1985-02-07 22:06:32 +00:00
|
|
|
.define .cii
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1985-02-07 22:06:32 +00:00
|
|
|
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
1985-02-07 22:06:32 +00:00
|
|
|
.cii:
|
|
|
|
move.l (sp)+,a0 ! return address
|
1987-03-27 09:21:14 +00:00
|
|
|
move.l (sp)+,d0 ! destination size
|
|
|
|
move.l (sp)+,d1
|
|
|
|
move.l (sp),d2
|
|
|
|
cmp.l #1,d1
|
|
|
|
bne 1f
|
|
|
|
move.l #2,d1
|
|
|
|
ext.w d2
|
|
|
|
1:
|
|
|
|
cmp.l #2,d1
|
|
|
|
bne 1f
|
|
|
|
move.l #4,d1
|
|
|
|
ext.l d2
|
|
|
|
1:
|
|
|
|
move.l d2,(sp)
|
|
|
|
sub.l d1,d0
|
1985-02-07 22:06:32 +00:00
|
|
|
bgt 1f
|
1987-03-27 09:21:14 +00:00
|
|
|
sub.l d0,sp ! pop extra bytes
|
1985-02-07 22:06:32 +00:00
|
|
|
bra 3f
|
|
|
|
1:
|
1987-03-27 09:21:14 +00:00
|
|
|
clr.l d1
|
|
|
|
tst.l d2
|
|
|
|
bge 1f
|
|
|
|
move.l #-1,d1
|
|
|
|
1:
|
|
|
|
asr #2,d0
|
1985-02-07 22:06:32 +00:00
|
|
|
2:
|
1987-03-27 09:21:14 +00:00
|
|
|
move.l d1,-(sp)
|
1985-02-07 22:06:32 +00:00
|
|
|
dbf d0,2b
|
|
|
|
3:
|
|
|
|
move.l a0,-(sp)
|
|
|
|
rts
|
1986-07-22 13:37:16 +00:00
|
|
|
|
1985-02-07 22:06:32 +00:00
|
|
|
.align 2
|