Line | |
---|
1 | .sect .text; .sect .rom; .sect .data; .sect .bss
|
---|
2 | .sect .text
|
---|
3 | .define .sar4
|
---|
4 |
|
---|
5 | .sar4:
|
---|
6 | ! ebx, descriptor address
|
---|
7 | ! eax, index
|
---|
8 | sub eax,(ebx)
|
---|
9 | mov ecx,8(ebx)
|
---|
10 | imul ecx
|
---|
11 | pop ebx
|
---|
12 | pop edx ! base address
|
---|
13 | add edx,eax
|
---|
14 | sar ecx,1
|
---|
15 | jnb 1f
|
---|
16 | pop eax
|
---|
17 | movb (edx),al
|
---|
18 | jmp ebx
|
---|
19 | 1:
|
---|
20 | sar ecx,1
|
---|
21 | jnb 1f
|
---|
22 | pop eax
|
---|
23 | o16 mov (edx),ax
|
---|
24 | jmp ebx
|
---|
25 | 1:
|
---|
26 | xchg edi,edx ! edi = base address, edx is saved edi
|
---|
27 | mov eax,esi
|
---|
28 | mov esi,esp
|
---|
29 | rep movs
|
---|
30 | mov esp,esi
|
---|
31 | mov esi,eax
|
---|
32 | mov edi,edx
|
---|
33 | jmp ebx
|
---|
Note:
See
TracBrowser
for help on using the repository browser.