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-09-19 16:49
Slammer

Registered: Feb 2004
Posts: 416
Yes you can. (just like you can have functions of the same name).

But lets end the discussion cos there are other problems involved too.
2006-09-24 19:04
Slammer

Registered: Feb 2004
Posts: 416
Hi, I have been a bit busy lately, but I finally manages to write som dokumentation. So the new beta-release with .pseudocommands are now posted on http://www.theweb.dk/KickAssembler.htm

The manual shows how to define inc16, mov16 and add16 in just a few lines (shorter than the above posted example), so the rest of a 16 bit instructionset should be straight forward to implement. (Check out page 25-26 at http://www.theweb.dk/KickAssembler_Manual.pdf)

I must admit that when the subject of adressmode detection was brought up I thought it was only a matter of cosmetics to the already existing macros. But now that the pseudocommands are implemented I thinks it's a really cool feature with alot of possibilities which I am gonna use alot :-)
2006-09-24 19:09
Cruzer

Registered: Dec 2001
Posts: 1048
"use alot" - as in coding demo parts? :D
2006-09-25 06:22
Oswald

Registered: Apr 2002
Posts: 5094
pseudo commands will be really useful, any coder must know that there are a lot of 3-6 line code segments (16 bit stuff, loops, pointer increment,etc) we use over and over and over again, its way much better to write just one statement instead.
2006-10-01 22:01
Jammer

Registered: Nov 2002
Posts: 1336
a little problem of a person who cannot code nonetheless sticks his fingers into ass (obviously it's me):

.pc=$0801 "Basic"
:BasicUpstart($1000)

.pc=$1000 "Main"

lda #$00
sta $d020
sta $d021
lupek: jmp lupek

why can't i compile such trivial piece of code? i get 'null' in logfile :| don't laugh at me :P
2006-10-02 15:46
Slammer

Registered: Feb 2004
Posts: 416
Quote: a little problem of a person who cannot code nonetheless sticks his fingers into ass (obviously it's me):

.pc=$0801 "Basic"
:BasicUpstart($1000)

.pc=$1000 "Main"

lda #$00
sta $d020
sta $d021
lupek: jmp lupek

why can't i compile such trivial piece of code? i get 'null' in logfile :| don't laugh at me :P


Sounds really strange. I tried to copy paste your program into a file and assemble it and it works fine.

You mention something about getting null in a logfile, so I guess you are using Relaunch64? (Otherwise you don't need to use the logfile option). Remember to use the latest Relaunch version, where you can set up KickAss like shown below.

If you don't use Relauch then check the command line you are using for running KickAss. The error is probably to be found there.

2006-10-02 16:42
Jammer

Registered: Nov 2002
Posts: 1336
Quote: Sounds really strange. I tried to copy paste your program into a file and assemble it and it works fine.

You mention something about getting null in a logfile, so I guess you are using Relaunch64? (Otherwise you don't need to use the logfile option). Remember to use the latest Relaunch version, where you can set up KickAss like shown below.

If you don't use Relauch then check the command line you are using for running KickAss. The error is probably to be found there.



err, i only copy kickass.jar to program's dir and use

java -jar kickass.jar programtitle.asm -log log.txt

it works fine with all the examples included in the package. unfortunately it doesn't compile this one from me :|
2006-10-02 19:57
Slammer

Registered: Feb 2004
Posts: 416
There is nothing wrong with your code, and your command line look ok too.

What editor are you using? Perhaps it saves the sourcefile in a format that isn't supported by the lexical analyzer. You can test if that is the case in the following way.

Open one of my sourcefiles in your editer, make a small change (fx, insert a space) and save it againg. Then try to assemble it. If it won't assemble, then your editor have saved it in an unsuppored format.

To fix this you should look for a format option in your save file dialog. If you have saved it in a perfectly normal format and still can't get it to compile then send me the sourcefile and I'll look into it (The email address is in the introduction). Btw. both unix and windows textfiles works fine, and unicode chars like æøå is also ok.





2006-10-02 20:15
Jammer

Registered: Nov 2002
Posts: 1336
i use plain notepad then save as filename.asm, maybe that's the reason. however, i was modyfying examples in the notepad too and it worked.
2006-10-02 20:30
Slammer

Registered: Feb 2004
Posts: 416
I don't see why notepad shouldn't work. Try mailing me the sourcefile an I'll look at it.
Previous - 1 | ... | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ... | 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
Courage
Benson/Tristar & Red..
The Syndrom/TIA/Pret..
Unlock/Padua/Albion
Durandal
MaD ][/Starship
Andy/AEG
Malmix/Fatzone
Guests online: 105
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
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 Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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