delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/25/14:21:39

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9709251813.AA15469@clio.rice.edu>
Subject: Re: hello.s, anyone?
To: grbhat AT unigoa DOT ernet DOT in (Gurunandan R. Bhat)
Date: Thu, 25 Sep 1997 13:13:36 -0600 (CDT)
Cc: djgpp AT delorie DOT com
In-Reply-To: <Pine.LNX.3.91.970925095607.2058A-100000@aditya.unigoa.ernet.in> from "Gurunandan R. Bhat" at Sep 25, 97 10:11:14 am

> This is a program that needs no sbrk or any other 
> crt0 service to allocate space for variables because
> the assembler reserves space for L1. Right?

Correct.  It's stack usage is so small that the 
stack is still pointed to the transfer buffer also.

> Who (What) sets the segment registers, stub.asm?
> It doesn't need a main because it is crt0.o that 
> calls main. Right? And is it stub.asm that calls 
> "start"? Amazing! 

stub.asm loads the COFF image into DPMI memory, sets
the values for the segment registers, then 
transfers control to the executable code in DPMI memory.
ld defines that the entry point to the COFF image is "start".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019