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