Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) 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....
 
2016-01-26 17:46
The Gothicman
Account closed

Registered: Aug 2011
Posts: 40
Wow! I -was- drunk...

Haha... Fuck the shit... :)
2016-01-26 17:55
soci

Registered: Sep 2003
Posts: 473
No way, I don't buy that. You can do those simple movements in VICE as "T 1000 1FFF 4000".
2016-01-26 18:35
The Gothicman
Account closed

Registered: Aug 2011
Posts: 40
Believe me: I WAS drunk. If you'd know me you wouldn't doubt, at all.

And I wasn't speaking of a transfer from 1000 to 4000, but I was speaking from 1000-1fff to 4000 and, simultaneously, transfering 4000-4fff to 1000.

But, since I'm sober again, that's fixed. ;)
2016-03-07 20:53
TWW

Registered: Jul 2009
Posts: 541
Hello,

When passing an argument to a pseudo:

:pseudo_test 1234

would result in that the figgure "1234" is enterpreted as AT_ABSOLUTE (in decimal). Why not AT_NONE (as no addressing mode is really defined)?
2016-03-08 06:15
Slammer

Registered: Feb 2004
Posts: 416
Well a number in Kick Assembler indicates an absolute adressing mode:
   nothing         - no argument
   number          - absolute (or abs zeropage)
   #               - immediate
   (number),y      - indirect zeropage,y 
   etc.
How would you indicate absolute mode?

(AT_NONE is what you use in nop, sei, cli, etc. while commands like lsr can both use the argument types AT_NONE and AT_ABSOLUTE with different results)
2016-03-08 16:33
TWW

Registered: Jul 2009
Posts: 541
I was thinking a prefixed with "$" ($02 or $1234) indicating absolute. However i see Your point With the othe OPcodes (LSR etc.).

How about AT_NONE for no addressing mode ("1234") and AT_NULL for no argument ("")? Labels or const/var's would have to be prefixed somehow internally then I Guess.

I'm just trying in a pseudocommand to differentiate between an argument not being passed at all (which may result in an assertion error) and an argument passed without a prefix (which would result in an assertion warning) but it's nitpick.

Brgds!
2016-03-08 19:22
Agemixer

Registered: Dec 2002
Posts: 38
What a nice feature... I'd also like to know, so perhaps an example would do? I would have required that years before but never tested (Whadda lazy bustard!!! :)) Can they be defined by mnemonic extensions?

Also is it possible to pass a function inside a function to be called anyhow with kickasm scripting? Because i think that's more comfy than passing by arguments like if(a==1) {.eval Arg=Num*ber .eval x=blabla(Arg)} if (a==2) {.eval Arg=Num*bah .eval x=blabla_2(Arg)}
Thinking about something like .function DoSomething(NumMultiplier,MyFunction()) but that doesn't work... so if that's already possible i'm with love to :)

3rd question... Can i exit a .for loop? Or a .goto style of directive. How you would do that in kickasm?
2016-03-08 19:38
Agemixer

Registered: Dec 2002
Posts: 38
Also some days ago, i think i found a bug in kickassembler: If i changed .var i value in .for (i....) loop (sorry i don't have this code which failed anymore..) ...it hangs kickassembler (and halts relaunch64) but ends with some Java heap overflow (if i remember correctly). Is this a bug or did i just mess up some internal counter? And should i just NOT skip or touch .var i inside a for loop? :D (My lameness, but it was necessary to skip certain values from a huge set which i simply knew those would fail anyway.)

Any help appreciated :)
2016-03-08 20:12
Slammer

Registered: Feb 2004
Posts: 416
TWW: $ means the number is written in hexadecimal, just like % means its in binary. So the following 3 executions gives the same result:
  	:pseudo_test $1234
	:pesudo_test 4660
	:pesudo_test %1001000110100
just as this is the same:
	lda $1234
	lda 4660
	lda %1001000110100
On the inside of the pseudocommand all arguments are filled with pairs of (argumenttype, value). If no argument is given, the argumenttype is AT_NONE. If you want to test if no argument is given you could do something like this
.pseudocommand pseudo_test arg1 {
	.if (arg1.getType()==AT_NONE) .print "No argument is given"
	else .if (arg1.getType()==AT_ABSOLUTE) .print "the argument is absolute: "+ arg1.getValue()
	else .print "the argument is something else!"
}

:pseudo_test
:pseudo_test 4660
:pseudo_test $1234
:pseudo_test ($30),y
This will give:
  No argument is given
  the argument is absolute: 4660
  the argument is absolute: 4660
  the argument is something else! 
So by testing for AT_NONE you can see if an argument is given or not.
2016-03-08 20:20
Slammer

Registered: Feb 2004
Posts: 416
Agemixer: Currently there are no 'break', 'goto' or 'continue' directives to modify the flow of loops. Also, there are no lamdaexpression. This migth change, especially with 'break' and 'continue' and perhaps with lambda expressions (just for the fun of implementing it :-) )
Previous - 1 | ... | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | ... | 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
Honesty/Covenant/Ons..
Guests online: 71
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 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (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 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.058 sec.