You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
748 B
28 lines
748 B
10 years ago
|
[org 0x7c00] ; bootloader offset
|
||
|
mov bp, 0x9000 ; set the stack
|
||
|
mov sp, bp
|
||
|
|
||
|
mov bx, MSG_REAL_MODE
|
||
|
call print ; This will be written after the BIOS messages
|
||
|
|
||
|
call switch_to_pm
|
||
|
jmp $ ; this will actually never be executed
|
||
|
|
||
|
%include "../05-bootsector-functions-strings/boot_sect_print.asm"
|
||
|
%include "../09-32bit-gdt/32bit-gdt.asm"
|
||
|
%include "../08-32bit-print/32bit-print.asm"
|
||
|
%include "32bit-switch.asm"
|
||
|
|
||
|
[bits 32]
|
||
|
BEGIN_PM: ; after the switch we will get here
|
||
|
mov ebx, MSG_PROT_MODE
|
||
|
call print_string_pm ; Note that this will be written at the top left corner
|
||
|
jmp $
|
||
|
|
||
|
MSG_REAL_MODE db "Started in 16-bit real mode", 0
|
||
|
MSG_PROT_MODE db "Loaded 32-bit protected mode", 0
|
||
|
|
||
|
; bootsector
|
||
|
times 510-($-$$) db 0
|
||
|
dw 0xaa55
|