News:

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

i'm just filled with errors

Started by thomas_remkus, February 02, 2007, 03:52:32 AM

Previous topic - Next topic

thomas_remkus

Below is my code. I'm trying to combine several things I am reading about into something simple. What I have seems to be right but I really need some help. Can someone tell me what I am doing wrong with this.

.686
.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

OutMyName proto :ptr db

person STRUCT
firstname db 100 dup(0)
lastname db 100 dup(0)
person ends

.const
ReturnNewline db 13, 10, 0

.data
p person <"thomas", "remkus">

.code
start:
invoke OutMyName, p.person.firstname

xor eax, eax
invoke ExitProcess, eax

OutMyName proc outname:ptr db
invoke StdOut, outname
invoke StdOut, addr ReturnNewline
ret
OutMyName endp

end start

sinsi

3 changes:

OutMyName proto :ptr BYTE
...
start:  invoke OutMyName, ADDR p.firstname
...
OutMyName proc outname:ptr BYTE

Light travels faster than sound, that's why some people seem bright until you hear them.