User Tools

Site Tools


notes:comporg:spring2024:projects:dapx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
notes:comporg:spring2024:projects:dapx [2024/03/22 14:15] – [Debug Registers] jwielandnotes:comporg:spring2024:projects:dapx [2024/03/24 23:43] – [Debug Registers] wgates1
Line 405: Line 405:
 </code> </code>
  
-To print out the number in the middle, we first need to check if the number is greater than 10. If it is then we print out a 1 then the second value, this wouldn't work with massive array of numbers but it will work just fine for our case.+To print out the number in the middle, we first need to check if the number is greater than 10. If it is then we print out a 1 then subtract 10 from it, this is so we can do ascii shift with the second number that changes it to the number we want to print.
  
 <code asm> <code asm>
Line 425: Line 425:
  
     _less_than_10:     _less_than_10:
-    iadd R1, 48+    iadd R1, 48 ;ascii shift by 48 to print out the number
     out  GPU_SelectedRegion, R1     out  GPU_SelectedRegion, R1
     out  GPU_DrawingPointX, R3     out  GPU_DrawingPointX, R3
Line 435: Line 435:
  
 ===Printing registers=== ===Printing registers===
 +===Calling debugregs===
 +As we have worked on these dap projects, the process of calling such debug subroutines has become simpler. With dap0, we had to have the following in our program: 
 +<code asm>
 +       mov  TMP, R8
 +       push TMP
 +       mov  TMP, 100
 +       push TMP
 +       mov  TMP, 200
 +       push TMP
 +       call          _debug
 + </code>
 +Then later after the hlt, you'll always have the %include "debug.s" for all the dap projects.
 +
 +Concerning dap2, we have drastically simplified the process of debugging. All that is need is just one line, Not accounting for the include line. Put the following to use your debug registers subroutine:
 +
 +<code asm>
 +call _debugregs
 +</code>
notes/comporg/spring2024/projects/dapx.txt · Last modified: 2024/03/24 23:49 by wgates1