| |
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.... |
| |
Conrad
Registered: Nov 2006 Posts: 849 |
Hello Slammer,
just been trying out this new cross-assembler for first time... I'm really impressed :) will be using this from now on!
Keep the very impressive work up, sir! |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
finally actually doing something with this kick ass assembler. the only small probs I ran into so far were easily solved as the manual seems quite complete ;) |
| |
TDJ
Registered: Dec 2001 Posts: 1879 |
Quote: finally actually doing something with this kick ass assembler. the only small probs I ran into so far were easily solved as the manual seems quite complete ;)
Dude, you're coding? I expect a new SCS+TRC demo for X2008 then! |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
Quote: Dude, you're coding? I expect a new SCS+TRC demo for X2008 then!
you gotta be kidding me ;) |
| |
TDJ
Registered: Dec 2001 Posts: 1879 |
Quote: you gotta be kidding me ;)
When it comes to a new SCS+TRC demo, I do not kid.
But a new Pain demo is welcome too .. maybe you can get Sonix to do the graphics for it? :) |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: finally actually doing something with this kick ass assembler. the only small probs I ran into so far were easily solved as the manual seems quite complete ;)
o_O
W00t! |
| |
Conrad
Registered: Nov 2006 Posts: 849 |
Dear Slammer (or anyone using kickass),
I'm having some trouble with this particular code to declare a list of strings and read a char from each string to store as a byte in memory. here's the code:
.var InfoList = List(12)
.pc=$0400
.for(var j=0; j<InfoList.size(); j++)
{
.for(var i=0; i<InfoList.get(j).size(); i++)
{
.by [InfoList.get(j).charAt(i)]
}
}
(and yes I've put the .eval stuff in aswell to enter strings, but that's too much to look at right now ;)
But I'm getting this common message:
"Error: Cant get a numeric representation from a value of type string"
Am I missing some function out to read a character and store as byte or is it something wrong in the code? |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
have you tried ".te" instead of ".by"?
|
| |
Conrad
Registered: Nov 2006 Posts: 849 |
Hello Cruzer.
Thank you for your suggestion as now the routine logically works, however it isn't doing exactly what i want it to do...
Basically what I want to do is when writing the list of strings to screen memory, encrypt each character with a certain byte. e.g. "A" character in list string shows "B" character on screen memory if encrypted by +$1.
if i do this:
.te [InfoList.get(j).charAt(i)]+$1
it only concatenates the "1" figure to the string, which is why I thought .by would do it.
Any other methods ? |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Hi Conrad
Kick Assembler doesnt support char objects (yet), so when you use the charAt(i) function it really just returns a string with the char at position i. Since its a small pretty straight forward job to implement it, it will probably be included in one of the future versions.
Right now im working on Kick Assembler 3.0 which makes major changes the underlying architecture of the assembler (Dont worry, the syntax for the sourceode will be unchanged). This means that their migth go some time before the next Kick Ass version.
However, you can make a charValue routine with a hashtable like this:
.var allChars = "abcdefghijklmnopqrstuvwxyz"
.var charToValueTable = Hashtable()
.var valueToCharTable = Hashtable()
.for (var i=0; i<allChars.size(); i++) {
.eval charToValueTable.put(allChars.charAt(i), i)
.eval valueToCharTable.put(i, allChars.charAt(i))
}
So in your code you write:
.by charToValueTable.get(InfoList.get(j).charAt(i))+1
|
Previous - 1 | ... | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 - Next |