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-12-03 20:16
Slammer

Registered: Feb 2004
Posts: 416
I just uploaded a new release including the mod command.

http://www.theweb.dk/KickAssembler.htm

At first I made the % operator, but found out that it collides with the notation for binary numbers..
2006-12-04 12:31
Mace

Registered: May 2002
Posts: 1799
Magnificent concept!

In fact, this idea once crossed my mind when I was coding PHP for a webpage. Since it is possible to combine JavaScript, HTML and PHP all in one page, the idea of combining 'languages' for the C64 came to mind.
The exact thought I had, was: "woah, wouldn't it be nice to be able to add script to assembly code for C64?!".

Never said it out loud and I'm not capable of programming an assembler either, so you can guess my interest :-)

I started reading the manual. When I'm done, you'll receive an email with all the glitches and errors I found.

Also, I was wondering how it would be possible to distinguish between ASCII and screencodes in .text.
2006-12-04 20:48
Slammer

Registered: Feb 2004
Posts: 416
Thanks, Always nice with some feedback.

I'm not sure I understand what you mean by screen codes. The .text directives put out the chars corrosponding to the letters that would come out with the lower/upper case standard charset (Shifted mode). If you work in unshifted mode remember to write your text with small letters.



2006-12-04 21:09
tlr

Registered: Sep 2003
Posts: 1729
@slammer: Screencode = what you poke into the screen memory to get the corresponding char.

@ = 0, A = 1, B = 2, etc...
2006-12-04 21:21
Slammer

Registered: Feb 2004
Posts: 416
Ok, then I guess my previos post answered the question: The .text directive always outputs shifted-mode screen codes. Is there a need for a ascii or unshifted-mode option?
2006-12-05 16:15
Mace

Registered: May 2002
Posts: 1799
(former post deleted)

Ok, so writing in small chars would give 'a' as a $01 in the memory?
Then that's sorted, then :)
2006-12-07 20:52
Slammer

Registered: Feb 2004
Posts: 416
Hi guys,

My internetprovider's mailserver is highly unreliable these days, so if you want to be sure that your Kick Assembler feedback, bugreports etc. reach me then use private messaging here on CSDB..

2006-12-08 13:55
LordNikon

Registered: Dec 2001
Posts: 42
Is there a way to override warnings? ...
I try to import a huge binary and i only want to change some bytes in it with the following source code. When i compile that stuff the assembler gives me a warning and doesn't produce a prg.
2006-12-08 17:12
Slammer

Registered: Feb 2004
Posts: 416
Hi, can't see your source code so I dont know precisely what you are doing.

However, I guess you get a warning because you have reached an address higher than $10000. If you only want to use some of the binary file, then use the LoadBinary command to load it into a variable and the .fill command to dump the selected part to memory:

// Use the first $2000 bytes of a file
.var file = LoadBinary("myFile")
.fill $2000, file.get(i)

Edit: On second thought, perhaps thats not what you are trying to do. Is it that you want to have overlapping memory segments?

2006-12-09 17:30
Cruzer

Registered: Dec 2001
Posts: 1048
I think I've had the same problem as LordNikon. Solution: Load the file into a List, modify the bytes there, and dump the content of the List.
Previous - 1 | ... | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ... | 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
csabanw
Mason/Unicess
Steel/SCS&TRC/G★P
Paul Bearer
Jammer
DeMOSic/HF^MS^BCC^LSD
Board Rider/Commodor..
zscs
Guests online: 111
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 No Bounds  (9.6)
7 Aliens in Wonderland  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 It's More Fun to Com..  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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