shrd ebx, ecx, 20\r
and ecx, 0xf\r
mov bx, cx\r
- mov [@jmp_addr], ebx\r
+ mov [@jmp_addr + 1], ebx\r
retf\r
+\r
+BITS 16\r
.0:\r
- DB 0xb8, 0x30, 0 ; mov ax, 30h as selector\r
- mov ds, ax\r
- mov es, ax\r
- mov fs, ax\r
- mov gs, ax\r
- mov ss, ax\r
+ mov ax, 0x30\r
+o32 mov ds, eax\r
+o32 mov es, eax\r
+o32 mov fs, eax\r
+o32 mov gs, eax\r
+o32 mov ss, eax\r
mov eax, cr0 ; Get control register 0\r
- DB 0x66\r
- DB 0x83, 0xe0, 0xfe ; and eax, 0fffffffeh ; Clear PE bit (bit #0)\r
- DB 0xf, 0x22, 0xc0 ; mov cr0, eax ; Activate real mode\r
- DB 0xea ; jmp far @jmp_addr\r
-@jmp_addr: DD 0\r
+ and eax, 0x0fffffffe ; Clear PE bit (bit #0)\r
+ mov cr0, eax ; Activate real mode\r
+@jmp_addr:\r
+ jmp 0x0:0x0\r
\r
global ASM_PFX(AsmTransferControl32)\r
ASM_PFX(AsmTransferControl32):\r