Skip to content

Commit

Permalink
keyboard reading code from Notch himself
Browse files Browse the repository at this point in the history
  • Loading branch information
jtauber committed Apr 5, 2012
1 parent 037c879 commit d3d99a9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions keyboard_reader.asm
@@ -0,0 +1,20 @@
; Reading characters from the keyboard
; by Markus Persson

#macro nextkey(target) {
push(i)
set i,[keypointer]
add i,0x9000
set target,[i]
ife target,0
jmp end
set [i],0
add [keypointer], 1
and [keypointer], 0xf
:end
pop(i)
}

:keypointer
dat 0

0 comments on commit d3d99a9

Please sign in to comment.