News:

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

Help about print

Started by ookami, January 27, 2011, 10:43:46 AM

Previous topic - Next topic

ookami

Hello,

Is "print" a procedure or a macro ? It seems to be a macro because it does not need a call instruction....Am I right ?

And can you explain me how to use it well (what the meaning of chr$, str$, cat$....) ?

Thank you

oex

print is a macro

you could use it:

print chr$("Some Text")
or
print chr$("Some Text With A New Line"), 13, 10

chr$ is also a macro....

see: \masm32\macros\macros.asm
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

disintx

Quote from: ookami on January 27, 2011, 10:43:46 AM
Hello,

Is "print" a procedure or a macro ? It seems to be a macro because it does not need a call instruction....Am I right ?

And can you explain me how to use it well (what the meaning of chr$, str$, cat$....) ?

Thank you

macros will make calls to APIs or other functions which either don't or do use the win32 api, which make your life much simpler. follow ookami's advice and give the masm32 help files (:\masm32\help) a once-over; they make the simple things of programming much easier and remove much of the "mundane work" for you to work on more interesting algorithms, whilst still being ultra-efficient.

hutch--

ookami,

They are documented in the help file on the help menu of the masm32 editor.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

you can read the docs, as Hutch suggests
but, you can also learn a lot about writing code by seeing how these macros and functions are written   :U
the macros are in \masm32\macros\macros.asm
and the functions are in the \masm32\m32lib folder

ookami

#5
Thank you very much everybody, that's a great help !


ookami

Sorry for the double post.

Dednave, I found all of them in the m32lib folder, and I can open them and see how they are written (they are .asm files).....apart from the masm32 (there is only a .lib and a .inc, but no asm.).  :dazzled:
Where can I find it ?

dedndave

i guess i don't understand what you are asking for
if you mention a specific example function, we can help you out   :U

ookami


dedndave

\masm32\m32lib\stdout.asm

sometimes, you may have to use windows explorer search tool to find the title you are looking for

ookami

Thank you.

In this folder there are only the functions from the masm32 lib, but not the others, right ?
Where can i find the 'crt_system' for example ?

dedndave

that is a function from MS visual C runtime library (MSVCRT.lib)
you can find info for that at msdn, however you won't find the source code for the function

http://msdn.microsoft.com/en-us/library/abx4dbyh%28v=vs.80%29.aspx

ookami

Thanks.

Is there a function in masm32 lib that does the same (pausing the console) ? (sorry for all these questions)

jj2007

Quote from: ookami on January 27, 2011, 07:00:09 PM
Thanks.

Is there a function in masm32 lib that does the same (pausing the console) ? (sorry for all these questions)

Something like inkey "hit the keybord to get more text" ?

xandaz

   hey jj. Why is italy in your personal image? you italian? Which part?