The as of yet undocumented DAT op code can also be used to read keyboard input by simply referencing dat 0. Here's the code from Notch's pastebin:
; 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
Just updated your iPhone? You'll find new emoji, enhanced security, podcast transcripts, Apple Cash virtual numbers, and other useful features. There are even new additions hidden within Safari. Find out what's new and changed on your iPhone with the iOS 17.4 update.
1 Comment
Thanks again to Andrew Kersten for the tip.
Share Your Thoughts