| |
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. |
|
| |
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. |
| |
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.
|
| |
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 |
| |
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. :) |
| |
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 :)
|