-
Assembly- 1st code
Sorry, if this is not the right board.
.MODEL SMALL
.STACK
.CODE
mov ah, 1h
mov cx, 07h
int 10h
mov ah, 4ch
int 21h
END
I assembled above assembly code(copied it from a tutorial) on my windows xp, intel computer, and got an .obj file.
Then tried to link it but got the following warning and error messages on masm32:
first.obj : warning LNK4078: multiple ".data" sections found with different attributes (C0220040)
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
first.exe : fatal error LNK1120: 1 unresolved externals
Why is this please?
Thanks.
-
In your case the problem is that the linker you are using is too new. You are following a tutorial which is probably pretty old, it teaches how to write DOS applications (there is a difference between a pure DOS application and a console application). You can download an old version of link.exe here
You also have to change your program a little bit:
Code:
.MODEL SMALL
.STACK
.CODE
Start:
mov ah, 1h
mov cx, 07h
int 10h
mov ah, 4ch
int 21h
END Start
Compile with:
Code:
ml /c yourfile.asm
link yourfile.obj
Some useful links:
http://www.movsd.com - The masm32 package
http://radasm.visualassembler.com - A great IDE
http://home.t-online.de/home/Ollydbg/ - A debugger
http://board.win32asmcommunity.net - THE assembly board
http://win32asm.cjb.net - Some new tutorials
-
Understood.
Thank you for the links.
-
There is an active ASM board over at www.flashdaddee.com/forums
-