/ init the serial port
xor ax, ax
movb $0xE3, al / 9600N81
mov $0, dx
int $0x14 / init port
/ say hello,
mov $hello, si
call puts
/ si -> null terminated string
puts:
lodsb
cmpb $0, al
jes 1f
call putc
jmp puts
1:
ret
putc: // write the char in al to both video and serial
push dx
push cx
push bx
push ax
/ write to video
push si
push ax
mov $7, bx
movb $0xe, ah
int $0x10
/ write to serial port
pop ax
movb $1, ah
xor dx, dx
int $0x14
pop si
pop ax
pop bx
pop cx
pop dx
ret
hello:
<\r\n\nCoraid sez hello\r\n\0>
|