Beginner having problems assembling simple program.

This is a discussion on Beginner having problems assembling simple program. within the ASM x86 ASM 370 forums in Programming Languages category; I've been reading the book: Peter Norton's Assembly Language Book For The IMB PC and am using TASM 5.0. I'm trying to assemeble the following code like it said in the book. ..model small ..code mov ah,07h mov dl,41h ;ASCII code for "A" int 21h mov ah,4Ch int 21h ; ah=4Ch exit to dos end TASM.exe creates an OBJ file without errors, but when I try to run TLINK.exe it complaines: Fatal: No program entry point I looked through the readme and help files but didn't see this error listed. I tried compiling with MASMv8.2 and it again assmembled it ...

Go Back   Application Development Forum > Programming Languages > ASM x86 ASM 370

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-04-2008, 01:07 AM
durabol
Guest
 
Default Beginner having problems assembling simple program.

I've been reading the book: Peter Norton's Assembly Language Book For
The IMB PC and am using TASM 5.0. I'm trying to assemeble the
following code like it said in the book.

..model small
..code
mov ah,07h
mov dl,41h ;ASCII code for "A"
int 21h
mov ah,4Ch
int 21h ; ah=4Ch exit to dos
end

TASM.exe creates an OBJ file without errors, but when I try to run
TLINK.exe it complaines:

Fatal: No program entry point

I looked through the readme and help files but didn't see this error
listed.

I tried compiling with MASMv8.2 and it again assmembled it okay, but
when linking it, it complained:

01.obj : warning LNK4078: multiple ".data" sections found with
different attributes (C0220040)
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
01.exe : fatal error LNK1120: 1 unresolved externals

Thanks for any help
Brock

Reply With Quote
  #2  
Old 09-04-2008, 02:06 AM
ArarghMail809NOSPAM
Guest
 
Default Re: Beginner having problems assembling simple program.

On Wed, 3 Sep 2008 22:07:53 -0700 (PDT), durabol <spamtrap@crayne.org>
wrote:

>I've been reading the book: Peter Norton's Assembly Language Book For
>The IMB PC and am using TASM 5.0. I'm trying to assemeble the
>following code like it said in the book.
>
>.model small
>.code

start:
>mov ah,07h
>mov dl,41h ;ASCII code for "A"
>int 21h
>mov ah,4Ch
>int 21h ; ah=4Ch exit to dos
>end

end start

BTW, this is a 16-bit program

>
>TASM.exe creates an OBJ file without errors, but when I try to run
>TLINK.exe it complaines:
>
>Fatal: No program entry point

see above


>I looked through the readme and help files but didn't see this error
>listed.
>
>I tried compiling with MASMv8.2 and it again assmembled it okay, but
>when linking it, it complained:

which has a 16/32 bit assembler.
>
>01.obj : warning LNK4078: multiple ".data" sections found with
>different attributes (C0220040)

It's probably complaining about mixing use16 data with use32 data

>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
>01.exe : fatal error LNK1120: 1 unresolved externals

32bit linker trying to create a windown GUI program, which isn't what
you assembled.


And you are using a 32bit only linker -- which don't work with 16bit
programs.


--
ArarghMail809 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.

Reply With Quote
  #3  
Old 09-04-2008, 03:13 PM
NathanCBaker
Guest
 
Default Re: Beginner having problems assembling simple program.

On Sep 4, 1:07*am, durabol <spamt...@crayne.org> wrote:
>
> I tried compiling with MASMv8.2 and it again assmembled it okay, but
> when linking it, it complained:
>
> 01.obj : warning LNK4078: multiple ".data" sections found with
> different attributes (C0220040)
> LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
> 01.exe : fatal error LNK1120: 1 unresolved externals
>


A 16-bit linker is available here:
http://website.masm32.com/microsft.htm

Nathan.

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 02:23 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.