ack/mach/mantra/int/mloop2

495 lines
7.7 KiB
Plaintext
Raw Normal View History

1986-12-09 11:13:14 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1984-07-23 11:49:00 +00:00
!--------------------------------------------------------------------------
! Load constant , load local , store local
1984-07-23 11:49:00 +00:00
!--------------------------------------------------------------------------
loc_0: mov d6,-(sp)
jmp (a4)
loc_1: loc_2: loc_3: loc_4: loc_5: loc_6: loc_7: loc_8:
loc_9: loc_10: loc_11: loc_12: loc_13: loc_14: loc_15: loc_16:
loc_17: loc_18: loc_19: loc_20: loc_21: loc_22: loc_23: loc_24:
loc_25: loc_26: loc_27: loc_28: loc_29: loc_30: loc_31: loc_32:
loc_33:
asr.w #2,d0 !make the multiplication undone
mov d0,-(sp)
jmp (a4)
loc__1:
mov #-1,-(sp)
jmp (a4)
loc_s0: clr.w d0
move.b (a3)+,d0
mov d0,-(sp)
jmp (a4)
loc_s_1: mov #-1,d0
move.b (a3)+,d0
mov d0,-(sp)
jmp (a4)
lpi_l:
adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
move.l d0,-(sp)
jmp (a4)
lpi_q: jmp (a4)
loc_q: jmp (a4)
#ifndef lword
bra e_illins
#endif
loc_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
mov d0,-(sp)
jmp (a4)
ldc_0: cl -(sp)
cl -(sp)
jmp (a4)
ldc_l:
adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0 !ext works only on d register
4: move.l d0,-(sp)
1984-07-23 11:49:00 +00:00
#ifdef lword
bmi 0f
clr.l -(sp)
bra 1f
0: move.l #-1,-(sp)
1:
#endif
jmp (a4)
ldc_q:
#ifdef lword
tst.l (sp)
bmi 0f
1984-07-23 11:49:00 +00:00
clr.l -(sp)
bra 1f
0: move.l #-1,-(sp)
1:
1984-07-23 11:49:00 +00:00
#endif
jmp (a4)
!-------------------------------------------------------------------------
! offsets should be adapted for wordsize 4 .Use identifiers
! l3 to l_8 for the offsets in lol_3W to lol__8 . Use the
! preprocessor for conditional definitions .
lol_0: mov l0(a2),-(sp) ; jmp (a4)
lol_1W: mov l1(a2),-(sp) ; jmp (a4)
lol_2W: mov l2(a2),-(sp) ; jmp (a4)
lol_3W: mov l3(a2),-(sp) ; jmp (a4)
lol__1W: mov l_1(a2),-(sp) ; jmp (a4)
lol__2W: mov l_2(a2),-(sp) ; jmp (a4)
lol__3W: mov l_3(a2),-(sp) ; jmp (a4)
lol__4W: mov l_4(a2),-(sp) ; jmp (a4)
lol__5W: mov l_5(a2),-(sp) ; jmp (a4)
lol__6W: mov l_6(a2),-(sp) ; jmp (a4)
lol__7W: mov l_7(a2),-(sp) ; jmp (a4)
lol__8W: mov l_8(a2),-(sp) ; jmp (a4)
lol_w0: clr.w d0
move.b (a3)+,d0
asl.w wmu,d0
mov l0(a2,d0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
lol_w_1: move.l #-1,d0
move.b (a3)+,d0
asl.w wmu,d0
1984-07-23 11:49:00 +00:00
mov 0(a2,d0),-(sp)
jmp (a4)
lol_pw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
5: asl.l wmu,d0
add.l a2,d0
move.l d0,a0
#if test
locptr
7: bra e_badptr
6:
#endif
mov l0(a0),-(sp)
jmp (a4)
1984-07-23 11:49:00 +00:00
lol_nw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
2: asl.l wmu,d0
add.l a2,d0
move.l d0,a0
#if test
locptr
7: bra e_badptr
6:
#endif
mov (a0),-(sp)
jmp (a4)
1984-07-23 11:49:00 +00:00
lol_qnw: move.l (sp)+,d0
bra 2b
lol_qpw: move.l (sp)+,d0
bra 5b
!--------------------------------------------------------------------------
ldl_0: mov l1(a2),-(sp) !offset code
mov l0(a2),-(sp) !offset code
jmp (a4)
ldl_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 word(a0),-(sp)
mov (a0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
ldl_pw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
5: asl.l wmu,d0
add.l a2,d0
move.l d0,a0
#if test
locptr
7: bra e_badptr
6:
#endif
mov l1(a0),-(sp)
mov l0(a0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
ldl_nw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
bra 2b
ldl_qpw: move.l (sp)+,d0
bra 5b
ldl_qnw: move.l (sp)+,d0
bra 2b
!-------------------------------------------------------------------------
loe_lw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
bra 1f
loe_qw: move.l (sp)+,d0
bra 1f
loe_w0: loe_w1: loe_w2: loe_w3: loe_w4:
sub.w #624,d0
asl.w #6,d0
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 (a0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
lde_lw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
bra 1f
lde_qw: move.l (sp)+,d0
bra 1f
lde_w0: clr.w d0
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 word(a0),-(sp)
mov (a0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
!------------------------------------------------------------------------------
lil_0: move.l l0(a2),a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
mov (a0),-(sp)
jmp (a4)
lil_1W: move.l l1(a2),a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
mov (a0),-(sp)
jmp (a4)
lil_pw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
bra 1f
lil_qpw: move.l (sp)+,d0
bra 1f
lil_w0: clr.w 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
move.l l0(a0),a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
mov (a0),-(sp)
jmp (a4)
lil_nw: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
bra 1f
lil_qnw: move.l (sp)+,d0
bra 1f
lil_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
move.l (a0),a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
mov (a0),-(sp)
jmp (a4)
!---------------------------------------------------------------------------
lof_s0: move.l d6,d0
move.b (a3)+,d0
bra 1f
lof_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
bra 1f
lof_q: move.l (sp)+,d0
bra 1f
lof_1W: move.l wrd,d0
1984-07-23 11:49:00 +00:00
1: move.l (sp)+,a0
add.l d0,a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
mov (a0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
lof_2W: move.l wrd+word,d0 ; bra 1b
lof_3W: move.l wrd+word+word,d0 ; bra 1b
lof_4W: move.l wrd+word+word+word,d0 ; bra 1b
1984-07-23 11:49:00 +00:00
ldf_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
2: move.l (sp)+,a0
add.l d0,a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
mov word(a0),-(sp)
mov (a0),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
ldf_q: move.l (sp)+,d0
bra 2b
!-------------------------------------------------------------------------
lal_p: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
bra 1f
lal_qp: move.l (sp)+,d0
1: add.l #0+l0,d0
bra 4f
lal_0: pea l0(a2)
1984-07-23 11:49:00 +00:00
jmp (a4)
lal_w0: clr.w d0
move.b (a3)+,d0
asl.l wmu,d0
add.l #0+l0,d0
1984-07-23 11:49:00 +00:00
bra 3f
lal_n: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
ext.l d0
bra 4f
1984-07-23 11:49:00 +00:00
lal_qn: move.l (sp)+,d0
4: add.l a2,d0
move.l d0,-(sp)
jmp (a4)
1984-07-23 11:49:00 +00:00
lal__1: move.l #-1,d0
3: pea 0(a2,d0)
jmp (a4)
lal_w_1: move.l #-1,d0
2: move.b (a3)+,d0
asl.l wmu,d0
bra 3b
lal_w_2: move.l #-512,d0
bra 2b
1984-07-23 11:49:00 +00:00
lae_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1: add.l a6,d0
move.l d0,-(sp)
jmp (a4)
1984-07-23 11:49:00 +00:00
lae_q: move.l (sp)+,d0
bra 1b
1984-07-23 11:49:00 +00:00
lae_w0: lae_w1: lae_w2: lae_w3: lae_w4:
lae_w5: lae_w6:
sub.w #484,d0
asl.w #6,d0
move.b (a3)+,d0
asl.w wmu,d0
pea 0(a6,d0)
1984-07-23 11:49:00 +00:00
jmp (a4)
!---------------------------------------------------------------------------
lxl_1: move.l l0(a2),-(sp)
1984-07-23 11:49:00 +00:00
jmp (a4)
lxl_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
beq 5f
bgt 1f
blt e_oddz
1: sub.l #1,d0
bra 2f
lxl_2: move.l #1,d0
1984-07-23 11:49:00 +00:00
2: move.l a2,a0
3: move.l l0(a0),a0
#if test
locptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
dbra d0,3b
move.l a0,-(sp)
jmp (a4)
5: move.l a2,-(sp)
jmp (a4)
lxa_1: move.l #0,d0
bra 3f
lxa_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
bgt 1f
blt e_oddz
pea l0(a2)
1984-07-23 11:49:00 +00:00
jmp (a4)
1: sub.l #1,d0
3: move.l a2,a0
2: move.l l0(a0),a0
#if test
locptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
dbra d0,2b
pea l0(a0)
1984-07-23 11:49:00 +00:00
jmp (a4)
!-----------------------------------------------------------------------
1988-06-06 10:30:57 +00:00
loi_q: move.l (sp)+,d1; bra 8f
1984-07-23 11:49:00 +00:00
loi_l: adroff
clr.l d1
1987-03-31 09:23:20 +00:00
move.w (a5),d1
1984-07-23 11:49:00 +00:00
bra 8f
loi_s0: move.l #0,d1
1984-07-23 11:49:00 +00:00
move.b (a3)+,d1
1988-06-06 10:30:57 +00:00
8: cmp.l #1,d1
1984-07-23 11:49:00 +00:00
beq loi_1
1988-06-06 10:30:57 +00:00
cmp.l #2,d1
1984-07-23 11:49:00 +00:00
beq 2f
1988-06-06 10:30:57 +00:00
move.l d1,d0
1984-07-23 11:49:00 +00:00
move.w d7,d2
1988-06-06 10:30:57 +00:00
3: asr.l #1,d0 ; dbcs d2,3b
1984-07-23 11:49:00 +00:00
bcs e_oddz
bra 5f
loi_1W: loi_2W: loi_3W: loi_4W:
asr.w #2,d0
sub.w #168,d0
move.l d0,d1
asl.w wmu,d1
5: move.l (sp)+,a0
add.l d1,a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1988-06-06 10:30:57 +00:00
sub.l #1,d0
1984-07-23 11:49:00 +00:00
1: mov -(a0),-(sp)
dbra d0,1b
jmp (a4)
2: move.l (sp)+,a0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
move.w (a0),d0
mov d0,-(sp)
jmp (a4)
loi_1: move.l (sp)+,a0
move.w d6,d0
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
1984-07-23 11:49:00 +00:00
move.b (a0),d0
mov d0,-(sp)
jmp (a4)
los_z: mov (sp)+,d0
bra 0f
los_l: adroff
1987-03-31 09:23:20 +00:00
move.w (a5),d0
1984-07-23 11:49:00 +00:00
0: checksize
2: move.l #0,d1 ; move.w (sp)+,d1 ; bra 8b
4: move.l (sp)+,d1 ; bra 8b