1985-02-07 22:06:32 +00:00
|
|
|
.define .los
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1985-02-07 22:06:32 +00:00
|
|
|
|
|
|
|
! d0 : # bytes
|
|
|
|
! a0 : source address
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
1985-02-07 22:06:32 +00:00
|
|
|
.los:
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l (sp)+,a1
|
1985-02-07 22:06:32 +00:00
|
|
|
move.l (sp)+,d0
|
|
|
|
move.l (sp)+,a0
|
|
|
|
cmp.l #1,d0
|
|
|
|
bne 1f
|
|
|
|
clr.l d0 !1 byte
|
|
|
|
move.b (a0),d0
|
|
|
|
move.l d0,-(sp)
|
|
|
|
bra 3f
|
|
|
|
1:
|
|
|
|
cmp.l #2,d0
|
|
|
|
bne 2f
|
|
|
|
clr.l d0 !2 bytes
|
|
|
|
add.l #2,a0
|
|
|
|
move.w (a0),d0
|
|
|
|
move.l d0,-(sp)
|
|
|
|
bra 3f
|
|
|
|
2:
|
|
|
|
add.l d0,a0 !>=4 bytes
|
|
|
|
asr.l #2,d0
|
|
|
|
|
|
|
|
4: move.l -(a0),-(sp)
|
|
|
|
sub.l #1,d0
|
|
|
|
bgt 4b
|
|
|
|
3:
|
1986-07-22 13:37:16 +00:00
|
|
|
jmp (a1)
|
1985-02-07 22:06:32 +00:00
|
|
|
.align 2
|