diff --git a/adder/.vscode/launch.json b/adder/.vscode/launch.json index 78856c6..b7ef0ff 100644 --- a/adder/.vscode/launch.json +++ b/adder/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Pico Debug", "device": "RP2040", - "gdbPath": "${env:GDB_PATH}", + "gdbPath": "gdb-multiarch", "cwd": "${workspaceRoot}", "executable": "${command:cmake.launchTargetPath}", "request": "launch", @@ -25,7 +25,7 @@ "break main", "continue" ], - "showDevDebugOutput": "parsed" + "showDevDebugOutput": "raw" } ] -} +} \ No newline at end of file diff --git a/adder/ops.S b/adder/ops.S index 079019e..eab3ad1 100644 --- a/adder/ops.S +++ b/adder/ops.S @@ -2,9 +2,11 @@ .global add @ Provide program starting address to linker add: - @ TODO: PUSH link register to stack + PUSH {LR} + @BKPT LDR R6, [R4] LDR R7, [R5] ADD R6, R7 - @ TODO: POP link register value to a lo register - @ TODO: BX (Branch and eXecute) back to main \ No newline at end of file + POP {R0} + @BKPT + BX R0 \ No newline at end of file diff --git a/adder/program.S b/adder/program.S index 09cce8b..3c35c69 100644 --- a/adder/program.S +++ b/adder/program.S @@ -5,9 +5,11 @@ main: BL stdio_init_all LDR R4, =a LDR R5, =b - @ TODO: Branch to appropriate label in ops.S + BL add @ JUMP TO add; STORE CURRENT LOCATION + @ OF PROGRAM TO LR LDR R0, =finish MOV R1, R6 + BKPT BL printf rest: diff --git a/docs/hack.md b/docs/hack.md new file mode 100644 index 0000000..7cab757 --- /dev/null +++ b/docs/hack.md @@ -0,0 +1,13 @@ +# Dynamo Dispatcher: Hack documentation + +## Describe the Hack you discovered. + +`TODO` + +## What steps did you take to introduce the conditions supporting the Hack? + +`TODO` + +## What is the potential knowledge value of the Hack? + +`TODO` diff --git a/docs/report.md b/docs/report.md new file mode 100644 index 0000000..1de2c9c --- /dev/null +++ b/docs/report.md @@ -0,0 +1,34 @@ +# Dynamo Dispatcher: General report + +Deepening our knowledge of the stack, in these activitives we're exploring: + +* new functional opportunities with the stack +* an introduction to the link register and new forms of program branching +* bit shifting to leverage the most significant and least significant bits (MSB/LSB) +* dynamic subroutine calls consistent with our broader understanding of program execution + +## Across all activities in this set of exercises, describe the various ways/purposes for which you've used the stack. + +`TODO` + +## `dynamo` proposed a new way to consider bit shifting; explain how this application is different than your use of shifting with the CARDIAC. + +> Be sure to extend beyond just the syntax differences; CARDIAC wasn't a digital system, so how is it different in ARM Assembly? + +`TODO` + +## In `sifter`, what was the benefit of using `BL`, `BX`, et al. versus traditional comparison and conditional branching? + +`TODO` + +### Though a more complex cognitive operation, does it simplify our programs? Why or why not? + +## Follow the `sifter` to the deepest point of the stack (i.e. when it was fullest). + +> Describe the values in general terms rather than strict registers or values. For example: +> * Value of `LR` pointing to `sifter` subroutine +> * Current of number from `numbers` array in iteration + +|Value | +|:-----| +|`TODO`| \ No newline at end of file diff --git a/gatorgrade.yml b/gatorgrade.yml index d84c271..faa5490 100644 --- a/gatorgrade.yml +++ b/gatorgrade.yml @@ -68,7 +68,7 @@ check: MatchFileRegex options: regex: '[push|PUSH](\s|\t)+\{[r|R|lr|LR][0-7]\}' - count: 2 + count: 3 exact: false - dynamo/dispatch.S: - description: dynamo/dispatch.S contains sufficient POP instructions to add values to the stack @@ -76,7 +76,7 @@ check: MatchFileRegex options: regex: '[pop|POP](\s|\t)+\{[r|R][0-7]\}' - count: 2 + count: 3 exact: false - dynamo/dispatch.S: - description: dynamo/dispatch.S uses LSR to shift a register incrementally @@ -92,7 +92,7 @@ check: MatchFileRegex options: regex: '[bx|BX](\s|\t)+[a-zA-Z0-9_]+' - count: 2 + count: 6 exact: false - dynamo/dispatch.S: - description: dynamo/dispatch.S uses CMP instructions to evaluate conditional logic @@ -114,6 +114,14 @@ - description: dynamo/dispatch.S contains no TODOs category: TODOs check: MatchFileFragment + options: + fragment: 'TODO' + count: 0 + exact: true +- docs/report.md: + - description: docs/report.md contains no TODOs + check: MatchFileFragment + category: TODOs options: fragment: 'TODO' count: 0