X-Git-Url: https://git.wirehaze.ovh/BOS.git/blobdiff_plain/ca7bddd67adf9e8da536d21dab2a0a1d42d08a65..2c5764025542375cf66d6eb178fd9468b9022726:/kernel/krl_incs/rmode_int.inc diff --git a/kernel/krl_incs/rmode_int.inc b/kernel/krl_incs/rmode_int.inc index bd2dbe2..ed5716d 100755 --- a/kernel/krl_incs/rmode_int.inc +++ b/kernel/krl_incs/rmode_int.inc @@ -24,7 +24,7 @@ rmode_int: mov word [realmode_cx], cx mov word [realmode_dx], dx call disable_irqs - jmp pword 0x18:do_16pmode-0x10000 ; must substract 0x10000 from + jmp pword 0x18:do_16pmode ; must substract 0x10000 from ; data addresses becasue of ; fasm strict "org" behavior use16 @@ -41,7 +41,7 @@ do_16pmode: and al, 0xFE mov cr0, eax - jmp 0x1000:(do_realm-0x10000) + jmp 0x1000:(do_realm) do_realm: mov ax, cs @@ -53,34 +53,34 @@ do_realm: mov gs, ax mov ss, ax - lidt [ridtr - 0x10000] ; realmode/variables.inc + lidt [ridtr] ; realmode/variables.inc sti - mov ax, word [realmode_ax - 0x10000] - mov bx, word [realmode_bx - 0x10000] - mov cx, word [realmode_cx - 0x10000] - mov dx, word [realmode_dx - 0x10000] + mov ax, word [realmode_ax] + mov bx, word [realmode_bx] + mov cx, word [realmode_cx] + mov dx, word [realmode_dx] push ax ; this is some cool shit.. ;) - mov al, [int_number - 0x10000] ; interrupt to preform - mov [$+5 - 0x10000], al ; move it to right pos. + mov al, [int_number] ; interrupt to preform + mov [$+5], al ; move it to right pos. pop ax db 0xCD ; opcode for int. db 0x00 ; move int_number here jnc .no_error - mov byte [realmode_error - 0x10000], 1 + mov byte [realmode_error], 1 .no_error: - mov word [realmode_ax - 0x10000], ax - mov word [realmode_bx - 0x10000], bx - mov word [realmode_cx - 0x10000], cx - mov word [realmode_dx - 0x10000], dx + mov word [realmode_ax], ax + mov word [realmode_bx], bx + mov word [realmode_cx], cx + mov word [realmode_dx], dx cli - lgdt [gdtr - 0x10000] - lidt [idtr - 0x10000] + lgdt [gdtr] + lidt [idtr] mov eax, cr0 or al, 1 mov cr0, eax