Adding upstream version 4.02+dfsg.
[syslinux-debian/hramrach.git] / com32 / modules / stubs / swapstub.asm
blobb670ce4e62d21bbd2bb79d618b87b07bfbe930c2
1 bits 16
2 swap:
3 push bx
4 movzx bx,dl
5 mov dl,[cs:bx+(table-$$)]
6 pop bx
7 .jmp: jmp 0:0
8 nop
9 nop
10 install:
11 ;; DS = CS, ES = 0
12 mov edi,[es:si+4*0x13]
13 mov [swap.jmp+1],edi
14 mov di,[es:0x413]
15 dec di
16 mov [es:0x413],di
17 shl edi,16+6
18 mov [es:si+4*0x13],edi
19 shr edi,16
20 mov es,di
21 xor di,di
22 rep movsd
23 mov si,0
24 mov di,0
25 mov ds,si
26 mov es,di
27 mov ecx,0
28 mov esi,0
29 mov edi,0
30 jmp 0:0
32 align 16
33 table: