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
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
> .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....
The numbers should be hex numbers, add an h to the end of all your numbers.
Paul Bosselaers
> .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
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.
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
>
>
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
[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
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
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
.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")?