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....
 
2008-03-31 16:40
wattie

Registered: Dec 2003
Posts: 57
I'm having the same problem here as Burglar

.pc = $0800 "Program"
<code till $080c>

.pc = $080d "Program"
.import c64 "file.bin"

leads me to the same error.
2008-03-31 17:52
Cruzer

Registered: Dec 2001
Posts: 1048
Quote:
leads me to the same error.
If you get this as an error you can always give it the "-aom" argument to reduce it to a warning.
2008-03-31 19:09
Slammer

Registered: Feb 2004
Posts: 416
Hi, I can't reproduce the error. The following works ok:
.pc = $1000 "one byte"
.byte 1
.pc = $1001 "one more"
.byte 1

.pc = $2000 "charset"
.import c64 "endcharset.c64" 
.pc = $2800 "byte after charset"
.byte 1

with this result:
Memory Map
----------
$1000-$1000 one byte
$1001-$1001 one more
$2000-$27ff charset
$2800-$2800 byte after charset

Notice that the last byte in the range in the memory block belongs to the block so the one byte from $1000 gives a block from $1000-$1000 which means that you have to start the next block which endrange+1.

Also check the range of your input file

If none of the above explains the warning then send your code and file to me and I will check it out.

2008-04-01 12:31
Burglar

Registered: Dec 2004
Posts: 1101
hmmm, odd, maybe indeed my input prgs are 1 byte too long, and I thought I checked it properly... ;)

will check it out later today and thanks for the quick response!
2008-07-27 17:37
Barbarossa

Registered: May 2007
Posts: 31
I get a strange error in the script language. It looks like it is impossible to uses parenthesis within the arguments of the .if command.

For example:
.if ((i+1)*8<j) results in a syntax error, but
.if (i+1*8<j) compiles okay but obviously results in a wrong argument.

Anybody encountered this before? Is there a workaround? The only thing I can come up with is to put the left argument in a variable and use that in the .if statement. Not very pretty but works if there is no other solution available.
2008-07-27 21:48
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Use square parenthesis [ ]inside the if:

.if([i+1]*8<j)

At least that's how I recall it.
2008-07-27 21:50
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: I get a strange error in the script language. It looks like it is impossible to uses parenthesis within the arguments of the .if command.

For example:
.if ((i+1)*8<j) results in a syntax error, but
.if (i+1*8<j) compiles okay but obviously results in a wrong argument.

Anybody encountered this before? Is there a workaround? The only thing I can come up with is to put the left argument in a variable and use that in the .if statement. Not very pretty but works if there is no other solution available.


For a more pretty workaround you could:

(i+1)*8 => i*8 + 1*8 => i*8 + 8

:D
2008-07-28 09:09
Barbarossa

Registered: May 2007
Posts: 31
Of course brackets, that's a good solution. Thanks!
I never thought of that. I use them already in arguments for opcodes (e.g. lda #[3*23]) but I never thought of that for the scriptlanguage. A bit strange though that it doesn't allow for that. Maybe future update!
2009-05-30 22:12
Slammer

Registered: Feb 2004
Posts: 416
Hi Guys

I have started a new series of improvements on Kick Assembler. First of all some major core changes have been made which have resulted in version 3.0. The assembling is now done using a flexible pass algorithm and some techniques have been added to make the assembling more flexible and efficient.

The current version is now version is now 3.1, featuring chars and namespaces. More features will follow. Currently no known errors exist and all old sources are assembling, however a major release will first be uploaded to CSDB when I have seen Kick Assembler 3.x work stable for some time. If you want to use the latest beta you can find it on the website (http://www.theweb.dk/KickAssembler/Main.php)
2009-05-31 06:21
Mix256
Account closed

Registered: Dec 2008
Posts: 26
Cool! Seems a bit faster.
But the virtual-stars on the mem-map has disappeared.
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
Alakran_64
wil
Case/Padua
crayon/Hokuto Force
Spinball/Excess
Smasher/F4CG
Acidchild/Padua
New Design/Excess
iAN CooG/HVSC
Sulevi/Virtual Dreams
t0m3000/hf^boom!^ibx
tlr
iceout/Avatar/HF
Guests online: 110
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (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 Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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