Difference between revisions of "Programming the Microprocessor"
Line 1: | Line 1: | ||
'''Use Notepad++ to write your source code.''' | '''Use Notepad++ to write your source code.''' | ||
Download and Install '''Notepad++''' from https://notepad-plus-plus.org/ | Download and Install '''Notepad++''' from https://notepad-plus-plus.org/ | ||
− | Open '''Notepad++''' and select '''File''' and then select '''New''' (Opens a new window) | + | Open '''Notepad++''' and select '''File''' and then select '''New'''. (Opens a new window) |
− | Select '''Language''' and then select the Letter '''A''' then select '''Assembly''' | + | Select '''Language''' and then select the Letter '''A''' then select '''Assembly.''' |
Select '''File''' again and then '''Save AS''' [enter a file name for your program] | Select '''File''' again and then '''Save AS''' [enter a file name for your program] | ||
− | Make sure it has the yourfilename.'''asm''' extension click '''Save''' | + | Make sure it has the yourfilename.'''asm''' extension click '''Save'''. |
Revision as of 22:27, 26 September 2020
Use Notepad++ to write your source code.
Download and Install Notepad++ from https://notepad-plus-plus.org/ Open Notepad++ and select File and then select New. (Opens a new window) Select Language and then select the Letter A then select Assembly. Select File again and then Save AS [enter a file name for your program] Make sure it has the yourfilename.asm extension click Save.
Example code: STX #$6ffc ; capture x reg LDX #$55 ; set counter to binary 10101010 count EQU * LDA #$0f ; Turn on half of the LED's 00001111 STA $6000 ; Write value to VIA chip DEX ; Decrease the X register by 1 LDA #$f0 ; Turn on half of the LED's 11110000 BNE count LDX $6ffc ; Restore X reg to orginal value LDA #$00 ; turn off all LED's 00000000 STA $6000 ; Write value to VIA chip