the current code I'm using to jump is:00017075992e[CPU0 ] read_virtual_word_32(): segment limit violation
00017076000p[WGUI ] >>PANIC<< POWER button turned off.
00017076000i[CPU0 ] CPU is in real mode (active)
00017076000i[CPU0 ] CS.mode = 16 bit
00017076000i[CPU0 ] SS.mode = 16 bit
00017076000i[CPU0 ] EFER = 0x00000000
00017076000i[CPU0 ] | EAX=00004201 EBX=00004e00 ECX=0009ffff EDX=00000100
00017076000i[CPU0 ] | ESP=0000ffff EBP=00000000 ESI=000e01dd EDI=00000005
00017076000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df IF tf sf ZF af PF cf
00017076000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00017076000i[CPU0 ] | CS:0be0( 0004| 0| 0) 0000be00 0000ffff 0 0
00017076000i[CPU0 ] | DS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00017076000i[CPU0 ] | SS:0000( 0005| 0| 0) 00000000 0000ffff 0 0
00017076000i[CPU0 ] | ES:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00017076000i[CPU0 ] | FS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00017076000i[CPU0 ] | GS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00017076000i[CPU0 ] | EIP=00000403 (00000403)
00017076000i[CPU0 ] | CR0=0x60000010 CR2=0x00000000
00017076000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00017076000i[CPU0 ] 0x0000000000000403>> pop ax : 58
Code: Select all
push WORD 0x0BE0
push WORD 0x0000
retf
My stage two:
Code: Select all
bits 16
org 0xBE00
jmp main
[.......]
main:
cli ; clear interrupts
xor ax, ax ; null segments
mov ds, ax
mov es, ax
mov ax, 0x0
mov ss, ax
mov sp, 0xFFFF
sti
[.......]
If you need anything else just ask.