...
 
Commits (3)
This diff is collapsed.
#!/bin/bash
bochs -q -f bochs.conf
qemu-system-x86_64 -fda MyBoot.bin
......@@ -21,6 +21,9 @@ mov dh, HEIGHT
mov dl, WIDTH
int 0x10
;; Turn on interrupts
sti
;; Set cursor to bottom of screen
mov dh, HEIGHT
mov dl, 0x00
......@@ -28,10 +31,33 @@ mov bh, 0x00
mov ah, 0x02
int 0x10
;; Start serial connection
mov ah, 0
mov al, 0b11100011
mov dx, 0
int 0x14
.loop:
;; Read character
mov ah, 0x00
int 0x16
;; Print a '.' to debug
mov ah, 0x01
mov al, '.'
mov dx, 0
int 0x14
;; Check status of COM1
mov ah, 0x03
mov dx, 0
int 0x14
;; If not ok, wait
and ah, 0x01
jz .loop
;; If ok, start reading character
mov ah, 0x02
mov dx, 0
int 0x14
cmp al, 0x0d ; newline
je .newline
......@@ -40,11 +66,11 @@ int 0x10
jmp .nonewline
.change_color_mode:
;; Read character
mov ah, 0x00
int 0x16
mov [color_mode], al
jmp .loop
;; Read character
mov ah, 0x00
int 0x16
mov [color_mode], al
jmp .loop
.newline:
;; Scroll up window
......@@ -72,11 +98,11 @@ int 0x10
.nonewline:
;; Write character
mov ah, 0x09
mov ah, 0x09
mov bh, 0x00
mov bl, [color_mode]
mov cx, 0x01
int 0x10
int 0x10
;; Get current cursor position
mov ah, 0x03
......