Writing a Simple Operating System — from Scratch

(Jeff_L) #1

CHAPTER 4. ENTERING 32-BIT PROTECTED MODE 40


; This is where we arrive after switching to and initialising protected mode.
BEGIN_PM:

mov ebx , MSG_PROT_MODE
call print_string_pm ; Use our 32-bit print routine.

jmp $ ; Hang.

; Global variables
MSG_REAL_MODE db "Started in 16-bit Real Mode", 0
MSG_PROT_MODE db "Successfully landed in 32-bit Protected Mode", 0

; Bootsector padding
times 510-($-$$) db 0
dw 0xaa55
Free download pdf