Created
May 15, 2012 14:45
-
-
Save letoh/2702317 to your computer and use it in GitHub Desktop.
basic i/o routine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%macro putchar 1 | |
mov ah, 0xe | |
int 0x10 | |
%endmacro | |
%macro getchar 1 | |
xor ax, ax | |
int 0x16 | |
mov ah, 0 | |
%endmacro | |
code _emit | |
pop reg_w | |
putchar reg_w | |
next | |
code _key | |
getchar reg_w | |
push reg_w | |
next | |
colon _cold | |
cell _banner | |
.begin: | |
cell _prompt | |
cell _key, _emit | |
cell _cr | |
cell _hello, _cr, _cr | |
_again .begin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment