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 > Kick Assembler
2006-06-07 21:34
Slammer

Registered: Feb 2004
Posts: 416
Kick Assembler


I recently did a new 6510 assembler and I hereby make it open to the public so you can use it too.

Kick Assembler is the combination of an assembler for doing 6510 machine code and a high level script language. With the assembler functionalities, you can write your assembler programs, and with the script language, you can write programs that generate data to use in the assembler programs. This could be data such as sine waves, coordinates for a vector object, or graphic converters. In addition, you can combine assembler commands and scripting commands which is a powerful combination. A little example: Where other assemblers can do simple unrolling of loops, Kick Assembler can base the unrolling of a loop on a list generated by the script language and select the content of the loop body based on the content of the list. This makes it more flexible when generating speed code.

The script language can handle values such as Numbers, Booleans, Strings, Lists, Vectors, Hashtables, Matrixes and you can define your own structures if the build in doesn’t meet your needs. The assembler contains a replica of the java math library + a special 3d library for doing vector math (Rotation, move and projection matrixes). You can also define your own functions.

Finally, I want to mention that the assembler contains some special objects that makes it easy to import graphics (and convert it into you own spooky format which fits into the part you are working on) and music. Since finding the correct play address for a tune has recently been an issue in the “*stupid* ASM Sid Player Example”- thread I will here show how it’s done in kick Assembler. You simply load you PSID file into a variable in the script language and then read the things you need to know from the variable.

// Load the music into an object in the script language
.var music = LoadSid("C:/C64Music/Tel_Jeroen/Closing_In.sid")


// init the music 
lda #music.startSong-1
jsr music.init

// play the music 
jsr music.play 


(The full example is listed in the manual)

Feel free to check out the assembler at http://www.theweb.dk/KickAssembler.htm
 
... 251 posts hidden. Click here to view all posts....
 
2007-05-27 08:59
Cruzer

Registered: Dec 2001
Posts: 1048
My guess would be that you refer to it before you define it, or it could be a case error - KickAss is case sensitive, so "anext" and "aNext" are two different things.

But as Style said - post the code.
2007-07-31 18:14
Iapetus/Algarbi/Wood

Registered: Dec 2004
Posts: 71
Is there a way to export a lables file with Kickassembler to use in vicemon?

Thanks
2007-07-31 21:22
Slammer

Registered: Feb 2004
Posts: 416
No, not at the moment. If you need this feature now, then I suggest you use the print command to print out the labels you need and then copy them from the console into a label-file. Something like:

.print "al C:"+toHexString(myLabel1) + " .myLabel1"
.print "al C:"+toHexString(myLabel2) + " .myLabel2"
etc.


I agree that an export of the labels would be nice, so it might be included in one of the future versions
2007-07-31 21:41
Iapetus/Algarbi/Wood

Registered: Dec 2004
Posts: 71
Thank you
2007-08-16 10:13
tlr

Registered: Sep 2003
Posts: 1790
Ok, doing some coding in Kick Assembler now.
Maybe I'm missing something here, but how do I declare uninitialized storage?

In dasm I used to do this:
    seg.u zp
    org $a0
ptr_zp:
    ds.w 1

And this:
    seg.u bss
    org $a000
var:
    ds.b 1
    align 256
table:
    ds.b 256

This just generates the addresses for the labels in a structured way and outputs no data. ds.[b|w|l] is "define storage", although dasm will accept dc.b's and such and ignore the actual data.
The concept of a segment is an entity with a "pc" and a "uninitialized" flag. You only need to set the origin once for each segment. Everytime a seg <name> is encountered, that segment will be continued upon. (.u's need to be matched)

I'd also love to see some kind of symbol table output/export facility for those multi part code overlay demos. :)
(sure, could probably be done by parsing the ".print" output)
2007-08-16 10:34
Iapetus/Algarbi/Wood

Registered: Dec 2004
Posts: 71
.pc= $xxxx

.byte
.word
.text

.pc= $xxxx

.
.
.

from the manual:
there is also

.align $100 //Alignment to the nearest page boundary saves a cycle

.pseudopc <expr>

Assembles code as if it was placed at a different
location.

hope this helps
2007-08-16 10:38
tlr

Registered: Sep 2003
Posts: 1790
But that generates initialized storage, no?
I'm looking for generating labels _only_ for selected regions.
2007-08-16 10:40
Iapetus/Algarbi/Wood

Registered: Dec 2004
Posts: 71
ah ok sorry

Lets see if Slammer shows up...
2007-08-16 11:15
Slammer

Registered: Feb 2004
Posts: 416
The next version of Kick Assembler is almost ready. In this you can add a virtual flag to your memory block declaration:

.pc = $8000 virtual

label1: .byte 1,2,3,4,5,6,7,8 // This will not be stored in memory since its virtual

.pc = $9000
label2: .byte 1,2,3,4,5,6,7,8 // But this will

I guess this is what you want?
Further more, virtual memory sections can overlap other memory sections..

The new version will be out this weekend
2007-08-16 11:19
Cruzer

Registered: Dec 2001
Posts: 1048
@tlr: Not sure what you're trying to do, but is it something with reserving some memory, and then being able to write some data there later? If so, a List in KickAss might do the trick...

.var myList = List()

.eval myList.add(data)
.eval myList.add(moreData)

.pc = whereToStoreIt
.fill myList.size(), myList.get(i)

// this only works for bytes, if it's words then replace the last line with:

.for (var i=0; i<myList.size(); i++) {
.wo myList.get(i)
}
Previous - 1 | ... | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ... | 26 | 27 - 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
leonofsgr/Singular C..
Dr.Science/Atlantis
WVL/Xenon
bexxx
New Design/Excess
Conjuror
ΛΛdZ
Guests online: 114
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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