1) Is there any way to use calls in a macro? That could be very helpful!
In asmdream, an address label is always local, which means it can only be refered to in the area where it was defined.
In other words, it's not possible to refer directly to an address label in a macro body, if the label was defined in the data|code area of your source.
The thing is, macro parameters are there to help you do that =]
For example, this won't work :
APPLE{
CALL JUICE < "undefined label" error there, since JUICE is not in the macro area.
}
prgmFRUIT
APPLE
JUICE
...
You have to use a macro parameter to be able to refer to JUICE, indirectly, like this :
APPLE(?){
CALL ?0
}
prgmFRUIT
APPLE(JUICE) < JUICE can be refered there, since it's in the same area.
JUICE
...
You can also use this method, if your code is compatible :
APPLE{
...
}
prgmFRUIT
CALL JUICE
JUICE
APPLE
You can also define address labels directly in a macro body (but won't then be able to refer to them in the data|code area of the source) :
APPLE{
CALL JUICE
JUICE
...
}
prgmFRUIT
APPLE
2) Would you be able to add these as math operations: *, /, and, or, xor, not( ?
Most of the missing operators are already in my todo list (see first post).
To be honest, that won't be for today, since i have to revise many routines to integrate those.
I won't probably add the / operator, since there could be conflicts with labels names (/ already used as a replacement for _).
Same thing goes for the not( token.
Indeed, that left parenthese bothers me, since parenthese tokens are already reserved for instructions & macros.
Anyway, you'll still have this option : -argument-1.
I ask these two because I wanted to make this macro:
Pxl-On(?,?{
LD BC,?0+?1*256
CALL GETPXLLOC
OR (HL)
LD (HL),a
}
I know u know but this piece of code is a good occasion for me to clarify for other potential users :
Only the following tokens are allowed in a macro name definition :
numbers (0>9)
uppercase letters (A>Z) < The first one must be one of these.
space
,
> (store)
(
)
? (special, defines a parameter)
{ (end of line only)
Unfortunately, i'm afraid allowing more tokens would slow down the macro parsing and i want to avoid that.
Also, LD (HL),a should be LD (HL),A.
Also, I made the outline of a snake game using Asmdream!
I'm definitely happy to see i'm not the only one testing asmdream.
That's a true honor my friend =]