source:
trunk/minix/lib/i86/em/em_inn.s@
20
Last change on this file since 20 was 9, checked in by , 14 years ago | |
---|---|
File size: 357 bytes |
Line | |
---|---|
1 | .define .inn |
2 | .text |
3 | |
4 | ! #bytes in cx |
5 | ! bit # in ax |
6 | .inn: |
7 | xor dx,dx |
8 | mov bx,#8 |
9 | div bx |
10 | mov bx,sp |
11 | add bx,#2 |
12 | add bx,ax |
13 | cmp ax,cx |
14 | jae 1f |
15 | movb al,(bx) |
16 | mov bx,dx |
17 | testb al,bits(bx) |
18 | jz 1f |
19 | mov ax,#1 |
20 | jmp 2f |
21 | 1: |
22 | xor ax,ax |
23 | 2: |
24 | pop bx |
25 | add sp,cx |
26 | ! ax is result |
27 | jmp (bx) |
28 | |
29 | .data |
30 | bits: |
31 | .data1 1,2,4,8,16,32,64,128 |
Note:
See TracBrowser
for help on using the repository browser.