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 Thread 2
2009-07-21 17:20
Slammer

Registered: Feb 2004
Posts: 416
Kick Assembler Thread 2

The previous thread took a little long to load, so this is a new fresh one..
 
... 590 posts hidden. Click here to view all posts....
 
2011-12-04 13:57
Slammer

Registered: Feb 2004
Posts: 416
Shadow: I don't know Atari coding so you will have to be a little more specific of what solution you had in mind.

Are you looking for something like this:
// Bank 2
.pc=$2000 
.pseudopc $1000   
{
	lda foo
	sta bar
	..

.align $400
	lda foo
	sta bar
	..
}

Or perhaps some kind of macro that makes it easier to set up the blocks?
2011-12-04 14:08
Slammer

Registered: Feb 2004
Posts: 416
Andym: I guess making support for files larger than 64k is not that big a problem. But since I'm not doing cartridge development i'll need someone to test it and see that the concept i really useful (eg. is this a good way to do it and what else would you need to do cartridge development).




2011-12-04 15:58
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Slammer: What I'm trying to accomplish I guess is setting the PC without having to break the pseudopc block.
Ideally I'd want something like this:

.pc=$2000
.pseudopc $1000
{
   lda blabla
   ...

.pc=$1400
   bla (code that ends up on $2400 here)
   
.pc=$1f3c
  blabla (code that ends up on $2f3c here)
   
}


But maybe the solution you posted will solve that!
Would replacing the
.pc=$1f3c
with
.align $0f3c
in my example work?
Eh, I guess I can just test that myself! :D
2011-12-04 22:56
Slammer

Registered: Feb 2004
Posts: 416
I don't think .align $0f3c is what you are looking for. The align directive is made so you can easily can align source code to page boundaries, så typically you would do:

.align $100
table: .byte 1,2,3,4,5,..

The align command reads the current memory position and inserts zeros until the next boundary is reached. Eg the pc=$107f and you write .align $100, then $81 zeros is inserted so the pc is now $1100.

In your first example it seemed like you wanted $400 block alignment :-)

Currently you cant set the pc freely inside an pseudocommand statement. You can make somekind of macro that advances the pc (and pseudope). Something like :

.macro setPos(pos) {
.var length = pos-*
.fill length, 0
}

but this will not work if pos is less that the current pc.
2011-12-08 20:37
Slammer

Registered: Feb 2004
Posts: 416
Hi, I got a mail from Alex who made a Kick Assembler plugin for Kate editor.

http://redlumf.blogspot.com/2011/12/kickass-plugin-for-kate.html

He would post it himself but had troubles signing up on CSDb.
2011-12-11 02:18
Conjuror

Registered: Aug 2004
Posts: 168
Slammer,

I have a couple suggestions for features:

1. Allow the ability to access variables from user-defined structures by index.
That way we can pass in a List or HashTable containing UDS's to a function and apply an action based on the variable's index rather than the name, which could be different for each UDS.
Great for library building.

2. Call an external JAVA program, passing in Strings, Floats, Integers, Lists & HashTables with UDS's and return the same back into KickAssembler variables.
I could get the functionality by having my JAVA code generate KickAssembler script but this could get quite large for Collections.
Would be nice to have this inline.

Steve
2011-12-11 17:37
Slammer

Registered: Feb 2004
Posts: 416
Quote: Slammer,

I have a couple suggestions for features:

1. Allow the ability to access variables from user-defined structures by index.
That way we can pass in a List or HashTable containing UDS's to a function and apply an action based on the variable's index rather than the name, which could be different for each UDS.
Great for library building.

2. Call an external JAVA program, passing in Strings, Floats, Integers, Lists & HashTables with UDS's and return the same back into KickAssembler variables.
I could get the functionality by having my JAVA code generate KickAssembler script but this could get quite large for Collections.
Would be nice to have this inline.

Steve


1. Yep, I guess it's easily done. Im not sure i understand how to benefit from this in libraries. (Looking forward too see en example of use!)

2. Yep, can be done. Is in fact on the todo list, but it's will take a bit of work so i have postphoned it a bit. One of the reasons for restructuring the assemble mekanism so it could handle a flexible number of passes and to cache script results, was to be able to call external programs - Both with script parameters and assembled code (if you want to do crunching or encrypting etc.)
2011-12-12 00:05
Conjuror

Registered: Aug 2004
Posts: 168
Say I had a multi-field sorting routine this time for point{x,y} I could pass in a List of points.
Another time the names could be different or sort by even more fields.

I recently did a 2 field sort with a Hashtable and Lists. The Keys been the Y values which I called sort on, then called sort on Lists (Hashtable values).
That got me the result I wanted but I'd rather have a more generic solution.

But if suggestion #2 comes soon this will be irrelevant as I will just use full blown JAVA Collections and its interfaces (hmm still indexed fields would still be useful there saves
calling invoke on named methods).

And great to hear that it is on your list. That will make any other 'missing' functionality just go away. Cant wait!
2011-12-12 22:00
Slammer

Registered: Feb 2004
Posts: 416
I don't think #2 will come that soon. Im pretty busy at the moment so there is not much time for coding for fun. However #1 is a small task. I guess it will be in the next release.
2011-12-12 23:03
Pantaloon

Registered: Aug 2003
Posts: 124
coding is always fun :)
Previous - 1 | ... | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ... | 60 - 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
Krill/Plush
mutetus/Ald ^ Ons
Sulevi/Virtual Dreams
TheEnemy/TREX/THD
Guests online: 123
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (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.047 sec.