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 /projects/12/ArrayTest/Main.jack | |
| 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 'projects/12/ArrayTest/Main.jack')
| -rw-r--r-- | projects/12/ArrayTest/Main.jack | 40 | 
1 files changed, 0 insertions, 40 deletions
| diff --git a/projects/12/ArrayTest/Main.jack b/projects/12/ArrayTest/Main.jack deleted file mode 100644 index 439770a..0000000 --- a/projects/12/ArrayTest/Main.jack +++ /dev/null @@ -1,40 +0,0 @@ -// This file is part of www.nand2tetris.org
 -// and the book "The Elements of Computing Systems"
 -// by Nisan and Schocken, MIT Press.
 -// File name: projects/12/ArrayTest/Main.jack
 -
 -/** Test program for the OS Array class. */
 -class Main {
 -
 -    /** Performs several Array manipulations. */
 -    function void main() {
 -        var Array r;                  // stores test results
 -        var Array a, b, c;
 -        
 -        let r = 8000;
 -        
 -        let a = Array.new(3);
 -        let a[2] = 222;
 -        let r[0] = a[2];              // RAM[8000] = 222
 -        
 -        let b = Array.new(3);
 -        let b[1] = a[2] - 100;
 -        let r[1] = b[1];              // RAM[8001] = 122
 -        
 -        let c = Array.new(500);
 -        let c[499] = a[2] - b[1];
 -        let r[2] = c[499];            // RAM[8002] = 100
 -        
 -        do a.dispose();
 -        do b.dispose();
 -        
 -        let b = Array.new(3);
 -        let b[0] = c[499] - 90;
 -        let r[3] = b[0];              // RAM[8003] = 10
 -        
 -        do c.dispose();
 -        do b.dispose();
 -        
 -        return;
 -    }
 -}
 | 
