mov word [realmode_cx], cx\r
mov word [realmode_dx], dx\r
call disable_irqs\r
- jmp pword 0x18:do_16pmode-0x10000 ; must substract 0x10000 from\r
+ jmp pword 0x18:do_16pmode ; must substract 0x10000 from\r
; data addresses becasue of\r
; fasm strict "org" behavior\r
use16\r
and al, 0xFE\r
mov cr0, eax\r
\r
- jmp 0x1000:(do_realm-0x10000)\r
+ jmp 0x1000:(do_realm)\r
\r
do_realm:\r
mov ax, cs\r
mov gs, ax\r
mov ss, ax\r
\r
- lidt [ridtr - 0x10000] ; realmode/variables.inc\r
+ lidt [ridtr] ; realmode/variables.inc\r
sti\r
\r
- mov ax, word [realmode_ax - 0x10000]\r
- mov bx, word [realmode_bx - 0x10000]\r
- mov cx, word [realmode_cx - 0x10000]\r
- mov dx, word [realmode_dx - 0x10000]\r
+ mov ax, word [realmode_ax]\r
+ mov bx, word [realmode_bx]\r
+ mov cx, word [realmode_cx]\r
+ mov dx, word [realmode_dx]\r
\r
push ax ; this is some cool shit.. ;)\r
- mov al, [int_number - 0x10000] ; interrupt to preform\r
- mov [$+5 - 0x10000], al ; move it to right pos.\r
+ mov al, [int_number] ; interrupt to preform\r
+ mov [$+5], al ; move it to right pos.\r
pop ax\r
db 0xCD ; opcode for int.\r
db 0x00 ; move int_number here\r
\r
jnc .no_error\r
- mov byte [realmode_error - 0x10000], 1\r
+ mov byte [realmode_error], 1\r
\r
.no_error:\r
- mov word [realmode_ax - 0x10000], ax\r
- mov word [realmode_bx - 0x10000], bx\r
- mov word [realmode_cx - 0x10000], cx\r
- mov word [realmode_dx - 0x10000], dx\r
+ mov word [realmode_ax], ax\r
+ mov word [realmode_bx], bx\r
+ mov word [realmode_cx], cx\r
+ mov word [realmode_dx], dx\r
\r
cli\r
\r
- lgdt [gdtr - 0x10000]\r
- lidt [idtr - 0x10000]\r
+ lgdt [gdtr]\r
+ lidt [idtr]\r
mov eax, cr0\r
or al, 1\r
mov cr0, eax\r