git-svn-id: branches/z80@45095 -
@@ -16,11 +16,49 @@
function fpc_setjmp(var S : jmp_buf) : shortint;assembler;[Public, alias : 'FPC_SETJMP'];nostackframe;compilerproc;
asm
+ push ix
+ ld ix, 0
+ add ix,sp
+
+ ld l, (ix+4) { (S) }
+ ld h, (ix+5) { (S+1) }
+ ld iy, 0
+ add iy, sp
+ push iy
+ pop bc
+ ld (hl), c
+ inc hl
+ ld (hl), b
+ ld l, 0
+ pop ix
end;
-procedure fpc_longjmp(var S : jmp_buf;value : shortint);assembler;[Public, alias : 'FPC_LONGJMP'];compilerproc;
+procedure fpc_longjmp(var S : jmp_buf;value : shortint);assembler;[Public, alias : 'FPC_LONGJMP'];nostackframe;compilerproc;
+ add ix, sp
+ ld d, (ix+6) { (value) }
+ ld c, (hl)
+ ld b, (hl)
+ push bc
+ pop iy
+ ld sp, iy
+ ld l, d
@@ -16,7 +16,8 @@
type
jmp_buf = packed record
- f,a,b,c,e,d,l,h,ixlo,ixhi,iylo,iyhi,splo,sphi,pclo,pchi : byte;
+ sp: word;
+{ f,a,b,c,e,d,l,h,ixlo,ixhi,iylo,iyhi,splo,sphi,pclo,pchi : byte;}
pjmp_buf = ^jmp_buf;