Refactoring assembly entry point

This commit is contained in:
Marco Cetica
2021-02-03 15:59:42 +01:00
parent dc3803491e
commit 1b207add8c
61 changed files with 4782 additions and 4779 deletions

View File

@@ -1,22 +1,22 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; vulcanOS Kernel ;
; Developed by Marco 'icebit' Cetica ;
; (c) 2019-2021 ;
; Released under GPLv3 ;
; https://github.com/ice-bit/iceOS ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
global gdt_flush ; for drivers/gdt.c
section .text
gdt_flush:
mov eax, [esp+4] ; get address of gdt_ptr_t
lgdt [eax] ; Load GDT
mov ax, 0x10 ; offset in the GDT of the data segment
mov ds, ax ; Load data segment selectors
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
jmp 0x08:.flush ; offset in the GDT of the code segment
.flush:
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; vulcanOS Kernel ;
; Developed by Marco 'icebit' Cetica ;
; (c) 2019-2021 ;
; Released under GPLv3 ;
; https://github.com/ice-bit/vulcanos ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
global gdt_flush ; for drivers/gdt.c
section .text
gdt_flush:
mov eax, [esp+4] ; get address of gdt_ptr_t
lgdt [eax] ; Load GDT
mov ax, 0x10 ; offset in the GDT of the data segment
mov ds, ax ; Load data segment selectors
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
jmp 0x08:.flush ; offset in the GDT of the code segment
.flush:
ret