Line | |
---|
1 | .sect .text; .sect .rom; .sect .data; .sect .bss
|
---|
2 | .sect .text
|
---|
3 | .define .loi
|
---|
4 | .define .los
|
---|
5 |
|
---|
6 | ! #bytes in ecx
|
---|
7 | ! address in ebx
|
---|
8 | ! save esi/edi. they might be register variables
|
---|
9 | .los:
|
---|
10 | pop edx
|
---|
11 | mov eax,ecx
|
---|
12 | sar ecx,1
|
---|
13 | jnb 1f
|
---|
14 | movsxb eax,(ebx)
|
---|
15 | push eax
|
---|
16 | jmp edx
|
---|
17 | 1:
|
---|
18 | sar ecx,1
|
---|
19 | jnb 1f
|
---|
20 | movsx eax,(ebx)
|
---|
21 | push eax
|
---|
22 | jmp edx
|
---|
23 | 1:
|
---|
24 | push edx
|
---|
25 | mov edx,esi
|
---|
26 | mov esi,ebx
|
---|
27 | pop ebx
|
---|
28 | sub esp,eax
|
---|
29 | jmp 1f
|
---|
30 |
|
---|
31 | .loi:
|
---|
32 | ! only called with size >= 4
|
---|
33 | mov edx,esi
|
---|
34 | mov esi,ebx
|
---|
35 | pop ebx
|
---|
36 | sub esp,ecx
|
---|
37 | sar ecx,2
|
---|
38 | 1:
|
---|
39 | mov eax,edi
|
---|
40 | mov edi,esp
|
---|
41 | rep movs
|
---|
42 | mov esi,edx
|
---|
43 | mov edi,eax
|
---|
44 | jmp ebx
|
---|
Note:
See
TracBrowser
for help on using the repository browser.