News:

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

hoo! It is not working!!!

Started by joseph_1978, March 21, 2006, 12:01:02 PM

Previous topic - Next topic

joseph_1978

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
      .model tiny      ; 16 bit memory model
      option casemap :none ;case sensitive
.code
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.STARTUP
   
    call main
main proc
    mov ah,02h
    mov dl,'A'
    int 21h
    ret
main endp
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end

while I tried to link the above file with ML.exe it threw the error message
--------------------------------------------------------------------------------------------------------------------------------------
test2.obj : warning LNK4078: multiple ".data" sections found with different attributes (C0220040)
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
test2.exe : fatal error LNK1120: 1 unresolved externals
_
Link error
Press any key to continue . . .
---------------------------------------------------------------------------------------------------------------------------------------
pls correct the error and give me the right prog.

Shantanu Gadgil

Seriously dude!!! You need to read the homework rule.  :tdown

You have been warned before by hutch:
http://www.masmforum.com/simple/index.php?topic=4232.msg31729#msg31729

Regarding this:
Quotepls correct the error and give me the right prog.
I know that you are new to the forum and all, but you need to correct the tone of the language.  :naughty: :tdown

The statement you have written sound more of an order than a request! Things could easily get misunderstood especially because you can't actually see the person. Also avoid the chat jargon like "pls", this is _NOT_ chat!!!

An to answer your question....again seriously...you need to hunt some more. Problems similar to this have been answered before!
This is not a clue or anything, just simple advice, hope you take this constructively! :)
To ret is human, to jmp divine!

hutch--

shantanu is right here, no-one will correct your program and give you the right prog but if you make some effort to do your own schoolwork, you may get some help there.

1. You are trying to use the MASM32 project to build 16 it code which it will not do.

2. You need to get the 16 bit linker from the forum web site.

3. You then need to learn the OMF linker syntax so you can build a 16 bit app.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Rockphorr

call main

main proc
    mov ah,02h
    mov dl,'A'
    int 21h
    ret
main endp

Your call "main" 2 times (1- by call 2- after ret)
Your code is equal

call main
main:
    mov ah,02h
    mov dl,'A'
    int 21h
    ret
ASM is NOT PASCAL
You must add Jmp instruction like this:

call main
jmp exit
main proc
    mov ah,02h
    mov dl,'A'
    int 21h
    ret
main endp
exit:
   mov AH,4Ch
   int  21h
Strike while the iron is hot - Бей утюгом, пока он горячий