ack/mach/m68k4/libem/inn.s

33 lines
535 B
ArmAsm
Raw Normal View History

1987-03-27 09:28:16 +00:00
.define .inn
.sect .text
.sect .rom
.sect .data
.sect .bss
1987-03-27 09:28:16 +00:00
.sect .text
1985-02-07 22:06:32 +00:00
1987-03-27 09:28:16 +00:00
.inn: ! d0 bitnumber
! d1 setsize in bytes
! on exit: 0 or 1 in d0
1985-02-07 22:06:32 +00:00
1987-03-27 09:28:16 +00:00
move.l d2, -(sp)
move.l d0, d2
asr.l #3, d2 ! offset .sect from sp in bytes
eor.l #3, d2 ! longs are stored in high-to-low order
cmp.l d1, d2
bge 1f ! bitnumber too large
btst d0, 8(sp, d2.l)
beq 2f
move.l #1, d0
bra 3f
1985-02-07 22:06:32 +00:00
1:
1987-03-27 09:28:16 +00:00
move.l #ESET, -(sp)
jsr .trp
1985-02-07 22:06:32 +00:00
2:
1987-03-27 09:28:16 +00:00
clr.l d0
3:
move.l (sp)+, d2
move.l (sp)+, a0 ! return address
add.l d1, sp ! pop bitset
jmp (a0) ! return
.align 2