source: trunk/minix/lib/i86/em/em_sar2.s@ 9

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

Minix 3.1.2a

File size: 419 bytes
RevLine 
[9]1.define .sar2
2.text
3
4.sar2:
5 ! bx, descriptor address
6 ! ax, index
7 pop cx
8 pop dx ! base address
9 push cx
10 xchg di,dx ! di = base address, dx is saved di
11 sub ax,(bx)
12 mov cx,4(bx)
13 push dx
14 imul cx
15 pop dx
16 add di,ax
17 sar cx,#1
18 jnb 1f
19 pop bx
20 pop ax
21 stosb
22 mov di,dx
23 jmp (bx)
241:
25 pop bx
26 mov ax,si
27 mov si,sp
28 rep
29 mov
30 mov sp,si
31 mov si,ax
32 mov di,dx
33 jmp (bx)
Note: See TracBrowser for help on using the repository browser.