-
I am using Masm32 and am pretty new to Assembly, but I am having trouble trying to assemble and link this code:
Code:
;Io1.asm: Displays character that is entered on the keyboard
.model small
.stack 100h
.code
start:
mov ah,1h ;character input sub-program
int 21h ;call ms-dos to read character
;al now contains character from keyboard
mov dl,al ;read character from register al
mov ah,2h ;character output sub-program
int 21h ;call ms-dos to display character
mov ax,4c00h ;return to ms-dos
int 21h
end start
I keep getting an error message that says "LINK : error lnk2001: unresolved external symbol _start"
Please help...this is driving me crazy!!!!
-
-
When is masm made? 92?
Use Pass32 instead you don't have to link and compile all
U have to do is to run the asm file with pass and u get a
Exe (or what ever u want) + Win32 exe and Win32 Dll. It's simple and good.
Microsoft never wanted anybody to know their Windows in assembler, that's why they stopped making MASM.
And give out VB and C++ instead. So that they can keep their
Deepest Windows Secrets.
Pass32 http://www.geocities.com/SiliconValley/Bay/3437/ Get the pdf Manual at the same site
-
Actually, MS still distribute MASM as part of the Windows DDK (Driver Development Kit).
-
For a start, rename labels "_start" and "end _start"
After that (in my version anyway) you get more problems since you can't use interrupts in win32 programs. Try using a 16 bit assembler, or type it straight into DOS's debug program.
Here is a good site for win32 assembly: http://freeshell.org/~michael/