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....
 
2015-03-25 12:20
Oswald

Registered: Apr 2002
Posts: 5007
"s there any other means at all to nicely access the operand by label pointer instead of opcode?"

dont know anything better. possibly you can script this in kickass by generating labels from stuff like:

VAR lda #$00

in 64tass style: var2 = var +1 ;)

btw I'm still guilty of using (fa) (fe), but I keep them now as labels (no $ infront), its just faster to type them out, and I have my own patterns where I use them and what to.
2015-03-25 14:41
chatGPZ

Registered: Dec 2001
Posts: 11088
Quote:
the problem with your debug code is kickass, it shouldnt define the conditinal code sections as scopes automagically.

noooooooo /o\
2015-03-25 15:48
Agemixer

Registered: Dec 2002
Posts: 38
I have a suggestion to kickass developers.

I think there is atleast 3 possible ways to deal with scopes (if you want to take my note on future versions of kickass)

The first one is a dirty addition:

{ // This is a scope
}

#{ // This one is unscoped
}

It could be also "-{" or "{{" instead of "#{" or such, you got the idea. Will be treated as same level as parent scope or main.

The another method could be a Global assignment to a label/var/constant definition:

.global label yesbox=$1234

...and "yesbox" could be then accessible from anywhere the whole source file, visible to all scopes. That's not standard assembly, but is kickassembler syntax any standard assembly anymore at all? :)

Then the third idea:

.scopeless (or .disable_scoping)

...and all scopes below this line would be treated as non-scopes, until .enable_scoping is reached to enable

Shouldn't be hard to implement in future version kickass and neither would break the current codings made with kickass i guess?
2015-03-26 21:23
Slammer

Registered: Feb 2004
Posts: 416
Soci: Thanks, Its corrected in the new version 3.39 just released.

Agemixer: Thanks. If you join the facebook group (https://www.facebook.com/groups/RetroAssembler/) you will get access to the official Kick Assembler Wish List, where you can enter your ideas. It's also a good place for discussing ideas.

I don't know if you have noticed, but you can enter normal scopes like this:
Function1: {
col:	lda #01
	sta $d020
	rts
}

Function2: {
	inc Function1.col+1
	rts
}

This will ofcause not solve the if-problem.
2015-03-27 00:07
Agemixer

Registered: Dec 2002
Posts: 38
Because i haven't found any examples how to produce C64 ascii with kickassembler, here is mine:

.function pet2asc(p) { .eval p = [ p>$40? p+=$80 : p ] .return [ p<$20? p^$40 : p ] }
.macro asctxt(str) { .fill str.size(), pet2asc(str.charAt(i)) }
.macro asctxtCR(str) { :asctxt(str) .byte $0d }


ldx #$00
loop: lda text,x
beq end
jsr $ffd2
inx
bne loop
end: rts


text: // C64 ascii
.byte 5 // color = white
.byte 147 // clr+home
.byte 9,14,8 // case change: enable C= + shift, set locase, disable
:asctxt("Hello World!")
:asctxtCR(" 1,2,3,4...")
:asctxtCR("")
:asctxt("The quick brown fox ")
:asctxtCR("jumps over the lazy dog")
.byte 0
2015-03-27 00:45
Agemixer

Registered: Dec 2002
Posts: 38
Thanks Slammer
2015-04-30 09:40
Murphy

Registered: Jul 2006
Posts: 10
Slammer: Thanks for this awesome assembler!

Support of |= (and &=) operators are planned?
2015-04-30 12:37
Murphy

Registered: Jul 2006
Posts: 10
I found a strange issue with the asserts.

.assert "Key is valid=", tab.containsKey(key), true
.var actList= List().addAll(tab.get(key))

The tab is a Hashtable which contains lists.
When the value of the key is invalid, i get an error:

cml.kickass.values.NullValue cannot be cast to cml.kickass.values.ListValue

It looks, the assert interpreted later than the addAll.
2015-05-01 07:30
Slammer

Registered: Feb 2004
Posts: 416
Hi Murphy

|= and &= can easily be implemented so it goes on the todo list (Feel free to enter the Facebook group and add them yourself).

In some cases KickAssembler can skip parts of evaluation if it doesnt have enough information to do the evaluations. Assert is not asserting before both values are valid and invalid values can occur if you base you calculations on labels that is not yet resolved.

However I would like to see your code, Could you shortend it to a small example and send it to me? You where not supposed to get a cast execption but a "Invalid argument. It has to be a list."-message in case of null.
2015-05-01 10:46
Murphy

Registered: Jul 2006
Posts: 10
Thanks Slammer! The source was sent in PM.
Previous - 1 | ... | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | ... | 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
Fungus/Nostalgia
Mason/Unicess
t0m3000/ibex-crew
Freeze/Blazon
cobbpg
Guests online: 353
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (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.063 sec.