I'm just doing it wrong probably, so I'm asking anyone who can help.
I've tried to put Set cursor Bios interrupt just before my C++ main method is called. Here is my code.
Code: Select all
.set ALIGN, 1<<0 # Zarovnanie modulov na stranku
.set MEMINFO, 1<<1 # Mapa pamate
.set FLAGS, ALIGN | MEMINFO # Vlajka pre "Multiboot"
.set MAGIC, 0x1BADB002 # Magicke cislo - na najdenie headeru
.set CHECKSUM, -(MAGIC + FLAGS) # Checksum prvych 4 riadkov
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
.section .bootstrap_stack, "aw", @nobits
stack_bottom:
.skip 16384 # 16384 B = 16KiB
stack_top:
movl %esp, %ebp
.section .text
.global _start
.type _start, @function
_start:
movl $stack_top, %esp
#Set registers for interrupt
movb $0, %bh
movb $2, %dh
movb $2, %dl
movb $0x02, %ah
#hlt
int $0x10 #Interrupt 0x10 hangs
#hlt
call kernelStartPoint
cli
hlt
.Lhang:
jmp .Lhang
.size _start, . - _start