[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Converting 6502 Asm to PIC
On 24 nov, 23:30, PIC Newbie <allenbsf6...@gmail.com> wrote:
>
> MESSAGE STR 'APPLE 2 FOREVER'
>
>
> MAIN LDX #1 ;POINT TO FIRST ASC
> MESSLOOP:
> LDA MESSAGE,X
> CMP $32
> BNE CONV
> SPACE JSR INT_WORD_DLY ;DELAY 6 DOT ELEMENTS ~500MS
> CLC
> BCC SPACE_OK
> CONV JSR CONVERT ;CONVERT ALPHA-NUMERIC TO INDEX
> SPACE_OK:
> INX
> CPX #MESSAGE+1 ;END OF MESSAGE?
> BCC MESSLOOP
> RTS
>
> TIA,
>
> Allen
I would have written...
SPACE_OK:
INX
CPX MESSAGE ;END OF MESSAGE?
BCC MESSLOOP
RTS
...instead of CPX #MESSAGE+1.
The length of the string is saved in the first byte of MESSAGE not the
second. Unless this is due to the assembler but I doubt it.
I have another question regarding $32. Is there a useful info saved on
zero page offset $32 or is it the space character (#32 or #$20)?
Thank you,
antoine