Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > 6502 Cross assembler for KPC pascal
2008-11-08 11:43
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..
2008-11-08 12:47
Oswald

Registered: Apr 2002
Posts: 5094
looks like the assembler steve judd used on c128. Merlin 128.
2008-11-08 13:06
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.
2008-11-08 13:46
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
2008-11-08 14:08
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.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
t0m3000/hf^boom!^ibx
Andy/AEG
Alakran_64
Freeze/Blazon
aNdy/AL/Cosine
tlr
Alta
Unicorn/TWA
iAN CooG/HVSC
Guests online: 92
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.049 sec.