Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CBM Program Studio Assembler syntax

I'm trying to learn CBM Program Studio. But I can't get macros work for me. Withouth the macro the codes was ok. But when I add the macro part it gives "No Matching End Definition" on line 7.

Any idea?

        *=$c000 ; sys 49152

        ; set screen colors to black 
        lda #$00
        sta $d020
        sta $d021

defm    waitmacro ;akumulatörü hacılıyor   
        TYA
mloop   DEY
        BNE mloop
        TAY     
        endm waitmacro

        ;color bars
        LDX #$FF
loop    LDY #$07
        STY $d020

        waitmacro

        INY
        STY $d020

        waitmacro

        DEX
        BNE loop
        RTS
like image 312
wizofwor Avatar asked Apr 01 '13 21:04

wizofwor


1 Answers

It should work fine if you don't specify a name for endm. I.e.:

defm waitmacro ;akumulatörü hacılıyor
        TYA
mloop   DEY
        BNE mloop
        TAY     
        endm

I'm not sure why this is the case or why the documentation suggests otherwise.

like image 198
Michael Avatar answered Sep 28 '22 15:09

Michael