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....
 
2010-11-06 19:42
Oswald

Registered: Apr 2002
Posts: 5034
RTFM
2010-11-06 19:45
Slammer

Registered: Feb 2004
Posts: 416
I think you are refering to the repetition commands in the pseudocommand tutorial on codebase64.

You can find it here

(Oswald: No, it's actually not in the manual)
2010-11-06 22:22
Lobogris
Account closed

Registered: Oct 2010
Posts: 22

so it is a macro that must be defined. Ok, that's good, I thought that was a fact of the assembler, and I've read the manual lots of times lol

Now I can remember reading that exact tip from you, in the codebase :D thanks Slammer.

2010-11-07 07:03
Oswald

Registered: Apr 2002
Posts: 5034
then "read 2 posts above your own one" :P :)
2010-11-07 11:02
Slammer

Registered: Feb 2004
Posts: 416
With functions, macros and pseudo-commands you can get KickAssembler to do a lot of fancy stuff. I suggest that everytime you find something you like you copy-paste it into your own library.

Here is a little trick. If you wan't the repetition commands to be an integrated part of KickAssembler you can copy-paste them into the resources/autoinclude.asm file that is placed inside the jar file. (To view the content of a jar just rename it to a zip-file)

Oswald: Yep
2010-11-07 11:55
Lobogris
Account closed

Registered: Oct 2010
Posts: 22
yeah I did that with the .import source "macrolib.asm" directive

It's nice to know the "trick" you said to include it as standard.
very handy :)

haha :D @oswald

:nop #2
jmp *-2

2010-11-07 14:16
Mace

Registered: May 2002
Posts: 1799
Quoting Slammer
There is a new release on the site.

Seems that toIntString() is borked now.
Or is it .text toIntString()?
Because that returns odd results!
So :BasicUpstart() doesn't work either: de number after SYS is all nonsense.
2010-11-07 14:32
Slammer

Registered: Feb 2004
Posts: 416
OK, I will look into it tonight

When did you download?
2010-11-07 19:35
Mace

Registered: May 2002
Posts: 1799
I downloaded today, just minutes before that post.

[edit]
While you're at it, I've got another question.

I have declared to pseudocommands, GoDebug and DebugRoutine.

// ========================================================
.var DebugOn = 0
.pseudocommand GoDebug {
                         jsr SUB_Debug
                         .var DebugOn = 1 }
.pseudocommand DebugRoutine {
                         // some routine to show debug info
                         }
/* code here */

     :GoDebug

/* more code */

/* at the end of all code */
SUB_Debug
     .if (DebugOn == 1) :DebugRoutine
// ========================================================

The idea is that if :GoDebug is called (and not commented out), the :DebugRoutine will be added to the code.
If :GoDebug isn't called, there will be no code following the SUB_Debug label.

This, however, doesn't work, because the if-statement doesn't see DebugOn as 1 even if :GoDebug is called.

What could be a solution for this problem?


How weird... it suddenly works, without changing anything, just by compiling it again?!
2010-11-07 22:28
Slammer

Registered: Feb 2004
Posts: 416
It doesnt work because you declare several DebugOn variables. When you write:
.var x=0
you declare the variable x. If you write
.var x=0
.var x=0 // This gives an error
You will get an error for redefining x since you cant have two variables with the same name. In you example you don't get an error because you are redefining the variable inside a scope:
.var x=0
{var x=1} // This declares another x variable inside a scope
So what you really want to do is to modify you existing variable not declare a new one. This is done with the eval command:
.var x=0
.eval x=1


Edit: Saw you fixed the problem. Still guess you should check the .var command..
Previous - 1 | ... | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ... | 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
Sentinel/Excess/TREX
Jammer
E$G/hOKUtO fOrcE
KAL_123
Guests online: 76
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 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (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 Birth of a Flower  (9.5)
9 Morph  (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.059 sec.