summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2025-02-22 12:47:40 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2025-02-22 12:47:40 -0500
commit608e76a2a7031713290720c23411bad182570a96 (patch)
tree82ed35df079595e148bac00f1697229caec2728c
parent7ba4aa87ce49cecae80a7f1a5b88168ec9d77a4c (diff)
HW6 ReadHex and ReadDecimal
-rw-r--r--cmpen472hw5_McDonnell/Full_Chip_Simulation.ini2
-rw-r--r--cmpen472hw5_McDonnell/Sources/cmpen472hw5_McDonnell.asm500
-rw-r--r--cmpen472hw5_McDonnell/Sources/main.asm8
-rw-r--r--cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/CWSettingsWindows.stgbin4263 -> 4263 bytes
-rw-r--r--cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/Standard/TargetDataWindows.tdtbin64365 -> 64365 bytes
-rw-r--r--cmpen472hw6_McDonnell/Sources/main.asm167
-rw-r--r--cmpen472hw6_McDonnell/bin/Project.absbin6230 -> 7090 bytes
-rw-r--r--cmpen472hw6_McDonnell/bin/Project.abs.s1965
-rw-r--r--cmpen472hw6_McDonnell/bin/main.dbg167
-rw-r--r--cmpen472hw6_McDonnell/cmpen472hw6_McDonnell.mcpbin57065 -> 57065 bytes
-rw-r--r--cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.obin6230 -> 7090 bytes
-rw-r--r--cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.sx65
-rw-r--r--cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/TargetDataWindows.tdtbin64174 -> 64551 bytes
13 files changed, 909 insertions, 65 deletions
diff --git a/cmpen472hw5_McDonnell/Full_Chip_Simulation.ini b/cmpen472hw5_McDonnell/Full_Chip_Simulation.ini
index 192e8f6..b4d42a0 100644
--- a/cmpen472hw5_McDonnell/Full_Chip_Simulation.ini
+++ b/cmpen472hw5_McDonnell/Full_Chip_Simulation.ini
@@ -10,7 +10,7 @@ Target=sim
Layout=ASM_layout.hwl
LoadDialogOptions=AUTOERASEANDFLASH NORUNAFTERLOAD
CPU=HC12
-MainFrame=0,1,-1,-1,-1,-1,593,167,1886,1190
+MainFrame=0,1,-1,-1,-1,-1,791,172,2084,1195
Configuration=Full_Chip_Simulation.hwc
Statusbar=1
ShowToolbar=1
diff --git a/cmpen472hw5_McDonnell/Sources/cmpen472hw5_McDonnell.asm b/cmpen472hw5_McDonnell/Sources/cmpen472hw5_McDonnell.asm
new file mode 100644
index 0000000..0f2e41c
--- /dev/null
+++ b/cmpen472hw5_McDonnell/Sources/cmpen472hw5_McDonnell.asm
@@ -0,0 +1,500 @@
+**************************************************************************
+*
+* Title: Hardware Controller
+*
+* Objective: CMPEN 472 Homework 5
+*
+* Revision: V1.0
+*
+* Date: Feb. 21, 2025
+*
+* Programmer: Jacob McDonnell
+*
+* Company: The Pennsylvania State University
+* Department of Computer Science and Engineering
+*
+* Algorithm: Simple Serial I/O, Parallel I/O use, time delay-loop, and PWM control
+*
+* Register Use: A & B to control LEDS initially, Light Level, current byte, etc
+* X & Y to hold the counter in the loop and address of strings and length of string.
+*
+* Memory Use: RAM Locations from $3000 for data,
+* RAM Locations from $3100 for program and additional data
+*
+* Input: Parameters hard-coded in the program - PORTB
+* Serial Port for User Input
+*
+* Output: LED 1 at PORTB bit 4
+* LED 2 at PORTB bit 5
+* LED 3 at PORTB bit 6
+* LED 4 at PORTB bit 7
+* Serial Port for String Output
+*
+* Observation: This program will respond to user input to turn on and off LEDs 1, 2, & 3,
+* Dim LED 4 from 100% to 0%, Dim LED 4 from 0% to 100%, and echo user input
+* back to the terminal in Type Writer Mode.
+*
+* Note: ON CSM-12C128 board,
+* Switch 1 is at PORTB bit 0, and
+* LED 4 is at PORTB bit 7.
+*
+* Comments: This program is developed and simulated using CodeWarrior
+* development software and targeted for Axion
+* Manufacturing's CSM-12C128 board running at 24MHz.
+*
+**************************************************************************
+* Parameter Declearation Section
+*
+* Export Symbols
+ xdef pgstart ; export 'pgstart' symbol
+ absentry pgstart ; for assembly entry point
+
+* Symbols and Macros
+PORTA equ $0000 ; i/o port A addresses
+DDRA equ $0002 ; data direction register for PORTA
+PORTB equ $0001 ; i/o port B addresses
+DDRB equ $0003 ; data direction register for PORTB
+
+SCIBDH equ $00C8 ; Serial port (SCI) Baud Register H
+SCIBDL equ $00C9 ; Serial port (SCI) Baud Register L
+SCICR2 equ $00CB ; Serial port (SCI) Control Register 2
+SCISR1 equ $00CC ; Serial port (SCI) Status Register 1
+SCIDRL equ $00CF ; Serial port (SCI) Data Register
+
+CR equ $0d ; carriage return, ASCII 'Return' key
+LF equ $0a ; line feed, ASCII 'next line' character
+NULL equ $00 ; NULL Terminator character
+
+**************************************************************************
+* Data Section: address used [ $3000 to $30FF ] RAM Memory
+*
+ org $3000 ; Reserved RAM memory starting address
+ ; for Data for CMPEN 472 class
+Counter dc.w $0036 ; X register count number for time Delay
+ ; loop for 10 useconds
+ ; The work to calculate this number is in
+ ; the comments for the delay10usec subroutine.
+
+LEVEL dc.b $0005 ; Light Level that the LED should be
+
+str ds.b $0010 ; Array of 16 bytes to read a string
+ dc.b NULL ; NULL terminated
+lenStr dc.w $0010 ; Length of str array
+* There is a second Data Section at the end of the file.
+*
+**************************************************************************
+* Program Section: address used [ $3100 to $3FFF ] RAM Memory
+*
+ org $3100 ; Program start address, in RAM
+pgstart lds #$3100 ; initialize the stack pointer
+
+ ldaa #%11110001 ; LED 1,2,3,4 at PORTB bit 4,5,6,7
+ staa DDRB ; set PORTB bit 4,5,6,7 as output
+
+ ldaa #$0C ; Enable SCI port Tx and Rx units
+ staa SCICR2 ; disable SCI interrupts
+
+ ldd #$0001 ; Set SCI Baud Register = $0001 => 1.5M baud at 24MHz (for simulation)
+ std SCIBDH ; SCI port baud rate change
+
+
+mainLoop
+ ldx #msg ; Load the address of msg into X
+ jsr WriteString ; Jump to WriteString to output message on serial
+
+ ldx #str ; Load the address of str into X
+ ldy lenStr ; Load length of str into Y
+ jsr Zeros ; jump to Zeros to zero out str
+
+ ldx #str ; Reload address of str into X
+ ldy lenStr ; Load the length of the string into Y
+ jsr ReadString ; Jump to ReadString to read user input into str
+
+ ldx #str ; Reload Address of str into X
+ jsr CheckInput ; Jump to CheckInput to handle user input
+ bra mainLoop ; Loop back to mainLoop always
+TypeWriter ldx #twMsg ; Load Type Writer welcome message address
+ jsr WriteString ; Jump to WriteString to write message to serial
+twReadLoop jsr getchar ; Read Character from Serial
+ beq twReadLoop ; While Character == 0, branch to twReadLoop
+ jsr putchar ; Write Character back to terminal
+ staa PORTB ; Write Character to PORTB
+ bra twReadLoop ; Branch always to twReadLoop
+
+**************************************************************************
+* Subroutine Section: address used [ $3100 to $3FFF ] RAM Memory
+*
+
+;*************************************************************************
+; CheckInput subroutine
+;
+; This subroutine will check the input string and match the option.
+;
+; Input: Address of null terminated string in X.
+; Output: No Output, Control flow changed to proper subroutine.
+; Registers in use: X for the address of the string, A & B to read characters from
+; from the string.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine will not return a value, it will jump to the proper subroutine
+; based on the input given.
+;
+
+CheckInput
+ psha ; Save A to the Stack
+ pshb ; Save B to the Stack
+ ldab 1,x+ ; Load Character from string in X to B
+ cmpb #'Q' ; Compare Character in A to 'Q'
+ beq quitCheck ; If B == 'Q', branch to quitCheck
+ cmpb #'L' ; Compare Character in A to 'L'
+ bne FCheck ; If A != 'L', branch to FCheck
+ ldaa 1,x+ ; Load Next character from string into A
+ ldab 1,x+ ; Load Next character from string into B
+ bne none ; If B != 0, then branch to none (unknown string)
+ cmpa #'4' ; Compare Character in A to '4'
+ beq L4Check ; If A == '4', branch to L4Check
+ suba #'0' ; Subtract character '0' from A
+ ; This allows the number in A to be the LED number (if correct)
+ ble none ; If A < '0', branch to none (unknown string)
+ cmpa #4 ; Compare A to 4
+ bhs none ; Branch to None if A > 3
+ jsr TurnOnLED ; Jump to TurnOnLED
+ bra doneCheck ; Branch always to doneCheck
+L4Check jsr LowToHigh ; Jump to LowToHigh subroutine
+ bra doneCheck ; Branch always to doneCheck
+FCheck cmpb #'F' ; Compare Character in A to 'L'
+ bne none ; If A != 'F', branch to none (unknown string)
+ ldaa 1,x+ ; Load Next character from string into A
+ ldab 1,x+ ; Load Next character from string into B
+ bne none ; If B != 0, then branch to none (unknown string)
+ cmpa #'4' ; Compare Character in A to '4'
+ beq F4Check ; If A == '4', branch to F4Check
+ suba #'0' ; Subtract character '0' from A
+ ble none ; If A < '0', branch to none (unknown string)
+ cmpa #4 ; Compare A to 4
+ bhs none ; Branch to None if A > 3
+ jsr TurnOffLED ; Jump to TurnOffLED
+ bra doneCheck ; Branch always to doneCheck
+F4Check jsr HighToLow ; Jump to HighToLow subroutine
+ bra doneCheck ; Branch always to doneCheck
+quitCheck ldaa 1,x+ ; Load next character from string in X to A
+ cmpa #'U' ; Compare A to 'U'
+ bne none ; If A != 'U', branch to none (unknown string)
+ ldaa 1,x+ ; Load next character from string in X to A
+ cmpa #'I' ; Compare A to 'I'
+ bne none ; If A != 'I', branch to none (unknown string)
+ ldaa 1,x+ ; Load next character from string in X to A
+ cmpa #'T' ; Compare A to 'T'
+ bne none ; If A != 'T', branch to none (unknown string)
+ ldaa 1,x+ ; Load next character from string in X to A
+ bne none ; If A != 0, branch to none (unknown string)
+ jmp TypeWriter ; Jump to TypeWriter portion of main routine.
+ ; NOTE: Jumping to TypeWriter will not return
+ ; as it is an infinite loop.
+none ldx #unknown ; Load address of uknown command string into X
+ jsr WriteString ; Write unknown command string to serial
+doneCheck pulb ; Restore B from the stack
+ pula ; Restore A from the stack
+ rts ; Return to caller
+
+;*************************************************************************
+; Zeros subroutine
+;
+; This subroutine will write zeros to every byte in a given array.
+;
+; Input: Address of an array in X and its length in Y
+; Output: Zeros in every byte of an array.
+; Registers in use: X for the address of the array, Y for the length, and A for 0
+; Memory locations in use: Memory Address of the array
+;
+; Comments: This subroutine requires serial to be setup and putchar subroutine.
+;
+
+Zeros
+ psha ; Save A to the Stack
+ clra ; Clear A
+zerosLoop staa 1,x+ ; Load A into byte at X
+ dbne y,zerosLoop ; Decrement Y and loop if Y != 0
+ pula ; Restore A from the stack
+ rts ; Return to caller
+
+;*************************************************************************
+; WriteString subroutine
+;
+; This subroutine will write a given null terminated string to the serial.
+;
+; Input: Address of null terminated string in X
+; Output: Null terminated string written to serial
+; Registers in use: X for the address of the string and A for the current byte
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine requires serial to be setup and putchar subroutine.
+;
+
+WriteString
+ psha ; Save A to the stack
+writeLoop ldaa 1,x+ ; Load the byte at addr in X, then add 1
+ beq doneWrite ; if A == 0, branch to doneWrite
+ jsr putchar ; Jump to putchar to write byte to serial
+ bra writeLoop ; branch always to writeLoop
+doneWrite pula ; restore A from the stack
+ rts ; return to caller
+
+;*************************************************************************
+; ReadString subroutine
+;
+; This subroutine will read a string from the serial line to a given address.
+;
+; Input: Address of an array in X
+; Output: Null terminated string in the given array
+; Registers in use: X for the address of the string Y for the length of the string,
+; and A for the current byte
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine requires serial to be setup and getchar subroutine.
+;
+
+ReadString
+ psha ; Save accumulator A to the stack
+ pshy ; Save Y to the stack
+ pshx ; Save X to the stack
+readLoop jsr getchar ; Jump to putchar to write byte to serial
+ beq readLoop ; While A == 0, loop
+ cmpa #CR ; If A == CR, exit loop
+ beq doneRead ; Branch to doneRead if A == CR
+ staa 1,x+ ; Save the byte to the addr in X, then add 1
+ jsr putchar ; Write Character back to the terminal
+ dey ; Decrement Y by 1
+ beq doneRead ; If Y == 0, no more room, stop reading
+ bra readLoop ; branch always to readLoop
+doneRead ldaa #LF ; Load Line Feed into A
+ jsr putchar ; Write LF to terminal
+ pulx ; Restore X from the stack
+ pulY ; Restore Y from the stack
+ pula ; restore A from the stack
+ rts ; return to caller
+
+;*************************************************************************
+; TurnOnLED subroutine
+;
+; This subroutine will dim turn on a specified LED
+;
+; Input: LED number 1 to 3, in accumulator A
+; Output: Specified LED turned on
+; Registers in use: A accumulator to specify the LED
+; Memory locations in use: PORTB memory location associated with PORTB on the chip
+;
+; Comments: This subroutine requires PORTB to be setup
+;
+
+TurnOnLED
+ cmpa #1 ; Compare A to 1
+ bne onCheckTwo ; If A != 1, check next number
+ bset PORTB,%00010000 ; Turn On LED 1
+ bra onDone ; Jump to onDone
+onCheckTwo cmpa #2 ; Compare A to 2
+ bne onCheckThr ; If A != 2, check next number
+ bset PORTB,%00100000 ; Turn On LED 2
+ bra onDone ; Jump to onDone
+onCheckThr bset PORTB,%01000000 ; Turn On LED 3
+onDone rts ; Return to caller
+
+;*************************************************************************
+; TurnOffLED subroutine
+;
+; This subroutine will dim turn of a specified LED
+;
+; Input: LED number 1 to 3, in accumulator A
+; Output: Specified LED turned of
+; Registers in use: A accumulator to specify the LED
+; Memory locations in use: PORTB memory location associated with PORTB on the chip
+;
+; Comments: This subroutine requires PORTB to be setup
+;
+
+TurnOffLED
+ cmpa #1 ; Compare A to 1
+ bne ofCheckTwo ; If A != 1, check next number
+ bclr PORTB,%00010000 ; Turn Off LED 1
+ bra ofDone ; Jump to onDone
+ofCheckTwo cmpa #2 ; Compare A to 2
+ bne ofCheckThr ; If A != 2, check next number
+ bclr PORTB,%00100000 ; Turn Off LED 2
+ bra ofDone ; Jump to onDone
+ofCheckThr bclr PORTB,%01000000 ; Turn Off LED 3
+ofDone rts ; Return to caller
+
+;*************************************************************************
+; HighToLow subroutine
+;
+; This subroutine will dim LED4 from 100% to 0% in 400ms
+;
+; Input: No Input, all parameters are hard coded
+; Output: LED4 dimmed from 100% to 0% in 400ms, wasted cycles
+; Registers in use: A accumulator to control the light level of the LED
+; Memory locations in use: PORTB memory location associated with PORTB on the chip
+;
+; Comments: This subroutine requires dimmer subroutine
+;
+
+HighToLow
+ psha ; Save accumulator A to the stack
+ ldaa #100 ; load 100 into accumulator A
+decrease tbeq A,doneDec ; Test if A == 0, skip loop if so
+ staa LEVEL ; Save A to LEVEL
+ jsr dimmer ; jump to dimmer subroutine
+ jsr dimmer ; jump to dimmer subroutine
+ jsr dimmer ; jump to dimmer subroutine
+ jsr dimmer ; jump to dimmer subroutine
+ deca ; decrement accumulator A by 1
+ bra decrease ; loop to decrease always
+doneDec pula ; Restore A from the stack
+ rts ; Return to caller
+
+;*************************************************************************
+; LowToHigh subroutine
+;
+; This subroutine will dim LED4 from 0% to 100% in 400ms
+;
+; Input: No Input, all parameters are hard coded
+; Output: LED4 dimmed from 0% to 100% in 400ms, wasted cycles
+; Registers in use: A accumulator to control the light level of the LED
+; Memory locations in use: PORTB memory location associated with PORTB on the chip
+; LEVEL memory location for byte of light level.
+;
+; Comments: This subroutine requires dimmer subroutine
+;
+
+LowToHigh
+ psha ; Save accumulator A to the stack
+ ldaa #0 ; load 100 into accumulator A
+increase cmpa #100 ; Compare A to 100
+ beq doneInc ; Test if A == 100, jump to doneInc
+ staa LEVEL ; Save A to LEVEL
+ jsr dimmer ; jump to dimmer subroutine
+ jsr dimmer ; jump to dimmer subroutine
+ jsr dimmer ; jump to dimmer subroutine
+ jsr dimmer ; jump to dimmer subroutine
+ inca ; increment accumulator A by 1
+ bra increase ; loop to increase always
+doneInc pula ; Restore A from the stack
+ rts ; Return to caller
+
+;*************************************************************************
+; dimmer subroutine
+;
+; This subroutine will dim LED4 to a given level
+;
+; Input: Two 1 byte counters, ONN and OFF, for how many times
+; LED4 should be on and off for.
+; Output: LED4 dimmed to a given level, wasted cycles
+; Registers in use: A accumulator to counter number of times looped
+; Memory locations in use: PORTB memory location associated with PORTB on the chip
+; LEVEL memory location for byte of light level.
+;
+; Comments: This subroutine requires delay10usec subroutine
+;
+
+dimmer
+ bset PORTB,%10000000 ; Turn LED4 on
+ psha ; Save A to the stack
+ ldaa LEVEL ; Load the light level into accumulator A
+onDelay tbeq A, skipToOff ; Test if A == 0, skip loop if so
+ jsr delay10usec ; delay for 10 microseconds
+ deca ; decrement accumulator A by 1
+ bra onDelay ; jump back to onDelay always
+skipToOff bclr PORTB,%10000000 ; Turn off LED4
+ ldaa #100 ; load 100 into accumulator A
+ suba LEVEL ; Subtract LEVEL to get off count
+offDelay tbeq A,doneLoop ; Test if A == 0, skip loop if so
+ jsr delay10usec ; delay 10 microseconds
+ deca ; decrement accumulator A by 1
+ bra offDelay ; jump back to offDelay always
+doneLoop pula ; restore A from the stack
+ rts ; return to caller
+
+;*************************************************************************
+; delay10usec subroutine
+;
+; This subroutine causes a 10 usec. delay
+;
+; Input: a 16bit count number in 'Counter'
+; Output: time delay, cpu cycle wasted
+; Registers in use: X register, as counter
+; Memory locations in use: a 16bit input number at 'Counter'
+;
+; Comments: Code relies on counter being $39 to be exactly 10 usec work is below
+; Given: freq = 24MHz = 24000000 sec = 10 usec = 0.00001
+; freq = cycles / seconds
+;
+; cycles = freq * seconds = 24000000Hz * 0.00001 = 240
+;
+; This sub routine is 12 + 4 * 'Counter' cycles long, solving for 'Counter'
+; the result is found to be 57.
+;
+
+delay10usec
+ pshx ; Save register x to the stack
+ ldx Counter ; load counter into register x
+innerLoop dex ; decrement register x by 1
+ bne innerLoop ; loop while register x is not 0
+ pulx ; restore register x from the stack
+ nop ; extra nop to make exactly 10 usec
+ rts ; return to caller
+
+;*************************************************************************
+; putchar subroutine
+;
+; This subroutine writes a single byte to a serial line
+;
+; Input: A single ASCII byte in accumulator A
+; Output: Sends one character to SCI port
+; Registers in use: Accumulator A with input byte
+; Memory locations in use: SCISR1 and SCIDRL status and data registers
+;
+
+putchar brclr SCISR1,#%10000000,putchar ; wait for transmit buffer empty
+ staa SCIDRL ; send a character
+ rts ; Return to caller
+
+;*************************************************************************
+; putchar subroutine
+;
+; This subroutine reads one byte from the SCI port
+;
+; Input: One byte from the SCI port
+; Output: One byte in accumulator A
+; Registers in use: Accumulator A for output byte
+; Memory locations in use: SCISR1 and SCIDRL status and data registers
+;
+
+getchar brclr SCISR1,#%00100000,getchar7 ; If no input on SCI port, return 0
+ ldaa SCIDRL ; Read one byte from SCI port into A
+ rts ; Return to caller
+getchar7 clra ; Set A to 0
+ rts ; Return to caller
+
+**************************************************************************
+* Data Section: address used [ $3100 to $3FFF ] RAM Memory
+*
+
+; unknown: string to warn the user of unknown output
+unknown dc.b 'Error: Unknown Command',CR,LF,NULL
+
+; twMsg: welcome message when type writer loads
+twMsg dc.b 'Welcome to Type Writer, you may type below.',CR,LF
+ dc.b 'Restart to enter main menu again.',CR,LF,NULL
+
+; msg: this is the main option menu string
+msg dc.b 'L1: Turn on LED1',CR,LF
+ dc.b 'F1: Turn off LED1',CR,LF
+ dc.b 'L2: Turn on LED2',CR,LF
+ dc.b 'F2: Turn off LED2',CR,LF
+ dc.b 'L3: Turn on LED3',CR,LF
+ dc.b 'F3: Turn off LED3',CR,LF
+ dc.b 'L4: LED4 goes from 0% light level to 100% light level in 0.4 seconds',CR,LF
+ dc.b 'F4: LED4 goes from 100% light level to 0% light level in 0.4 seconds',CR,LF
+ dc.b 'QUIT: Quit menu program, run Type writer program.',CR,LF,NULL
+
+
+ end ; last line of the file
diff --git a/cmpen472hw5_McDonnell/Sources/main.asm b/cmpen472hw5_McDonnell/Sources/main.asm
index 8eef62d..0f2e41c 100644
--- a/cmpen472hw5_McDonnell/Sources/main.asm
+++ b/cmpen472hw5_McDonnell/Sources/main.asm
@@ -19,7 +19,7 @@
* X & Y to hold the counter in the loop and address of strings and length of string.
*
* Memory Use: RAM Locations from $3000 for data,
-* RAM Locations from $3100 for program
+* RAM Locations from $3100 for program and additional data
*
* Input: Parameters hard-coded in the program - PORTB
* Serial Port for User Input
@@ -77,9 +77,9 @@ Counter dc.w $0036 ; X register count number for time Delay
LEVEL dc.b $0005 ; Light Level that the LED should be
-str ds.b $000F ; Array of 16 bytes to read a string
- dc.b NULL
-lenStr dc.w $000F ; Length of str array
+str ds.b $0010 ; Array of 16 bytes to read a string
+ dc.b NULL ; NULL terminated
+lenStr dc.w $0010 ; Length of str array
* There is a second Data Section at the end of the file.
*
**************************************************************************
diff --git a/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/CWSettingsWindows.stg b/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/CWSettingsWindows.stg
index a8536b0..f8fc1f8 100644
--- a/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/CWSettingsWindows.stg
+++ b/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/CWSettingsWindows.stg
Binary files differ
diff --git a/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/Standard/TargetDataWindows.tdt b/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/Standard/TargetDataWindows.tdt
index f03dd86..d99d038 100644
--- a/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/Standard/TargetDataWindows.tdt
+++ b/cmpen472hw5_McDonnell/cmpen472hw5_McDonnell_Data/Standard/TargetDataWindows.tdt
Binary files differ
diff --git a/cmpen472hw6_McDonnell/Sources/main.asm b/cmpen472hw6_McDonnell/Sources/main.asm
index 62592ce..1e9eb0c 100644
--- a/cmpen472hw6_McDonnell/Sources/main.asm
+++ b/cmpen472hw6_McDonnell/Sources/main.asm
@@ -84,6 +84,13 @@ lenBuf dc.w $0010 ; Length of buffer array
buffer2 ds.b $0010 ; Array of 16 bytes for reading and reversal
dc.b NULL ; NULL terminated
lenBuf2 dc.w $0010 ; length of buffer2
+
+badAddr dc.b 'invalid input, address',CR,LF,NULL ; Error message for bad address
+
+badData dc.b 'invalid input, data',CR,LF,NULL ; Error message for bad data
+
+badCom dc.b 'invalid input, command',CR,LF,NULL ; Error message for bad command
+
* There is a second Data Section at the end of the file.
*
**************************************************************************
@@ -134,6 +141,17 @@ mainLoop
ldx #Counter
jsr PrintMem
+ ldx #buffer
+ ldy lenBuf
+ jsr Zeros
+
+ ldx #buffer
+ ldy lenBuf
+ jsr ReadString
+
+ ldx #buffer
+ jsr ReadDecimal
+
bra mainLoop
ldx #msg ; Load the address of msg into X
@@ -179,7 +197,138 @@ twReadLoop jsr getchar ; Read Character from Serial
CheckInput
rts ; Return to caller
+
+;*************************************************************************
+; ReadHex subroutine
+;
+; This subroutine will read an ASCII string of a number in hex and convert it to
+; its value.
+;
+; Input: A memory address in register X.
+; Output: The value of the hex number in the Y register, and any errors printed
+; to the seriel line. Zero bit is set if error occurs.
+; Registers in use: X for the address of the contents and for a buffer while printing,
+; D for multiplication, B for the character, Y for output value.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine will return the value in the Y register, and if an error occurs,
+; the Zero bit in the CCR will be set.
+;
+
+ReadHex
+ pshx ; Save X to the stack
+ pshd ; Save D to the stack
+ ldy #0 ; Clear Y register
+ ldab 1,x+ ; Read character from X into B, add 1 to X
+ cmpb #'$' ; Compare B to '$'
+ bne rHError ; If B != '$', jump to error, not hex data
+rHLoop ldab 1,x+ ; Read Next character from X
+ beq rHDone ; If B == 0, exit loop
+ cmpb #' ' ; Compare B to space character
+ beq rHDone ; If B == ' ', exit loop
+ cmpb #'0' ; Compare B to '0' character
+ blt rHError ; If B < '0', bad address, exit loop
+ cmpb #'9' ; Compare B to '9' character
+ bhi rHAlpha ; If B > '9', check if 'A'-'F' characters
+ subb #'0' ; Subtract '0' from B to get true value
+ pshb ; Save B to the stack
+ ldd #16 ; load 16 into D
+ emul ; Multiply Y and D
+ exg d,y ; Transfer data from D to Y
+ pulb ; Restore b from the stack
+ aby ; Add B to Y
+ bra rHLoop ; Branch always to rHLoop
+rHAlpha cmpb #'A' ; Compare B to 'A' character
+ blt rHError ; If B < 'A', bad address, exit loop
+ cmpb #'F' ; Compare B to 'F' character
+ bhi rHError ; If B > 'F', invalid data, error out
+ subb #'A' ; Subtract 'A' from B to get true value
+ addb #$A ; Add $A to B to account for offet
+ pshb ; Save B to the stack
+ ldd #16 ; load 16 into D
+ emul ; Multiply Y and D
+ exg d,y ; Transfer data from D to Y
+ pulb ; Restore b from the stack
+ aby ; Add B to Y
+ bra rHLoop ; Branch always to rHLoop
+rHDone clra ; clear A accumulator
+ tap ; Transfer A into CCR to clear zero bit
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+rHError ldx #badAddr ; Load address of bad address string into X
+ jsr WriteString ; Write string to seriel output
+ ldaa #4 ; Load 4 into A to set zero bit in CCR
+ tap ; Transfer A into CCR to set zero bit and warn error
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+;*************************************************************************
+; ReadDecimal subroutine
+;
+; This subroutine will read an ASCII string of a number in decimal and convert it to
+; its value.
+;
+; Input: A memory address in register X.
+; Output: The value of the number in the Y register, and any errors printed
+; to the seriel line. Zero bit is set if error occurs.
+; Registers in use: X for the address of the contents and for a buffer while printing,
+; D for multiplication, B for the character, Y for output value.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine will return the value in the Y register, and if an error occurs,
+; the Zero bit in the CCR will be set.
+;
+
+ReadDecimal
+ pshx ; Save X to the stack
+ pshd ; Save D to the stack
+ ldy #0 ; Clear Y register
+dHLoop ldab 1,x+ ; Read Next character from X
+ beq dHDone ; If B == 0, exit loop
+ cmpb #' ' ; Compare B to space character
+ beq dHDone ; If B == ' ', exit loop
+ cmpb #'0' ; Compare B to '0' character
+ blt dHError ; If B < '0', bad address, exit loop
+ cmpb #'9' ; Compare B to '9' character
+ bhi dHError ; If B > '9', check if 'A'-'F' characters
+ subb #'0' ; Subtract '0' from B to get true value
+ pshb ; Save B to the stack
+ ldd #10 ; load 10 into D
+ emul ; Multiply Y and D
+ exg d,y ; Transfer data from D to Y
+ pulb ; Restore b from the stack
+ aby ; Add B to Y
+ bra dHLoop ; Branch always to rHLoop
+dHDone clra ; clear A accumulator
+ tap ; Transfer A into CCR to clear zero bit
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+dHError ldx #badAddr ; Load address of bad address string into X
+ jsr WriteString ; Write string to seriel output
+ ldaa #4 ; Load 4 into A to set zero bit in CCR
+ tap ; Transfer A into CCR to set zero bit and warn error
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+
+;*************************************************************************
+; PrintMem subroutine
+;
+; This subroutine will print the address and contents of the given memory location.
+;
+; Input: A memory address in register X.
+; Output: The memory address in Hex and the contents in binary, hex, & decimal
+; on the seriel output.
+; Registers in use: X for the address of the contents and for a buffer while printing,
+; D for the contents of the location, Y for another buffer address while
+; reversing strings and printing.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine requires the seriel console to be setup before calling.
+;
PrintMem
pshy ; Save Y to the Stack
@@ -221,7 +370,23 @@ PrintMem
puld ; Restore D from the stack
puly ; Restore Y from the stack
rts ; Return to caller
-
+
+;*************************************************************************
+; strrev subroutine
+;
+; This subroutine will reverse a string from one buffer into another.
+;
+; Input: Address of null terminated string in X, address of a large enough
+; buffer in Y.
+; Output: The string in X reversed in Y.
+; Registers in use: X for the address of the string, Y for the address of the buffer,
+; A to read characters from the string.
+; Memory locations in use: Memory Address for serial line, address of the string & buffer
+;
+; Comments: This subroutine will not check that the output buffer is large enough, that
+; is the job of the caller.
+;
+
strrev
pshx ; Save X to the stack
pshy ; Save Y to the stack
diff --git a/cmpen472hw6_McDonnell/bin/Project.abs b/cmpen472hw6_McDonnell/bin/Project.abs
index c48cb9d..45904b8 100644
--- a/cmpen472hw6_McDonnell/bin/Project.abs
+++ b/cmpen472hw6_McDonnell/bin/Project.abs
Binary files differ
diff --git a/cmpen472hw6_McDonnell/bin/Project.abs.s19 b/cmpen472hw6_McDonnell/bin/Project.abs.s19
index 55fba26..e6448e5 100644
--- a/cmpen472hw6_McDonnell/bin/Project.abs.s19
+++ b/cmpen472hw6_McDonnell/bin/Project.abs.s19
@@ -1,32 +1,39 @@
S0580000433A5C55736572735C4A61636F62204D63446F6E6E656C6C5C446F63756D656E74735C434D50454E2D3437322D48575C636D70656E3437326877365F4D63446F6E6E656C6C5C62696E5C50726F6A6563742E6162734A
S1233000003605000000000000000000000000000000000000100000000000000000000061
-S10C302000000000000000001093
-S1233100CF310086F15A03860C5ACBCC00015CC88612C6CDCD3003163213CE3003FD301467
-S1233120163285860D1632B9860A1632B986FFC6FFCD3003163255CE3003FD3014163285A3
-S1233140860D1632B9860A1632B9CE300016318520BECE333316328ECE3003FD301416320A
-S123316085CE3003FD301416329ACE3003163184209ECE32E216328E1632C027FB1632B935
-S12331805A0120F43D353BB7D4CD3003163213B7C5863D1632B9863E1632B9EC00CE300337
-S12331A0FD30141632851631EE3686201632B91632B932CD30031632133686201632B9166A
-S12331C032B932CE3003FD3014163285CD3003163255860D1632B9860A1632B93A313D3421
-S12331E03536A67F27046A3020F83231303D343B37180E86251632B9CE001055B720840187
-S12332008B301632B90405088E000826EE3320EB3A303D343B35CE001018108E00002716D9
-S1233220C10A2D0ACB41C00A6B60B7D420E8CB306B60B7D420E08C000026E586246A60CE2A
-S123324030161631DF16328EFD3027CE3016163285313A303D343B35CE000A18108E0000E9
-S12332602708CB306B60B7D420EE8C000026F3CE30161631DF16328EFD3027CE3016163257
-S123328085313A303D36876A300436FB323D36A63027051632B920F7323D3635341632C06C
-S12332A027FB810D270A6A301632B903270220ED860A1632B93031323D4FCC80FC5ACF3DF7
-S12332C04FCC200396CF3D873D4572726F723A20556E6B6E6F776E20436F6D6D616E640D06
-S12332E00A0057656C636F6D6520746F2054797065205772697465722C20796F75206D61FB
-S12333007920747970652062656C6F772E0D0A5265737461727420746F20656E746572208A
-S12333206D61696E206D656E7520616761696E2E0D0A004C313A205475726E206F6E204CC1
-S12333404544310D0A46313A205475726E206F6666204C4544310D0A4C323A205475726E05
-S1233360206F6E204C4544320D0A46323A205475726E206F6666204C4544320D0A4C333A41
-S1233380205475726E206F6E204C4544330D0A46333A205475726E206F6666204C45443325
-S12333A00D0A4C343A204C45443420676F65732066726F6D203025206C69676874206C65CF
-S12333C076656C20746F2031303025206C69676874206C6576656C20696E20302E3420731D
-S12333E065636F6E64730D0A46343A204C45443420676F65732066726F6D203130302520C1
-S12334006C69676874206C6576656C20746F203025206C69676874206C6576656C20696E79
-S123342020302E34207365636F6E64730D0A515549543A2051756974206D656E7520707299
-S12334406F6772616D2C2072756E2054797065207772697465722070726F6772616D2E0DDF
-S10534600A005C
+S1233020000000000000000010696E76616C696420696E7075742C20616464726573730D06
+S12330400A00696E76616C696420696E7075742C20646174610D0A00696E76616C69642027
+S1143060696E7075742C20636F6D6D616E640D0A00E9
+S1233100CF310086F15A03860C5ACBCC00015CC88612C6CDCD30031632B5CE3003FD3014C5
+S1233120163327860D16335B860A16335B86FFC6FFCD30031632F7CE3003FD301416332775
+S1233140860D16335B860A16335BCE3000163227CE3003FD3014163327CE3003FD30141689
+S1233160333CCE30031631F120A6CE33D5163330CE3003FD3014163327CE3003FD30141684
+S1233180333CCE300316319C2086CE338416333016336227FB16335B5A0120F43D343BCDDB
+S12331A00000E630C124263CE6302732C120272EC1302D30C139220EC03037CC001013B7C4
+S12331C0C63319ED20E2C1412D1AC1462216C041CB0A37CC001013B7C63319ED20CA87B788
+S12331E0023A303DCE30291633308604B7023A303D343BCD0000E630271AC1202716C130F6
+S12332002D18C1392214C03037CC000A13B7C63319ED20E287B7023A303DCE3029163330E6
+S12332208604B7023A303D353BB7D4CD30031632B5B7C5863D16335B863E16335BEC00CEA3
+S12332403003FD301416332716329036862016335B16335B32CD30031632B5368620163336
+S12332605B16335B32CE3003FD3014163327CD30031632F7860D16335B860A16335B3A3152
+S12332803D343536A67F27046A3020F83231303D343B37180E862516335BCE001055B72057
+S12332A084018B3016335B0405088E000826EE3320EB3A303D343B35CE001018108E00004E
+S12332C02716C10A2D0ACB41C00A6B60B7D420E8CB306B60B7D420E08C000026E586246A7B
+S12332E060CE3016163281163330FD3027CE3016163327313A303D343B35CE000A18108E32
+S123330000002708CB306B60B7D420EE8C000026F3CE3016163281163330FD3027CE3016B8
+S1233320163327313A303D36876A300436FB323D36A630270516335B20F7323D363534162F
+S1233340336227FB810D270A6A3016335B03270220ED860A16335B3031323D4FCC80FC5A87
+S1233360CF3D4FCC200396CF3D873D4572726F723A20556E6B6E6F776E20436F6D6D616ECA
+S1233380640D0A0057656C636F6D6520746F2054797065205772697465722C20796F7520B7
+S12333A06D617920747970652062656C6F772E0D0A5265737461727420746F20656E7465AE
+S12333C072206D61696E206D656E7520616761696E2E0D0A004C313A205475726E206F6EFB
+S12333E0204C4544310D0A46313A205475726E206F6666204C4544310D0A4C323A205475D9
+S1233400726E206F6E204C4544320D0A46323A205475726E206F6666204C4544320D0A4C2D
+S1233420333A205475726E206F6E204C4544330D0A46333A205475726E206F6666204C458E
+S123344044330D0A4C343A204C45443420676F65732066726F6D203025206C696768742088
+S12334606C6576656C20746F2031303025206C69676874206C6576656C20696E20302E343E
+S1233480207365636F6E64730D0A46343A204C45443420676F65732066726F6D20313030D2
+S12334A025206C69676874206C6576656C20746F203025206C69676874206C6576656C206B
+S12334C0696E20302E34207365636F6E64730D0A515549543A2051756974206D656E752004
+S12334E070726F6772616D2C2072756E2054797065207772697465722070726F6772616D98
+S10735002E0D0A007E
S9030000FC
diff --git a/cmpen472hw6_McDonnell/bin/main.dbg b/cmpen472hw6_McDonnell/bin/main.dbg
index 58fa190..3cd2193 100644
--- a/cmpen472hw6_McDonnell/bin/main.dbg
+++ b/cmpen472hw6_McDonnell/bin/main.dbg
@@ -84,6 +84,13 @@ lenBuf dc.w $0010 ; Length of buffer array
buffer2 ds.b $0010 ; Array of 16 bytes for reading and reversal
dc.b NULL ; NULL terminated
lenBuf2 dc.w $0010 ; length of buffer2
+
+badAddr dc.b 'invalid input, address',CR,LF,NULL ; Error message for bad address
+
+badData dc.b 'invalid input, data',CR,LF,NULL ; Error message for bad data
+
+badCom dc.b 'invalid input, command',CR,LF,NULL ; Error message for bad command
+
* There is a second Data Section at the end of the file.
*
**************************************************************************
@@ -134,6 +141,17 @@ mainLoop
ldx #Counter
jsr PrintMem
+ ldx #buffer
+ ldy lenBuf
+ jsr Zeros
+
+ ldx #buffer
+ ldy lenBuf
+ jsr ReadString
+
+ ldx #buffer
+ jsr ReadDecimal
+
bra mainLoop
ldx #msg ; Load the address of msg into X
@@ -179,7 +197,138 @@ twReadLoop jsr getchar ; Read Character from Serial
CheckInput
rts ; Return to caller
+
+;*************************************************************************
+; ReadHex subroutine
+;
+; This subroutine will read an ASCII string of a number in hex and convert it to
+; its value.
+;
+; Input: A memory address in register X.
+; Output: The value of the hex number in the Y register, and any errors printed
+; to the seriel line. Zero bit is set if error occurs.
+; Registers in use: X for the address of the contents and for a buffer while printing,
+; D for multiplication, B for the character, Y for output value.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine will return the value in the Y register, and if an error occurs,
+; the Zero bit in the CCR will be set.
+;
+
+ReadHex
+ pshx ; Save X to the stack
+ pshd ; Save D to the stack
+ ldy #0 ; Clear Y register
+ ldab 1,x+ ; Read character from X into B, add 1 to X
+ cmpb #'$' ; Compare B to '$'
+ bne rHError ; If B != '$', jump to error, not hex data
+rHLoop ldab 1,x+ ; Read Next character from X
+ beq rHDone ; If B == 0, exit loop
+ cmpb #' ' ; Compare B to space character
+ beq rHDone ; If B == ' ', exit loop
+ cmpb #'0' ; Compare B to '0' character
+ blt rHError ; If B < '0', bad address, exit loop
+ cmpb #'9' ; Compare B to '9' character
+ bhi rHAlpha ; If B > '9', check if 'A'-'F' characters
+ subb #'0' ; Subtract '0' from B to get true value
+ pshb ; Save B to the stack
+ ldd #16 ; load 16 into D
+ emul ; Multiply Y and D
+ exg d,y ; Transfer data from D to Y
+ pulb ; Restore b from the stack
+ aby ; Add B to Y
+ bra rHLoop ; Branch always to rHLoop
+rHAlpha cmpb #'A' ; Compare B to 'A' character
+ blt rHError ; If B < 'A', bad address, exit loop
+ cmpb #'F' ; Compare B to 'F' character
+ bhi rHError ; If B > 'F', invalid data, error out
+ subb #'A' ; Subtract 'A' from B to get true value
+ addb #$A ; Add $A to B to account for offet
+ pshb ; Save B to the stack
+ ldd #16 ; load 16 into D
+ emul ; Multiply Y and D
+ exg d,y ; Transfer data from D to Y
+ pulb ; Restore b from the stack
+ aby ; Add B to Y
+ bra rHLoop ; Branch always to rHLoop
+rHDone clra ; clear A accumulator
+ tap ; Transfer A into CCR to clear zero bit
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+rHError ldx #badAddr ; Load address of bad address string into X
+ jsr WriteString ; Write string to seriel output
+ ldaa #4 ; Load 4 into A to set zero bit in CCR
+ tap ; Transfer A into CCR to set zero bit and warn error
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+;*************************************************************************
+; ReadDecimal subroutine
+;
+; This subroutine will read an ASCII string of a number in decimal and convert it to
+; its value.
+;
+; Input: A memory address in register X.
+; Output: The value of the number in the Y register, and any errors printed
+; to the seriel line. Zero bit is set if error occurs.
+; Registers in use: X for the address of the contents and for a buffer while printing,
+; D for multiplication, B for the character, Y for output value.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine will return the value in the Y register, and if an error occurs,
+; the Zero bit in the CCR will be set.
+;
+
+ReadDecimal
+ pshx ; Save X to the stack
+ pshd ; Save D to the stack
+ ldy #0 ; Clear Y register
+dHLoop ldab 1,x+ ; Read Next character from X
+ beq dHDone ; If B == 0, exit loop
+ cmpb #' ' ; Compare B to space character
+ beq dHDone ; If B == ' ', exit loop
+ cmpb #'0' ; Compare B to '0' character
+ blt dHError ; If B < '0', bad address, exit loop
+ cmpb #'9' ; Compare B to '9' character
+ bhi dHError ; If B > '9', check if 'A'-'F' characters
+ subb #'0' ; Subtract '0' from B to get true value
+ pshb ; Save B to the stack
+ ldd #10 ; load 10 into D
+ emul ; Multiply Y and D
+ exg d,y ; Transfer data from D to Y
+ pulb ; Restore b from the stack
+ aby ; Add B to Y
+ bra dHLoop ; Branch always to rHLoop
+dHDone clra ; clear A accumulator
+ tap ; Transfer A into CCR to clear zero bit
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+dHError ldx #badAddr ; Load address of bad address string into X
+ jsr WriteString ; Write string to seriel output
+ ldaa #4 ; Load 4 into A to set zero bit in CCR
+ tap ; Transfer A into CCR to set zero bit and warn error
+ puld ; Restore D from the stack
+ pulx ; Restore X from the stack
+ rts ; Return to caller
+
+;*************************************************************************
+; PrintMem subroutine
+;
+; This subroutine will print the address and contents of the given memory location.
+;
+; Input: A memory address in register X.
+; Output: The memory address in Hex and the contents in binary, hex, & decimal
+; on the seriel output.
+; Registers in use: X for the address of the contents and for a buffer while printing,
+; D for the contents of the location, Y for another buffer address while
+; reversing strings and printing.
+; Memory locations in use: Memory Address for serial line, address of the string
+;
+; Comments: This subroutine requires the seriel console to be setup before calling.
+;
PrintMem
pshy ; Save Y to the Stack
@@ -221,7 +370,23 @@ PrintMem
puld ; Restore D from the stack
puly ; Restore Y from the stack
rts ; Return to caller
-
+
+;*************************************************************************
+; strrev subroutine
+;
+; This subroutine will reverse a string from one buffer into another.
+;
+; Input: Address of null terminated string in X, address of a large enough
+; buffer in Y.
+; Output: The string in X reversed in Y.
+; Registers in use: X for the address of the string, Y for the address of the buffer,
+; A to read characters from the string.
+; Memory locations in use: Memory Address for serial line, address of the string & buffer
+;
+; Comments: This subroutine will not check that the output buffer is large enough, that
+; is the job of the caller.
+;
+
strrev
pshx ; Save X to the stack
pshy ; Save Y to the stack
diff --git a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell.mcp b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell.mcp
index 4bff8b3..a09cd6e 100644
--- a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell.mcp
+++ b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell.mcp
Binary files differ
diff --git a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.o b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.o
index c48cb9d..45904b8 100644
--- a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.o
+++ b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.o
Binary files differ
diff --git a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.sx b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.sx
index 25b5dc8..8290b66 100644
--- a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.sx
+++ b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/ObjectCode/main.asm.sx
@@ -1,32 +1,39 @@
S0840000433A5C55736572735C4A61636F62204D63446F6E6E656C6C5C446F63756D656E74735C434D50454E2D3437322D48575C636D70656E3437326877365F4D63446F6E6E656C6C5C636D70656E3437326877365F4D63446F6E6E656C6C5F446174615C5374616E646172645C4F626A656374436F64655C6D61696E2E61736D2E70726DCD
S1233000003605000000000000000000000000000000000000100000000000000000000061
-S10C302000000000000000001093
-S1233100CF310086F15A03860C5ACBCC00015CC88612C6CDCD3003163213CE3003FD301467
-S1233120163285860D1632B9860A1632B986FFC6FFCD3003163255CE3003FD3014163285A3
-S1233140860D1632B9860A1632B9CE300016318520BECE333316328ECE3003FD301416320A
-S123316085CE3003FD301416329ACE3003163184209ECE32E216328E1632C027FB1632B935
-S12331805A0120F43D353BB7D4CD3003163213B7C5863D1632B9863E1632B9EC00CE300337
-S12331A0FD30141632851631EE3686201632B91632B932CD30031632133686201632B9166A
-S12331C032B932CE3003FD3014163285CD3003163255860D1632B9860A1632B93A313D3421
-S12331E03536A67F27046A3020F83231303D343B37180E86251632B9CE001055B720840187
-S12332008B301632B90405088E000826EE3320EB3A303D343B35CE001018108E00002716D9
-S1233220C10A2D0ACB41C00A6B60B7D420E8CB306B60B7D420E08C000026E586246A60CE2A
-S123324030161631DF16328EFD3027CE3016163285313A303D343B35CE000A18108E0000E9
-S12332602708CB306B60B7D420EE8C000026F3CE30161631DF16328EFD3027CE3016163257
-S123328085313A303D36876A300436FB323D36A63027051632B920F7323D3635341632C06C
-S12332A027FB810D270A6A301632B903270220ED860A1632B93031323D4FCC80FC5ACF3DF7
-S12332C04FCC200396CF3D873D4572726F723A20556E6B6E6F776E20436F6D6D616E640D06
-S12332E00A0057656C636F6D6520746F2054797065205772697465722C20796F75206D61FB
-S12333007920747970652062656C6F772E0D0A5265737461727420746F20656E746572208A
-S12333206D61696E206D656E7520616761696E2E0D0A004C313A205475726E206F6E204CC1
-S12333404544310D0A46313A205475726E206F6666204C4544310D0A4C323A205475726E05
-S1233360206F6E204C4544320D0A46323A205475726E206F6666204C4544320D0A4C333A41
-S1233380205475726E206F6E204C4544330D0A46333A205475726E206F6666204C45443325
-S12333A00D0A4C343A204C45443420676F65732066726F6D203025206C69676874206C65CF
-S12333C076656C20746F2031303025206C69676874206C6576656C20696E20302E3420731D
-S12333E065636F6E64730D0A46343A204C45443420676F65732066726F6D203130302520C1
-S12334006C69676874206C6576656C20746F203025206C69676874206C6576656C20696E79
-S123342020302E34207365636F6E64730D0A515549543A2051756974206D656E7520707299
-S12334406F6772616D2C2072756E2054797065207772697465722070726F6772616D2E0DDF
-S10534600A005C
+S1233020000000000000000010696E76616C696420696E7075742C20616464726573730D06
+S12330400A00696E76616C696420696E7075742C20646174610D0A00696E76616C69642027
+S1143060696E7075742C20636F6D6D616E640D0A00E9
+S1233100CF310086F15A03860C5ACBCC00015CC88612C6CDCD30031632B5CE3003FD3014C5
+S1233120163327860D16335B860A16335B86FFC6FFCD30031632F7CE3003FD301416332775
+S1233140860D16335B860A16335BCE3000163227CE3003FD3014163327CE3003FD30141689
+S1233160333CCE30031631F120A6CE33D5163330CE3003FD3014163327CE3003FD30141684
+S1233180333CCE300316319C2086CE338416333016336227FB16335B5A0120F43D343BCDDB
+S12331A00000E630C124263CE6302732C120272EC1302D30C139220EC03037CC001013B7C4
+S12331C0C63319ED20E2C1412D1AC1462216C041CB0A37CC001013B7C63319ED20CA87B788
+S12331E0023A303DCE30291633308604B7023A303D343BCD0000E630271AC1202716C130F6
+S12332002D18C1392214C03037CC000A13B7C63319ED20E287B7023A303DCE3029163330E6
+S12332208604B7023A303D353BB7D4CD30031632B5B7C5863D16335B863E16335BEC00CEA3
+S12332403003FD301416332716329036862016335B16335B32CD30031632B5368620163336
+S12332605B16335B32CE3003FD3014163327CD30031632F7860D16335B860A16335B3A3152
+S12332803D343536A67F27046A3020F83231303D343B37180E862516335BCE001055B72057
+S12332A084018B3016335B0405088E000826EE3320EB3A303D343B35CE001018108E00004E
+S12332C02716C10A2D0ACB41C00A6B60B7D420E8CB306B60B7D420E08C000026E586246A7B
+S12332E060CE3016163281163330FD3027CE3016163327313A303D343B35CE000A18108E32
+S123330000002708CB306B60B7D420EE8C000026F3CE3016163281163330FD3027CE3016B8
+S1233320163327313A303D36876A300436FB323D36A630270516335B20F7323D363534162F
+S1233340336227FB810D270A6A3016335B03270220ED860A16335B3031323D4FCC80FC5A87
+S1233360CF3D4FCC200396CF3D873D4572726F723A20556E6B6E6F776E20436F6D6D616ECA
+S1233380640D0A0057656C636F6D6520746F2054797065205772697465722C20796F7520B7
+S12333A06D617920747970652062656C6F772E0D0A5265737461727420746F20656E7465AE
+S12333C072206D61696E206D656E7520616761696E2E0D0A004C313A205475726E206F6EFB
+S12333E0204C4544310D0A46313A205475726E206F6666204C4544310D0A4C323A205475D9
+S1233400726E206F6E204C4544320D0A46323A205475726E206F6666204C4544320D0A4C2D
+S1233420333A205475726E206F6E204C4544330D0A46333A205475726E206F6666204C458E
+S123344044330D0A4C343A204C45443420676F65732066726F6D203025206C696768742088
+S12334606C6576656C20746F2031303025206C69676874206C6576656C20696E20302E343E
+S1233480207365636F6E64730D0A46343A204C45443420676F65732066726F6D20313030D2
+S12334A025206C69676874206C6576656C20746F203025206C69676874206C6576656C206B
+S12334C0696E20302E34207365636F6E64730D0A515549543A2051756974206D656E752004
+S12334E070726F6772616D2C2072756E2054797065207772697465722070726F6772616D98
+S10735002E0D0A007E
S9033100CB
diff --git a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/TargetDataWindows.tdt b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/TargetDataWindows.tdt
index df5641b..96523a5 100644
--- a/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/TargetDataWindows.tdt
+++ b/cmpen472hw6_McDonnell/cmpen472hw6_McDonnell_Data/Standard/TargetDataWindows.tdt
Binary files differ