ack/mach/i386/libem/exg.s

23 lines
270 B
ArmAsm
Raw Permalink Normal View History

1989-01-19 16:43:32 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.define .exg
! #bytes in ecx
.sect .text
.exg:
push edi
mov edi,esp
1989-01-19 16:43:32 +00:00
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
1989-01-19 16:43:32 +00:00
loop 1b
2:
pop edi
ret