Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f77db9
day 1+
SteveMM-III Oct 1, 2020
01def84
day 2
SteveMM-III Oct 3, 2020
4b9e560
day 2 code tweaks
SteveMM-III Oct 3, 2020
8c46403
day 2 converted to branch table
SteveMM-III Oct 3, 2020
f6f9d01
day 2 formatting and code structure
SteveMM-III Oct 3, 2020
f95adcf
day 2 add comments and remove superfluous var
SteveMM-III Oct 3, 2020
270ebfe
day 2 add comments and remove superfluous var
SteveMM-III Oct 3, 2020
384e15b
day 2 remove unneeded or
SteveMM-III Oct 3, 2020
0efe1ad
day 2 pc increment function
SteveMM-III Oct 3, 2020
36cd3f6
day 2 added limiter function for alu operations to limit values to 25…
SteveMM-III Oct 3, 2020
e290ef9
day 3 stack
SteveMM-III Oct 6, 2020
127514a
day 4 call/ret
SteveMM-III Oct 6, 2020
476b671
formatting
SteveMM-III Oct 7, 2020
027e966
alu operations
SteveMM-III Oct 7, 2020
828cb8f
consistent spacing
SteveMM-III Oct 7, 2020
764e820
changed flags to internal register and ocd spacing on separators
SteveMM-III Oct 7, 2020
9428c62
changed flags to internal register and ocd spacing on separators
SteveMM-III Oct 7, 2020
035fcb8
removed unused alu function in favor of alu branch table & more spaci…
SteveMM-III Oct 7, 2020
435cede
vscode folding tags added around instruction definitions
SteveMM-III Oct 7, 2020
e0e1208
removed overwriting duplication of stack pointer
SteveMM-III Oct 8, 2020
cda637c
timer interrupt
SteveMM-III Oct 9, 2020
d4cad77
refactoring
SteveMM-III Oct 9, 2020
ea37c5b
spacing
SteveMM-III Oct 9, 2020
0cfa024
comments
SteveMM-III Oct 9, 2020
bd65c2b
code structure
SteveMM-III Oct 9, 2020
f2726f6
comments and histogram
SteveMM-III Oct 10, 2020
7876764
separator
SteveMM-III Oct 10, 2020
2d448e1
previous git add from subdir; missed files
SteveMM-III Oct 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions asm/asm.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"NOT": {"type": 1, "code": "01101001"},
"OR": {"type": 2, "code": "10101010"},
"POP": {"type": 1, "code": "01000110"},
"PRL": {"type": 1, "code": "01110011"},
"PRA": {"type": 1, "code": "01001000"},
"PRN": {"type": 1, "code": "01000111"},
"PUSH": {"type": 1, "code": "01000101"},
Expand Down
26 changes: 26 additions & 0 deletions asm/histogram.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
; histogram.asm
;
; Expected output:
; *
; **
; ****
; ********
; ****************
; ********************************
; ****************************************************************

LDI R0,1 ; 0 - current asterisks
LDI R1,1 ; 1 - current line
LDI R2,8 ; 2 - max lines + 1
LDI R3,2 ; 3 - multiply by
LDI R4,Print ; 4 - load print address

Print:

PRL R0 ; 5 - print line with current asterisks
MUL R0,R3 ; 6 - double current asterisks
INC R1 ; 7 - increment current line
CMP R1,R2 ; 8 - compare lines
JLT R4 ; 9 - less than max lines loop back to print
HLT ; 10 - halt when done

6 changes: 3 additions & 3 deletions asm/mult.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mult.asm
#
# Expected output: 72
; mult.asm
;
; Expected output: 72

LDI R0,8
LDI R1,9
Expand Down
Loading