Skip to content

Instantly share code, notes, and snippets.

@letoh
Created May 15, 2012 14:45
Show Gist options
  • Save letoh/2702317 to your computer and use it in GitHub Desktop.
Save letoh/2702317 to your computer and use it in GitHub Desktop.
basic i/o routine
%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