diff options
Diffstat (limited to 'cmpen472hw6_McDonnell/Sources/main.asm')
| -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 |
