Frans doodemans version
This commit is contained in:
parent
2febff1a79
commit
3177072e2f
1 changed files with 22 additions and 25 deletions
|
@ -1,33 +1,30 @@
|
||||||
.define .set
|
.define .set
|
||||||
.sect .text
|
.sect .text
|
||||||
.sect .rom
|
.sect .rom
|
||||||
.sect .data
|
.sect .data
|
||||||
.sect .bss
|
.sect .bss
|
||||||
|
|
||||||
! d0 : setsize in bytes
|
.sect .text
|
||||||
! d1 : bitnumber
|
.set: ! d0 bitnumber
|
||||||
.sect .text
|
! d1 setsize in bytes
|
||||||
.set:
|
|
||||||
move.l (sp)+,a0
|
move.l (sp)+,a0
|
||||||
move.l (sp)+,d1
|
move.l d1, d2
|
||||||
move.l d0,d2
|
asr.l #2, d2
|
||||||
asr.l #2,d2
|
sub.l #1, d2
|
||||||
1:
|
1:
|
||||||
clr.l -(sp) !create empty set
|
clr.l -(sp)
|
||||||
sub.l #1,d2
|
dbf d2, 1b
|
||||||
bgt 1b
|
|
||||||
move.l sp,a1 ! set base
|
move.l d0, d2
|
||||||
move.l d1,d2
|
asr.l #3, d2 ! offset .sect from sp in bytes
|
||||||
asr.l #3,d2
|
eor.l #3, d2 ! longs are stored in high-to-low order
|
||||||
cmp.l d0,d2
|
cmp.l d1, d2
|
||||||
bcs 1f
|
blt 2f
|
||||||
move.w #ESET,-(sp)
|
move.l a0, -(sp)
|
||||||
jsr .trp
|
move.l #ESET, -(sp) ! bitnumber too large
|
||||||
1:
|
jmp .trp
|
||||||
bclr #0,d2
|
2:
|
||||||
bclr #1,d2
|
bset d0, 0(sp, d2.l)
|
||||||
add.l d2,a1
|
|
||||||
clr.l d2
|
|
||||||
bset d1,d2
|
|
||||||
move.l d2,(a1)
|
|
||||||
jmp (a0)
|
jmp (a0)
|
||||||
|
.align 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue