repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
. service tells you which device it couldn't stat
[minix3.git]
/
lib
/
i386
/
em
/
em_inn.s
blob
95d8ac01b2029bb619288c60dcb9fdcba840b053
1
.sect .text; .sect .rom; .sect .data; .sect .bss
2
.sect .text
3
.define .inn
4
5
!
#bytes in ecx
6
!
bit
# in eax
7
.inn:
8
xor
edx
,
edx
9
mov ebx
,
8
10
div
ebx
11
mov ebx
,
esp
12
add
ebx
,
4
13
add
ebx
,
eax
14
cmp
eax
,
ecx
15
jae
1
f
16
movb al
,(
ebx
)
17
mov ebx
,
edx
18
testb al
,
bits
(
ebx
)
19
jz
1
f
20
mov eax
,
1
21
jmp
2
f
22
1
:
23
xor
eax
,
eax
24
2
:
25
pop ebx
26
add
esp
,
ecx
27
!
eax is result
28
jmp ebx
29
30
.sect .rom
31
bits
:
32
.data1 1,2,4,8,16,32,64,128