| |
viper Account closed
Registered: Feb 2005 Posts: 17 |
problem with illegal opcodes in cross asemblers
Are there illegal opcodes in acme ??? I would like to use cross asembler with illegal opcodes, which also has linking data posiblility. 64tass is good but it hasn't linker.
Does exist any converter (for example 64tass -> acme or cc65) because i don't want to waste my time for remaking sources.
Thanks for help... |
|
| |
Radiant
Registered: Sep 2004 Posts: 639 |
I've not fiddled much with crossasm or illegal opcodes, but shouldn't it be possible to just insert the right bytes in the code? You could even define the byte sequence as a macro, thus creating "support" for the opcode.
Sorry if I'm completely off track. |
| |
viper Account closed
Registered: Feb 2005 Posts: 17 |
I know this way but i think that is too primive in my opinion. |
| |
doynax Account closed
Registered: Oct 2004 Posts: 212 |
For what it's worth these are the ACME macros I use personally. They aren't really that hard to use but I figure that it shouldn't be to hard to patch ACME to support them natively either.
!macro anc_imm .i { !byte $0b : !byte .i }
!macro ane_imm .i { !byte $8b : !byte .i }
!macro arr_imm .i { !byte $6b : !byte .i }
!macro asr_imm .i { !byte $4b : !byte .i }
!macro dcp_zpg .i { !byte $c7 : !byte .i }
!macro dcp_zpx .i { !byte $d7 : !byte .i }
!macro dcp_abs .i { !byte $cf : !word .i }
!macro dcp_abx .i { !byte $df : !word .i }
!macro dcp_aby .i { !byte $db : !word .i }
!macro dcp_inx .i { !byte $c3 : !byte .i }
!macro dcp_iny .i { !byte $d3 : !byte .i }
!macro isb_zpg .i { !byte $e7 : !byte .i }
!macro isb_zpx .i { !byte $f7 : !byte .i }
!macro isb_abs .i { !byte $ef : !word .i }
!macro isb_abx .i { !byte $ff : !word .i }
!macro isb_aby .i { !byte $fb : !word .i }
!macro isb_inx .i { !byte $e3 : !byte .i }
!macro isb_iny .i { !byte $f3 : !byte .i }
!macro jam { !byte $02 }
!macro lae_abs .i { !byte $bb : !word .i }
!macro lax_zpg .i { !byte $a7 : !byte .i }
!macro lax_zpy .i { !byte $b7 : !byte .i }
!macro lax_abs .i { !byte $af : !word .i }
!macro lax_aby .i { !byte $bf : !word .i }
!macro lax_inx .i { !byte $a3 : !byte .i }
!macro lax_iny .i { !byte $b3 : !byte .i }
!macro lxa_imm .i { !byte $ab : !byte .i }
!macro rla_zpg .i { !byte $27 : !byte .i }
!macro rla_zpx .i { !byte $37 : !byte .i }
!macro rla_abs .i { !byte $2f : !word .i }
!macro rla_abx .i { !byte $3f : !word .i }
!macro rla_aby .i { !byte $3b : !word .i }
!macro rla_inx .i { !byte $23 : !byte .i }
!macro rla_iny .i { !byte $33 : !byte .i }
!macro rra_zpg .i { !byte $67 : !byte .i }
!macro rra_zpx .i { !byte $77 : !byte .i }
!macro rra_abs .i { !byte $6f : !word .i }
!macro rra_abx .i { !byte $7f : !word .i }
!macro rra_aby .i { !byte $7b : !word .i }
!macro rra_inx .i { !byte $63 : !byte .i }
!macro rra_iny .i { !byte $73 : !byte .i }
!macro sax_zpg .i { !byte $87 : !byte .i }
!macro sax_zpy .i { !byte $97 : !byte .i }
!macro sax_abs .i { !byte $8f : !word .i }
!macro sax_inx .i { !byte $83 : !byte .i }
!macro sbx_imm .i { !byte $cb : !byte .i }
!macro sha_abx .i { !byte $93 : !word .i }
!macro sha_aby .i { !byte $9f : !word .i }
!macro shs_aby .i { !byte $9b : !word .i }
!macro shx_aby .i { !byte $9e : !word .i }
!macro shy_abx .i { !byte $9c : !word .i }
!macro skb { !byte $80 }
!macro skw { !byte $0c }
!macro slo_zpg .i { !byte $07 : !byte .i }
!macro slo_zpx .i { !byte $17 : !byte .i }
!macro slo_abs .i { !byte $0f : !word .i }
!macro slo_abx .i { !byte $1f : !word .i }
!macro slo_aby .i { !byte $1b : !word .i }
!macro slo_inx .i { !byte $03 : !byte .i }
!macro slo_iny .i { !byte $13 : !byte .i }
!macro sre_zpg .i { !byte $47 : !byte .i }
!macro sre_zpx .i { !byte $57 : !byte .i }
!macro sre_abs .i { !byte $4f : !word .i }
!macro sre_abx .i { !byte $5f : !word .i }
!macro sre_aby .i { !byte $5b : !word .i }
!macro sre_inx .i { !byte $43 : !byte .i }
!macro sre_iny .i { !byte $53 : !byte .i } |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
ca65 has all you ask for... Also ca65 can be configured to swallow TASS sources with only minor modifications. Such as ! becomes A:. And if you really like the linking possibility then you have to rewrite all those *= into segments in any case... It's not hard work, I've converted a couple of TASS source into ca65 (for instance Krill's loader) and it was not at all hard. |
| |
CyberBrain Administrator
Posts: 392 |
CA65 can be made allmost tass compatible, if you start your source with these lines:
.feature labels_without_colons ;<- You don't have to write colons after labels (labels must start at 1st char)
.feature pc_assignment ;<- you can write *=xxxx instead of .org xxxx
then it should be minimal work to convert tass -> ca65
it looks like illegal opcodes can be enabled http://www.cc65.org/mailarchive/2004-05/4131.html |
| |
viper Account closed
Registered: Feb 2005 Posts: 17 |
Maybe this question is funny but I don't know how to set offset in acme
Something like this in tass
drvprog := *
*= $0300
.offs drvprog-*
not work in acme |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
The CVS version of ca65 has illegal opcodes supported (you just have to enable the correct CPU type with a flag when assembling), and there is also a linker (ld65) for it.
Conversion of a source TASS -> cc65 is a question of minutes. Not hard. |
| |
viper Account closed
Registered: Feb 2005 Posts: 17 |
Thanks for help but I don't want to waste my time for learning ca65 so I would like to somebody wrote:
1. How to make offset in acme. I read documentation but I only found only sentence about offset but without examples so I tried this.
*=1000
some code
...
some_variable
.offs <$0050>
ldx#0
...
but it didn't work
2. How do the same in 64tass. In documentation are of course .binary <filename> and .logical <adres> but on my version of 64tass v1.44 it not work.
3. Write what parametr I have write in relanch64 in parametr section when I want use ca65.exe. And what directivies must be at the begining of my source.
|
| |
Cybernator
Registered: Jun 2002 Posts: 154 |
To offset the code in acme, just write:
!pseudopc $xxxx
And to get back in normal mode:
!realpc
|
| |
Krill
Registered: Apr 2002 Posts: 2980 |
viper: you can learn ca65 within half an hour. and it's worth it, as ca65 is the most sophisticated c64 crossassembler i know. and you dont have your offset problems because you have link files where you can tell each segment's load and run addresses. |
| |
viper Account closed
Registered: Feb 2005 Posts: 17 |
Krill & Cybernator and others - thanks for help. |