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: 1378
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-05-05 18:46
soci

Registered: Sep 2003
Posts: 473
That's not entirely fair to him, not everyone wasted 20+ years on the scene yet.
2016-05-05 19:34
Slammer

Registered: Feb 2004
Posts: 416
"Focus on the journey, not the destination. Joy is found not in finishing an activity but in doing it." - Greg Anderson

But, yes. Finishing something is nice too.
2016-05-05 20:03
Oswald

Registered: Apr 2002
Posts: 5017
Quote: "Focus on the journey, not the destination. Joy is found not in finishing an activity but in doing it." - Greg Anderson

But, yes. Finishing something is nice too.


now I know why it is so hard to finish a demo :)
2016-05-05 20:07
saimo

Registered: Aug 2009
Posts: 36
Quote: Writing the instructions directly into the C source to create the desired output is way too easy ;)

Instead of doing that I wrote C program which reads in various text/binary files to describe the output. This way I gained freedom from syntactic limitations of the compiler too.


@soci

Not sure what you mean here. It sounds like you created some sort of custom compiler... is that so?
2016-05-05 20:25
Perplex

Registered: Feb 2009
Posts: 254
Quoting soci
That's not entirely fair to him, not everyone wasted 20+ years on the scene yet.

Time you enjoy wasting is not wasted time. ―Bertrand Russell
2016-05-05 20:35
saimo

Registered: Aug 2009
Posts: 36
Quote: So much syntactic sugar and brainwank for so few releases :-D

@BitBreaker

Well, it isn't just syntactic sugar: there's a new dimension that opens up new possibilities. I mean, besides the compile stage, where one can enjoy the power of macros and conditional compiling offered by the C compiler, there's also the intermediate stage of binary generation executed by a self-shaping program, which makes it possible to generate dinamically tailor-made ML code.
Hmm, I can't really find the words... F.ex., it is possible to include a binary file, analyze it, and generate code depending on the results of the analysis.
I feel I'm only scratching the surface for now, but, after all, at the moment I don't need anything complicated, and I'm enjoying the possibility of doing things like this:

pc = EmbedString(pc, "ZONE 1: CLIFFS");

which writes the string at the current pc address, returning the address of the first byte after the string, and mapping automatically the ASCII characters to the characters in the charset, which are arranged in a custom order (currently: graphical tiles, 0...9, A...Z, [SPACE], various symbols). Clean, robust, and easy ;)
2016-05-05 21:03
Oswald

Registered: Apr 2002
Posts: 5017
since I dont know any other, 64tass can do that for you (and probably most others), as you can define custom encoding in it.

[link]http://tass64.sourceforge.net/#text-encoding[/link]

byte after string is at * after the line .text.


also it has macros, conditinal assembly, all the bells and whistles.

my guess is you were just too lazy to learn a new syntax :)


edit: as I was for like 15 years using c64 native tasm assembler I dont find the need for scripting to write my code generators. I think they can be done in about the same time the native way as with scripting. Bonus is I dont have to rewrite the generator to native when done. Key is to plan the speedcode before starting to write the generator. The flexibility they offer is enough to tweak a little when needed. Esp if you copy a code segment around, you can easily add / remove instructions. I find the most problematic when a speedcode modifies another one, but thats also just a case of counting a bit how much bytes apart those places are. or if you want to be fancy add labels to the cookie cutter code, and some substractions will give you the correct answer no matter how it changes
2016-05-06 03:30
saimo

Registered: Aug 2009
Posts: 36
@Oswald

Laziness did play a role, but it wasn't the deciding factor. I should have:
1. checked which assemblers are available for AmigaOS (4);
2. studied the features of all of them;
3. chosen the one that would suit me best.
Admittedly, this would have been tedious. But what would have really annoyed me is if, in the end, I would have liked one thing from an assembler, another thing from another assembler, and no assembler would have satisfied me entirely. Mind you, maybe there's a perfect assembler out there for me, but still finding out would have been a pain and a risk. So I did it my own way, which comes with the added bonus that I'm not restricted by the limitations of any compiler, and I can do directly in the code things that otherwise might need external tools and/or manual fiddling.

Regarding the text encoding, sure, I didn't mean to say that it wouldn't be possible/easy in other ways. Actually, that's something so basic that I expected there would be several ways of doing it easily.
The text encoding example was meant only to give an idea of how things work and of the potential (that's why I introduced it with "I feel I'm only scratching the surface for now, but, after all, at the moment I don't need anything complicated, and I'm enjoying the possibility of doing things like this"). It's more important what I said before that, i.e. that this way of generating code dynamically through an intermediate executable can be very handy and powerful.
I'll make the text encoding example a bit more interesting...

Recently, the preview of a C64 commercial game that is/was being crowdfunded was leaked, and the authors were quite pissed. So, let's imagine that one wants to provide reviewers with identifiable executables. There are a number of ways to do that, and one could be generating copies with unique text encoding. In this framework I'm working with, that is done by:
1. adding a function that scrambles the arrangement of characters in the charset in a unique way, and produces the corresponding mapping information;
2. writing a function that encodes the ASCII texts according to the mapping information;
3. compiling the C code once;
4. running the intermediate executable every time it is necessary to produce an identifiable copy.
In the end, it would all boil down to typing "make" in a shell (or some other equivalent operation) - and the result would be obtained very quickly, since there is no compiling, and the intermediate executable outputs the final executable almost instantly.

Or... let's go completely paranoid and generate a unique copy for each person who gets the game: how about having all the subroutines arranged in an order unique to each copy (the permutations are many already with a reduced set of subroutines, so the size of the audience is not a problem)? It would be sufficient to:
1. enclose each subroutine in a C function;
2. define a vector of all the functions;
3. call the functions in different order each time.
The process could be automated entirely: it would be enough to have the intermediate executable on the server that delivers the game and execute it every time a download is requested.
OK, true, no server runs on AmigaOS, but you get the idea :D

Hey, just to be clear, I'm not trying to convert anyone: just showing a different answer to the question "which assembler do you prefer?" and its potential.
2016-05-06 07:04
Krill

Registered: Apr 2002
Posts: 2839
Quoting saimo
Indeed it bothers me a bit to have to write all those () and ;
I've been wondering why you don't use preprocessor macros to get rid of those (at least for the opcodes with implied arguments), so you'd write "txa" instead of "txa();" using a simple "#define txa txa();".
2016-05-06 07:18
Krill

Registered: Apr 2002
Posts: 2839
Quoting saimo
Recently, the preview of a C64 commercial game that is/was being crowdfunded was leaked, and the authors were quite pissed.
Care to drop a name? I wasn't aware such things existed (but i'm not really surprised either), and i find this a bit funny. It's crowdfunded anyways, so why not give out previews on a regular basis? But that's a topic for another thread. :)
Previous - 1 | ... | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 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
TheRyk/MYD!
Weasel/Padua/Hitmen/..
cba
CreaMD/React
Durandal
The Human Co../Maste..
Scooby/G★P/Light
Martin Piper
Guests online: 156
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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