Sep 25th, 2000, 09:06 PM
Ok, im trying to get this example to work. Im using TASM 5.0. Here are the files...
tut_01.asm
.386
locals
jumps
.model flat, STDCALL
extrn GetModuleHandleA:Proc
extrn MessageBoxA:Proc
extrn ExitProcess:Proc
.data
AppHWnd dd 0
MsgBoxCaption db "Lesson 1", 0
MsgBoxContent db "Just saying hello.", 13, 10
db "And goodbye.", 0
.code
Start:
push 0h
call GetModuleHandleA
mov [AppHWnd], eax
push 20h
push offset MsgBoxCaption
push offset MsgBoxContent
push [AppHWnd]
call MessageBoxA
push 0h
call ExitProcess
End Start
tut_01.def
NAME TUT_01
DESCRIPTION 'ASM Program'
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE
DATA PRELOAD MOVEABLE MULTIPLE
makefile
# make -B Will build .EXE
# make -B -DDEBUG Will build the debug version.
NAME = TUT_01
OBJS = $(NAME).obj
DEF = $(NAME).def
!if $d(DEBUG)
TASMDEBUG=/zi
LINKDEBUG=/v
!else
TASMDEBUG=
LINKDEBUG=
!endif
!if $d(MAKEDIR)
IMPORT=$(MAKEDIR)\..\lib\import32
!else
IMPORT=import32
!endif
$(NAME).EXE: $(OBJS) $(DEF)
tlink32 /Tpe /aa /c $(LINKDEBUG) $(OBJS), $(NAME),, $(IMPORT), $(DEF)
.asm.obj:
tasm32 $(TASMDEBUG) /m1 /m2 $&.asm
When i run the "makefile" i get these errors...
Error: Unresolved external 'GETMODULEHANDLEA' referenced from module TUT_01.asm
Error: Unresolved external 'MESSAGEBOXA' referenced from module TUT_01.asm
Error: Unresolved external 'EXITPROCESS' referenced from module TUT_01.asm
Any ideas?
tut_01.asm
.386
locals
jumps
.model flat, STDCALL
extrn GetModuleHandleA:Proc
extrn MessageBoxA:Proc
extrn ExitProcess:Proc
.data
AppHWnd dd 0
MsgBoxCaption db "Lesson 1", 0
MsgBoxContent db "Just saying hello.", 13, 10
db "And goodbye.", 0
.code
Start:
push 0h
call GetModuleHandleA
mov [AppHWnd], eax
push 20h
push offset MsgBoxCaption
push offset MsgBoxContent
push [AppHWnd]
call MessageBoxA
push 0h
call ExitProcess
End Start
tut_01.def
NAME TUT_01
DESCRIPTION 'ASM Program'
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE
DATA PRELOAD MOVEABLE MULTIPLE
makefile
# make -B Will build .EXE
# make -B -DDEBUG Will build the debug version.
NAME = TUT_01
OBJS = $(NAME).obj
DEF = $(NAME).def
!if $d(DEBUG)
TASMDEBUG=/zi
LINKDEBUG=/v
!else
TASMDEBUG=
LINKDEBUG=
!endif
!if $d(MAKEDIR)
IMPORT=$(MAKEDIR)\..\lib\import32
!else
IMPORT=import32
!endif
$(NAME).EXE: $(OBJS) $(DEF)
tlink32 /Tpe /aa /c $(LINKDEBUG) $(OBJS), $(NAME),, $(IMPORT), $(DEF)
.asm.obj:
tasm32 $(TASMDEBUG) /m1 /m2 $&.asm
When i run the "makefile" i get these errors...
Error: Unresolved external 'GETMODULEHANDLEA' referenced from module TUT_01.asm
Error: Unresolved external 'MESSAGEBOXA' referenced from module TUT_01.asm
Error: Unresolved external 'EXITPROCESS' referenced from module TUT_01.asm
Any ideas?