News:

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

New to asm, need some help

Started by astak, October 27, 2007, 09:10:35 AM

Previous topic - Next topic

astak

I searched the forum but could'nt find any good answers so I test make my own thread.
I've just downloaded masm and read through the helpfiles, I understand the basics of asm know, but.

I want to make a simple program, like "hello world" and in 32-bit versions since I read in another post that it is no 16-bit linker in masm nowadays.
No messagebox, just a clean console output.

Vortex

Welcome to the forum.

Here is an example :

.386
.model flat, stdcall
option casemap :none

include     \masm32\include\windows.inc
include     \masm32\include\kernel32.inc
include     \masm32\include\masm32.inc

includelib  \masm32\lib\kernel32.lib
includelib  \masm32\lib\masm32.lib

.data

message     db 'Hello world!',13,10,0

.code

start:

    invoke  StdOut,ADDR message ; masm32.lib provides this function to print strings
    invoke  ExitProcess,0       ; terminate the application

END start

astak

Thank you so much :D
I want to read more about asm-programming for the console, where should I "look"?

Vortex

You are welcome.

Have a look at Masmlib.hlp file coming with the Masm32 package :

\masm32\help\MASMLIB.hlp

The chapter entitled Console Mode Functions explains the basics of console handling.