HDTenEightyP/NetNews huggingface dataset:
From: pshuang@zurich.ai.mit.edu (Ping Huang)
Newsgroups: comp.os.msdos.programmer
Subject: Re: .RTLink Plus Hints Needed
Date: 27 Sep 92 14:30:52 GMT
Reply-To: pshuang@athena.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: cambler@zeus.calpoly.edu's message of 27 Sep 92 08:23:17 GMT

In article <1992Sep27.082317.191310@zeus.calpoly.edu> cambler@zeus.calpoly.edu (Christopher J. Ambler, Phish) writes:

 > Specifically, hints to increase heap memory, how to virtualize large
 > data objects, and determine often swapped function calls begging to
 > be put into root are a good start... 

I tried using .RTLink on one of my projects recently. (The project
involved using Novell LWP TCP/IP libraries and Magma Systems Mewel
[substantial subset of Windows API in text mode] libraries.) I had very
good success letting .RTLink automatically decide what could be put into
Virtual Memory pages. Even without turning VML on (e.g. having it
emulate Microsoft Link as much as possible), I noticed that my
executable size went from 380Kb to about 295Kb. .RTLink reported that
executable to require 314Kb to load. I then turned on VML, using the
output of VMARFGEN to decide what could be virtualized and what could
not, made one manual change (WINALT.c in Mewel cannot be virtualized, it
does nasty interrupt handling stuff), and the new executable required
only 173Kb to load. 

The documentation that comes with .RTLink strikes me as very good and
well worthwhile reading; unlike most programming tools, there seems to
be almost an overabundance of documentation rather than too little. Be
sure to print out some of the .HLP files on disk that relate specifics
about using .RTLink with specific compilers and library packages.

I was unable to get profiling to work after playing with it for a couple
of hours. This is unfortunately, because the profiling functionality
documented in the manuals looks very powerful -- capable of providing
all the information you need about which functions should be put back
into the root image for performance reasons, not to mention localizing
where optimization would be worthwhile.

For virtualizing large data objects, I would take a look at the overlay
chapter in the manual. It clearly states that managing large data
objects by overlays is easier than in Virtual Memory pages if you want
to be able to change the data in a persistent way. If you are using
Microsoft C7, you might also want to take a look at section 4.7 of
"Programming Techniques", which talks about the new virtual memory
manager in C7 -- it looks like Microsoft has provided new run-time
library routines which have similar semantics to Windows calls to
allocate and deallocate memory for data.

--
| Ping Huang (INTERNET: pshuang@martigny.ai.mit.edu) speaking for himself.
| "One Thing to name them all, One Thing to define them,
|  One Thing to place them in environments and bind them..."

Newsgroups: comp.os.msdos.programmer,comp.lang.c,alt.msdos.programmer
From: pynq@quads.uchicago.edu (George Jetson)
Subject: Re: C Memory Debugger Libraries (info wanted)
Reply-To: pynq@midway.uchicago.edu
Organization: D. J. Dougherty & Associates
Date: Sun, 27 Sep 1992 02:13:35 GMT

In article <1992Sep26.234330.634@panix.com> bergman@panix.com (Mark Bergman) writes:

>Many people suggested the dbmalloc library recently posted to the net.
>Has anyone got this working under TurboC or DJGCC?
>

Speaking of DJGCC, I recently realized something very interesting:

	"You don't need malloc!"

All you have to do is declare a big array (make it 128 megabytes in size)
(e.g., for character strings, I just do a "char theData[128*1024*1024];")
and then let GO32 manage it for you.  You can declare as many of these
big arrays as you want, for each possible data type, and as long as the
the total amount of space that you actually use doesn't exceed 128M,
you're golden.  (Actualy, I take that back - you are limited to a gig of
static data (including bss and text) and a gig of stack, but you get the
idea...)

Basically, what you are doing is throwing the memory management task back to
the operating system, where it belongs.  IMHO, malloc() and its ilk are
all a big kludge, forcing the application to do what ought to be done by
the OS.

Of course, all of this only applies to new development and is not portable.

************************************************************************
A note to new readers:  the weasely :-) symbol is frowned upon in this
group.  Any questions, see Phil Gustafson who will gladly rearrange your
diodes for you.
			- From the AFU FAQ -

	- pynq@quads.uchicago.edu, who is still costing the net
	  hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Compressed directories
Organization: Queen's University
Date: Thu, 1 Oct 1992 12:28:25 GMT

In article <rdippold.717790642@qualcom> rdippold@qualcom.qualcomm.com (Ron Dippold) writes:
>dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
>>After reading Undocumented DOS, it seems relatively straightforward to 
>>install a TSR that looks like a network drive, but actually stores all data 
>>in a single file (perhaps a compressed archive) on the original drive.  
>
>Well, they're not free, but Stacker and Doubledisk already do this.
>For the price (about $80 US, I think), it might not be worth your time
>to do it yourself. 

A couple of people have suggested this by email. I don't know Doubledisk, 
but when I tried Stacker a couple of years ago, it didn't do what I want.  
In fact, changing my cluster size to 512 bytes gave me *more* compression 
than Stacker gives.  What I'm proposing is essentially to change my cluster 
size to 1 byte, avoiding the slack at the end of file allocations altogether.

The disadvantage, of course, is that if I ever tried writing to one of these
"disks" I could really get a mess of fragmented files; however, I'm willing 
to make the disk read-only, and have a separate utility to create it.

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: Michel_Gerber@bearsden.UUCP (Michel Gerber)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Help for Quick Basic needed
Date: 28 Sep 92 04:51:38 GMT
Organization: The Bear's Den BBS   (715) 839-7997

I'm no great expert, but QuickBASIC is my base programing language. 
However, 
I have never had a problem of making too big of a program.  Have your
friend 
try to cut back on the program if he can.  
 
1. Perhaps store data in seperate files, to be accessed when needed.
 
2. Cut the program up into 2 or more parts. You can save the need varibles
in 
a data file, then use the SHELL command to run the other half. (very slow 
though, and it need memory.)
 
3. Try a different aproach to the problem. See if you can write a smaller 
program to do the same thing.
 
Good Luck, that's about the only advice I can give you. QB 4.5 does have
it's 
imitations.  I have been trying to get it to disable Control Break for
months 
now.  Let me know how it's going, if you are more specfic I may be able to 
offer you more help. 
 
Disclaimer: M.C.O.C. Systems and myself are claiming no responsiblity for
the  
           above advice.  You may follow it at your discretion. 
 
E-Mail address: Michel_Gerber@bearsden.UUCP


-- Via DLG Pro v0.992
Newsgroups: comp.os.msdos.programmer
From: danderer@chopin.udel.edu (Dave Anderer)
Subject: VESA
Organization: University of Delaware
Date: Mon, 28 Sep 1992 19:28:35 GMT


Where can I find a copy of the VESA spec (or at least the part of it
I'll need to have my program support VESA-compliant video
adapters)?
-- 
    Dave Anderer        danderer@brahms.udel.edu       (302) 831-8805
Instructional Technology Center, University of Delaware, Newark, De.  19716
		"Sinners can repent; stupid is forever."
From: 38@unpcs1.cs.unp.ac.za (menglund)
Newsgroups: comp.os.msdos.programmer
Subject: How can I determine the clock frequency on an 80xxx machine.
Date: Wed, 30 Sep 1992 12:39:07 GMT
Organization: Dept. Computer Science, UNP
Distribution: world
NNTP-Posting-Host: pc044.cc.unp.ac.za

I am wanting to know how to determine a machines clock frequency dynamically
within a program. (eg: 8MHz, 16MHz ect).
Purpose:
        I need to know this to program the timer chip (8253) correctly on an
        Analog to Digital card. The boards Timer derives its frequency from the
        mother-boards clock. To make my program portable to different speed
        machines (80xxx architecture) I have to determine what the mother-boards
        clock frequency is!
Using:  - Dos 5.00
        - currently 80386sx
        - PC30 analog to digital card.
Any information or methods will be appreciated.
                          Many Thanks
                           Mark Englund.
                           Department of Computer Science
                           University of Natal
                           Pietermaritzburg
                           South Africa
You can email a response to me at:
menglund@unpcs1.cs.unp.ac.za
OR
englund@unpsun1.cc.unp.ac.za
From: mats.astrom@neurofys.uu.se (Mats Astrom)
Newsgroups: comp.os.msdos.programmer
Subject: DMA : number of transfer
Date: 1 Oct 1992 07:46:13 GMT
Organization: Department of Clinical Neurophysiology, University of Uppsala
NNTP-Posting-Host: mats.neurofys.uu.se

While doing DMA-transfer it's possible to read the number of transfers done
by reading a specific register of the DMA-circuit. I've manage to do so but
the result seem to be somewhat instable ! The instability is due to reads of
the register in the middle of a transfer, isn't it ????
Assuming I'm setting up everthing correctly, how do I read the number of
transferred bytes to get the correct value every time ?????
I program in TP 6.0, with the following declarations the code is:

BTW, I'm doing integer ( 2 bytes ) transfers, see odd(lobyte1) below !

   lobyte1,
   lobyte2,
   hibyte1,
   hibyte2  : byte;

   DMACountReg = $03; { byte Count, ch1 }

    version 1:
                      {--- check how far DMA has gone ---}
                      repeat
                         lobyte1 := port[DMACountReg];
                         hibyte1 := port[DMACountReg];
                         lobyte2 := port[DMACountReg];
                         hibyte2 := port[DMACountReg];
                      until odd(lobyte1) and
                            (hibyte2=hibyte1) and
                            (lobyte2=lobyte1);
    version 2:
                      {--- check how far DMA has gone ---}
                      repeat
                         lobyte1 := port[DMACountReg];
                         hibyte1 := port[DMACountReg];
                         lobyte2 := port[DMACountReg];
                         hibyte2 := port[DMACountReg];
                      until odd(lobyte1) and ( ( (hibyte2=hibyte1) and
                                                 (lobyte2<=lobyte1) ) or
                                              ( (hibyte2<hibyte1) and
                                                (lobyte2>lobyte1) ) );

The calculation of how many transfers done in both versions is:

                     nr_of_transfers := ( hibyte2 shl 8 + lobyte2 ) shr 1;

None of the above versions seem to give a stable result of the amount of
transfers done !!!
-----------------------------------------------------------------------
Mats strm             email:        mats.astrom@neurofys.uu.se
tel: +46 18 66 34 52                  Dept. of Clinical Neurophysiology
fax: +46 18 55 11 32                  University Hospital
                                      S-751 85 Uppsala
                                      Sweden
-----------------------------------------------------------------------
Newsgroups: comp.os.msdos.programmer
From: jws@iastate.edu (James William Shoemaker)
Subject: Re: Getting %1, %2, etc under Borland C
Organization: Iowa State University, Ames, IA
Date: Mon, 28 Sep 1992 18:18:46 GMT

	In MSC 6.0 + SDK I use something like

extern int	__argc; (this may be wrong it may be *__argc)
	this is the count of arguments.

extern char	**__argv[];
	a pointer to an array of pointers to the argument strings.

	There should be something similar in BC++.

				JWS
From: zaa@vax5.cit.cornell.edu
Newsgroups: comp.os.msdos.programmer
Subject: DOS extender compatibility
Date: 5 Oct 92 11:25:31 EDT
Distribution: comp
Organization: Cornell University

Dear fellow MS-DOS programmers,
     I'm about to purchase Phar Lap's DOS extender and I'm wondering if it is
compatible with Microsoft C v6.0.  If not, what sort of problems might I 
expect?  I'm doing some serious image processing and I definitely need
more than 640K at a time.  Windows is out of the question because I need 
all of my extended memory.  OS/2 is not compatible with the commercial
subroutines I'm controlling the external image storage unit with.  My only
option seems to be a DOS extender.  Is this a good idea?

Thanks for your help!

		Aaron S. Chou, c/o Ingrid Brust-Mascher
		zaa@vax5.cit.cornell.edu

     I'm about to purchase Phar Lap's DOS extender and I'm wondering if it
is compatible with Microsoft C v6.0.  If not, what sort of problems migh
Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Compressed directories
Organization: Queen's University
Date: Mon, 28 Sep 1992 12:57:31 GMT

After reading Undocumented DOS, it seems relatively straightforward to 
install a TSR that looks like a network drive, but actually stores all data 
in a single file (perhaps a compressed archive) on the original drive.  

The point would be to save space:  I've got a commercial program with 
hundreds and hundreds of tiny files; since my cluster size is 4K, 70% of the 
space these files use is wasted.  

Before I go and try this myself, does anyone know of a free version already
in existence?  I'm only going to end up saving a few megabytes, so I don't 
want to spend money on this, but it would be an interesting programming 
exercise if it hasn't already been done.


Duncan Murdoch
dmurdoch@mast.queensu.ca
From: STDN%MARIST@VM.MARIST.EDU (Dan Newcombe)
Newsgroups: comp.os.msdos.programmer
Subject: Generating 80x86 code from a compiler (NO DOS)
Date: 6 Oct 1992 12:42:49 -0500
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

What I want to do is this:
  Generate pure 80x86 code from a compiler that could be used without
DOS.  I don't want stuff like INT 21 and all of those functions.
ie. If I were to write a program that would print A, I would want
  MOV AL,4B
  MOV AH,1
  INT 10
(I may be off on the functions or something but that's okay)
 instead of
  MOV AL,4B
  MOV AH,2
  INT 21

Can this be done with any compilers out there?  Or do I need to
write my own?

  -Dan
Newsgroups: comp.os.msdos.programmer
From: adrian@csqx.cs.rhbnc.ac.uk (A Johnstone)
Subject: Re: DMA : number of transfer
Reply-To: adrian@csqx.cs.rhbnc.ac.uk (A Johnstone)
Organization: Dept of Comp Sci, Royal Holloway & Bedford New College Uni London
Date: Fri, 2 Oct 1992 13:39:09 GMT

In article <mats.astrom.24.0@neurofys.uu.se>, mats.astrom@neurofys.uu.se (Mats Astrom) writes:
|> Path: rhbnc!doc.ic.ac.uk!uknet!mcsun!sunic!corax.udac.uu.se!neurofys.uu.se!mats.astrom
|> From: mats.astrom@neurofys.uu.se (Mats Astrom)
|> Newsgroups: comp.os.msdos.programmer
|> Subject: DMA : number of transfer
|> Message-ID: <mats.astrom.24.0@neurofys.uu.se>
|> Date: Thu, 1 Oct 92 08:46:13 GMT-0:08
|> Organization: Department of Clinical Neurophysiology, University of Uppsala
|> Lines: 52
|> NNTP-Posting-Host: mats.neurofys.uu.se
|> 
|> While doing DMA-transfer it's possible to read the number of transfers done
|> by reading a specific register of the DMA-circuit. I've manage to do so but
|> the result seem to be somewhat instable ! The instability is due to reads of
|> the register in the middle of a transfer, isn't it ????
|> Assuming I'm setting up everthing correctly, how do I read the number of
|> transferred bytes to get the correct value every time ?????
 

I expect I'm just being dumb, but why would you expect the number of transfers to
be stable? The whole point of DMA is that it goes on in the background while your
program is executing, and in principle on a PC every other bus cycle can be DMA
so of course its changing. If DMA masked off then in my experience the registers
are stable, so I guess you must have a programming problem.

Incidentally, when DMA is running flat out the mainline code in general gets 
much less than 50% of the CPUtime because wait states are automatically added 
for DMA cycles making them longer than typical program access cycles.

                       Adrian
Newsgroups: comp.os.msdos.programmer
From: wright@staff.tc.umn.edu (Mark Wright)
Subject: Re: 32 bit C, again...
Organization: University of Minnesota
Date: Wed, 30 Sep 1992 23:59:50 GMT

I tried using DJGPP, but I was never able to get the debugger to work.
Was it just me, or does the debugger not show the source code as you are
debugging.  If so, then it's really not adequate for most of us, which is
too bad, because otherwise DJGPP is absolutely amazing.  But, I think a
powerful debugger is an absolute necessity for all but the most god-like
of programmers.
-- 
Mark Wright
wright@epx.cis.umn.edu
Newsgroups: comp.os.msdos.programmer
From: few@well.sf.ca.us (Frank Whaley)
Subject: Looking for LALR
Organization: WordStar International
Date: Mon, 5 Oct 1992 13:48:23 GMT

I need to maintain some code written with the LALR product (apparently from 
LALR Software).  This company and product seem to have disappeared.  Can 
anyone help me out?
-- 
Frank Whaley, Software Engineer
WordStar International
few@well.sf.ca.us | ...!apple!well!few
From: martijn@dutecaj.et.tudelft.nl (Martijn Nykerk)
Newsgroups: comp.os.msdos.programmer
Subject: device drivers
Date: 1 Oct 92 13:05:41 GMT
Organization: Delft University of Technology, Dept. of Electrical Engineering

Hello,

Could anybody help me with writting a block device driver for DOS in C?

Just some sample code with all the basics and the instructions
on how to compile it will do. I just need to know where
to put all the driver header stuff.

Mail or Post, I'll summarize if anybody is interested.

Thanks, martijn
From: tima@hls.com
Newsgroups: comp.os.msdos.programmer
Subject: A QBASIC Question
Date: 30 Sep 92 18:50:35 GMT


I've been hacking around with QBASIC recently and I've come across 
a problem that I can't figure out. When I execute the program shown below,
I get a syntax error. Any suggestions ????

  DEFINT a-z

  CONST Num = 10

  READ a          <===== error is reported at this line

  DATA Num

  END


Tim
tima@hls.com
From: exujlg@exu.ericsson.se (Jon L. Gauthier)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Fourier Transform Library for Borland C?
Date: 5 Oct 92 22:11:44 GMT
Organization: Ericsson Network Systems, Inc.
X-Disclaimer: This article was posted by a user at Ericsson in North America.
              The opinions expressed are strictly those of the user and
              not necessarily those of Ericsson.

Sent the previous port before I meant to!

I need the source code for FFT's, preferably Borland C, MS C is ok.
------------------------------------------------------------------------------
Jon L. Gauthier                                 Ericsson Network Systems, Inc
EXU/IS/TP Systems Programmer                                  P.O. Box 833875
+1 214 997-0157                                     Richardson, TX 75083-3875

Disclaimer:  "My opinions are my own - my employer would take the 5th on
             everything I say."  Surely it's been said before!...
------------------------------------------------------------------------------
Xref: sparky comp.os.msdos.programmer:9603 comp.sources.wanted:4470
From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
Subject: Re: Getting %1, %2, etc under Borland C
Organization: Texas Instruments Inc
Date: Mon, 28 Sep 1992 18:44:09 GMT

In <1992Sep28.143744.1@wombat.newcastle.edu.au> c9106225@wombat.newcastle.edu.au (Matt McLeod) writes:


>OK.  This has probably been asked zillions of times before, but I'll ask again
>anyway...

>I'm trying to get ahold of the command line parameters (that is %1, %2, etc)
>within a Borland C Windows program.  I've tried the getenv() function, but to
>no avail, and there doesn't seem to be any other function around.

>Any ideas?

Uh, my first idea is that you should pick a language besides C.
Either that, or get a book on the subject and learn the language
before trying to program in it.

Command line parameters in C programs are gotten in in two parameters
that are arguments to main().  Declare your main like this --

	int main (int argc, char *argv[])

The argc argument will be the count of command line arguments when the
program is invoked.  The argv aregument is an array of pointers to
character, where the array entries are strings containing the command
line arguments.  argv[0] contains the name of the program.  This is
standard C.

>Thanks in advance,

Any time, but I seriously suggest that you're going to need to know a
LOT more about C than you apparently do.


-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
Newsgroups: comp.os.msdos.programmer
From: neuwirth@ferranti.com (howard neuwirth-hirsch)
Subject: Re: Help for Quick Basic needed
Summary: modules
Organization: Ferranti International Controls Corporation
Date: Tue, 29 Sep 1992 22:05:56 GMT

In article <1992Sep26.093929.9982@jyu.fi>, sm@jyu.fi (Seismo Malm) writes:
> A fried of mine is using QB 4.5 to compile a largish (60 KB of source)
> programm. Now it seems that QB can handle only about 50 KB of source
> at one time, are there any possible solutions around it ?
 
Break the program into logical modules and compile them independently
using bc.  Build them into a quick library which you will use when 
you load qb.  See the manual for details.



-- 
Howard Neuwirth-Hirsch

neuwirth@ficc.ferranti.com
Newsgroups: comp.os.msdos.programmer,comp.os.ms-windows.programmer.misc
From: whedon@netcom.com (Bill Whedon)
Subject: Re: Editor to find and replace hidden chars, strip controls?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Mon, 5 Oct 1992 01:59:11 GMT

In article <92278.184011RVK@psuvm.psu.edu> <RVK@psuvm.psu.edu> writes:
>Where can I find an editor that can find and replace hidden characters,
>strip control characters and linefeeds?  Essentially, I need to strip a
>large number of linefeeds from a data acquisition file.  Thanks in advance.
>
>Atul Ramani
>PSUVM
>===========
Why bother with an editor?  Here's source for a simple filter which will take
out all CR and LF characters (0x0D and 0x0A) for you:


#include <stdio.h>

int main();
int main()
{
   int c;
   while (EOF != (c=getchar())){
     if ((0x0A == c) || (0x0D == c)){
       continue;
     } else {
       putchar(c);
     }
   }
   return(0);
}

To use it, cut it out, name it something useful like "stripper.c", then
compile and link it (any model will do).  Now, say you have one of your
data files "GOOD.DAT", which has the CR/LF in it:  Just call stripper:

   stripper <good.dat >better.dat

That runs good.dat through stripper.exe (which is really a filter), and
produces better.dat as output, sans CR/LF pairs.  If you really need to
remove only one or the other, just change the "if..." statement as needed.
Enjoy!
Bill Whedon   whedon@netcom.com

-- 
---------------------------------------------------------------------
--           the net, working,                                     --
--           sends mail afar                                       --
--           and we, in cybernetic dream                           --
--           reply                                                 --
--                                                                 --
-------Bill-Whedon------whedon@netcom.com----------------------------
Newsgroups: comp.os.msdos.programmer