| |
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.... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
sorry to say, but this looks needlessly overcomplicated. you guys really never used .if/.endif like they were supposed to be used in any other assembler? i somehow cant believe this =) |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Its modelled after java/c++ and in this context it makes sence. There is also some evaluation concerns involved. You can evaluate a lot more with .if than a preparse #if and I guess if we make preparsing people will automaticly assume that you can put anything in the #if condition. Im not against preparsing and its absolutely a possibility, but I don't want to rush things and get alot of fixes that solves specific problems instead of one clean concept that can solve them all.
Can I see the code contructs you are using? Is it labels or options you are setting up this way?
Btw I just got a letter in my mailbox saying that I should demand tags on csdb in return for preparsing. :-)
Nothing is certain yet, but right now i'm considering a Kick Ass 4:
1. More flexible parse mekanism (Possiblity for ; as line comment,* instead of .pc and normal paranthesis instead of [] and leaving out : in front of macros/pseudocommands)
2. Possible to do 'skins' so you can support other assembler formats
3. Possibility to cover other processor types (while keeping the script language)
4. Making small constrains in the evaluations mekasnism to simplify the code in order to go open source.
5. Point 2 and 3 should be doable by plugins/ 3rd party development
So send me an example of 'ugly code' and preparsing will be taken into consideration.
|
| |
ruk
Registered: Jan 2012 Posts: 43 |
I've been using cmdLineVars in order to inject global constants, e.g. "debug", and some macros / functions to support this:
.function isDebug() {
.return cmdLineVars.get("debug") != null && cmdLineVars.get("debug").asBoolean()
}
.pseudocommand debugD020 {
.if (isDebug()){
inc $d020
}
}
.pseudocommand rebugD020 {
.if(isDebug()){
dec $d020
}
}
Works like intended, and I can surround debug code with isDebug() or use debugD020 without worrying where the debug-symbol is defined.
But it is a little quirky having to declare ":debug=true" on the commandline. I would rather see something similar to Java's "final static" in addition to the cmdlineVars hash.
Also, vars, consts and friends should respect the namespace they are declared in.
@Cruzer:
What about
block: {
label:
.if (true) {
nop
}
}
jmp block.label
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
"Can I see the code contructs you are using? Is it labels or options you are setting up this way?"
both. i use conditional assembling with labels inside if/then a lot, and also headers with defines that are switched for different configurations. and i honestly dont feel like showing more code just to see another proposed super ugly workaround as a response =)
"So send me an example of 'ugly code' and preparsing will be taken into consideration."
if whats shown in this thread doesnt already convince you, then all hope is lost - forget it. maybe kickass is for tables and not for code =P
"vars, consts and friends should respect the namespace they are declared in."
yes. and it should be possible to explicitly export them into the parent namespace. thats how any other sane assembler does it anyways =P |
| |
FATFrost Account closed
Registered: Sep 2003 Posts: 211 |
hi, i have a problem running Kickass, in osx i get
Exception in thread "main" java.lang.NoClassDefFoundError: kickass/jar
Caused by: java.lang.ClassNotFoundException: kickass.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247
Do i need to update or install anything?
Any help would be appreciated!! :)
|
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
FATFrost: Did you remember -jar? E.g. java -jar KickAss.jar |
| |
FATFrost Account closed
Registered: Sep 2003 Posts: 211 |
er...let me have look// :)
|
| |
FATFrost Account closed
Registered: Sep 2003 Posts: 211 |
Yeahz!! got it working nice!! Thanks Cruzer!! |
| |
TWW
Registered: Jul 2009 Posts: 541 |
So Mads, I've got one question:
Question: Before I go ahead and make too many pseudocommands, is there any plans for implementing the 65816 OPC set? |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
TWW: The short answer is no. I'm considering doing a hand made lexer/parser which allows people to insert their own instruction sets (from whatever processor you wish) while reusing the script language. This will take some time, so earliest release date (if any) will be about a year from now. So if I were you I would just go ahead with the pseudo-commands. |
Previous - 1 | ... | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | ... | 60 - Next |