source: trunk/minix/lib/i386/em/em_sar4.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: 528 bytes
Line 
1.sect .text; .sect .rom; .sect .data; .sect .bss
2.sect .text
3.define .sar4
4
5.sar4:
6 ! ebx, descriptor address
7 ! eax, index
8 sub eax,(ebx)
9 mov ecx,8(ebx)
10 imul ecx
11 pop ebx
12 pop edx ! base address
13 add edx,eax
14 sar ecx,1
15 jnb 1f
16 pop eax
17 movb (edx),al
18 jmp ebx
191:
20 sar ecx,1
21 jnb 1f
22 pop eax
23 o16 mov (edx),ax
24 jmp ebx
251:
26 xchg edi,edx ! edi = base address, edx is saved edi
27 mov eax,esi
28 mov esi,esp
29 rep movs
30 mov esp,esi
31 mov esi,eax
32 mov edi,edx
33 jmp ebx
Note: See TracBrowser for help on using the repository browser.