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....
 
2023-07-07 17:50
TWW

Registered: Jul 2009
Posts: 541
Quote: Quoting TWW
@ Krill: No it doesen't (which you surely know) but I really didn’t want to get into any this assembler vs. that assembler and exactly what I was trying to avoid in this thread. I am not thrilled about the syntax of some other assemblers however I try to keep it to myself.
I'd keep my mouth shut if it was only about choosing the quirks of one assembler over the quirks of the other. :)

Alas, it isn't - if you cannot avoid other assemblers being involved.

Consider a 3rd party library - let's say, a loader. =)

The most basic and portable way to include it is via some sort of .incbin to statically link its binary.

The problem is that the symbols definition file with the relevant call and zeropage variable addresses and some other constants (included via some sort of .include) needs to be understood by your assembler - if you want to have clean code, at least.

It doesn't get simpler than "install = $1000" and "load = $2000" etc. (which is understood by pretty much each and every other 6502 assembler) then "jsr install" etc., and yet... need to "convert" that stuff in the include file to work with KA. Bit annoying.


Agreed, definately a pain, but doable (and regarding say, a loader, already done - check your pm) :D
2023-07-07 18:31
Krill

Registered: Apr 2002
Posts: 2839
Quoting TWW
Agreed, definately a pain, but doable (and regarding say, a loader, already done - check your pm) :D
Not quite the solution i was hoping for, tbh. :)
2023-07-07 20:43
Stone

Registered: Oct 2006
Posts: 168
@TWW: I was pompous, sure, but not sarcastic. There was no malice.
2023-07-09 19:20
PAL

Registered: Mar 2009
Posts: 269
Strange how fast things just turn and get twisted or weird.
In our scene all people are on different skill levels and production methods (Novice. Advanced Beginner. Competent. Proficient. Expert.) Some are great at everything, while some others can not figure out things that seem simple or "stupid" yet create super great effects and parts... I think one should reflect a tad about the fact that we are all on different levels and also social skills... I think I have learned a lesson in the last one ;-)

@TWW - Looking forward to me and you get together after the summer and try to create something nice like we spoke of at X and in chats - We will have lots of fun with that! PAL
2023-07-11 03:06
Martin Piper

Registered: Nov 2007
Posts: 634
Since I modified Acme to add python scripting support and exhaustive forward label resolution (it retries passes until all labels are defined consistent values) I prefer that assembler. :)
2023-07-11 17:41
Frantic

Registered: Mar 2003
Posts: 1627
Quote: Since I modified Acme to add python scripting support and exhaustive forward label resolution (it retries passes until all labels are defined consistent values) I prefer that assembler. :)

Where is that version of ACME available, if anywhere?
2023-07-12 09:32
Martin Piper

Registered: Nov 2007
Posts: 634
Quote: Where is that version of ACME available, if anywhere?

Win binaries: https://github.com/martinpiper/ACME/tree/master/Release

Tests:
https://github.com/martinpiper/ACME/blob/master/features/CheckF..
https://github.com/martinpiper/ACME/blob/master/features/CheckP..

https://github.com/martinpiper/ACME/blob/master/TestPython.a#L17

Source in same repo.
2023-08-09 17:56
Frostbyte

Registered: Aug 2003
Posts: 166
I have a small problem, and I don't know if Kick Assembler has a way to provide the solution.

What I think I'd need is dynamic labels - that is, labels that are created and named dynamically at compile time.

In my macro, i'm generating code based on some input data, and I'd need labels within that code (in positions and numbers I don't know of yet at the time of generating the code). Then I'm generating another code block that would refer to those generated labels.

E.g. first bit of macro creates code with label1, label2, label3 etc.

Second bit of macro creates code that updates the values at the aforementioned labels.

As far as I can see this is not possible, at least with the usual labels that seem to be always hard-coded? Any other ideas how to do something like this?
2023-08-09 18:54
trident

Registered: May 2002
Posts: 74
Quote: I have a small problem, and I don't know if Kick Assembler has a way to provide the solution.

What I think I'd need is dynamic labels - that is, labels that are created and named dynamically at compile time.

In my macro, i'm generating code based on some input data, and I'd need labels within that code (in positions and numbers I don't know of yet at the time of generating the code). Then I'm generating another code block that would refer to those generated labels.

E.g. first bit of macro creates code with label1, label2, label3 etc.

Second bit of macro creates code that updates the values at the aforementioned labels.

As far as I can see this is not possible, at least with the usual labels that seem to be always hard-coded? Any other ideas how to do something like this?


Instead of using a bunch of labels, you can create a list to keep track of the addresses, and then use that list to reach them. Like this:

.var ldas = List()

.macro the_macro_that_creates_the_code() {
.eval ldas.add(* + 1)
lda #0
sta $d020
}

Then, further down in the code:

.macro the_macro_that_refers_to_the_created_code() {
.for (var i = 0; i < ldas.size(); i++) {
lda colors + i,x
sta ldas.get(i)
}
}
2023-08-09 21:51
Frostbyte

Registered: Aug 2003
Posts: 166
Quote: Instead of using a bunch of labels, you can create a list to keep track of the addresses, and then use that list to reach them. Like this:

.var ldas = List()

.macro the_macro_that_creates_the_code() {
.eval ldas.add(* + 1)
lda #0
sta $d020
}

Then, further down in the code:

.macro the_macro_that_refers_to_the_created_code() {
.for (var i = 0; i < ldas.size(); i++) {
lda colors + i,x
sta ldas.get(i)
}
}


Ahhh of course, brilliant! Thank you! I haven't tried it yet, but I can already see it solves my problem. :)
Previous - 1 | ... | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 - 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
Didi/Laxity
Wayne Kerr/Flashtro
Menace/Spaceballs
tlr
Doc Snyder/ONS
Krill/Plush
CA$H/TRiAD
Guests online: 142
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 Memento Mori  (9.6)
10 Bromance  (9.5)
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 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (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 Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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