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
3 changes:
OutMyName proto :ptr BYTE
...
start: invoke OutMyName, ADDR p.firstname
...
OutMyName proc outname:ptr BYTE