Results 1 to 4 of 4

Thread: !!!!!!!!!!! PLEASE HELP !!!!!!!!!!!!!!!!! ARGH!!!!!!!!

  1. #1
    Guest

    Post

    Ok, im trying to get this example to work. Im using TASM 5.0. Here are the files...

    tut_01.asm
    Code:
    	.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
    Code:
    NAME		TUT_01
    DESCRIPTION	'ASM Program'
    EXETYPE		WINDOWS
    CODE		PRELOAD MOVEABLE
    DATA		PRELOAD MOVEABLE MULTIPLE
    makefile
    Code:
    # 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?

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Thumbs up Hhehe hey chimp

    Sorry to make you think there was a answer..but can you tell me where you got your TASM5.0? and was it free?

    Thanks man

  3. #3
    Guest
    Yes i did get it for free of some japanese site, but i dont remember the url though. If you look up "tasm downloads" on altavista, you should find something.

  4. #4
    New Member
    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    11
    I am not really familiar with Tasm.
    But I Know that if U just want to show a msgbox
    you can skip the hwnd(push 0). Here is a example 4 pass32


    .COMMENT
    ****************************************************************************
    HELLOWIN.ASM Example Win32 file
    (c) 1998,1999 by Dieter Pawelczak - Pass32 Version 3.0alpha
    ============================================================================
    ****************************************************************************


    .MODEL WIN32 ; - all you have to do ...

    .MEM 32 ; - just like in old times
    .STACK 32



    .data
    szDisplayName db 'Hello World Demo',0
    szMessage db 'Hello, World with Pass32',0
    hwin dd 0
    .code

    ; WIN 32 Prototypes :

    proc MessageBox
    .win32 'USER32.MessageBoxA'
    endp MessageBox


    Start:
    mov ecx,0
    loop:
    push ecx
    push ecx ; Style
    push OFFSET szDisplayName ; Message-Window-Title
    push OFFSET szMessage ; Message
    push 0 ; hwin
    call MessageBox ; call via Prototype
    pop ecx
    cmp eax,4 ; = REPEAT
    je short L1
    inc ecx
    L1:
    cmp ecx,5
    jb loop
    push 0
    .invoke .win32 'KERNEL32.ExitProcess' ; call direct

    end start


    end




    Assembler is more then a Language, it's a Religion

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width