source:
trunk/minix/lib/i386/em/em_exg.s@
20
Last change on this file since 20 was 9, checked in by , 14 years ago | |
---|---|
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 |
13 | 1: |
14 | mov eax,(ebx) |
15 | xchg eax,(edi) |
16 | mov (ebx),eax |
17 | add edi,4 |
18 | add ebx,4 |
19 | loop 1b |
20 | 2: |
21 | pop edi |
22 | ret |
Note:
See TracBrowser
for help on using the repository browser.