aboutsummaryrefslogtreecommitdiff
path: root/tools/OS/Keyboard.vm
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
committerYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
commitd3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 (patch)
treed58df9ec2480e2a9ec6240f9c797f83d1a0b1056 /tools/OS/Keyboard.vm
parent3571f998b28fbc8d9250ba04c983935f10a16c15 (diff)
rearranged the dir for github
- removed tools and pdfs - rearranged the projects dirs - added md files - other minor changes
Diffstat (limited to 'tools/OS/Keyboard.vm')
-rw-r--r--tools/OS/Keyboard.vm102
1 files changed, 0 insertions, 102 deletions
diff --git a/tools/OS/Keyboard.vm b/tools/OS/Keyboard.vm
deleted file mode 100644
index a806c4e..0000000
--- a/tools/OS/Keyboard.vm
+++ /dev/null
@@ -1,102 +0,0 @@
-function Keyboard.init 0
-push constant 0
-return
-function Keyboard.keyPressed 0
-push constant 24576
-call Memory.peek 1
-return
-function Keyboard.readChar 2
-push constant 0
-call Output.printChar 1
-pop temp 0
-label WHILE_EXP0
-push local 1
-push constant 0
-eq
-push local 0
-push constant 0
-gt
-or
-not
-if-goto WHILE_END0
-call Keyboard.keyPressed 0
-pop local 0
-push local 0
-push constant 0
-gt
-if-goto IF_TRUE0
-goto IF_FALSE0
-label IF_TRUE0
-push local 0
-pop local 1
-label IF_FALSE0
-goto WHILE_EXP0
-label WHILE_END0
-call String.backSpace 0
-call Output.printChar 1
-pop temp 0
-push local 1
-call Output.printChar 1
-pop temp 0
-push local 1
-return
-function Keyboard.readLine 5
-push constant 80
-call String.new 1
-pop local 3
-push argument 0
-call Output.printString 1
-pop temp 0
-call String.newLine 0
-pop local 1
-call String.backSpace 0
-pop local 2
-label WHILE_EXP0
-push local 4
-not
-not
-if-goto WHILE_END0
-call Keyboard.readChar 0
-pop local 0
-push local 0
-push local 1
-eq
-pop local 4
-push local 4
-not
-if-goto IF_TRUE0
-goto IF_FALSE0
-label IF_TRUE0
-push local 0
-push local 2
-eq
-if-goto IF_TRUE1
-goto IF_FALSE1
-label IF_TRUE1
-push local 3
-call String.eraseLastChar 1
-pop temp 0
-goto IF_END1
-label IF_FALSE1
-push local 3
-push local 0
-call String.appendChar 2
-pop local 3
-label IF_END1
-label IF_FALSE0
-goto WHILE_EXP0
-label WHILE_END0
-push local 3
-return
-function Keyboard.readInt 2
-push argument 0
-call Keyboard.readLine 1
-pop local 0
-push local 0
-call String.intValue 1
-pop local 1
-push local 0
-call String.dispose 1
-pop temp 0
-push local 1
-return