ack/mach/pdp/libem/cii.s

24 lines
353 B
ArmAsm
Raw Normal View History

1987-05-15 09:11:10 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.sect .text
.define cii~
! $Header$
1984-07-19 12:51:00 +00:00
1987-05-15 09:11:10 +00:00
!convert int to int
! 1 byte -> ? : sign extension
1984-07-19 12:51:00 +00:00
cii~:
mov (sp)+,r3
1984-07-19 12:51:00 +00:00
mov (sp)+,r0
sub (sp)+,r0
ble 1f
asr r0
bcc 2f
movb (sp),r1
mov r1,(sp)
2: tst r0
beq 3f
tst (sp)
4: sxt -(sp)
sob r0,4b
1987-05-15 09:11:10 +00:00
1: sub r0,sp ! if out of sob loop r0==0
3: jmp (r3)