diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2025-04-19 21:45:38 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2025-04-19 21:45:38 -0400 |
| commit | ea6836839c2a91a299cea810aaf75b6c7230b428 (patch) | |
| tree | 184cc76b41389c53c2d711b2563054bb4e8ba4c0 /cmpen472hw12_McDonnell/Sources | |
| parent | 48ca8e4061cb346392e57b0ec8ab5750feb455e4 (diff) | |
HW 12: Go Command Seems to work
Diffstat (limited to 'cmpen472hw12_McDonnell/Sources')
| -rw-r--r-- | cmpen472hw12_McDonnell/Sources/main.asm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmpen472hw12_McDonnell/Sources/main.asm b/cmpen472hw12_McDonnell/Sources/main.asm index a5935af..18fc72b 100644 --- a/cmpen472hw12_McDonnell/Sources/main.asm +++ b/cmpen472hw12_McDonnell/Sources/main.asm @@ -152,6 +152,8 @@ CheckInput lbeq cTypeWrite ; If A == 'Q', branch to cTypeWrite cmpa #'M' ; Compare A to 'M' beq cMDCommand ; If A != 'M', Check if MD command + cmpa #'G' ; Compare A to 'G' + beq cGoTo ; If A != 'G', Check if GO command cmpa #'S' ; Compare A to 'S' lbne cUnknownCMD ; If A != 'S', Command unknown ldaa 0,x ; Load next character but don't increment @@ -166,6 +168,16 @@ CheckInput jsr Zeros ; Fill buffer with Zeros pulx ; Restore X from the stack bra cDone ; branch always to cDone +cGoTo ldaa 1,x+ ; Load next character + cmpa #'O' ; Compare to 'O' + lbne cUnknownCMD ; If A != 'S', Command unknown + ldaa 0,x ; Load next character but don't increment + cmpa #'$' ; Compare A to '$' + lbne cUnknownCMD ; If A != '$', branch to unknown command + jsr ReadHex ; ReadHex to Read the memory Address + lbeq cBadAddr ; If Z == 1, branch to cBadAddr + jsr 0,y ; Launch address in Y + bra cNoPrint ; Done with command cMDCommand ldaa 1,x+ ; Load next character into A cmpa #'D' ; Compare do 'D' character bne cUnknownCMD ; If A != 'D', unknown command |
