minix/lib/i386/em/em_exg.s

23 lines
270 B
ArmAsm
Raw Normal View History

2005-04-21 16:53:53 +02:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.define .exg
! #bytes in ecx
.sect .text
.exg:
push edi
mov edi,esp
add edi,8
mov ebx,edi
add ebx,ecx
sar ecx,2
1:
mov eax,(ebx)
xchg eax,(edi)
mov (ebx),eax
add edi,4
add ebx,4
loop 1b
2:
pop edi
ret