| |
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.... |
| |
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. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
"it looks like you are writing a letter, do you want me to..." =) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
nooooooooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :) |
| |
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. |
| |
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! |
| |
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 ; -> //
|
| |
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. |
| |
Devia
Registered: Oct 2004 Posts: 401 |
Quoting SlammerDoes 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.
|
| |
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. |
| |
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 |