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 > CSDb Entries > Release id #191551 : Kick Assembler V5.15
2021-01-05 12:57
Jammer

Registered: Nov 2002
Posts: 1289
Release id #191551 : Kick Assembler V5.15

Any chances for passing string variable to program counter/memory block label? Would come really handy when I compile separate memory blocks with parametrized names, e.g. in some loop, reading names from the list for batch conversion. General goal is to use one script asm file to produce multiple output binaries that I plan to exomize each individually. If that's technically impossible, is there any reasonable workaround? I'm, sadly, not on friendly terms with makefiles ;)
 
... 10 posts hidden. Click here to view all posts....
 
2021-01-05 20:24
Jammer

Registered: Nov 2002
Posts: 1289
Segments look really cool! However, not that close to comfy automatization I guess ;) What would suit problem the best is imho sth like:

.var filenamelist = List(all filename entries)
...
conversion loop with another filenames from the list:
.var filename = filenamelist.get(loop index)
.var importbitmap = LoadBinary(filename + ".tga")
...
some code to convert data and fill array with it
...
.pc = picturedata filename(index) 
.fill 8 * rows * columns, bitmaparray.get(i)
.fill rows * columns, screenmaparray.get(i)


I miss a lot from actual code but you get the idea :) And then I compile binary with -mbfiles
2021-01-07 14:52
Digger

Registered: Mar 2005
Posts: 421
@Jammer:

You can do it apart from the memory block name, it's not dynamic. Example (edited) from Norah:

.const twisterColors = List().add(peptoBright.get($8), peptoBright.get($7))
.const numFrames = 7

.var twisterFramesFiles = List()
.for (var i = 1; i <= numFrames + 1; i++) {
    .const fileName = "assets/twister/sprites frame " + i + ".png"
    .const file = LoadPicture(fileName, twisterColors)
    .eval twisterFramesFiles.add(file)
}

.macro cutTwisterFrame(frame) {
    .const file = twisterFramesFiles.get(frame - 1)
    .for (var y = 0; y < layout.size(); y++) {
        .for (var x = 0; x < layout.get(y).size(); x++) {
            .eval twisterPointersList.add(toSpritePtr(*))
            cutHiresSprite(file, x * 24, y * 21 + 6 - x)
        }
    }
}

.pc = *
cutTwisterFrame(1)
.pc = *
cutTwisterFrame(2)
...
2021-01-07 16:24
Jammer

Registered: Nov 2002
Posts: 1289
Another cool way but I guess my current approach seems more flexible and like less sweat to me ;)
Previous - 1 | 2 - 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
LordCrass
Didi/Laxity
Martin Piper
Guests online: 145
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 Memento Mori  (9.6)
10 Bromance  (9.5)
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 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (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.033 sec.