Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %define com1 0x3f8
- bootentry: cli
- mov ax,0x07c0
- mov ds,ax
- mov ss,ax
- mov es,ax
- mov sp,0x0800
- sti
- call setup_uart
- cld
- mov ax,0xb800
- mov es,ax
- xor di,di
- mov si,fo
- mov ax,10
- push ax
- pop cx
- rep movsw
- hang: mov dx,com1+3
- in al,dx
- push ax
- and al,127
- out dx,al ; disable DLAB
- mov dx,com1
- mov al,'K'
- out dx,al
- pop ax
- add dx,3
- out dx,al ; set LCR back
- jmp hang
- setup_uart: mov dx,com1+1
- mov al,0
- out dx,al
- mov dx,com1+3
- mov al,0x80
- out dx,al
- mov dx,com1
- mov al,0x01
- out dx,al
- mov dx,com1+1
- mov al,0x00
- out dx,al
- mov dx,com1+3
- mov al,0x03
- out dx,al
- mov dx,com1+2
- mov al,0xC7
- out dx,al
- mov dx,com1+4
- mov al,0x0B
- out dx,al
- xor ax,ax
- xor dx,dx
- ret
- fo: db "H",0x0f,"e",0x0f,"y",0x0f," ",0x0f,"W",0x0f,"o",0x0f,"r",0x0f,"l",0x0f,"d",0x0f,"!",0x0f
- buffer: times 510-($-$$) db 0
- signature: dd 0xAA55
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement