[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting 6502 Asm to PIC



Hi,

I have written a small 6502 program to buzz the piezo with morse code
message.  I wish to make it onto a small PCB with a 12F629 mounted.
It will be finally be fitted onto the back of my bicycle.  But
translating the 6502 to PIC asm,  I was stuck on the first beginning
of the program.  I am sure there are some here who played with the
PIC
that might help.  The code is as follows:

   ORG $800

;I am using LISA 2.5 by Randy Hyde

   JMP main
MESSAGE STR 'APPLE 2 FOREVER'

;STR will generate the message in normal ASC with the number of
;characters as the first byte

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