ack/mach/m68k2/libem/sts.s

27 lines
303 B
ArmAsm
Raw Normal View History

1984-12-14 15:41:14 +00:00
.define .sts
.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
move.l (sp)+,a0
cmp #1,d0
bne 1f
move.w (sp)+,d0
move.b d0,(a0)
bra 3f
1:
asr #1,d0
2:
move.w (sp)+,(a0)+
sub #1,d0
bgt 2b
3:
jmp (a1)