diff options
author | Yuchen Pei <me@ypei.me> | 2018-01-20 15:41:49 +0100 |
---|---|---|
committer | Yuchen Pei <me@ypei.me> | 2018-01-20 15:41:49 +0100 |
commit | d3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 (patch) | |
tree | d58df9ec2480e2a9ec6240f9c797f83d1a0b1056 /tools/OS/Memory.vm | |
parent | 3571f998b28fbc8d9250ba04c983935f10a16c15 (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/Memory.vm')
-rw-r--r-- | tools/OS/Memory.vm | 279 |
1 files changed, 0 insertions, 279 deletions
diff --git a/tools/OS/Memory.vm b/tools/OS/Memory.vm deleted file mode 100644 index 5d42aad..0000000 --- a/tools/OS/Memory.vm +++ /dev/null @@ -1,279 +0,0 @@ -function Memory.init 0
-push constant 0
-pop static 0
-push constant 2048
-push static 0
-add
-push constant 14334
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-push constant 2049
-push static 0
-add
-push constant 2050
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-push constant 0
-return
-function Memory.peek 0
-push argument 0
-push static 0
-add
-pop pointer 1
-push that 0
-return
-function Memory.poke 0
-push argument 0
-push static 0
-add
-push argument 1
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-push constant 0
-return
-function Memory.alloc 1
-push argument 0
-push constant 1
-lt
-if-goto IF_TRUE0
-goto IF_FALSE0
-label IF_TRUE0
-push constant 5
-call Sys.error 1
-pop temp 0
-label IF_FALSE0
-push constant 2048
-pop local 0
-label WHILE_EXP0
-push constant 0
-push local 0
-add
-pop pointer 1
-push that 0
-push argument 0
-lt
-not
-if-goto WHILE_END0
-push constant 1
-push local 0
-add
-pop pointer 1
-push that 0
-pop local 0
-goto WHILE_EXP0
-label WHILE_END0
-push local 0
-push argument 0
-add
-push constant 16379
-gt
-if-goto IF_TRUE1
-goto IF_FALSE1
-label IF_TRUE1
-push constant 6
-call Sys.error 1
-pop temp 0
-label IF_FALSE1
-push constant 0
-push local 0
-add
-pop pointer 1
-push that 0
-push argument 0
-push constant 2
-add
-gt
-if-goto IF_TRUE2
-goto IF_FALSE2
-label IF_TRUE2
-push argument 0
-push constant 2
-add
-push local 0
-add
-push constant 0
-push local 0
-add
-pop pointer 1
-push that 0
-push argument 0
-sub
-push constant 2
-sub
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-push constant 1
-push local 0
-add
-pop pointer 1
-push that 0
-push local 0
-push constant 2
-add
-eq
-if-goto IF_TRUE3
-goto IF_FALSE3
-label IF_TRUE3
-push argument 0
-push constant 3
-add
-push local 0
-add
-push local 0
-push argument 0
-add
-push constant 4
-add
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-goto IF_END3
-label IF_FALSE3
-push argument 0
-push constant 3
-add
-push local 0
-add
-push constant 1
-push local 0
-add
-pop pointer 1
-push that 0
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-label IF_END3
-push constant 1
-push local 0
-add
-push local 0
-push argument 0
-add
-push constant 2
-add
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-label IF_FALSE2
-push constant 0
-push local 0
-add
-push constant 0
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-push local 0
-push constant 2
-add
-return
-function Memory.deAlloc 2
-push argument 0
-push constant 2
-sub
-pop local 0
-push constant 1
-push local 0
-add
-pop pointer 1
-push that 0
-pop local 1
-push constant 0
-push local 1
-add
-pop pointer 1
-push that 0
-push constant 0
-eq
-if-goto IF_TRUE0
-goto IF_FALSE0
-label IF_TRUE0
-push constant 0
-push local 0
-add
-push constant 1
-push local 0
-add
-pop pointer 1
-push that 0
-push local 0
-sub
-push constant 2
-sub
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-goto IF_END0
-label IF_FALSE0
-push constant 0
-push local 0
-add
-push constant 1
-push local 0
-add
-pop pointer 1
-push that 0
-push local 0
-sub
-push constant 0
-push local 1
-add
-pop pointer 1
-push that 0
-add
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-push constant 1
-push local 1
-add
-pop pointer 1
-push that 0
-push local 1
-push constant 2
-add
-eq
-if-goto IF_TRUE1
-goto IF_FALSE1
-label IF_TRUE1
-push constant 1
-push local 0
-add
-push local 0
-push constant 2
-add
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-goto IF_END1
-label IF_FALSE1
-push constant 1
-push local 0
-add
-push constant 1
-push local 1
-add
-pop pointer 1
-push that 0
-pop temp 0
-pop pointer 1
-push temp 0
-pop that 0
-label IF_END1
-label IF_END0
-push constant 0
-return
|