News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_lachlank

WinAPE Macros?

Started by lachlank, 00:56, 28 June 09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lachlank

Hi all, is there any way to define a macro like this in WinAPE? (complex parameters)

macro myIFZ truepart falsepart
jp z, @false
truepart
jp @endif
.@false
falsepart
.@endif
endm

ld a, (someAddr)
cp 10
myIFZ {ld a, 6 : call someFn} {ld a, 22 : call someOtherFn}

???

Lachlan

Executioner

There's no way to do that because WinAPE treats the ':' character the same as end of line. One possible workaround is to define another macro containing the two instructions since I think you can nest macros. eg.

macro fn1:ld a,6:call someFn:endm
macro fn2:ld a,22:call someOtherFn:endm
myIFZ fn1,fn2

Powered by SMFPacks Menu Editor Mod