diff options
| author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-08 10:17:09 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-08 10:17:09 -0400 | 
| commit | cc1e5892a25949b996d69a0b07f151a276ef2570 (patch) | |
| tree | 643d37db692c19d1ef64223eadcac7a28dbbd7db /input | |
| parent | 19d13c8339ee990fba358417a54aa6f1c94c7bca (diff) | |
| parent | b85c10ba1c53f1b442fea6bde4c2a2f73cfe5d6b (diff) | |
Merge pull request #1 from bdunahu/bdunahu
Add logic to open file, full lexer and tests.
Diffstat (limited to 'input')
| -rw-r--r-- | input/add-loop.asm | 22 | ||||
| -rw-r--r-- | input/simple.asm | 5 | 
2 files changed, 27 insertions, 0 deletions
| diff --git a/input/add-loop.asm b/input/add-loop.asm new file mode 100644 index 0000000..6379831 --- /dev/null +++ b/input/add-loop.asm @@ -0,0 +1,22 @@ +        addi $fp $0 0x200 +        addi $5 $0 0x1 +        store $5 0($fp) +        addi $5 $0 0x2 +        store $5 1($fp) +        addi $5 $0 0x3 +        store $5 2($fp) +        addi $5 $0 0x4 +        store $5 3($fp) +        addi $5 $0 0x0 +        addi $6 $0 0x3 +        jrl CHECK +LOOP: +        add $9 $fp $5 +        load $7 -0($9) +        load $8 +1($9) +        add $7 $7 $8 +        store $7 0($9) +        addi $5 $5 0x1 +CHECK: +        cmp $6 $5 +        bgt LOOP diff --git a/input/simple.asm b/input/simple.asm new file mode 100644 index 0000000..3e60ee8 --- /dev/null +++ b/input/simple.asm @@ -0,0 +1,5 @@ +        addi $sp $0 512 +        addi $5 $0 1 +        store $5 0($sp) +        addi $5 $0 2 +        store $5 1($sp) | 
