projects
/
com32
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
porting over pcboot codebase
[com32]
/
src
/
macros.inc
1
UART_BASE equ 2f8h ; COM1: 3f8, COM2: 2f8
2
UART_DIVISOR equ 115200 / 9600 ; 9600 baud
3
4
%macro WAITKEY 0
5
%%waitkey:
6
in al, 64h
7
test al, 1
8
jz %%waitkey
9
in al, 60h
10
%endmacro
11
12
%macro SER_PUTCHAR 0
13
push dx
14
push ax
15
mov dx, UART_BASE + 5 ; LSTAT
16
%%wait: in al, dx
17
test al, 20h ; TRIG_EMPTY
18
jz %%wait
19
mov dx, UART_BASE
20
pop ax
21
out dx, al
22
pop dx
23
%endmacro
24
25
%macro PMPRINT 1
26
mov al, %1
27
SER_PUTCHAR
28
%endmacro
29
30
; vi:set ts=8 sts=8 sw=8 ft=nasm: