mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 10:26:59 +00:00
Notepad port to userspace and bug fixes
This commit is contained in:
@@ -6,7 +6,7 @@ section .text
|
||||
gdt_flush:
|
||||
lgdt [rdi] ; Load GDT from the pointer passed in RDI
|
||||
|
||||
mov ax, 0x10 ; 0x10 is our offset in the GDT to our data segment
|
||||
mov ax, 0x10 ; 0x10 is the offset in the GDT to data segment
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
mov fs, ax
|
||||
@@ -14,7 +14,7 @@ gdt_flush:
|
||||
mov ss, ax
|
||||
|
||||
; Far jump to update CS
|
||||
push 0x08 ; 0x08 is our offset to the code segment
|
||||
push 0x08 ; 0x08 is the offset to the code segment
|
||||
lea rax, [rel .flush]
|
||||
push rax
|
||||
retfq
|
||||
@@ -23,6 +23,6 @@ gdt_flush:
|
||||
ret
|
||||
|
||||
tss_flush:
|
||||
mov ax, 0x28 ; 0x28 is our offset in the GDT to the TSS
|
||||
mov ax, 0x28 ; 0x28 is the offset in the GDT to the TSS
|
||||
ltr ax
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user