source: trunk/minix/lib/i386/em/em_exg.s@ 20

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

Minix 3.1.2a

File size: 270 bytes
Line 
1.sect .text; .sect .rom; .sect .data; .sect .bss
2.define .exg
3
4 ! #bytes in ecx
5.sect .text
6.exg:
7 push edi
8 mov edi,esp
9 add edi,8
10 mov ebx,edi
11 add ebx,ecx
12 sar ecx,2
131:
14 mov eax,(ebx)
15 xchg eax,(edi)
16 mov (ebx),eax
17 add edi,4
18 add ebx,4
19 loop 1b
202:
21 pop edi
22 ret
Note: See TracBrowser for help on using the repository browser.