*
*
*               ARRAY B (i) = ARRAY A (i) * 2 + 1
*               SOLUTION III
*
*

*LABEL          OPER.   OPERAND         COMMENT
*****           *****   *******         *******************************

RAMStart        EQU     $0040           ; Starting location of RAM
ROMStart        EQU     $8000           ; Starting location of ROM (FLASH)
ResetVector     EQU     $FFFE           ; Reset vextor address


                ORG     Resetvector
                FDB     MAIN


                ORG     RAMStart
A_Data          FCB     $01,$02,$03,$1C,$1D,$18,$04,$03,$02,$01     ; Array A
B_Data          RMB     10                                          ; Reserve 10 memory bytes



                ORG     ROMStart
MAIN            LDX     #$00

LOOP            LDA     A_Data,X
                LSLA
                INCA
                STA     B_data,X

                INCX
                CPX     #$0A
                BLS     LOOP

DONE            BRA     DONE                    ; Branch always to DONE



