1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/ka/sys/main.k
2019-07-09 19:51:03 +02:00

39 lines
601 B
Plaintext

; The OS/K Team licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
PrintBootMsg:
mov rcx, STRLEN_MAX
mov rdx, .bootmsg
prns.rep.nz rdx
ret
.bootmsg = "Starting DOS...\n\n"
;
; Initialize TRAP handlers
;
InitSyscalls:
mov ax0, 1
.prepare_next:
call RFS.ActivateFrame
mov ax1, $rip
mov ax2, trap0_handler
call RFS.StoreReg
mov ax1, ax0
add ax0, 255 # TRAP no. (ax0 - 1)
call IDT.AddHandler
ret
;
; Main function
;
main:
call PrintBootMsg
call InitSyscalls
ret