News:

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

cant compile "hello world"

Started by WYVERN666, April 10, 2011, 05:17:53 AM

Previous topic - Next topic

WYVERN666

sorry dedndave, i didnt saw your last post , its explains more thanks!. Yeah i knowed the "print" macro, like other macros it makes easier but i think i will avoid the use of macros at least for now if i want to learn asm hehe. Thank for your help!

RuiLoureiro

«but why is shorter than your examples?»

When i run your example the prog exit and i cannot see any Hello World !!!
See StdOut

WYVERN666




invoke StdOut, addr HelloMsg
   invoke ExitProcess, 0



that is not using StdOut??, i dont know, linking with /SUBSYSTEM:CONSOLE woks fine for me, but runing from CMD, nor clicking the file.

dedndave

the console opens, runs, and closes before you see it
that is why i added the "inkey" macro in the last example
it waits for a key-press
i think Rui used Sleep to wait

by the way - you can look up the "inkey" and "exit" macros
they are all in masm32\macros\macros.asm

also, in the masm32\help folder, you will find help files that explain the macros and functions

WYVERN666

yeah, clicking the file the window disappear, and i didnt use sleep or wainting for a key xD. 

dedndave your last example was too much macros for me! haha, but the good thing is that i can check the macro code and learn how to do it mi own. Thanks

Can you give me some advice for a good book? (i hope to fins it in spanish hehe).

RuiLoureiro

Quote from: dedndave on April 10, 2011, 04:10:03 PM
i think Rui used Sleep to wait

              I used StandardIn (like StdIn) because we need some input when we write a prog...

dedndave

well - i suggest Randall Hyde's old AoA
it is available online, and can be translated to Spanish using google translate
the first 6 chapters are what you need

http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html

here is an example of it translated by google...
http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=en&tl=es&u=http%3A%2F%2Fwww.arl.wustl.edu%2F~lockwood%2Fclass%2Fcs306%2Fbooks%2Fartofasm%2Ftoc.html

to get there, first go to google translate
translate.google.com

select English to Spanish
then, enter the URL of the page you want translated into the big white box

once you are in there, you may navigate around the HTML pages
and google will translate them all to Spanish

also, the masm32\examples folder has a lot of good material to learn from
the forum search tool can also be a great way to learn

WYVERN666

thank you very much, i will chek that.  :U

hutch--

WYVERN666,

There is a reason why you use macros early in your development cycle, until you have a lot more experience you don't know enough to write your own runtime library which is a reasonably advanced task. Macros get you up and going a lot faster and with a lot more code written you will be able to start writing your own if you need it. What is generally the case with learners at their entry stage is an incorrect set of assumptions about what assembler is or should be.

The guy who get a lot of code up and running in reasonable time will go on to write his own specialised code at a lower level, the alternative abandons assembler and ends up writing server side scripting or similar crap from a visual garbage generator.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php