* * * MOVE BYTES TO PORT A WITH AIX AND STA * * RAMStart EQU $0040 RomStart EQU $E000 ResetVector EQU $FFFE PORTA EQU $00 ; Address of Port A DDRA EQU $04 ; Address of Data Direction Register for Port A ORG ResetVector FDB MAIN ORG RAMStart BEGIN FCB 'Hello World' END FCB $00 ORG RomStart MAIN LDA #$FF ; Load A to $FF STA DDRA ; Set Port A for output LDHX #BEGIN ; Point to string in memory LOOP LDA ,X ; Move data from memory to A STA PORTA ; Move A to Port A AIX #$01 ; Add immediate value to H:X (Increase H:X by 1) CPHX #END ; has pointer reeached END (value 00) BLS LOOP ; Branch if lower or same NOP