HDTenEightyP/NetNews huggingface dataset:
From: pshuang@zurich.ai.mit.edu (Ping Huang)
Newsgroups: comp.os.msdos.programmer
Subject: Far heap available (Microsoft C 7.0)
Date: 14 Aug 92 21:07:15 GMT
Distribution: comp
Organization: M.I.T. Artificial Intelligence Lab.

How do you find out how much free far heap you still have available? The
only function which looks like it even comes close is _memavl(), but
that only reports on the near heap. (I'm compiling for the large memory
model and using third-party libraries, ergo mostly using far heap.) I've
checked the documentation in QH, "Managing Memory in C" in the
Programming Techniques manual, and the function reference manuals but to
no avail. The non-orthogonality bothers me (there should be a _fmemavl).

--
| 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
From: kemp@convex.com (Phil Kemp)
Subject: How to make a CD play?
Summary: looking for programming examples?
Keywords: cd-rom audio mscdex
Organization: CONVEX Computer Corporation, Richardson, Tx., USA
Date: Tue, 18 Aug 1992 17:04:22 GMT
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

How does one cause an audio cd to play in a cd-rom.
I have a couple of binaries which do this but I would like to 'design'
my own user interface.

Can this be done with interrupts, do I have to go out on the scsi bus
and give the drive commands or can the mscdex util be accessed to
perform this function. I would like to be able to choose tracks, skip
forward and back, etc...

Thanks for any help.

--
Phil Kemp, Systems Engineer         Voice:(403)-233-2815
CONVEX Computer Canada Ltd.           Fax:(403)-261-2029
Calgary, Alta.                  Internet:kemp@convex.com
From: venaas@siri.unit.no (Stig Venaas)
Newsgroups: comp.os.msdos.programmer
Subject: Re: A batch programming contest for you
Date: 19 Aug 92 07:47:33 GMT
Organization: University of Trondheim

In article <1992Aug19.045036.5132@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes:
>In article <1992Aug18.233207.1159@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
>>I am away from my DOS machine now, but I think that the above ideas
>>will work after some polishing. 
>>
>>	erase echo.*
>>	copy %1 echo.*
>>	for %%f in (echo.*) do %%f > ext 
>>
>>The extension of %1 should be in the file ext now.
>>
>>Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
>
>@echo off
>rem That's a very inventive trick, Yossi.  I expanded a bit. The snag is
>rem the the file must exist in order to get the extension. Another
>rem question is how do you get the extension name into an environment
>rem variable so that we can utilize it.
>
>if not exist %1 goto _out
>if exist echo.* erase echo.*
>copy %1 echo.* > nul
>for %%f in (echo.*) do %%f > ext
>type ext
>if exist ext erase ext
>:_out
>
>..................................................................
>Prof. Timo Salmi
>Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
>Faculty of Accounting & Industrial Management; University of Vaasa
>Internet: ts@uwasa.fi Bitnet: salmi@finfun   ; SF-65101, Finland

I've solved it, but it's not an elegant solution. I've maybe
cheated a little bit too. I've used some of Yossi's ideas above.

To make it work, you will first have to create a file containing
set %1=
with no LF or CR. To do it, write "copy con bat" then type
"set %1=" and press F6.

ok, then over to the batch file I've made.

md ext.$$$
copy %2 ext.$$$\echo.*
cd ext.$$$
for %%a in (echo.*) do %a>ch
copy ..\bat+ch batch.bat
call batch %1
del echo.*
del ch
del batch.bat
cd ..
rd ext.$$$

This should work I think. If you want this batch file and
the special file to be in a special directory, just
modify the copy ..\bat....... line.

I really hope someone has got a better solution, but this works.
The big problem is that dos always insist on adding cr.

Stig
-- 
Stig (venaas@siri.unit.no)
Newsgroups: comp.os.msdos.programmer
From: hanso@research.ptt.nl (Otten H.A.H.)
Subject: How can I get more info on LALR ?
Keywords: LALR
Organization: PTT Research
Date: Wed, 19 Aug 1992 14:15:06 GMT

Can anybody out there tell me more about a program called LALR by LALR
Research? It was suggested to me as an alternative to YACC/LEX. All I know is
that it runs in an MsDos environment (and I'm working in a Unix environment
with input files of 1 Mbyte on average (don't you just hate those
program-generated sources?)).

The project I'm working on involves a translator from one high-level language
to another. However, conflicts in one domain (the action part) have to be
resolved in another (the type-declaration part), and I'm not sure if LALR can
cope.

Thanks,
  Hans.

E-mail : H.A.H.Otten@research.ptt.nl (Hans Otten)
-- 
Groetjes van hans...
Newsgroups: comp.os.msdos.programmer
From: yogi@cs.ubc.ca (Yossi Gil)
Subject: Re: Parallel port I/O (mostly O : -)
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Wed, 19 Aug 92 15:25:09 GMT

n.margetic@ucl.ac.uk (Nino Margetic) writes:

>Hi,

>I am trying to write a driver for a device which accepts commands thru
>the parallel port. I have used INT17 for that, and the thing works.
>The way I've done it is simple - I am checking bit 7 after getting a
>status info of the LPT port via INT17. When bit 7 is NOT_BUSY I send a
>new character down the line.

>I know that there is also a way to access the LPT port directly thru the
>in/out commands and its 3 I/O registers. Are there any advantages (in
>terms of speed) in using interrupt driven parralel I/O, as compared to
>INT17 BIOS service as I have used it - if there is, how much, and is
>it doable in C?? I can just about read assembler, but that's about it.

>The speed of the application is crucial - I need to send as many bytes
>thru the LPT port as possible (order of 1e6). N.B. does anyone know the
>approximate number of bytes per second that can be sent thru the LPT port
>via INT17 and/or interrupt driven parallel I/O??

>Any suggestions, pointers, code snippets, anything, will be of immense value.
>Thanx in advance.

>--Nino

>--
>Janet: n.margetic@uk.ac.ucl                \     Nino Margetic         
>Earn/Bitnet/Internet: n.margetic@ucl.ac.uk  \    University College London, UK
>Bang: ...!mcvax!uknet!ucl!n.margetic         \   +44 71 387 9300 /x 53 13

I recall a byte article on this exact topic few years back. I think it
was about 5 or so. I also recal that the max baud rate you can get
is 4500. That is 4.5 KB/sec. 
--
Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
From: caross@acsu.buffalo.edu (Christian Ross)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Help : SVGA Drivers and alot more.
Date: 21 Aug 92 03:14:35 GMT
Organization: UB

I'd love to help, but I'm still looking for the answers to some of the 
questions you posted (For encryption, check DDJ, May 92 and other recent
issues for references).

BUT REALLY. THREE COPIES AND ADDITIONAL CROSS POSTS IS A BIT EXCESSIVE.

-- 
Christian A. Ross                |               Student (Physics/Mathematics)
caross@acsu.buffalo.edu          |     State University of New York at Buffalo
-- 
 "A witty saying proves nothing." - Voltaire
Newsgroups: comp.os.msdos.programmer
From: yogi@cs.ubc.ca (Yossi Gil)
Subject: Re: A batch programming contest for you
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Wed, 19 Aug 92 16:47:10 GMT

mlevis@ringer.cs.utsa.edu (Mike Levis) writes:

>In article <1992Aug19.045036.5132@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes:
>>In article <1992Aug18.233207.1159@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
>>
>>if not exist %1 goto _out
>>if exist echo.* erase echo.*
>>copy %1 echo.* > nul
>>for %%f in (echo.*) do %%f > ext
>>type ext
>>if exist ext erase ext
>>:_out

>I modified this.  The following batch file will work somewhat.
>It is not efficient (it copies the file that you want
>to find the extension of), and it does not do much
>error checking (it fails if the filename has no extension),
>but it works if the filename either has an extension or
>the filename is not given.

>It creates a variable xyz to have the filename extension.
>It creates (and later deletes) a temporary batch file
>called tmp.bat .  Essentially, tmp.bat is a clone of the
>original batch file below, but it also has the filename
>extension as part as the batch file code.

>@echo off
>set xyz=
>if %1.==. goto end_batch
>del echo.*
>copy %1 echo.* > nul
>for %%f in (echo.*) do %%f > tmp.dat
>if exist %0 copy %0+tmp.dat tmp.bat > nul
>if not exist %0 copy %0.bat+tmp.dat tmp.bat > nul
>call tmp.bat
>del tmp.bat
>:end_batch
>if %xyz%.==. set xyz=^Z

>Important!!!  The ^Z means Control-Z (End of file).  It
>must be on the same line as the last command, not on the
>line following it.  Since ^Z is on the same line as the
>last command, we can append the filename extension to
>a copy of the batch file and run the copy to set the
>variable.

>Even though this code works somewhat, I'm sure there is a
>much better way of doing it.

Perhaps a more elegant variation to the above is (I didn't bother
with all the chekcs)

copy %1 echo.*
for %f in (echo.*) do %%f >> %0
set ext=^Z

This batch file will auto destruct but it is not too difficult to
remedy this: copy %0 to some tmp and rexecute it. The trick in the
above is that DOS rereads the batch file after each command.  If you
don't believe it, try the following automodifying batch file:

	echo echo >> %0.bat






>>..................................................................
>>Prof. Timo Salmi
>>Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
>>Faculty of Accounting & Industrial Management; University of Vaasa
>>Internet: ts@uwasa.fi Bitnet: salmi@finfun   ; SF-65101, Finland


>-- 
>==== Mike Levis   mlevis@ringer.cs.utsa.edu ====
>::   ftp ftp.cs.widener.edu (147.31.254.132)  ::  .--.
>::   for ``The Simpsons'' information.  Get   :: (OS/2)
>:::: ``Simpsons'' FAQL in dir /pub/simpsons ::::  ~--~
--
Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
From: tyrant@Aardvark.Rain.COM (Rex Goode)
Newsgroups: comp.os.msdos.programmer
Subject: Re: BIOS/DOS interrupt list
Date: 19 Aug 92 15:06:42 GMT
Organization: Steve's UNIX System, Portland, Oregon

ISSLKA@BYUVM.BITNET writes:

>Can somebody please let me know where I can find a good list of DOS and BIOS
>interrupts, with descriptions and necassary parameter values?  I'm a student
>programmer and would like to be able to do some of the stuff that the big
>boys do.

Is this an illegal plug?

I rely on "The Peter Norton Programmer's Guide To the IBM PC". I have an
old version, pre-386. I'll bet there's something newer along the same line.
-- 
----------------------------------------------------------------------------
Stephen Rex Goode        | But common men must have their cheap marvels    |
tyrant@aardvark.rain.com | and wonders. - H.G. Wells                       |
----------------------------------------------------------------------------
Newsgroups: comp.os.msdos.programmer
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: Summary: P.D. MAKE for msdos
Date: Thu, 13 Aug 1992 05:29:30 GMT
Organization: D'Arcy Cain Consulting

glauber@vpnet.chi.il.us (Glauber Ribeiro) writes:
> [Re: Gnuish Make]
>     Second catch is, there is an irritating inconsistency in 
>dealing with the backslash. You normally have to use 2 backslashes 
>instead of 1 (e.g,: c:\\dos\\edit instead of c:\dos\edit). UNLESS 
>the backslash appears on a line that is an internal messydos 
>command (e.g.: "dir c:\dos\*.*" is correct). Moreover, it doesn't 

Have you tried using the forward slash?

>recognize "cls" as a valid msdos command (use "command /c cls", 
>instead). If you can live with these booboos, you will love this 
>program.

Why not create a "clear.bat" and use clear instead of cls?  simpler
and also compatible with the Unix command.

-- 
D'Arcy J.M. Cain (darcy@druid.com)  |
D'Arcy Cain Consulting              |   There's no government
Toronto, Ontario, Canada            |   like no government!
+1 416 424 2871          DoD#0082   |
Newsgroups: comp.os.msdos.programmer
From: gmribeir@david.wheaton.edu (Glauber)
Subject: Re: Summary: P.D. MAKE for msdos
Organization: (n.) Body of persons united for a specific purpose.
Date: Mon, 17 Aug 1992 15:03:03 GMT

In article <PETRI.VIRKKULA.92Aug15082227@vipunen.hut.fi> Petri.Virkkula@hut.fi (Petri Virkkula) writes:
>On Tue, 11 Aug 1992 06:02:05 GMT, glauber@vpnet.chi.il.us (Glauber Ribeiro) said:
>
>Glauber> (1) My personal choice: GNUISH MAKE
>
>Glauber>      This is a port done by the legendary Thorsten Ohl, of GNU 
>Glauber> make 3.58 (beta version). It is public domain, fully unix- 
>
>
>Petri>	Once again, allthough GNUISH make is free it isn't PD.
>Petri>	It is distributed under GNU General Public License.
>

You are right. I was using PD loosely, as "something you aren't
expected to pay for." In the case of make, it doesn't "make" a
lot of difference, unless you are going to incorporate part of
the source code in your application or modify and redistribute
it. In these cases, your products would have to conform to the
GNU "copyleft". If you use GNU make as part of your development
environment, and are not using GNU source code in your programs,
your programs won't be bound by the copyleft. This is the reason
i didn't mention it in my original post, and also because i
thought it was already too long as it was.
							Glauber

P.S.: If anyone has modified the current version of GNUISH make
for ms-dog in order to fix bugs or improve performance, i'd like
to hear from you.


-- 
Glauber Ribeiro - Wheaton College, IL  (USA)
                  glauber@david.wheaton.edu 
                  glauber@vpnet.chi.il.us
Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer,comp.windows.ms.programmr
From: fox@rei.com (Fuzzy Fox)
Subject: Re: How do virtual 386 DOS windows work?
Date: Fri, 14 Aug 1992 18:15:14 GMT
Organization: Recognition Equipment, Inc.

kr@jet.uk (Kenneth Reed) writes:

>For example, take 2 processes writing to a file "simultaneously". They
>both come along and find out what blocks are free and let's assume
>that the information stays withing the DOS buffers so they don't need
>to go back to disk again. What stops both processes trying to use the
>same "free" blocks?

Think about this:  Suppose you open two files in a standard DOS program,
how does does "know" not to write the two files on top of each other?
Answer:  Because it's DOS and it manages the disk access.

I think what you're missing is that there are not multiple versions of
DOS running in virtual machines.  OS/2 does that.  Windows actually
shares the memory image that exists in the machine at the point where
you typed 'WIN', so all TSR's, including DOS, are shared by all DOS
boxes that you open in Windows.  It's the same DOS running in each box.
So when you run muliple DOS boxes, DOS just thinks you are running a
program called Windows which has a helluva lotta files open.

-- 
#ifdef TRUE         | Fuzzy Fox                  fuzzy@netcom.com
#define  TRUE   0   | a.k.a. David DeSimone      an207@cleveland.freenet.edu
#define  FALSE  1   |
#endif              |         How's my posting?  Call 1-800-ALT-FLAME
From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Summary: P.D. MAKE for msdos
Date: Sat, 15 Aug 92 18:46:56 CDT
Organization: Villa CyberSpace, Minneapolis, MN

exuhag@exu.ericsson.se (James Hague) writes:

> The downside to Borland MAKE, as has already been mentioned, is
> that the documentation really stinks.

Now that you mention it.....

I've got a library in progress, and I'm adding modules occasionally.
Since each module has to be tested before addition, the .obj is
natuarally not out of date against its .c file.

So... how do I write rules that specify the .lib depend on the component
.obj's and force the recompilation of said .c files and their
addition/update into the lib?  (they need to be recompiled to remove the
main() that lies inside an #ifdef TEST)  The Borland MAKE documentation
says nothing helpful.  In fact, I can't seem to find anything at all
that would help here.  Default rules fail, because the name of the .c
file differs from the name of the .lib.  I don't particulary want to
have to write a unique rule for each and every module.
--
Due to failure of my mail connection, please use the following emergency
                          addresses to reply:
roy%cybrspc@tfsquad.mn.org   cybrspc!roy@tfsquad.mn.org   roy@tfsquad.mn.org
Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Table lookup ...
Organization: Queen's University
Distribution: comp.os.msdos.programmer
Date: Thu, 20 Aug 1992 15:16:31 GMT

In article <LUBKT.92Aug20094704@synergy.CC.Lehigh.EDU> lubkt@synergy.CC.Lehigh.EDU (Binod Taterway) writes:
>
>struct p_table {
>	char	*parameter_name;/* name of the parameter */
>	bool	specified; 	/* whether or not it is user-specified */
>	short	type; 		/* Integer, string, long, etc. */
>	char	*default_value; /* Default value */
>	char	*value; 	/* User-specified value */
>} P_TABLE;
>
>P_TABLE p_table[] = {
>	{"xyz_directory", TRUE, TYPE_STRING, "c:\xyz_orig", "c:\xyz"},
..
>}
>
>Though not implemented yet, I am not convinced if this the best
>approach. If you know of any other approaches to reading a
>configuration file, please throw in your two cents. Thanks.

I haven't done this for configuration files, but a very nice way to 
implement command line parameters that are of lots of different types and 
effects is to use a message-passing strategy.  In your case, this would mean 
something like this:

1.  Create a collection of objects or whatever that need to know about the
parameters.  I don't know how you'd implement this in C, but an array of 
structures like you had is probably as good a way as any.  In an OOP 
language, a polymorphic collection is ideal.  Give each of them some default 
behaviour, in case the parameter is never specified.

2.  Do minimal parsing of the config file line, probably just breaking it up 
into parameter name and parameter value (as a string).

3.  Pass a message containing each parsed line to every object in the 
collection.  If they care about that particular parameter, they'll act on 
the value; if they don't, they'll just ignore it.

The advantage of this approach is that you can have quite sophisticated 
parsing for particular parameters localized in the code that deals with 
those parameters, but you don't need to write one monster parser that 
handles every possible case when it reads the config file.

In case you're interested, the application where I did use this approach was 
the not-yet-released-but-maybe-sometime update of my disassembler DUMPPROG.
You can specify a range of addresses to disassemble in a quite general 
format, because the various kinds of objects it knows about can each 
recognize references to themselves.  The delays on release don't come from 
using this approach :-), but rather from indecision on how much to put in 
the update.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.os.msdos.programmer
From: adrian@csqx.cs.rhbnc.ac.uk (A Johnstone)
Subject: Virtual to physical address mapping
Reply-To: adrian@csqx.cs.rhbnc.ac.uk (A Johnstone)
Organization: Dept of Comp Sci, Royal Holloway & Bedford New College Uni London
Date: Mon, 17 Aug 1992 10:00:34 GMT

I'm a hardware engineer with plenty of Unix and VMS systems programming experience
but rather ignorant about MS-DOS internals, so please pardon my naivity.

I have a homebrew SCSI card that is meant to perform DMA. It works fine on an
XT but not on an AT. On an XT, buffers live at the same physical addresses as
the compiler and linker specify, so it is easy to figure out what to put in the
DMA controller registers. On a 386 under MS-DOS 5 this is no longer true. I have
no way of figuring out what the true physical address of a particlular virtual 
address is, and since I don't know where in the hardware address space my buffer
is living, I can't tell my SCSI chip where to DMA to. I must stress that even under
the simplest MS-DOS setup, with no high drivers or other cleverness, program 
addresses no longer equal hardware addresses. I assume that under Windows or when 
using memory extenders the situation becomes even murkier.

Any advice, hints or pointers to the literature on the subject of memory allocation
in an extended memory environment would be welcome. What I'm really hoping is
that one of you will be able to tell me about an MS-DOS interrupt that takes a
segment:offset pair and returns a 24-bit number containg the equivalent physical
main-memory address. However I've got this hunch that things in MS-DOS land are not
so simple...

                                   Adrian
From: phil@cs.utexas.edu (Philip Smolen)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Detecting a disk in floppy drive
Date: 13 Aug 1992 03:26:47 -0500
Organization: U Texas Dept of Computer Sciences, Austin TX
NNTP-Posting-Host: muleshoe.cs.utexas.edu

In article <4672@blue.cis.pitt.edu.UUCP> demented+@pitt.edu (Scott E Berry) writes:
>
>How can I detect if a drive contains a disk without getting the 
>Abort, Retry, Ignore message.  I work in a computer lab at Pitt

Use int 13h to "verify" the first sector on the disk.  For example:

a_drive	equ	0
b_drive	equ	1
tries	equ	3

	mov	si,tries
verify:	mov	ax,0401h	; verify 1 sector
	mov	cx,1		; sector == 1; cylinder== 0
	mov	dx,a_drive	; head == 0; drive == a:
	int	13h
	jnc	disk_is_in_drive
	dec	si
	jnz	verify
no_disk_in_drive:
From: billp@jupiter.cse.utoledo.edu (Bill Parquet)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Anyone have a suggestion for a good 286 DOS Extender?
Date: 20 Aug 92 23:27:58 GMT

gchunt@rio.dixie.edu (Galen C. Hunt) writes:
: The software project that I'm currently working on needs to run on 286 machines,
: but I would like to use a DOS extender because my program is extremely cramped
: in 640K.  I would appreciate any helpful hints, suggestions or opinions from
: anyone using a 286 DOS extender.  Important questions I have are the following:
: 	1) How much does it cost?
: 	2) Is there are runtime royalty?
: 	3) Will it work with Microsoft C (either 6.0 or 7.0)?
: 	4) Will it work with CodeView?
: 	5) Does it support automatic paging or swapping to disk?
: Thanks for you time!

I got a free copy of pharlap 286 lite with I upgraded to borland c++ 3.1.
I'm not sure how much it costs if it was bought separately (or even if they
do [it may be just something they threw together to get people to buy
the big $500 full SDK])  It does work with bcpp 3.1 and turbo debugger.

I'm not sure if there are any 286 extenders out there that support paging
on the 286.  Although the hardware supports it, its pretty hairy (it has
to take place using variable sized segments instead of fixed size pages
on the 386)