[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Converting 6502 Asm to PIC
- Subject: Converting 6502 Asm to PIC
- From: PIC Newbie <allenbsf6502@gmail.com>
- Date: Wed, 24 Nov 2010 14:04:35 -0800 (PST)
- Complaints-to: groups-abuse@google.com
- Injection-info: y30g2000prb.googlegroups.com; posting-host=60.53.39.6; posting-account=0pSeuwoAAABUNs-tiy2n5vORF7izTcNI
- Newsgroups: comp.sys.apple2
- Organization: http://groups.google.com
- User-agent: G2/1.0
- Xref: g2news2.google.com comp.sys.apple2:21184
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