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
|
1987-06-09 10:22:50 +00:00
|
|
|
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 10:35:22 +00:00
|
|
|
mov dx,4(bx)(di)
|
1987-06-09 10:22:50 +00:00
|
|
|
add di,2
|
|
|
|
loop 1b
|
1985-02-07 15:33:13 +00:00
|
|
|
!endif
|
1987-06-09 10:22:50 +00:00
|
|
|
mov bx,8
|
|
|
|
div bx
|
|
|
|
cmp ax,di
|
1985-02-07 15:33:13 +00:00
|
|
|
jae 2f
|
1987-06-09 10:22:50 +00:00
|
|
|
mov di,dx
|
|
|
|
movb dl,bits(di)
|
1985-02-07 15:33:13 +00:00
|
|
|
mov di,sp
|
|
|
|
add di,ax
|
1987-06-09 10:22:50 +00:00
|
|
|
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
|
1987-06-09 10:22:50 +00:00
|
|
|
pop di
|
1985-02-07 15:33:13 +00:00
|
|
|
mov ax,ESET
|
|
|
|
push ax
|
|
|
|
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
|