| |
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.... |
| |
Mace
Registered: May 2002 Posts: 1799 |
Quoting SlammerThere 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. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
OK, I will look into it tonight
When did you download? |
| |
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?! |
| |
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.. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Ok, fixed the problem with the .text issue. Since the problem only existed from this morning and until now, there will be no new release number.
I happend to change the java source format to UTF-8 thinking 'That doesn't make any difference for the final code' and then some speedtest on the new ftp site by timing the uploading - Well, it turns out it did matter. Sorry for the inconvinience. |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
Question:
is there any way i can transform a char from a string to a numeric ascii value ?
asNumber obviously doesn't work.
ie.
.macro mymacro(str)
{
for (var i = 0; i < str.size(); i++)
{
.var asciivalue = ASCIIVALUE(str.charAt(i))
}
}
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Knowing that Kick-Ass internally uses ISO-8859-1 and that the scripts seems quite close to java perhaps something like this would work:
.var asciivalue = s.charAt(i)+0;
But I dunno ofcuorse... :) |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
JackAsser's solution almost works, except the 0 has to be prefixed:
.var asciivalue = 0 + s.charAt(i) |
| |
Mace
Registered: May 2002 Posts: 1799 |
@ Pantaloon: RTFM, especially paragraph 4.7.
Your question is answered there in full detail and it's much easier than you think. |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
GREAT! |
Previous - 1 | ... | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ... | 61 - Next |