Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/i386/pmbr/pmbr.S
- This file was moved from sys/boot/i386/pmbr/pmbr.s.
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | err_big: movw $msg_big,%si # "Boot loader too | ||||
jmp putstr # large" | jmp putstr # large" | ||||
err_pt: movw $msg_pt,%si # "Invalid partition | err_pt: movw $msg_pt,%si # "Invalid partition | ||||
jmp putstr # table" | jmp putstr # table" | ||||
err_rd: movw $msg_rd,%si # "I/O error loading | err_rd: movw $msg_rd,%si # "I/O error loading | ||||
jmp putstr # boot loader" | jmp putstr # boot loader" | ||||
err_noboot: movw $msg_noboot,%si # "Missing boot | err_noboot: movw $msg_noboot,%si # "Missing boot loader" | ||||
jmp putstr # loader" | # fall through to putstr | ||||
# | # | ||||
# Output an ASCIZ string to the console via the BIOS. | # Output an ASCIZ string to the console via the BIOS. | ||||
# | # | ||||
putstr.0: movw $0x7,%bx # Page:attribute | putstr: | ||||
#if defined(SIO) && COMSPEED != 0 | |||||
xorw %dx,%dx # Use COM1 | |||||
movw $COMSPEED,%ax # defined by Makefile | |||||
int $0x14 # BIOS: Serial init | |||||
#endif | |||||
lodsb # Get character | |||||
testb %al,%al # End of string? | |||||
putstr.0: jz putstr.0 # Yes: await reset | |||||
#ifndef SIO | |||||
movw $0x7,%bx # Page: attribute | |||||
movb $0xe,%ah # BIOS: Display | movb $0xe,%ah # BIOS: Display | ||||
int $0x10 # character | int $0x10 # character | ||||
putstr: lodsb # Get character | #else | ||||
testb %al,%al # End of string? | movb $0x01,%ah # BIOS: Send | ||||
jnz putstr.0 # No | int $0x14 # character | ||||
putstr.1: jmp putstr.1 # Await reset | #endif | ||||
jmp putstr # Next character | |||||
msg_big: .asciz "Boot loader too large" | msg_big: .asciz "Boot loader too large" | ||||
msg_pt: .asciz "Invalid partition table" | msg_pt: .asciz "Invalid partition table" | ||||
msg_rd: .asciz "I/O error loading boot loader" | msg_rd: .asciz "I/O error loading boot loader" | ||||
msg_noboot: .asciz "Missing boot loader" | msg_noboot: .asciz "Missing boot loader" | ||||
lba: .quad 1 # LBA of GPT header | lba: .quad 1 # LBA of GPT header | ||||
Show All 18 Lines |