| |
Bones99
Registered: May 2005 Posts: 30 |
6502 Cross assembler for KPC pascal
I've been playing with RJ Kuhn's 6502 pascal compiler (http://www.geocities.com/rjkuhn_2000/software.htm#kpc).
I can get it to compile, but i cant seem to find a cross-assembler that likes this format .
Anyone have any idea ?
I suppose I could write a pre-processor for one of the many cross-assemblers out there, but I'd prefer to avoid doing that if I can.
the ASM it generates looks like this :
;;KPC02 Output
BP EQU $F0
BX EQU $F2
BL EQU BX
BH EQU BX+1
AX EQU $F4
AL EQU AX
AH EQU AX+1
DX EQU $F6
DL EQU DX
DH EQU DX+1
CX EQU $F8
CL EQU CX
CH EQU CX+1
R28H EQU CX
R2AH EQU $FA
R2CH EQU $FC
R2EH EQU $FE
ORG $2000
JMP ZMAIN
C DS 2
D DS 2
E DS 2
F DS 2
;;
ZMAIN EQU *
LDY #>D
LDA #<D
STY BX
STA BX+1
LDY E
LDA E+1
STY AX
STA AX+1
LDY F
LDA F+1
STY DX
STA DX+1
LDY #>2
LDA #<2
STY CX
STA CX+1
LDA DX
STA BP
LDA DX+1
etc.. |
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
looks like the assembler steve judd used on c128. Merlin 128. |
| |
Bones99
Registered: May 2005 Posts: 30 |
ok.. DASM seems to handle it , as long as you specify the "processor 6502" directive at the top of the code. |
| |
iAN CooG
Registered: May 2002 Posts: 3195 |
No, you don't even need that =)
Get my version of DASM, we have talked about it 2 days ago |
| |
Bones99
Registered: May 2005 Posts: 30 |
Quote: No, you don't even need that =)
Get my version of DASM, we have talked about it 2 days ago
Nice one!
I plugged it in to crimson editor and it just worked!
I can now compile from pascal source to .prg with just 2 keypresses, thanks for that Ian. |