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 > Assembler preferences.
2016-02-09 06:03
ChristopherJam

Registered: Aug 2004
Posts: 1409
Assembler preferences.

Two questions:
- what's everyone using these days?
- on large productions, do groups tend to enforce a single assembler for the entire project, or is the code base a bit heterogenous?

I'd like to keep this discussion purely focussed on assemblers; please leave code generators, loader toolchains etc for that other thread.


(as for me, I'm still using xa65 for most projects)
 
... 204 posts hidden. Click here to view all posts....
 
2016-04-30 14:17
Slammer

Registered: Feb 2004
Posts: 416
I see. You use normal align directives, when you want to control page boundaries. How about placement of graphics, that sometimes have to be in certain places. Do you have to work all graphics positions into the memory map?

Also, Something smart could be required of a linker. If you have libraries like:
--- Lib1 ---
.byte 23

--- Lib2 ---
.align $100
.byte 0,1,2,3,3,4,..., $ff

--- Lib3 ---
.byte 23

--- Lib4 ---
.align $100
.byte 0,1,2,3,3,4,..., $ff

--- Lib5 ---
.byte 23

--- Lib6 ---
.align $100
.byte 0,1,2,3,3,4,..., $ff
I would prefer it first places lib2,Lib4,lib6 and then Lib1, Lib3 and Lib5 to avoid wasting alot of alignment bytes.
2016-04-30 14:26
soci

Registered: Sep 2003
Posts: 480
The user needs to be smart to create two segments, one for aligned stuff, the other for non-aligned. And then feed them accordingly.
2016-04-30 14:26
Krill

Registered: Apr 2002
Posts: 2980
You are free to make the segments as finely granular as you please. You can also specify graphics positions in your source files, without them showing up in the link file, but that would somehow defeat the purpose.

I don't quite see why the linker should shuffle around segments based on some "smartness" (it would sooner or later fail, as most programs trying to be smart do). You specify the order and can shuffle segments around easily with a bit of the old cut'n'paste.
2016-04-30 15:11
White Flame

Registered: Sep 2002
Posts: 136
ca65, even for single asm file projects. I've got an easily reusable makefile & config to get simple things up fast.
2016-04-30 15:18
Krill

Registered: Apr 2002
Posts: 2980
Quoting Slammer
instead of assuming people are gonna use the script language in a bad way
Quoting Oswald
nothing wrong with kickass itself, its brilliant imho. as told what raises eyebrows is when people overuse it :)
Reading these forums, it appears to me that many people overuse it. But that's just my personal opinion. Many people prefer KickAss for its main selling point, the built-in scripting, which is cool.

I cringe a little, though, already when people try to incbin a file, but want to skip the first few bytes, then keep a run of bytes, then skip a few more bytes, then keep the rest of the file. This is what the zoo of tools in the *NIX userland was made for. But then many people stick to Windows, and then i do see a point in wanting to do everything with one tool. I wonder how many KickAss users are Windows users, actually.

And Wisdom, assuming that you meant me: The "you" in the hammer/nail post was a generic you. I didn't intend to offend you or anyone personally, and there is no need to post your life story to defend your choice. And i'm certainly not a child any more.
2016-04-30 15:43
Slammer

Registered: Feb 2004
Posts: 416
Edit: response to krill/socis earlier post.. I just got disturbed while writing :-)

Im just trying ot figure out it works plus the pros and cons. That includes figuring out how much is done by the linker and how much the user should do. I guess Soci gave the answer to the library question.

I see both pros and cons. When I heard linker I thought of my experience with linkers on PCs where everything is done for you without a big setup. I guess thats not posible on the c64 which is pretty memory sensitive. But I see some good things and understand why you like the feature.
2016-04-30 15:52
Krill

Registered: Apr 2002
Posts: 2980
Quoting Slammer
When I heard linker I thought of my experience with linkers on PCs where everything is done for you without a big setup. I guess thats not posible on the c64 which is pretty memory sensitive.
Hmm, what do you mean? I've spent some time tinkering with GNU ld link files, and ld doesn't automagically do things either. You do have a bit of scripting there, but IIRC not the Turing-complete sort. The cc65 suite does many things pretty much like the original *NIX way, only with 6502-ish targets. And ld65 comes with a few built-in targets as well, so you don't have to write your own link files for simple memory layouts.
2016-04-30 16:20
Krill

Registered: Apr 2002
Posts: 2980
Quoting ChristopherJam
on large productions, do groups tend to enforce a single assembler for the entire project, or is the code base a bit heterogenous?
As others said already, there is no need to enforce The One Assembler. And why would there be? :) Given the plethora of assembler preferences, no demo coded by many coders would get finished. And already the choice of loader usually gives you the need to work with a second assembler, albeit only once to build the loader with your preferred options.
2016-04-30 16:25
Slammer

Registered: Feb 2004
Posts: 416
Quoting Krill
Hmm, what do you mean? I've spent some time tinkering with GNU ld link files, and ld doesn't automagically do things either. You do have a bit of scripting there, but IIRC not the Turing-complete sort. The cc65 suite does many things pretty much like the original *NIX way, only with 6502-ish targets. And ld65 comes with a few built-in targets as well, so you don't have to write your own link files for simple memory layouts.

Back in 1995-2000 when i coded C++ I never had to make any linker config files. A makefile was enough to glue it all together. Why did you need link-configuration?
2016-04-30 16:49
Krill

Registered: Apr 2002
Posts: 2980
Quoting Slammer
Why did you need link-configuration?
E.g., for embedded systems firmware, i needed a special section for non-volatile RAM. Static variables assigned to this section ("PERSISTENT_VARIABLE(int user_flags)") would be periodically monitored and mirrored to an EEPROM by a background thread, to survive power-cycling without requiring any code other than using that PERSISTENT_VARIABLE() macro. The same firmware can be built as a regular x86-PC Linux command-line program, which needs this segment as well (but accesses a regular file rather than an EEPROM, in that background thread).

And well, in embedded systems you generally used to require your own special memory layout and link files. Not so much these days any more, with lower-end hardware already sporting an MMU and happily running Linux.
Previous - 1 | ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ... | 22 - Next
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
Flashback
wil
LightSide
St0rmfr0nt/Quantum
Paladin/G★P
RetroGL
Nith/TRIɅD
CreaMD/React
pcollins/Quantum
Guests online: 81
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 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (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 Triad  (9.3)
5 Censor Design  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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