1989-01-19 16:43:32 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
|
|
|
.sect .text
|
|
|
|
.define .set
|
|
|
|
|
|
|
|
! #bytes in ecx
|
|
|
|
! bit # in eax
|
|
|
|
.set:
|
|
|
|
pop ebx ! return address
|
|
|
|
xor edx,edx
|
|
|
|
!ifdef create set
|
|
|
|
sub esp,ecx
|
|
|
|
push ebx
|
|
|
|
push edi
|
|
|
|
mov ebx,esp
|
|
|
|
xor edi,edi
|
1989-10-10 11:38:18 +00:00
|
|
|
sar ecx,2
|
1989-01-19 16:43:32 +00:00
|
|
|
1:
|
1989-10-10 11:38:18 +00:00
|
|
|
mov 8(ebx)(edi),edx
|
1989-01-19 16:43:32 +00:00
|
|
|
add edi,4
|
|
|
|
loop 1b
|
|
|
|
!endif
|
|
|
|
mov ebx,8
|
|
|
|
div ebx
|
|
|
|
cmp eax,edi
|
|
|
|
jae 2f
|
|
|
|
mov edi,edx
|
|
|
|
movb dl,bits(edi)
|
|
|
|
mov edi,esp
|
|
|
|
add edi,eax
|
|
|
|
orb 8(edi),dl
|
|
|
|
pop edi
|
|
|
|
ret
|
|
|
|
2:
|
|
|
|
.extern ESET
|
|
|
|
.extern .trp
|
|
|
|
pop edi
|
|
|
|
mov eax,ESET
|
|
|
|
jmp .trp
|
|
|
|
|
|
|
|
.sect .rom
|
|
|
|
bits:
|
|
|
|
.data1 1,2,4,8,16,32,64,128
|