| |
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 doesnt 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 its 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.... |
| |
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. |
| |
Iapetus/Algarbi/Wood
Registered: Dec 2004 Posts: 71 |
Is there a way to export a lables file with Kickassembler to use in vicemon?
Thanks |
| |
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
|
| |
Iapetus/Algarbi/Wood
Registered: Dec 2004 Posts: 71 |
Thank you |
| |
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) |
| |
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 |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
But that generates initialized storage, no?
I'm looking for generating labels _only_ for selected regions. |
| |
Iapetus/Algarbi/Wood
Registered: Dec 2004 Posts: 71 |
ah ok sorry
Lets see if Slammer shows up... |
| |
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 |
| |
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 |