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 > Cross assembler source conversion
2009-04-04 14:47
LOGAN
Account closed

Registered: Aug 2003
Posts: 71
Cross assembler source conversion

I'm looking for some tools that convert sources between different cross assemblers. For now my main targets are conversions between the mainstream c64 assemblers and modern cross assemblers. I could do it by hand but for ease of use and switching I could use such an application.

Assemblers:
Turbo Assembler (C64)
Acme
Dasm
Kickass
etc.

PS anyone have a binary for windows of the toacme conversion tool for windows? The website promised binaries soon, but that was posted in 2006 and those binaries were a no show :(

Any other suggestions (besides manually converting) to make the sharing of sources between different people with different assemblers easier?

Thanks.
2009-04-04 14:53
iAN CooG

Registered: May 2002
Posts: 3195
apart "toacme" I don't know any other conversion tool.
You need to know what a pseudoop does in assembler X, what's the equivalent in assembler Y (hoping there's an equivalent at all) and search&replace in any editor.
2009-04-04 15:31
LOGAN
Account closed

Registered: Aug 2003
Posts: 71
Obviously if people using different assemblers it's a crime to convert sources by hand. Hmm, maybe the devs could use the same assembler but people have their own preferences.

So far I played with Dasm and Acme and used Relaunch64. Relaunch64 throws in it's own functionality like pre-processor which I thought was a function of the assembler. A pre-processor can conditionally assemble the source, ie:

#if myvar="black"
lda #$00
#else
lda #$01
#endif

I'm still in flux what assembler to use, and was thinking maybe the pre-processor could also make one source conditionally for different assemblers. But maybe thats getting overly complex. I still haven't settled but currently use ACME.
2009-04-05 09:45
enthusi

Registered: May 2004
Posts: 677
I really like XA assembler alot.
It handles SOME stuff slightly different but more logical anyway :)

And as for conversion I use the tr tool in unix world alot.
As in cat source.asm | tr '!byte' '.byte' | tr '[A-Z]' '[a-z]'

and so on :)
Missing functions (like IF, DEFINE, BLOCKS) cant be converted properly anyway I think....

Cheers
2009-04-05 10:58
Angel of Death

Registered: Apr 2008
Posts: 211
It all depends on how far you want to take it.
Most crossassemblers can compile turbo-ass style code with only syntax-corrections.
So upwards conversions shouldn't be that hard. (from tass by singular to dream-ass for example)
The other way around is much more complex, ofcourse.
The code-generating stuff of cc65 is impossible to down-convert without resembling to compiling the code and making it ascii again.
I had high hopes for Rosetta but that one does only mem-locations and not really labels.
I did start on a "disassembler" for win32 myself with the possibility to format your own output. But as a lot of stuff that's been frozen solid by now being in the fridge for so long. :)
2009-04-05 14:05
LOGAN
Account closed

Registered: Aug 2003
Posts: 71
Rosetta does labels for JMP, BNE, lda,x etc. things that it doesn't do is loading hi/lo bytes but that's to be expected.

I guess the most important thing for the assembler source is to have the option to load it in different assemblers. Porting source back to a real c64 running assembler is not that important.

But the possibility to switch between say, ACME and DASM would be very handy. I hope a multiplatform solution will one day be available.

Porting Preprocessor tags seems usefull but I don't excactly know which compilers actually support it. I would imagine that an convertor could conditionally convert the source as well based on the source's settings.

With all the different compilers in use it's a bit of a shame that no standard for them has emerged after like 20 years :)

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
Andy/AEG
DeMOSic/MS^LSD^ONS
theK/ATL
Mike
kbs/Pht/Lxt
Tom/TRS
Guests online: 110
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 Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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