Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Werner ! (Registered 2024-05-30) 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-12-08 17:32
Conrad

Registered: Nov 2006
Posts: 838
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!
2007-12-14 16:57
Burglar

Registered: Dec 2004
Posts: 1051
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 ;)
2007-12-14 17:39
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!
2007-12-14 18:15
Burglar

Registered: Dec 2004
Posts: 1051
Quote: Dude, you're coding? I expect a new SCS+TRC demo for X2008 then!

you gotta be kidding me ;)
2007-12-14 19:09
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? :)
2007-12-14 19:39
Scout

Registered: Dec 2002
Posts: 1568
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!
2008-01-07 02:46
Conrad

Registered: Nov 2006
Posts: 838
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?
2008-01-07 07:25
Cruzer

Registered: Dec 2001
Posts: 1048
have you tried ".te" instead of ".by"?
2008-01-07 10:38
Conrad

Registered: Nov 2006
Posts: 838
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 ?
2008-01-07 22:01
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
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
t0m3000/HF^BOOM!^IBX
Dymo/G★P
BroneCk/Samar^BooM!
E$G/hOKUtO fOrcE
Yogibear/Protovision
Guests online: 106
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 Aliens in Wonderland  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (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 Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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