diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2025-02-14 18:20:46 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2025-02-14 18:20:46 -0500 |
| commit | 7b2d0640e6209539d80e79126d3b05ff8bf88176 (patch) | |
| tree | 46cd3c6455e37e1654aaf96c753454ecca223fbd /ExamPrepTwo/Sources/main.asm | |
| parent | db27faf84654f0084542536e538044a0458bb554 (diff) | |
HW4 Finished
Diffstat (limited to 'ExamPrepTwo/Sources/main.asm')
| -rw-r--r-- | ExamPrepTwo/Sources/main.asm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/ExamPrepTwo/Sources/main.asm b/ExamPrepTwo/Sources/main.asm new file mode 100644 index 0000000..fc86659 --- /dev/null +++ b/ExamPrepTwo/Sources/main.asm @@ -0,0 +1,56 @@ +************************************************************************** +* 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 + +************************************************************************** +* Data Section: address used [ $3000 to $30FF ] RAM Memory +* + org $3000 ; Reserved RAM memory starting address + ; for Data for CMPEN 472 class +num dc.b 0 + +* +************************************************************************** +* Program Section: address used [ $3100 to $3FFF ] RAM Memory +* + org $3100 ; Program start address, in RAM +pgstart ldaa #70 + ldab #60 + aba + nop + + ldaa #60 + ldab #-70 + aba + nop + + ldaa #-60 + ldab #-70 + sba + nop + + ldaa #70 + ldab #-60 + sba + nop + + ldab num + +dly ldaa num +loop deca + bne loop + +* +************************************************************************** + +done + end ; Last line of the file
\ No newline at end of file |
