.sect .text .sect .rom .sect .data .sect .bss .sect .text !--------------------------------------------------------------------- ! STORE GROUP !--------------------------------------------------------------------- stl_pw: adroff move.w (a5),d0 3: asl.l wmu,d0 add.l a2,d0 move.l d0,a0 #if test locptr 7: bra e_badptr 6: #endif mov (sp)+,l0(a0) jmp (a4) stl_qpw: move.l (sp)+,d0 bra 3b stl_nw: adroff move.w (a5),d0 ext.l d0 bra 1f stl_qnw: move.l (sp)+,d0 bra 1f stl_w_1: move.l #-1,d0 move.b (a3)+,d0 1: asl.l wmu,d0 add.l a2,d0 move.l d0,a0 #if test locptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) jmp (a4) stl_0: mov (sp)+,l0(a2) ; jmp (a4) stl_1W: mov (sp)+,l1(a2) ; jmp (a4) stl__1W: mov (sp)+,l_1(a2) ; jmp (a4) stl__2W: mov (sp)+,l_2(a2) ; jmp (a4) stl__3W: mov (sp)+,l_3(a2) ; jmp (a4) stl__4W: mov (sp)+,l_4(a2) ; jmp (a4) stl__5W: mov (sp)+,l_5(a2) ; jmp (a4) sdl_w_1: move.l #-1,d0 move.b (a3)+,d0 2: asl.l wmu,d0 add.l a2,d0 move.l d0,a0 #if test locptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) mov (sp)+,word(a0) jmp (a4) sdl_nw: adroff move.w (a5),d0 ext.l d0 bra 2b sdl_qnw: move.l (sp)+,d0 bra 2b sdl_qpw: move.l (sp)+,d0 bra 4f sdl_pw: adroff move.w (a5),d0 4: asl.l wmu,d0 add.l a2,d0 move.l d0,a0 #if test locptr 7: bra e_badptr 6: #endif mov (sp)+,l0(a0) mov (sp)+,l1(a0) jmp (a4) !------------------------------------------------------------------------ sde_q: move.l (sp)+,d0 bra 1f sde_l: adroff move.w (a5),d0 1: add.l a6,d0 move.l d0,a0 #if test extptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) mov (sp)+,word(a0) jmp (a4) ste_qw: move.l (sp)+,d0 bra 1f ste_lw: adroff move.w (a5),d0 bra 1f ste_w2: move.w #512,d0 ; bra 0f ste_w1: move.w #256,d0 ; bra 0f ste_w0: clr.w d0 0: move.b (a3)+,d0 1: asl.l wmu,d0 add.l a6,d0 move.l d0,a0 #if test extptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) jmp (a4) !------------------------------------------------------------------------- stf_q: move.l (sp)+,a0 bra 0f stf_l: adroff move.l #0,a0 move.w (a5),a0 bra 0f stf_2W: move.l wrd+word,d0 ; move.l d0,a0 bra 0f stf_s0: clr.w d0 move.b (a3)+,d0 move.l d0,a0 bra 0f stf_1W: move.l wrd,d0 ; move.l d0,a0 0: add.l (sp)+,a0 #if test locptr heaptr extptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) jmp (a4) sdf_q: move.l (sp)+,a0 bra 1f sdf_l: adroff move.l d6,a0 move.w (a5),a0 1: add.l (sp)+,a0 #if test locptr heaptr extptr 7: bra e_badptr 6: #endif mov (sp)+,(a0)+ mov (sp)+,(a0) jmp (a4) !----------------------------------------------------------------------------- sil_w0: move.w d6,d0 move.b (a3)+,d0 5: asl.l wmu,d0 add.l a2,d0 move.l d0,a0 #if test locptr 7: bra e_badptr 6: #endif move.l l0(a0),a0 #if test locptr heaptr extptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) jmp (a4) sil_w_1: move.l #-1,d0 move.b (a3)+,d0 2: asl.l wmu,d0 add.l a2,d0 move.l d0,a0 #if test locptr 7: bra e_badptr 6: #endif move.l (a0),a0 #if test locptr heaptr extptr 7: bra e_badptr 6: #endif mov (sp)+,(a0) jmp (a4) sil_pw: adroff move.w (a5),d0 bra 5b sil_qpw: move.l (sp)+,d0 bra 5b sil_nw: adroff move.w (a5),d0 ext.l d0 bra 2b sil_qnw: move.l (sp)+,d0 bra 2b !---------------------------------------------------------------------------- sti_1: move.l (sp)+,a0 #if test locptr heaptr extptr 7: bra e_badptr 6: #endif move.b word-1(sp),(a0) add.l wrd,sp jmp (a4) sti_q: move.l (sp)+,d0; bra 0f sti_l: adroff ; move.w (a5),d0 ; bra 0f sti_s0: clr.w d0 ; move.b (a3)+,d0 0: asr.l #1,d0 ; bne 1f bcs sti_1 ; bra e_oddz 1: bcs e_oddz #ifdef lword asr.l #1,d0 ; bne 2f move.l (sp)+,a0; lea 2(sp),sp #if test locptr heaptr extptr 7: bra e_badptr 6: #endif move.w (sp)+,(a0); jmp (a4) 2: bcs e_oddz #endif sub.l #1,d0 ; bra 3f sti_1W: sti_2W: sti_3W: sti_4W: sub.w #876,d0 ; asr.w #2,d0 3: move.l (sp)+,a0 #if test locptr heaptr extptr 7: bra e_badptr 6: #endif 4: mov (sp)+,(a0)+ dbra d0,4b jmp (a4) sts_l: adroff ; move.w (a5),d0 6: checksize 4: move.l (sp)+,d0; bra 0b 2: move.w (sp)+,d0; bra 0b sts_z: mov (sp)+,d0 bra 6b !------------------------------------------------------------------------------ ! POINTER ARITHMETIC !------------------------------------------------------------------------------ adp_l: adroff ; move.w (a5),d0 ext.l d0 add.l d0,(sp); jmp (a4) adp_q: move.l (sp)+,d0 ; add.l d0,(sp) jmp (a4) adp_1: add.l #1,(sp); jmp (a4) adp_2: add.l #2,(sp); jmp (a4) adp_s0: move.l d6,d0 ; move.b (a3)+,d0 add.l d0,(sp); jmp (a4) adp_s_1: move.l #-1,d0 ; move.b (a3)+,d0 add.l d0,(sp) ; jmp (a4) ads_l: adroff ; move.w (a5),d0 bra 0f ads_z: mov (sp)+,d0 0: checksize 4: move.l (sp)+,d1 ; add.l d1,(sp) ; jmp (a4) 2: move.w (sp)+,d1 ; ext.l d1 add.l d1,(sp) ; jmp (a4) ads_1W: mov (sp)+,d0 extend d0 add.l d0,(sp); jmp (a4) sbs_l: adroff ; move.w (a5),d0 bra 0f sbs_z: mov (sp)+,d0 !d0 contains objectsize 0: checksize 4: move.l (sp)+,d1 ; sub.l d1,(sp) jmp (a4) 2: move.l (sp)+,d1 ; sub.l d1,(sp) clr.w (sp)+ ; jmp (a4)