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....
 
2019-09-18 20:49
Raistlin

Registered: Mar 2007
Posts: 680
I just tried converting our code to 64Tass... got it working - but there’re a couple of things that KickAss does that 64Tass doesn’t seem to..? Eg.:-

.fill 64, i <— KickAss would give you a 64 byte array with 0, 1, ..., 63

I got this working in 64Tass only by using a .for loop... which isn’t anywhere near as neat. Can this be done more easily?

KickAss also lets me name blocks easily with just:-

* = $8000 “codeblock”

But in 64Tass I have to drop the name.

Maybe these features are there in different ways - I dodm’t Read the whole .doc yet...?

If 64Tass is much faster i’ll forgive it.. but i’m not sure yet.
2019-09-18 21:19
Raistlin

Registered: Mar 2007
Posts: 680
Anyone who’s tried 64Tass vs KickAss, i’d be very interested in hearing your thoughts. I am so far finding that 64Tass is faster at compiling, and will probably stick with it for that... but i’ll see...
2019-09-19 05:29
soci

Registered: Sep 2003
Posts: 480
Quoting Raistlin

.fill 64, i <— KickAss would give you a 64 byte array with 0, 1, ..., 63

I got this working in 64Tass only by using a .for loop... which isn’t anywhere near as neat. Can this be done more easily?

Such one liner table generation is easier with sequences than using loops. The equivalent is:
.byte range(64)
For most of the cases just replace "i" with "range(something)" in the expression.

Quoting Raistlin
* = $8000 “codeblock”

But in 64Tass I have to drop the name.
Moving around * does not create sections, it just moves the PC and the location of data in the image. Sections and their names need to be defined explicitly. I usually define them at the start like this (with your naming):
        *= $0801
        .dsection codeblock
        .section codeblock
        .word +, 2019
        .null $9e, format("%d", start)
+       .word 0
        .send

        .dsection datablock
        .dsection bss
;------------------
        .section codeblock
start   rts

        .section datablock
bitmask .byte %10000000 >> range(8)
        .send

        .section bss
tmp     .byte ?
        .send

        .send
Results in:
Memory range:      $0801-$0815   $0015
Section:           $0801-$080d   $000d   codeblock
Memory range:      $0801-$080d   $000d
Section:           $080e-$0815   $0008   datablock
Memory range:      $080e-$0815   $0008
Section:           $0816-$0816   $0001   bss

Memory ranges show where data is stored in the image within a section. As only space was reserved in "bss" it does not have any.
2019-09-19 08:22
Krill

Registered: Apr 2002
Posts: 2980
Real-world question:

Consider a given disk track number, anything in say [1..35], as a compile-time constant denoting the (shadow) directory track.

Depending on the track number (density zone), there is a specific maximum legal sector number.

Now, how do i put in a mapping from track number to max sector number, such that the max sector number can be used as an argument for cmp #imm, with the operand being determined at compile-time?

I've not yet found a nice solution for ca65, maybe another assembler can do that?
2019-09-19 08:26
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: Real-world question:

Consider a given disk track number, anything in say [1..35], as a compile-time constant denoting the (shadow) directory track.

Depending on the track number (density zone), there is a specific maximum legal sector number.

Now, how do i put in a mapping from track number to max sector number, such that the max sector number can be used as an argument for cmp #imm, with the operand being determined at compile-time?

I've not yet found a nice solution for ca65, maybe another assembler can do that?


KickAsm can do it with simple Hashtable: http://theweb.dk/KickAssembler/webhelp/content/ch06s04.html

I'll see if I can come up with a way in CA65, maybe @Radiant knows?
2019-09-19 08:28
Krill

Registered: Apr 2002
Posts: 2980
There are char mappings in ca65, which i've not tried yet, but i have a hunch that this will result in at least 35 more lines of code for my specific problem. :)

Edit: Also the .CHARMAP mapping appears to be global and non-resettable, and applies to string or character literals only.
2019-09-19 08:56
ChristopherJam

Registered: Aug 2004
Posts: 1409
.define sectors_in_track(tk) (21-tk/18*2-tk/25-tk/31)
2019-09-19 09:09
Krill

Registered: Apr 2002
Posts: 2980
Haha, brilliant! Glad i stated my actual problem and not just the wrong tree i've been barking up to. X-Y problem averted. =)

The academic question still remains, though. :]
2019-09-19 09:57
ChristopherJam

Registered: Aug 2004
Posts: 1409
Cheers!

But yeah, if I really need proper data structures I just use Python to generate source for ca65 to assemble. Scripting's not its strong point.
2019-09-19 10:28
Krill

Registered: Apr 2002
Posts: 2980
I'm generally opposed to the idea of a Turing-complete language embedded in assembly code, though (see above), so having external scripts for the complex stuff is a-okay.

But simple things like mappings i do like to have. :)
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
Flashback
Sulevi/Virtual Dreams
Alakran_64
pcollins/Quantum
MWR/Visdom
Devia/Ancients
Freeze/Blazon
rambo/Therapy/ Resou..
Guests online: 151
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 Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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