From 0fff5cc80fb7db0935924b432f11f24902967ff7 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 20 May 1987 14:11:22 +0000 Subject: [PATCH] transfer made to work on pdp/11 EM intrpreter --- lang/m2/libm2/transfer.e | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/lang/m2/libm2/transfer.e b/lang/m2/libm2/transfer.e index 2ac9ee3e6..08a90e6a1 100644 --- a/lang/m2/libm2/transfer.e +++ b/lang/m2/libm2/transfer.e @@ -58,7 +58,7 @@ cal $_ChkSize asp EM_WSIZE lfr EM_WSIZE - sil EM_WSIZE ; store size in area (indicated by A) + sil EM_PSIZE ; store size in area (indicated by A) lal EM_PSIZE loi EM_PSIZE ; address of area (A) lal 0 @@ -117,6 +117,18 @@ _target loi EM_PSIZE adp -2*EM_PSIZE sti EM_PSIZE ; save it + lor 1 ; load SP + lae _CurrentProcess + loi EM_PSIZE + adp -EM_PSIZE + sti EM_PSIZE ; save it + ; Now, we must find a stack we can temporarily use. + ; Just take the one from the main program. + lae _MainProcess + loi EM_PSIZE + adp -EM_PSIZE + loi EM_PSIZE + str 1 ; temporary stackpointer lae _CurrentProcess loi EM_PSIZE lae _MainProcess @@ -143,21 +155,8 @@ _target adp -3*EM_PSIZE-EM_WSIZE loi EM_WSIZE bls EM_WSIZE ; copy -2 - lor 1 ; load SP - lae _CurrentProcess - loi EM_PSIZE - adp -EM_PSIZE - sti EM_PSIZE ; save it - - ; Now, we must find a stack we can temporarily use. - ; Just take the one from the main program. - lae _MainProcess - loi EM_PSIZE - adp -EM_PSIZE - loi EM_PSIZE - str 1 ; temporary stackpointer +2 lae _target loi EM_PSIZE dup EM_PSIZE @@ -211,14 +210,14 @@ _target 4 lae _target loi EM_PSIZE - adp -EM_PSIZE + adp -2*EM_PSIZE loi EM_PSIZE - str 1 ; restore SP + str 0 ; restore LB lae _target loi EM_PSIZE - adp -2*EM_PSIZE + adp -EM_PSIZE loi EM_PSIZE - str 0 ; restore LB + str 1 ; restore SP ret 0 end 0 -- 2.34.1