Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A very stupid question...

111 views
Skip to first unread message

Bram den Boer

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to
I'm a beginner and I just started to explore the assembly language.
But I have a 'little' problem with linking COM files using TLINK.EXE.
I get the following error message: 'invalid initial entry point address'.
In the source code I did use the 'ORG 100' command, but I still get the
error.

This is causing the error (can't make it more simple ;-)):

.model tiny
.code

org 100
mov ah,4c
int 21

end


What am I doing wrong?

Bram


Kevin G. Rhoads

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to
Well, if it were MASM you would need to tell
that the start address/entry point was at 100h:

org 100h
entry_here label far
<stuff>
end entry_here

But I don't know if that is necessary with TASM or NASM
or whatever.

The entry_here after the end tells MASM to note to
the linker that the entry point is "entry_here".
--
Kevin G. Rhoads, Ph.D. (Yes there is life after CIH)
T_Rhoads@NO_SPAM.MSN.com
krhoads@NO_SPAM.cmpnetmail.com

Randy Foiles

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to
>I get the following error message: 'invalid initial entry point address'.

> .model tiny


> .code
>
> org 100
> mov ah,4c
> int 21
>
> end

>What am I doing wrong?
>
>Bram
>

You still need to have a PROC FAR in it and a **** endp ... the PROC FAR
directive is the marker for an Entry point......
Example

.model tiny
.code
org 100H
begin: jmp main ; <===This seems to be wanted as well ;)
;=================
main proc far ; <=== Entry point (main function)

mov ax,4c00H
int 21H

main endp ;<=== End function
end begin ;<=== End program

then tasm example
then tlink /t example
there! an eight byte com program....


Paul J. Bosselaers

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to
In article <01be05af$3560bae0$8e2aeed4@default>, "Bram den Boer" <br...@bdenboer.demon.nl> wrote:
>I'm a beginner and I just started to explore the assembly language.
>But I have a 'little' problem with linking COM files using TLINK.EXE.
>I get the following error message: 'invalid initial entry point address'.
>In the source code I did use the 'ORG 100' command, but I still get the
>error.
>
>This is causing the error (can't make it more simple ;-)):
>
> .model tiny
> .code
>
> org 100
> mov ah,4c
> int 21
>
> end
>
>
>What am I doing wrong?
>
>Bram
>

The numbers should be hex numbers, add an h to the end of all your numbers.

Paul Bosselaers

Ray M. Ransom

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to
Bram den Boer wrote in message <01be05af$3560bae0$8e2aeed4@default>...

> .model tiny
> .code
>
> org 100
> mov ah,4c
> int 21
>
> end

Don't listen to those c programmers. All you have to do is add a label to
the first line of code and put the same label after the "end"

.MODEL TINY
.CODE
ORG 100H

LABEL: MOV AH,4CH
INT 21H
END LABEL


Randy Foiles

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to

Ray M. Ransom <*micosyen*@bigbear.net> wrote in message
<71i65f$i16$1...@supernews.com>...

Very Good!
I thought it needed the PROC as well guess that is just for .EXE files. I
have not messed with the .COM too much.

Jim Morrison

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to
You need a label to define the start of the program and then refer to it in
the END statement. e.g.

org 100h
begin: jmp start
(data area)
.
.
start: (code here)
.
.
end begin

James E. Morrison
astr...@i84.net
astrolabe web pages at: http://myhouse.com/mc/planet/astrodir/astrolab.htm

Bram den Boer wrote in message <01be05af$3560bae0$8e2aeed4@default>...

>I'm a beginner and I just started to explore the assembly language.
>But I have a 'little' problem with linking COM files using TLINK.EXE.
>I get the following error message: 'invalid initial entry point address'.
>In the source code I did use the 'ORG 100' command, but I still get the
>error.
>
>This is causing the error (can't make it more simple ;-)):
>

> .model tiny
> .code
>
> org 100
> mov ah,4c
> int 21
>
> end
>
>

Bas Nedermeijer

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to

Bram den Boer wrote in message <01be05af$3560bae0$8e2aeed4@default>...
>I'm a beginner and I just started to explore the assembly language.
>But I have a 'little' problem with linking COM files using TLINK.EXE.
>I get the following error message: 'invalid initial entry point address'.
>In the source code I did use the 'ORG 100' command, but I still get the
>error.
>
>This is causing the error (can't make it more simple ;-)):
>
> .model tiny
> .code
>
> org 100


You did forget to add the 'h' so it becomes 100h instead of 100


> mov ah,4c
> int 21
>
> end
>
>
>What am I doing wrong?
>
>Bram

>


Greetz Bas


Ray Moon

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to Randy Foiles
Randy Foiles wrote:

[some deleted]



> You still need to have a PROC FAR in it and a **** endp ... the PROC FAR
> directive is the marker for an Entry point......
> Example
>
> .model tiny
> .code
> org 100H
> begin: jmp main ; <===This seems to be wanted as well ;)
> ;=================
> main proc far ; <=== Entry point (main function)
>
> mov ax,4c00H
> int 21H
>
> main endp ;<=== End function
> end begin ;<=== End program

Randy,

Two points.

First, you do not need a procedure. A label will work just as well.
Personally, I use the PROC statement because I believe that it makes my
code more readable and maintainable.

Second, the jump at the start is not needed. This jump originated from
the earliest DOS days when programmers placed all code and data in one
segment for .com files. Data was placed between the jump and the start
of the code. I can not find my MASM V1.0 documentation, so I can not
confirm this, but MASM never required this construction, but I may be
wrong on this. Anyway, now MASM and TASM, at least, do not need this.
You can use the simplified directives to define data in the data
segments vice in the beginning of the code segment.

Ray

Randy Foiles

unread,
Nov 1, 1998, 3:00:00 AM11/1/98
to

>Randy,
>
>Two points.
>
>First, you do not need a procedure. A label will work just as well.
>Personally, I use the PROC statement because I believe that it makes my
>code more readable and maintainable.
>
>Second, the jump at the start is not needed. This jump originated from
>the earliest DOS days when programmers placed all code and data in one
>segment for .com files. Data was placed between the jump and the start
>of the code. I can not find my MASM V1.0 documentation, so I can not
>confirm this, but MASM never required this construction, but I may be
>wrong on this. Anyway, now MASM and TASM, at least, do not need this.
>You can use the simplified directives to define data in the data
>segments vice in the beginning of the code segment.
>
>Ray

Thanks, I am still new to assembly and I was feeling kinda happy that I
could actualy answer someones question :( ....From a later answer I saw that
the label was all that was needed. Thank you for your help and I take all
tips! :)
Randy

Dan

unread,
Nov 3, 1998, 3:00:00 AM11/3/98
to
Try 'org 100h' instead of 'org 100'....

Can't see anything else wrong.

Dan
(to reply by mail, remove the 'removeme.' from my address)

Bram den Boer wrote:
>
> I'm a beginner and I just started to explore the assembly language.
> But I have a 'little' problem with linking COM files using TLINK.EXE.
> I get the following error message: 'invalid initial entry point address'.
> In the source code I did use the 'ORG 100' command, but I still get the
> error.
>
> This is causing the error (can't make it more simple ;-)):
>
> .model tiny
> .code
>
> org 100

east...@geocities.com

unread,
Nov 5, 1998, 3:00:00 AM11/5/98
to
Try this:

.model tiny
.code

org 100h

mov ah, 4ch
int 21h

end

You forget those 'h' letters after 100h, 4ch, and int 21h.

Jerzy Tarasiuk

unread,
Nov 6, 1998, 3:00:00 AM11/6/98
to
>>>>> eastbone <east...@geocities.com> writes:
> Try this:
> .model tiny
> .code
> org 100h
> mov ah, 4ch
> int 21h
> end
> You forget those 'h' letters after 100h, 4ch, and int 21h.

What's about starting address (after "end")?

0 new messages