*
*
*               MOVE BYTES TO PORT A WITH MOVE INSTRUCTION
*
*
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            MOV     X+,PORTA      ; Move data from memory
                CPHX    #END          ; has pointer reeached END (value 00)
                BLS     LOOP          ; Branch if lower or same

                NOP


