. service tells you which device it couldn't stat
[minix3.git] / lib / i386 / em / em_set.s
blob3493eac528f165d50ed20f00f507407c4dc34ae1
1 .sect .text; .sect .rom; .sect .data; .sect .bss
2 .sect .text
3 .define .set
5 ! #bytes in ecx
6 ! bit # in eax
7 .set:
8 pop ebx ! return address
9 xor edx,edx
10 !ifdef create set
11 sub esp,ecx
12 push ebx
13 push edi
14 mov ebx,esp
15 xor edi,edi
16 sar ecx,2
18 mov 8(ebx)(edi),edx
19 add edi,4
20 loop 1b
21 !endif
22 mov ebx,8
23 div ebx
24 cmp eax,edi
25 jae 2f
26 mov edi,edx
27 movb dl,bits(edi)
28 mov edi,esp
29 add edi,eax
30 orb 8(edi),dl
31 pop edi
32 ret
34 .extern ESET
35 .extern .trp
36 pop edi
37 mov eax,ESET
38 jmp .trp
40 .sect .rom
41 bits:
42 .data1 1,2,4,8,16,32,64,128