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....
 
2006-10-19 14:59
Oswald

Registered: Apr 2002
Posts: 5094
I'd like to throw an axe into bill gates' head every time windows wants to hide something or windows wants to tell me what to do.
2006-10-19 15:01
chatGPZ

Registered: Dec 2001
Posts: 11386
"it looks like you are writing a letter, do you want me to..." =)
2006-10-19 15:18
Oswald

Registered: Apr 2002
Posts: 5094
nooooooooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :)
2006-10-20 18:26
Slammer

Registered: Feb 2004
Posts: 416
Cavey: I got the files, and they assembled ok. Jammer told me the problem comes when you place the files in a cetain way, but I havn't been able to reconstruct it.
2006-10-26 19:44
Frantic

Registered: Mar 2003
Posts: 1648
Just started trying out Kick Assembler and it seems to work OK in most respects.

However, when an error occurs during assembly, the program do not seem to end with an error code (return 1), so my makefile can not detect that a problem occured and goes on to transfer a binary to my c64 memory even though no new binary file was generated by the assembler. Fixable?

Also, I find it very disturbing that Kick Assembler uses another symbol for linecomments than _every other_ assembler I know of. Kinda pointless to be forced to fix this over and over again when grabbing some code from an old project.

Anyway, it seems like a nice assembler, well worth trying out!
2006-10-26 20:00
Slammer

Registered: Feb 2004
Posts: 416
I guess the return of an error code is fixed quite easily. Does anyone know an easy way of displaying the return code of a dos program, so I can test this?

BTW. Have you noticed the execute option that let you execute a program in case the assembling is successfull. I normally use it to run Vice.

The lack of ;-comments is because it would be even more irritating not to use the ; in the for loops (fx: .for(var i=0; i<10; i++) {})

EDIT: Btw. the fixing of old code can be done quite fast with a search/replace ; -> //
2006-10-26 21:31
Cruzer

Registered: Dec 2001
Posts: 1048
I for one welcome Slammer's new line comments. About time for some innovation in this area. ;)

Seriously, this is the smallest problem when migrating code from other assemblers. It's a bit more cumbersome to e.g. convert MXass style local variables to KickAss style. But still it's only a matter of like 10-15 mins to get a rather big project converted, and since I usually use several months on one routine, it's not really a big deal.

But it still would be nice with an "import other formats" feature.
2006-10-27 07:41
Devia

Registered: Oct 2004
Posts: 401
Quoting Slammer
Does anyone know an easy way of displaying the return code of a dos program, so I can test this?


C:\>echo %ERRORLEVEL%

Beware though when implementing it. I seem to remember that there are both a Return Code and an Exit Code and only the Return Code is accessible via the ERRORLEVEL environment variable.
2006-10-27 17:13
Slammer

Registered: Feb 2004
Posts: 416
Devia: Thanks for the tip.

I just implemented ERRORLEVEL=1 on errors. I will upload the new version to the webpage sometime this weekend.
2006-10-29 04:31
Style

Registered: Jun 2004
Posts: 498
Slammer - why am I suddenly getting syntax errors after upgrading?

eg

 :Do_irq (controlirq,$0090,true)
                     ^

Error: Syntax error



Doesnt it like hex anymore? :)


EDIT: Found it, you mustve changed the parser's handling of whitespace, because it no longer accepts a space between a macro call and its parameters.
Previous - 1 | ... | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ... | 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
psenough
Felidae/Reflex
The Syndrom/TIA/Pret..
Fred/Channel 4
wacek/arise
Sillicon/Unreal
/Panor..
Guests online: 119
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
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 Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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