ack/mach/i86/libem/set.s

43 lines
565 B
ArmAsm
Raw Normal View History

1987-01-08 10:13:48 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
1985-02-07 15:33:13 +00:00
.define .set
! #bytes in cx
! bit # in ax
.set:
pop bx ! return address
xor dx,dx
!ifdef create set
sub sp,cx
push bx
push di
mov bx,sp
xor di,di
sar cx,1
1985-02-07 15:33:13 +00:00
1:
1987-06-09 15:15:18 +00:00
mov 4(bx)(di),dx
add di,2
loop 1b
1985-02-07 15:33:13 +00:00
!endif
mov bx,8
div bx
cmp ax,di
1985-02-07 15:33:13 +00:00
jae 2f
mov di,dx
movb dl,bits(di)
1985-02-07 15:33:13 +00:00
mov di,sp
add di,ax
orb 4(di),dl
pop di
ret
1985-02-07 15:33:13 +00:00
2:
1987-01-08 10:13:48 +00:00
.extern ESET
.extern .trp
pop di
1985-02-07 15:33:13 +00:00
mov ax,ESET
jmp .trp
1987-01-08 10:13:48 +00:00
.sect .data
1985-02-07 15:33:13 +00:00
bits:
1987-01-08 10:13:48 +00:00
.data1 1,2,4,8,16,32,64,128