source: trunk/minix/lib/i86/em/em_set.s@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 515 bytes
RevLine 
[9]1.define .set
2.text
3
4 ! #bytes in cx
5 ! bit # in ax
6.set:
7 pop bx ! return address
8 xor dx,dx
9!ifdef create set
10 sub sp,cx
11 push bx
12 push di
13 mov bx,sp
14 xor di,di
15 sar cx,#1
161:
17 mov 4(bx)(di),dx
18 inc di
19 inc di
20 loop 1b
21!endif
22 mov bx,#8
23 div bx
24 cmp ax,di
25 jae 2f
26 mov di,dx
27 movb dl,bits(di)
28 mov di,sp
29 add di,ax
30 orb 4(di),dl
31 pop di
32 ret
332:
34ESET = 2
35.extern .error
36 pop di
37 mov ax,#ESET
38 call .error
39 ret
40
41 .data
42bits:
43 .data1 1,2,4,8,16,32,64,128
Note: See TracBrowser for help on using the repository browser.