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..
 
... 592 posts hidden. Click here to view all posts....
 
2012-03-13 15:46
Cruzer

Registered: Dec 2001
Posts: 1048
@H Macaroni: Seems like a cool feature, but no, you can't do that in KickAss. What I usually do is simply to print out the address of the point I wanna inspect in the monitor like this:

.print "here: " + toHexString(*)
2012-03-13 20:44
Slammer

Registered: Feb 2004
Posts: 416
If i where you, I would export a vice symbol file (option -vicesymbols) and see your code in the vice monitor (including your labels).

There actually is a secret option a bit like the one you want, but with a much higher detail level so I won't recommend it for debugging programs in general (I use it for debugging the assembler). However, It might be interesting for people who wants a sneak peak of whats going on while assembling. The option is -parsetree which shows the state between each pass. The output looks like this:
rasterbar.asm 45:4             :       #NAsmCmd(ldy, EAsmArg(EVarRef(rasterColor)))
rasterbar.asm 46:4             :       #NAsmCmd(cpy, EAsmArg(EConst(!255.0)))
rasterbar.asm 47:4             :       #NAsmCmd(beq, EAsmArg(EVarRef(o1)))
rasterbar.asm 48:4             :       #NAsmCmd(lda, EAsmArg(EConst(!53266.0)))
rasterbar.asm 49:4             :       #NAsmCmd(cmp, EAsmArg(EConst(!53266.0)))
rasterbar.asm 50:4             :       #NAsmCmd(beq, EAsmArg(EObjFuncCall(-,EPcRef(),EConst(!3.0))))
rasterbar.asm 51:4             :       #NAsmCmd(sty, EAsmArg(EConst(!53280.0)))
rasterbar.asm 52:4             :       #NAsmCmd(inx, EAsmArg())
rasterbar.asm 53:4             :       #NAsmCmd(jmp, EAsmArg(EVarRef(l1)))


Beware, It easily gets complicated and is not supported in any way (Originally only intended for me to read). However, if you are really interested whats going on in line 50, you might be able to tell.

2012-03-13 23:51
Norrland

Registered: Aug 2011
Posts: 14
Thanks for the answers, I'll try them.
2012-04-17 21:20
Mace

Registered: May 2002
Posts: 1799
Why do I get an error (Uknown function) on the - in [max-min] in de code below?
Using KickAss v3.25.

.pseudocommand sinData min;max;freq {
	.var amp = 0
	.eval amp = [max-min]/2
	.fill 256, amp + amp * sin(toRadians(i*[360*freq]/256))
	}

.pc = $1000
	:sinData 0;255;1
2012-04-17 22:00
Killsquad
Account closed

Registered: Jun 2005
Posts: 17
To get the numeric value of the params use max.getValue(), min.getValue() and freq.getValue().
2012-04-17 22:15
Killsquad
Account closed

Registered: Jun 2005
Posts: 17
Would it be possible for enums to continue from the next number after an explicit value?
Example:
.enum { var1 = $10, var2, var3 }
should give var2=$11, var3=$12

As it is now var1=$10, var2=$00 and var3=$01

Thanks for the massive effort by the way. Excellent assembler!
2012-04-18 11:11
Cruzer

Registered: Dec 2001
Posts: 1048
Mace: Seems more like a job for a macro. Then you don't have to use getValue()
2012-04-18 18:27
Mace

Registered: May 2002
Posts: 1799
Thanks Killsquad.
@Cruzer: yeah, probably... was just foolin' around 'n stuff ;-)
2012-04-18 18:39
Slammer

Registered: Feb 2004
Posts: 416
Mace: What Killsquad and Cruzer said. Pseudocommands is macros that takes assembler instruction arguments. So you can write :myCmd #$20 or :myCmd $20 and the command will know that the first one is an immediate argument and the second one is an absolute argument although they both have the value $20.

Killsquad: Thanks! Good Point. I actually considered that solution when I made the enum directive and it could just as well have been that solution. However, I'm rather sensitive to things that destroys backwards compatibility so I'm not planning on changing it.
2012-04-30 08:12
ruk

Registered: Jan 2012
Posts: 43
Hi,

This does not compile:
.var hashtable = Hashtable()
.const booleanOption = hashtable.containsKey("booleanOption") && hashtable.get("booleanOption")


The error is "Error: Can't get a boolean representation from a value of type Null", so I guess there is some issues with lazy evaluation?

As a workaround I have defined the following function:

.function getValue(hashtable, key, defaultValue) {

        .if (hashtable.containsKey(key))
                .return hashtable.get(key)
         else
                .return defaultValue
}


So that I can do e.g.

 .const underTest = getValue(cmdLineVars, "testing", false)


Previous - 1 | ... | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | ... | 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
Knut Clausen/SHAPE/F..
wil
Nordischsound/Hokuto..
Akira/G*P
csabanw
tlr
MagerValp/G★P
void256
Guests online: 94
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 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Aliens in Wonderland  (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 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Daah, Those Acid Pil..  (9.5)
9 Birth of a Flower  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Fungus  (9.7)

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