49 lines
699 B
Plaintext
Executable file
49 lines
699 B
Plaintext
Executable file
:asm read-shiftflags
|
|
MOV AH 0x12 #
|
|
INT 0x16 #
|
|
PUSH AX
|
|
NEXT
|
|
|
|
:asm wait-key
|
|
XOR AX AX
|
|
INT 0x16 #
|
|
PUSH AX
|
|
NEXT
|
|
|
|
:asm key-waiting? ( -- f )
|
|
MOV AH 1 #
|
|
INT 0x16 #
|
|
JNZ 0 @>
|
|
PUSH FALSE
|
|
NEXT
|
|
0 <:
|
|
PUSH TRUE
|
|
NEXT
|
|
|
|
: key>scan 8 >> ;
|
|
: key>ch 0xff & ;
|
|
: scanup 0x80 | ;
|
|
|
|
0x4b const %left
|
|
0x4d const %right
|
|
0x48 const %up
|
|
0x50 const %down
|
|
0x1c const %enter
|
|
0x01 const %esc
|
|
0x1d const %lctrl
|
|
0x2a const %lshift
|
|
0x36 const %rshift
|
|
0x38 const %lalt
|
|
0x39 const %space
|
|
0x3a const %capslock
|
|
0x3b const %f1
|
|
: %func %f1 1- + ;
|
|
0x47 const %home
|
|
0x49 const %pgup
|
|
0x4f const %end
|
|
0x51 const %pgdn
|
|
0x52 const %ins
|
|
0x53 const %del
|
|
0x0e const %bs
|
|
|