.set ALIGN, 1
.set MEMINFO, 2
.set FLAGS, ALIGN | MEMINFO
.set MAGIC, 464367618
.set CHECKSUM, -464367621
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
.section .bss
.align 16
stack_top:
.skip 16384
stack_bottom:
.section .text
.global _start
.type _start, @function
_start:
cli
movl $stack_top, %esp
movw $0x4F02, %ax
movb $0x03, %bl
int $0x10
cmpw $0x004F, %ax
jne error
1: hlt
jmp 1b
error:
movb $0x00, %ah
int $0x19
movw $0x4F02, %ax
movb $0x03, %bl
int $0x10
bh
остался мусор, а этот вызов принимает аргумент в bx
. .set ALIGN, 1
.set MEMINFO, 2
.set FLAGS, ALIGN | MEMINFO
.set MAGIC, 464367618
.set CHECKSUM, -464367621
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
.section .bss
.align 16
stack_top:
.skip 16384
stack_bottom:
.section .text
.global _start
.type _start, @function
_start:
cli
movl $stack_top, %esp
movw $0x4F02, %ax
movw $0x118, %bx
int $0x10
test %ah, %ah
jnz vesa_error
1: hlt
jmp 1b
vesa_error:
movl $0x2001, %eax
outw %ax, $0xB004