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: 1382
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-17 08:30
Trash

Registered: Jan 2002
Posts: 122
64tass with my own C#-shell, if I need scripting inline and the assemblers commands isn't enough I just add:
C#
{
..code that returns a tass64 compatible string
}
2019-09-17 09:44
oziphantom

Registered: Oct 2014
Posts: 480
maybe worth mentioning I added Array adding support to MLA on top of Tass64 and boy has it changed the way I code..

lda #!!ArrayAdd { [array name]:[data]}
...
.byte !!ArrayInstance{<array name>}

so this lets me add an item to an array, the add places the index into said array in its place when "assembled" then later you pull out the arrays data to use in tass. For example
    lda #!!ArrayAdd { copyData:[$2000,$8000,$10]} ; src, dest, pages
    ...
    CopyDataFields .block 
      values = !!ArrayInstance{copyData}
      src .block
        lo .byte <(values[:,0])
        hi .byte >(values[:,0])
      .bend
      dest .block
        lo .byte <(values[:,1])
        hi .byte >(values[:,1])
      .bend
      pages .byte values[:,2]
    .bend

added it on a "yeah why not" and now I basically use it nonstop..
2019-09-17 10:35
ChristopherJam

Registered: Aug 2004
Posts: 1382
^ I'm still using Python code generators for that sort of thing. Starting to think it might be worthwhile bastardizing the sort of template engine that usually gets used for generating html…
2019-09-17 12:32
Papademos

Registered: Jan 2011
Posts: 7
I'm a bit retarded so I use my own language called LAX. It's assembler with a c-ish syntax.

// Copy glyph to screen.
y = 0, do
0xf8[0] = 0
a = 0xf0[0][y]
x = 0xf9[0], if !=, do
a >>= 1, ror 0xf8[0]
--x, while !=, endif
0xf2[0][y] = a | 0xf2[0][y]
0xf4[0][y] = 0xf8[0]
++y, y ?= 8, while !=
2019-09-18 20:49
Raistlin

Registered: Mar 2007
Posts: 575
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: 575
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: 474
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: 2855
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: 1995
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: 2855
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.
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
tlr
Guests online: 67
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 No Bounds  (9.6)
7 Comaland 100%  (9.6)
8 Aliens in Wonderland  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Elwix  (9.1)
5 A Life in Hell  (9.1)

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