News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

What is the proper syntax for a macro call?

Started by raleeper, August 23, 2011, 11:55:04 AM

Previous topic - Next topic

raleeper

Please ignore.  I spotted my really stupid mistake while reviewing the post.
Sorry.

Thanks, ral

jj2007

Assembles fine here, Robert. Did you put it before the call, preferable below the includes?

include \masm32\include\masm32rt.inc

BEEPER  MACRO   freq1,freq2,dur
        push    ecx
        push    edx
        invoke  Beep,freq1,dur
        invoke  Beep,freq2,dur
        pop     edx
        pop     ecx
ENDM

.code
AppName db "Masm32:", 0

start:
BEEPER  800h,500h,0C0h
MsgBox 0, "Hello World", addr AppName, MB_OK
exit

end start

raleeper

Quote from: jj2007 on August 23, 2011, 12:11:16 PM
Assembles fine here, Robert. Did you put it before the call, preferable below the includes?

include \masm32\include\masm32rt.inc

BEEPER  MACRO   freq1,freq2,dur
        push    ecx
        push    edx
        invoke  Beep,freq1,dur
        invoke  Beep,freq2,dur
        pop     edx
        pop     ecx
ENDM

.code
AppName db "Masm32:", 0

start:
BEEPER  800h,500h,0C0h
MsgBox 0, "Hello World", addr AppName, MB_OK
exit

end start

Quote from: jj2007 on August 23, 2011, 12:11:16 PM
Assembles fine here, Robert. Did you put it before the call, preferable below the includes?

include \masm32\include\masm32rt.inc

BEEPER  MACRO   freq1,freq2,dur
        push    ecx
        push    edx
        invoke  Beep,freq1,dur
        invoke  Beep,freq2,dur
        pop     edx
        pop     ecx
ENDM

.code
AppName db "Masm32:", 0

start:
BEEPER  800h,500h,0C0h
MsgBox 0, "Hello World", addr AppName, MB_OK
exit

end start


The code above corrects the problem.  At the time I thought it didn't.
Thanks, Robert


dedndave

i like it, Robert   :P

it will sound like a euro-cop siren   :lol

if you want to put a "dead space" between sounds, just use a very high pitch like 32767
it will give you a moment of silence between beeps

raleeper

Quote from: dedndave on August 23, 2011, 01:20:08 PM
i like it, Robert   :P

it will sound like a euro-cop siren   :lol

if you want to put a "dead space" between sounds, just use a very high pitch like 32767
it will give you a moment of silence between beeps

Thanks, dedndave.
Best wishes, Rbert