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
|
|
|
|
mov di,sp
|
|
|
|
sub di,cx
|
|
|
|
1:
|
|
|
|
push dx
|
|
|
|
cmp sp,di
|
|
|
|
ja 1b
|
|
|
|
!endif
|
|
|
|
mov di,8
|
|
|
|
div di
|
|
|
|
cmp ax,cx
|
|
|
|
jae 2f
|
|
|
|
mov di,sp
|
|
|
|
add di,ax
|
|
|
|
mov si,dx
|
|
|
|
movb dl,bits(si)
|
|
|
|
orb (di),dl
|
|
|
|
jmp bx
|
|
|
|
2:
|
1987-01-08 10:13:48 +00:00
|
|
|
.extern ESET
|
|
|
|
.extern .trp
|
1985-02-07 15:33:13 +00:00
|
|
|
push bx
|
|
|
|
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
|