ack/mach/m68k2/libem/sts.s

34 lines
385 B
ArmAsm
Raw Permalink Normal View History

1984-12-14 15:41:14 +00:00
.define .sts
1991-04-19 13:09:30 +00:00
.define .sts4
.sect .text
.sect .rom
.sect .data
.sect .bss
1984-12-14 15:41:14 +00:00
! d0 : # bytes
! a0 : destination address
.sect .text
1984-12-14 15:41:14 +00:00
.sts:
move.l (sp)+,a1
move.w (sp)+,d0
1991-04-19 13:09:30 +00:00
ext.l d0
9:
1984-12-14 15:41:14 +00:00
move.l (sp)+,a0
1991-04-19 13:09:30 +00:00
cmp.l #1,d0
1984-12-14 15:41:14 +00:00
bne 1f
move.w (sp)+,d0
move.b d0,(a0)
bra 3f
1:
1991-04-19 13:09:30 +00:00
asr.l #1,d0
1984-12-14 15:41:14 +00:00
2:
move.w (sp)+,(a0)+
1991-04-19 13:09:30 +00:00
sub.l #1,d0
1984-12-14 15:41:14 +00:00
bgt 2b
3:
jmp (a1)
1991-04-19 13:09:30 +00:00
.sts4:
move.l (sp)+,a1
move.l (sp)+,d0
bra 9b