Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #866

Re: Borlands TLINK and minimizing an EXEs memory usage

From Bogus@Embarq.com (Steve)
Newsgroups comp.os.msdos.programmer
Subject Re: Borlands TLINK and minimizing an EXEs memory usage
Date 2013-04-04 12:51 +0000
Organization Aioe.org NNTP Server
Message-ID <c1.2b8.3ZhPDW$04q@NOVOSAD3.EMBARQ.COM> (permalink)
References <515c94db$0$6871$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


"R.Wieser" <address@not.available> writes:
>Hello all,
>
>I just created an EXE style executable, in which I tried to allocate 32
>KByte of memory using INT 21h, AH=48h.  To my amazement it failed, and
>reported I could just get 7 segments worth of it.  I always thought that an
>EXE style program used as much as it needed, and no more :-\
>
>Some googeling later I was reaquainted with the min- and max-allocation
>(WORDs at PSP:000Ah and PSP:000Ch), and how that last one would often be
>defaulted to 0FFFFh, meaning all memory would be assigned to the executable.

   WORDs in the header of the executable file, not the PSP.

>
>That same googeling told me that I should be able to tell my linker program
>to change that last value to something more sensible.
>
>Now the problem: I'm using Borlands TLINK v7.1 , and can't seem to find the
>switch I would need to use.  So, any of you (old hands) know ?   I would
>sure want to hear about it (it would beat both adding INT 21h, AH=4Ah code
>or editing that value in the resulting executable).

   I have some documentation for TASM/TLINK V2.0, and nothing
like that is documented.  So maybe Borland never implemented
it.  For the 16-bit Microsoft linker the switch is /CP or
/CPARMAXALLOC.  Sorry if this is unhelpful.

   Why not check the PSP and use the second word (pspNextParagraph
in MS speak) to see if enough memory was allocated and just
use it?  That seems easier than deallocaing memory just to
reallocate it.

Regards,

Steve N.

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-03 22:46 +0200
  Re: Borlands TLINK and minimizing an EXEs memory usage Bogus@Embarq.com (Steve) - 2013-04-04 12:51 +0000
    Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-04 17:51 +0200
      Re: Borlands TLINK and minimizing an EXEs memory usage Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-04-04 16:40 -0400
        Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-05 00:43 +0200
          Re: Borlands TLINK and minimizing an EXEs memory usage Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-04-04 19:51 -0400
            Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-05 11:50 +0200
              Re: Borlands TLINK and minimizing an EXEs memory usage Bogus@Embarq.com (Steve) - 2013-04-05 12:21 +0000
                Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-05 16:02 +0200
              Re: Borlands TLINK and minimizing an EXEs memory usage Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-04-05 20:56 -0400
                Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-06 12:37 +0200
                Re: Borlands TLINK and minimizing an EXEs memory usage JJ <jaejunks@nah.meh> - 2013-04-06 21:10 +0700
                Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-06 19:38 +0200
                Re: Borlands TLINK and minimizing an EXEs memory usage Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-04-07 02:34 -0400
                Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-07 19:55 +0200
                Re: Borlands TLINK and minimizing an EXEs memory usage Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-04-07 16:07 -0400
                Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-08 00:32 +0200
                Re: Borlands TLINK and minimizing an EXEs memory usage Bogus@Embarq.com (Steve) - 2013-04-08 12:52 +0000
                Re: Borlands TLINK and minimizing an EXEs memory usage rugxulo@gmail.com - 2013-04-08 14:15 -0700
  Re: Borlands TLINK and minimizing an EXEs memory usage "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-04-07 20:20 -0400
    Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-08 12:48 +0200
      Re: Borlands TLINK and minimizing an EXEs memory usage JJ <jaejunks@nah.meh> - 2013-04-09 09:12 +0700
        Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-09 12:47 +0200
    Re: Borlands TLINK and minimizing an EXEs memory usage Ross Ridge <rridge@csclub.uwaterloo.ca> - 2013-04-08 20:17 -0400
      Re: Borlands TLINK and minimizing an EXEs memory usage "R.Wieser" <address@not.available> - 2013-04-09 12:28 +0200

csiph-web