-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
598bb2d
commit c05bade
Showing
5 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
def printme(x) | ||
print(x) | ||
print(x) | ||
|
||
x = 4 | ||
printme(x) | ||
beep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
┌────┬────┬────┬────┐ | ||
0 │ 9 │ 15 │ 13 │ 40 │ | ||
├────┼────┼────┼────┤ | ||
4 │ 7 │ 0 │ 0 │ 0 │ (attempt to beep after the jump) | ||
├────┼────┼────┼────┤ | ||
8 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
12 │ 0 │ 0 │ 0 │ 4 │ <- x is at addr 15 | ||
├────┼────┼────┼────┤ | ||
16 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
20 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
24 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
28 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
32 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
36 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
40 │ 11 │ 43 │ 8 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
44 │ 11 │ 47 │ 8 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
48 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
52 │ 0 │ 0 │ 0 │ 0 │ | ||
|
||
.... | ||
|
||
├────┼────┼────┼────┤ | ||
│ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
│ 0 │ 0 │ 0 │ 0 │ | ||
└────┴────┴────┴────┘ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
┌────┬────┬────┬────┐ | ||
0 │ 9 │ 15 │ 10 │ 6 │ <- load the value of addr 8 into R1, | ||
├────┼────┼────┼────┤ so we can go back to wherever it points | ||
4 │ 13 │ 40│ 8 │ 7 │ <- we want to go back to addr 8 | ||
├────┼────┼────┼────┤ where we have the beep instruction | ||
8 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
12 │ 0 │ 0 │ 0 │ 4 │ <- x is at addr 15 | ||
├────┼────┼────┼────┤ | ||
16 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
20 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
24 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
28 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
32 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
36 │ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
40 │ 11 │ 43 │ 8 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
44 │ 11 │ 47 │ 8 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
48 │ 12 │ 51 │ 13 │ 0 │ <- use R1 to jump back | ||
├────┼────┼────┼────┤ | ||
52 │ 0 │ 0 │ 0 │ 0 │ | ||
|
||
.... | ||
|
||
├────┼────┼────┼────┤ | ||
│ 0 │ 0 │ 0 │ 0 │ | ||
├────┼────┼────┼────┤ | ||
│ 0 │ 0 │ 0 │ 0 │ | ||
└────┴────┴────┴────┘ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters