diff options
Diffstat (limited to 'cmpen472hw11_McDonnell/bin/main.dbg')
| -rw-r--r-- | cmpen472hw11_McDonnell/bin/main.dbg | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/cmpen472hw11_McDonnell/bin/main.dbg b/cmpen472hw11_McDonnell/bin/main.dbg index 479f8e9..1b74a74 100644 --- a/cmpen472hw11_McDonnell/bin/main.dbg +++ b/cmpen472hw11_McDonnell/bin/main.dbg @@ -165,10 +165,8 @@ pgstart lds #$3100 ; initialize the stack pointer cli ; Enable interrupts mainLoop - ldaa #'>' ; Load '>' character - jsr putchar ; Print to serial console - ldaa #' ' ; Load ' ' character - jsr putchar ; Print to serial console + ldx #prompt ; Load the address of prompt string into X + jsr WriteString ; Write the string to the serial console ldx #inputBuffer ; Load the address of inputBuffer into X ldy lenInput ; Load the length of inputBuffer into Y jsr ReadString ; Jump to ReadString to read input @@ -678,12 +676,12 @@ isGw2 cmpb #'2' ; Compare B to '2' ldab 1,x+ ; Load next character into B cmpb #NULL ; Compare to NULL lbne badCommand ; Not NULL? bad - ldx #sw2Msg ; Load address of sawtooth 125Hz message + ldx #sw2Msg ; Load address of sawtooth 100Hz message jsr WriteString ; Write string ldaa #'S' ; Load 'S' for sawtooth staa waveType ; Save A to waveType - ldd #4 ; Load 4 into D - std increment ; Set Increment to 4 -> 125Hz + ldd #3 ; Load 3 into D + std increment ; Set Increment to 3 -> ~100Hz jsr GenWave ; Jump to GenWave ldx #doneWave ; Load the address of doneWave jsr WriteString ; Write string @@ -698,7 +696,7 @@ isGt cmpa #'t' ; Compare A to 't' ldaa #'T' ; Load 'T' for triangle staa waveType ; Save A to waveType ldd #1 ; Load 1 into D - std increment ; Set Increment to 1 -> 31.25Hz + std increment ; Set Increment to 1 -> 15.625Hz jsr GenWave ; Jump to GenWave ldx #doneWave ; Load the address of doneWave jsr WriteString ; Write string @@ -713,7 +711,7 @@ isGq cmpa #'q' ; Compare A to 'q' ldaa #'q' ; Load 'q' for square staa waveType ; Save A to waveType ldd #1 ; Load 1 into D - std increment ; Set Increment to 1 -> 31.25Hz + std increment ; Set Increment to 1 -> 15.625Hz jsr GenWave ; Jump to GenWave ldx #doneWave ; Load the address of doneWave jsr WriteString ; Write string @@ -723,12 +721,12 @@ isGq2 cmpb #'2' ; Compare B to '2' ldab 1,x+ ; Load next character into B cmpb #NULL ; Compare B to NULL bne badCommand ; B != NULL? bad - ldx #sq2Msg ; Load address of square 125Hz message + ldx #sq2Msg ; Load address of square 100Hz message jsr WriteString ; Write string ldaa #'q' ; Load 'q' for square staa waveType ; Save A to waveType - ldd #8 ; Load 8 into D - std increment ; Set Increment to 4 -> 125Hz + ldd #6 ; Load 6 into D + std increment ; Set Increment to 6 -> ~100Hz jsr GenWave ; Jump to GenWave ldx #doneWave ; Load the address of doneWave jsr WriteString ; Write string @@ -1057,6 +1055,9 @@ sq2Msg dc.b 'square wave 125Hz generation...',CR,LF,NULL doneWave dc.b 'Done generating wave.',CR,LF,NULL +; prompt: command prompt string +prompt dc.b 'HW 11> ',NULL + ; msg: this is the main option menu string msg dc.b 'Commands:',CR,LF dc.b 'gw: generate sawtooth wave, printing 0 through 255, repeated for total 2048 points',CR,LF |
