Author Topic: WinAPE Macros?  (Read 2045 times)

0 Members and 1 Guest are viewing this topic.

Offline lachlank

  • CPC664
  • ***
  • Posts: 90
  • Country: nz
    • Awards
WinAPE Macros?
« on: 02:56, 28 June 09 »
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

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 785
  • Country: au
  • WinAPE Developer
    • WinAPE
    • Awards
Re: WinAPE Macros?
« Reply #1 on: 09:31, 30 June 09 »
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
like
0
No reactions