| |
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.... |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
Quote: KickAssembler supports imports from source, binary, c64 and text files. So if you write:
.import c64 myfile.prg It will skip the first two bytes. I will check it out if there is an error.
yes but
.pc = $1000 "Bla"
.import c64 "bla.prg"
.pc = $2000 "Bla 2"
jmp *
will throw a warning if bla.prg is a prg from $1000-$1fff (including $1fff) |
| |
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. |
| |
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.
|
| |
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.
|
| |
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! |
| |
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.
|
| |
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. |
| |
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 |
| |
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!
|
| |
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)
|
Previous - 1 | ... | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 - Next |