News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Macro ?

Started by Magnum, June 22, 2015, 05:57:22 AM

Previous topic - Next topic

Magnum

I forgot what to do so I do not have to type the whole section.

Macro comes to mind, but I am probably wrong.

mov ecx, 15
@@:
push ecx
invoke Beep, 1000, 55 ; Frequency in hertz and sound duration
invoke Beep, 800, 55   
pop ecx
dec ecx
jnz @B
invoke Sleep, 1500   

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Magnum

I found some examples in MASM32/macros/ but I am lost.

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

rrr314159

Magnum: ... I do not have to type the whole section.

- I don't understand what u want to do. What section?
I am NaN ;)

Magnum

I want to repeat the code I posted without typing the whole thing.

I know a lot of folks are mad at me, so the responses will be minimal.   :biggrin:

I will try real hard to not post anything to the Colesseum or other controversial areas. :-)


Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

rrr314159

playbeeps MACRO
LOCAL beeploop
mov ecx, 15
beeploop:
push ecx
invoke Beep, 1000, 55 ; Frequency in hertz and sound duration
invoke Beep, 800, 55   
pop ecx
dec ecx
jnz beeploop
invoke Sleep, 1500   
ENDM
I am NaN ;)