sanny Posted May 9, 2017 Share Posted May 9, 2017 You can simulate "org XXX" with ".res XXX-*". http://cc65.github.io/doc/ca65.html#ss17.1 But this will not create another load chunk at XXX (e.g. $9000), but fill the program with zeroes until XXX. Quote Link to comment Share on other sites More sharing options...
sanny Posted May 9, 2017 Share Posted May 9, 2017 Another simple/stupid test program which should demonstrate the creation of an Atari executable with multiple load chunks.... cc65-mlc.tar.gz Quote Link to comment Share on other sites More sharing options...
bugbear Posted May 10, 2017 Author Share Posted May 10, 2017 Yes, it's supported, but has a different meaning than on most other assemblers. It means "assemble code pretending it's running at location x". But the code itself is placed in the output file at the current location. (See http://cc65.github.io/doc/ca65.html#ss11.78) Ah. Oh dear. No wonder it doesn't work. Thank you. TBH (I know you can''t change it now) that meaning is so different it shouldn't have the same name IMHO. BugBear Quote Link to comment Share on other sites More sharing options...
bugbear Posted May 10, 2017 Author Share Posted May 10, 2017 So - I've now placed the 1-and-only-segment (CODE) at 0c00 (via -S 0x0C00) and adaded lots of .align $100 and .res $100 so everything ends up at the same place as it was in XASM style. The small scratch areas have been changed from direct equ of absolute values to the symbols to a sequence of labelled .res items. I've exported all the symbols that I have messed with in this way, and the main.map from ld65 shows them all with the same values as the XASM listing. Progress! BugBear Quote Link to comment Share on other sites More sharing options...
bugbear Posted May 10, 2017 Author Share Posted May 10, 2017 Ooh - nasty. My macro emulation/expansion of XASM mwa operation correctly handled mwa #value, addr but got very confused by mwa addr, addr In the source there are 13 of the former, and precisely ONE of the latter! BugBear (onwards!) Quote Link to comment Share on other sites More sharing options...
bugbear Posted May 11, 2017 Author Share Posted May 11, 2017 (edited) I eventually declared enough cc65 SEGMENTS (I used a tiny perl script to print them) to fully emulate the load chunks being used in the XASM source. This meant that each chunk should be identical. A quick binary compare of the chunks chased out a couple of bugs in my xasm->cc65 textual converter, and a couple more in the cc65 macros I'm using to emulate some of XASM's handy features. IT LIVES! (and my thanks to all who helped, especially sanny) BugBear Edited May 11, 2017 by bugbear Quote Link to comment Share on other sites More sharing options...
sanny Posted May 11, 2017 Share Posted May 11, 2017 IT LIVES! (and my thanks to all who helped, especially sanny) Thanks. Be my guest. Now that you've gotten it to work, would you consider publishing the source code (if the original license of the program allows that)? It might be helpful for others which are new to cc65 and try to port a program written for XASM to cc65. Especially your perl script to convert the syntaxes sounds likely be useful for others. And, if you are getting really ambitious, you could create a writeup about what you did, what problems you encountered, and how you solved them. :-) regards, chris Quote Link to comment Share on other sites More sharing options...
solo/ng Posted May 17, 2017 Share Posted May 17, 2017 Atari WUDSN is excellent out-of-the-box package http://www.wudsn.com/ it uses eclipse so should work on any java VM platform (windows, linux etc) wudsn + mads + altirra is pure awesomeness 1 Quote Link to comment Share on other sites More sharing options...
bugbear Posted November 5, 2020 Author Share Posted November 5, 2020 I did what Sanny asked (above) and wrote up my project; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.