summaryrefslogtreecommitdiff
path: root/HW1/Sources
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2025-04-01 18:21:56 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2025-04-01 18:21:56 -0400
commitfd3d5b220e20b5279a453739b42aae8becd69ca9 (patch)
treeda6b4fc053d94f132595a421a79fed469449c9f7 /HW1/Sources
parent76518a5895392bfc55fab037afadb32b1add9d68 (diff)
HW9: Initial glue of 7 & 8
Diffstat (limited to 'HW1/Sources')
-rw-r--r--HW1/Sources/cmpen472hw1_McDonnell.asm63
-rw-r--r--HW1/Sources/derivative.inc10
-rw-r--r--HW1/Sources/main.asm63
3 files changed, 0 insertions, 136 deletions
diff --git a/HW1/Sources/cmpen472hw1_McDonnell.asm b/HW1/Sources/cmpen472hw1_McDonnell.asm
deleted file mode 100644
index 31da964..0000000
--- a/HW1/Sources/cmpen472hw1_McDonnell.asm
+++ /dev/null
@@ -1,63 +0,0 @@
-**********************************************************************************************
-*
-* Title: Star Fill (In Memory) Homework #1
-*
-* Objective: CMPEN472 Homework #1 demonstration program. Fill 225 bytes of memory with '*'.
-*
-* Revision: V1.0
-*
-* Date: Jan. 22, 2025
-*
-* Programmer: Jacob McDonnell
-*
-* Company: The Pennsylvania State Universtiy
-* Electrical Engineering and Computer Science
-*
-* Algorithm: While Loop demo of HCS12 Assembly
-*
-* Register Use: A accumulator: character to be placed in memory
-* B accumulator: counter of filled memory locations
-* X register: pointer to memory location to fill
-*
-* Memory use: RAM locations $3000 to $30E1
-*
-* Input: No input, data and parameters are hard coded.
-*
-* Output: Memory locations $3000 to $30E1 are filled with '*' character.
-*
-* Observation: This program is designed for instruction purpose.
-* This program can be a template for other loop based code.
-*
-* Comments: This program is developed and simulated using CodeWarrior Development Software.
-*
-**********************************************************************************************
-* Parameter Declaration Section
-*
-* Export Symbols
- xdef pgstart ; export 'pgstart' symbol
- absentry pgstart ; for assembly entry point
-* Symbols and Macros
-porta equ $0000 ; i/o port address
-portb equ $0001
-ddra equ $0002
-ddrb equ $0003
-**********************************************************************************************
-* Data Section
-*
- org $3000 ; reserved memory starting address
-here ds.b $e1 ; 225 memory locations reserved
-count dc.b $e1 ; constant counter for stars = 225
-*
-**********************************************************************************************
-* Program Section
-*
- org $3100 ; Program Start Address in RAM
-pgstart ldaa #'*' ; Load '*' into accumulator A
- ldab count ; Load count of stars into B
- ldx #here ; Load address pointer into X
-loop staa 0,x ; Put a start at this memory location
- inx ; Go to the next memory location
- decb ; Decrement the counter
- bne loop ; Loop if not done
-done bra done ; Task finished
- end ; Last line of a file \ No newline at end of file
diff --git a/HW1/Sources/derivative.inc b/HW1/Sources/derivative.inc
deleted file mode 100644
index 9320da5..0000000
--- a/HW1/Sources/derivative.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-
- ; Note: This file is recreated by the project wizard whenever the MCU is
- ; changed and should not be edited by hand
- ;
-
- ; include derivative specific macros
- INCLUDE 'mc9s12c32.inc'
-
-
-
diff --git a/HW1/Sources/main.asm b/HW1/Sources/main.asm
deleted file mode 100644
index 31da964..0000000
--- a/HW1/Sources/main.asm
+++ /dev/null
@@ -1,63 +0,0 @@
-**********************************************************************************************
-*
-* Title: Star Fill (In Memory) Homework #1
-*
-* Objective: CMPEN472 Homework #1 demonstration program. Fill 225 bytes of memory with '*'.
-*
-* Revision: V1.0
-*
-* Date: Jan. 22, 2025
-*
-* Programmer: Jacob McDonnell
-*
-* Company: The Pennsylvania State Universtiy
-* Electrical Engineering and Computer Science
-*
-* Algorithm: While Loop demo of HCS12 Assembly
-*
-* Register Use: A accumulator: character to be placed in memory
-* B accumulator: counter of filled memory locations
-* X register: pointer to memory location to fill
-*
-* Memory use: RAM locations $3000 to $30E1
-*
-* Input: No input, data and parameters are hard coded.
-*
-* Output: Memory locations $3000 to $30E1 are filled with '*' character.
-*
-* Observation: This program is designed for instruction purpose.
-* This program can be a template for other loop based code.
-*
-* Comments: This program is developed and simulated using CodeWarrior Development Software.
-*
-**********************************************************************************************
-* Parameter Declaration Section
-*
-* Export Symbols
- xdef pgstart ; export 'pgstart' symbol
- absentry pgstart ; for assembly entry point
-* Symbols and Macros
-porta equ $0000 ; i/o port address
-portb equ $0001
-ddra equ $0002
-ddrb equ $0003
-**********************************************************************************************
-* Data Section
-*
- org $3000 ; reserved memory starting address
-here ds.b $e1 ; 225 memory locations reserved
-count dc.b $e1 ; constant counter for stars = 225
-*
-**********************************************************************************************
-* Program Section
-*
- org $3100 ; Program Start Address in RAM
-pgstart ldaa #'*' ; Load '*' into accumulator A
- ldab count ; Load count of stars into B
- ldx #here ; Load address pointer into X
-loop staa 0,x ; Put a start at this memory location
- inx ; Go to the next memory location
- decb ; Decrement the counter
- bne loop ; Loop if not done
-done bra done ; Task finished
- end ; Last line of a file \ No newline at end of file