diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2025-02-23 08:56:00 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2025-02-23 08:56:00 -0500 |
| commit | 8f172c86f60da45f946a181e1292aceb52b9ac36 (patch) | |
| tree | 9b390a894e63c52ae90aefee5d6c785e94f082cb | |
| parent | 30b524fd700b21821a372aee63c22ee3f4989e2e (diff) | |
HW6 Write Command now prints contents after write
| -rw-r--r-- | cmpen472hw6_McDonnell/Sources/main.asm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmpen472hw6_McDonnell/Sources/main.asm b/cmpen472hw6_McDonnell/Sources/main.asm index c280b8e..0b40a5a 100644 --- a/cmpen472hw6_McDonnell/Sources/main.asm +++ b/cmpen472hw6_McDonnell/Sources/main.asm @@ -176,7 +176,6 @@ CheckInput ldy lenBuf ; Loadd length of the buffer into Y jsr Zeros ; Fill buffer with Zeros pulx ; Restore X from the stack - jsr PrintMem ; Print the data at the memory address bra cDone ; branch always to cDone cWrite ldaa 0,x ; Load next character but don't increment cmpa #'$' ; Compare A to '$' @@ -201,8 +200,8 @@ cHexData dex ; Decrement X by 1 cWriteData puld ; Restore D from the stack exg D,X ; Exchange D and X sty x ; Write data in Y to memory in X - bra cDone ; Branch always to cDone -cDone puld ; Restore D from the stack +cDone jsr PrintMem ; Jump to PrintMem to print the contents of the location + puld ; Restore D from the stack pulx ; Restore X from the stack rts ; Return to caller cBadAddr ldx #badAddr ; Load the address of badAddr into X |
