From: Alan Cox Date: Sun, 18 Feb 2018 14:02:20 +0000 (+0000) Subject: pdp11: setjmp and longjmp X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=648437e84c1f8a1cb5a9580269396fc2dbe575fb;p=FUZIX.git pdp11: setjmp and longjmp --- diff --git a/Library/libs/setjmp_pdp11.s b/Library/libs/setjmp_pdp11.s new file mode 100644 index 00000000..1728ab1d --- /dev/null +++ b/Library/libs/setjmp_pdp11.s @@ -0,0 +1,28 @@ + + .text + .even + .globl _setjmp + .globl _longjmp + + +_setjmp: + mov 2(sp),r0 + mov r2,(r0)+ + mov r3,(r0)+ + mov r4,(r0)+ + mov r5,(r0)+ + mov r6,(r0)+ + clr r0 + rts pc + +_longjmp: + mov 2(sp),r1 + mov 4(sp),r0 + beq r0_ok + inc r0 +r0_ok: mov (r1)+,r2 + mov (r1)+,r3 + mov (r1)+,r4 + mov (r1)+,r5 + mov (r1)+,r6 + rts pc