HDTenEightyP/NetNews huggingface dataset:
From: bt00@ns1.cc.lehigh.edu (Binod Taterway)
Newsgroups: comp.os.msdos.programmer
Subject: Changing text color and detecting screen size ...
Date: 28 Aug 92 21:11:44 GMT
Organization: Lehigh University

I have asked this question before but I did not get satisfactory replies.
Here goes again.

I have written a C program that uses curses. Without using video libraries
and other complicated procedure, I would want to change text colors:
foreground and background. I will be perfectly happy with 7 colors. I looked
in the MSDOS Encyclopedia, and found Int 10H for video functions. I am not
clear whether or not this is the interrupt routine I should use. Any
suggestions to this effect will be appreciated.

Along the same lines, how do I detect number of lines and columns of a
screen. Note I am not doing any video programming. I have seen programs that
convert your screen to 80x28. My program uses only 25 lines instead of 28.
Where do I look for the number of lines/columns? Is it somewhere stored in the
BIOS area? Thanks a bunch.
-- 

-Binod
------------------------
Binod Taterway
Sr. User Consultant, LUCC
bt00@Lehigh.EDU
From: aki@cruzio.santa-cruz.ca.us
Newsgroups: comp.os.msdos.programmer
Subject: Stange things with V20 and a 8250 COM-port
Keywords: 8250 NEC V20
Date: Sat, 22 Aug 92 18:50:57 PDT
Reply-To: aki@cruzio.santa-cruz.ca.us


The problem that I reported earlier with a PC/XT's serial port
screwing up memory and freezing my program;  is now solved.

All I had to throw out was a little error that did not surface
anywhere else: a write to the Modem Status Register (value 0).

Has anyone else experienced something similar,  where an innocent
OUT to a well known "safe" address corrupts the PC?

Aki.
-- 
/  Phone: 408-662 9664   Fax: 662 9676  |  "Aki" pronounced: Ah-Key. I know  \ 
\  125 Searidge Ct #D, Aptos, CA 95003  |  what I'm doing most of the time.  /
Organization: Penn State University
Date: Wed, 2 Sep 1992 14:22:30 EDT
From: Kevin <F13@psuvm.psu.edu>
Newsgroups: comp.os.msdos.programmer
Subject: Re: Another MsDos batch programming challenge
 <1992Aug29.152816.14977@cs.ubc.ca> <qzhn!6f.resnicks@netcom.com>

In article <qzhn!6f.resnicks@netcom.com>, resnicks@netcom.com (Steve Resnick)
says:
>In article <1992Aug29.152816.14977@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil)      :
>writes
>>ts@uwasa.fi (Timo Salmi) writes:
>>
>>Following my tradition of suggesting dirty tricks here is my 3
>>lines version:
>>
>>cd >> %0
>>echo echo %%set%% >> %0
>>set set=^Z
>>
>This is the output, when I run FOO.BAT:
>        cd >> foo.bat
>        echo echo %set% >> foo.bat
>        set set=
>Cheers!
>Steve

   Hello all !  I won't pretend to be a master of batch files (I have almost
no idea what the above two examples are doing) but I do know there is an
undocumented DOS command TRUENAME that returns the name of the current
directory.  Is there a way to set an environment variable to what this
returns ?  (TRUENAME is suppossed to be given a file name as an argument,
and it returns the full name of the file, by the way).

Kevin Furrow (f13@psuvm.psu.edu)
From: elliot@Wellspring.COM (Elliot H. Mednick)
Newsgroups: comp.os.msdos.programmer
Subject: Keyboard input processing -- rolling one's own?
Distribution: world
Date: Fri, 28 Aug 92 19:12:34 GMT
Organization: Wellspring Solutions, Sutton, MA.
Reply-To: elliot@Wellspring.COM

An application that I am developing requires a more sophisticated keyboard
input processing than getc() can provide.  getc (stdin) returns only
when a crlf is detected.

I need (to write) a routine that returns either at the end of a line
or if the _first_ character typed is a specified "hot key" (e.g. a
function key).  As a side-effect, I need each key pressed to echo to
stdout and also to tee into a file (for a keystroke saver).

I would like this routine to handle file streams, as well (without the
"hot key" detection).

In Borland C++ (3.0) and MSC, there is a routine called getch which
gets a character directly from the console.  I can use this and
isatty() to write my own getc that does what I want.  The problem is,
I would like to attempt to make this routine portable to other
compilers and to UN*X; i.e. using ANSIC or C++ constructs only.
getch() is _not_ ANSI.

Is this possible?

Thanks in advance.
-Elliot
From: elliot@Wellspring.COM (Elliot H. Mednick)
Newsgroups: comp.os.msdos.programmer
Subject: Keyboard input processing -- rolling one's own?
Distribution: world
Date: Mon, 31 Aug 92 17:09:01 GMT
Organization: Wellspring Solutions, Sutton, MA.
Reply-To: elliot@Wellspring.COM

In article <BttsIw.4z1@NCoast.ORG> brown@NCoast.ORG writes:
 > In article <715029154snx@Wellspring.COM> elliot@Wellspring.COM writes:
 > >
 > > [...]
 > >
 > >Is this possible?
 > 
 > No, it is not possible.  The keyboard is unknown to ANSI C.  (Don't post
 > disagreements until you've read the standard, please.)  So there is in
 > principle no ANSI-standard way to do anything that requires the presence
 > of a keyboard.
 > 
 > FWIW, Microsoft C has getch( ); I think most MS-DOS based compilers do.
 > 
 > This topic (like so many) is well covered by the FAQ list in
 > comp.lang.c.  Here's the relevant excerpt:
 > 
 > [...]

Thanks for the info.  Egg on my face for not checking the FAQ, first.
I almost _always_ check the FAQ before I post.  Almost always.  Really.

-Elliot
Newsgroups: comp.os.msdos.programmer
Subject: <None>
From: phys169@csc.canterbury.ac.nz
Date: 2 Sep 92 14:32:01 +1200
 <1992Aug19.132543.7617@swlvx2.msd.ray.com> <4082@cruzio.santa-cruz.ca.us> 
 <1992Aug22.181032.11678@ctr.columbia.edu> <1992Aug31.144211.574@csc.canterbury.ac.nz>
Organization: University of Canterbury, Christchurch, New Zealand

I wrote...
> .....  One affects the way you can check for a directory existing
> by testing if the file dirname\.. exists, 
                         ^^^^^^^^^^
I think I made a mistake there, I think it was dirname\nul, and it was only
DRDOS 5 that differed from MSDOS, but that's from memory.

Another difference was that DRDOS 5 treated the wildcard string "*ABC.*" as an
error, but MSDOS and DRDOS 6 both treat it as "*.*" (so beware when doing
something like DEL *X.*  ... it doesn't just delete filenames ending in "X"
before the dot, but deletes all the files!).. That was a bug/limitation in
MSDOS from the beginning which some people/programs have come to expect.

I've heard that there are lots of differences (between versions of MSDOS, as
well as between DRDOS & MSDOS) in handling wildcards in the COPY command, e.g.
what do you expect the following to do??

  COPY *.BAT+*.LOG *.NEW


Another difference is that under most versions of MSDOS, the first device
driver in CONFIG.SYS can look at a register and find (and modify!) the
tokenised copy of the rest of the config.sys lines.  This is very undocumented
but used by at least two config.sys chooser programs, which won't work under
DRDOS (of course, you'd want to use DRDOS's own way of choosing options in
config.sys anyway, and it might not work with later MSDOS anyway).

Another difference is that a ";" after filenames can mean the start of a
password under DRDOS, but are often ignored by MSDOS.  Not very important,
except some network software that allows copying of files from a VAX can take
over the version numbers from VMS and they become passwords under DRDOS.

Beyond that, the differences are mainly improvements, which could possibly be
viewed as incompatibilities (e.g. if you had a program called "gosub" that was
referred to in a batch file, or any other filename that is now an internal
command, but that's at least patchable).

I'd be interested to hear of differences lists from others.

Mark Aitchison, University of Canterbury.
Newsgroups: comp.os.msdos.programmer
From: eigenstr@cs.rose-hulman.edu (Todd R. Eigenschink)
Subject: FoxPro
Organization: Rose-Hulman Institute of Technology
Distribution: comp
Date: Tue, 1 Sep 1992 22:05:37 GMT

I just got back from summer vacation, during which I got a large
development contract using FoxPro (2.0).  Does anybody who's used it
have any recommendations for books or anything "deep"?  I got a couple
issues of FoxTalk, which is an excellent resource, but my budget
doesn't allow for $120/year subscriptions.  A couple of books were
mentioned in one of the mags that I'm going to check out, but...

What I'm really looking for is not a "How To Use FoxPro" kind of
book, but tips, tricks, & neat stuff like that.  Y'know...

Thanks for any input anybody can give me.

Todd Eigenschink
D.G. Data Services Inc.
eigenstr@CS.Rose-Hulman.Edu
Newsgroups: comp.os.msdos.programmer
From: levin@world.std.com (Levin F Magruder)
Subject: BCC 2.0: What is the right way to use make & tlink?
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 4 Sep 1992 01:31:48 GMT

Yes, I have the manual and I've read the manual, but I can't
figure out:

With the make & tlink that come with BCC 2.0, how do you set
things up so that you only need to maintain a single list of
object files?

I defined a macro in make like:
OBJECTS=a.obj b.obj ....

and the line

prog.exe: $(OBJECTS)
    tlink \bc\t0s.obj $(OBJECTS), progname, , ...

worked until the command line overflowed.  So, I had to make a
response file for tlink.  And now I have to remember to update
both lists as I add modules.

There must be some feature I am missing?

If I'm *not* missing someone, someone here could probably write
a program in about 20 minutes that reads a list of file names
and spits out two files, an inclusion file for make and a response
file for tlink.  Or tell me some other intelligent way to do
this?
Newsgroups: comp.os.msdos.programmer
From: frotz@dri.com (Frotz)
Subject: Re: gem font spec?
Reply-To: frotz@novell.com
Organization: Desktop Systems Group/Novell, Monterey CA/USA
Distribution: comp
Date: Tue, 25 Aug 92 19:26:57 GMT

"gord armstrong" <gord.armstrong@canrem.com> writes:


]I'm writing a C/assembler program using bitmapped fonts for DOS and
]OS2. I would like to use GEM fonts.

]The GENUS GX TEXT manual (Appendix D) has some info on the GEM
]format but not any details. Would any one have the GEM font format
]specification or know where I can get it?

]Any help greatly appreciated.

You may have to ask BitStream for the information.  I forget at which
version we moved to BitStream Fonts, but if the fonts were created with
BitStream's Fontware, they are the source for the font files...  Sorry, 
I can't be more help, but this is pretty old stuff (at least internally).
--
John "Frotz" Fa'atuai	frotz@novell.com		(email@domain)
Desktop Systems		uunet!novell.com!frotz		(bang address)
  Group/Novell		NOVELL:FROTZ  or  FROTZ@NOVELL	(MHS address)
c/o TS Dept.		408/645-2067			(vmail)
80 Garden Court		408/649-8209			(fax)
Monterey, CA  93940
Newsgroups: comp.os.msdos.programmer
From: wright@epx.cis.umn.edu (Mark Wright)
Subject: Re: New and farcoreleft()
Organization: University of Minnesota
Date: Fri, 4 Sep 1992 05:10:57 GMT

In article <HOLLEN.92Sep3114500@peg.megatek.UUCP> hollen@megatek.UUCP (Dion Hollenbeck) writes:
>In article <1992Sep3.134102.17553@news2.cis.umn.edu>
>wright@epx.cis.umn.edu (Mark Wright) writes:
>
>Mark>      In a C++ program I've been writing, strategically placed
>Mark>   farcoreleft()'s seem to be saying that my objects are not being
>Mark>   de-allocated correctly when I 'destroy' them.  Should I worry about
>Mark>   this, or is farcoreleft() designed for use with malloc()?  If so,
>Mark>   is there a C++ function which will tell me how much mem. I have
>Mark>   left?  I'm using Borland C++ v3.1.
>
>Yes it is designed for use with malloc().  It is probably working
>correctly, you probably do not know how it is working.
[...]
>-- 
>Dion Hollenbeck       UUCP: {uunet, ucsd, sun}!megatek!hollen
>                      INTERNET:            hollen@megatek.com
>Megatek Corporation  9645 Scranton Rd.  San Diego, Ca.  92121

I don't think I stated my problem very clearly.  My concern is that allocating
space with 'new' may confuse farcoreleft().  I know that combining C style 
memory allocation routines (ie. malloc()) and C++ memory allocation routines
(ie. new) will cause problems - I guess what I want to know is 'Is 
farcorleft() C++ aware?'  Does farcoreleft() know about 'new', or is it
specifically a C function.  And if so, is there a C++ version of farcoreleft()?

Mark Wright
wright@epx.cis.umn.edu
From: Ross Ridge <ross@zooid.guild.org>
Newsgroups: comp.os.msdos.programmer
Subject: Re: Why can't I hook INT 21h???
Date: Tue, 25 Aug 1992 18:45:07 GMT
Organization: ZOOiD BBS

Ralf.Brown@B.GP.CS.CMU.EDU writes:
>The TSR I was thinking of swaps two pairs of keys on the keyboard in 53
>bytes of resident code.  You need to keep the first 64 bytes of the PSP
>(though you can clobber the first ten), so the TSR actually takes 128
>bytes when loaded low, 64 when loaded into a UMB.

If I had known that...  Hmm... why can you chuck the PSP when loaded
into a UMB but not when loaded low?

>I've also seen a *removable* TSR that takes only 64 bytes at the top of
>conventional memory.

I didn't put the functionality into tsr64.c, but it could remove the TSR
by seeing were the hooked interrupted points to, do a memcmp to check
if what's there is our ISR, unhooking it, and then freeing it's memory.

							Ross Ridge

-- 
Ross Ridge - The Great HTMU					     l/	 //
								    [OO][oo]
ross@zooid.guild.org						    /()\/()/
uunet.ca!zooid!ross						     db	 //
Newsgroups: comp.os.msdos.programmer
From: joet@dcatlas.dot.gov (Joe Trott)
Subject: Re: Help required to restore IO.SYS
Organization: U.S Dept. of Transportation
Date: Mon, 31 Aug 1992 17:05:53 GMT

Jon Freivald <jaf@jaflrn.UUCP> writes:

>ahemming@bmdhh116.bnr.ca (Andrew Hemming) writes:

>> Hi,
>>   About six months ago I upgraded to DOS 5, all worked fine until
>> a couple of months ago. There was I debugging my final year University
>> project when I started to have problems. Every now and again, when I
>> ran my program, it would crash, leaving several files open and corrupt.
>> Only being a poor student I could not afford such luxuries as Norton Utils
>> etc, so I used good old CHKDSK -f to clear up the mess. This worked fine
>> for several weeks until on day CHKDSK decided to "fix" my IO.SYS file. UGH!
>> I am now unable to boot from my hard disk. I can however still access it
>> by booting from diskette. This is not ideal!
>> 
>>   Does anyone out there know how I can restore my copy of IO.SYS other than
>> FORMAT C: /S. I have tried the obviouse.

>Eek!  Please don't -- use SYS C: instead!

And afterwards, unless you know why your system has been crashing, I'd
_strongly_ recommend that you virus-scan your disk.  Just in case...

(We get "STONED" here quite frequently)

-JTT
From: aw2t+@andrew.cmu.edu (Alex R.N. Wetmore)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Curses?
Date: 28 Aug 92 10:32:10 GMT
Article-I.D.: andrew.Iebb4eK00VohM2VXUU
Organization: Freshman, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

curses is a screen library that support a ton of terminals (anything in
/etc/termcap, which you can add more terminals too, or at least root
can).  It is mostly used on unix systems for programs like ezmail, vi,
emacs, etc.  There are also implementations for PC's, and I am sure that
there are some mac implementations also.

rtfm curses for more help.

alex
Newsgroups: comp.os.msdos.programmer
From: messina@netcom.com (Tony Porczyk)
Subject: Re: 4DOS diversion (Was Re: A batch programming contest for you)
Date: Sun, 23 Aug 92 23:45:18 GMT
Organization: Messina Software

ts@uwasa.fi (Timo Salmi) writes:
>The unfortunate side of all this are the inevitable compatibility
>problems.  Without going much into the details I just run into one
>in a TP program.  Part of the error codes are dependent (returned
>from) the command interpreter.  (The particular case was different
>IOResult values retuned when running with MsDos and with DRDOS). 

Wait.  I am not sure I follow.  Can you provide some details as to
which I/O routine in your program has return values dependent on
the command interpreter?  Something doesn't compute...

t.
From: pynq@quads.uchicago.edu (George Jetson)
Newsgroups: comp.os.msdos.programmer
Subject: Re: gcc (djgpp) default file mode (text vs binary) question?
Date: 1 Sep 92 17:51:33 GMT
Reply-To: pynq@midway.uchicago.edu
Organization: D. J. Dougherty & Associates

In article <4915@balrog.ctron.com> dj@ctron.com writes:

>At least in the latest version (1.08), you can call setmode() on a
>file.  This is required for stdin/stdout/stderr, which are already
>opened by the time you call main().  Also, it's always safe to use
>"rb" or "wb" when you can.

setmode() was conspicuously absent in 1.07 (the last version I have had
the time to play with)

It is good to hear that it is in in 1.08, since that fact clearly makes
this a non-problem.  Good job!

************************************************************************
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 -
************************************************************************
From: mlevis@ringer.cs.utsa.edu (Mike Levis)
Newsgroups: comp.os.msdos.programmer
Subject: Re: *************** HELP in DOS 5.0 ******************
Date: 30 Aug 92 03:03:08 GMT
Organization: University of Texas at San Antonio

In article <1992Aug30.013239.21315@cc.umontreal.ca> cholette@JSP.UMontreal.CA (Cholette Martin) writes:
>
>Hello, I need to concatenate to text files together in DOS 5.0 , I have looked
>in many manuals but I can't seem to find the answer. It seems straight
>forward enough yet I am unable to find the answer. I need to append to text
>files into a single text file a.txt + b.txt -> c.txt
                               ^^^^^^^^^^^^^^^^^^^^^^
You gave the partial answer in your question!
Here is how to do it.
C:> COPY a.txt+b.txt c.txt
I do not have DOS 5.0 (I have DOS 2.1, 4.0 and OS/2 1.3, 2.0) but
perhaps this append is documented under the COPY command?

>
>The equivalent of what I need in UNIX is:
>
>                        cat a.txt b.txt > c.txt
>
>Please someone help me, why can't I figure it out???
>
>Martin Cholette
>cholette@jsp.umontreal.ca


-- 
==== Mike Levis   mlevis@ringer.cs.utsa.edu ====
::   ftp ftp-os2.nmsu.edu (128.123.35.151)    ::  .--.
::   for OS/2 software & information.  Get    :: (OS/2)
:::: the OS/2 FAQL in dir /pub/os2/all/faq :::::  ~--~
From: waynet@pendragon.CNA.TEK.COM (Wayne Turner)
Newsgroups: comp.os.msdos.programmer
Subject: Overlay Linkers
Date: 2 Sep 92 19:08:08 GMT
Organization: Tektronix, Inc., Redmond, Oregon

Does anyone have experience with 3rd party DOS overlay linkers (in
particular RTLink and Blinker)?  Borland's VROOMM just doesn't offer me
the run-time efficiency and fine tuning I need for the product I'm
working on.  I'm currently trying RTLink and working with Pocket
Soft's tech support people to figure out why it won't work with my
application (bails out with internal error code).  Any comments
on good or bad experiences with these linkers would be welcome.

Wayne Turner (waynet@pendragon.cna.tek.com)
Newsgroups: comp.os.msdos.programmer
From: ts@uwasa.fi (Timo Salmi)
Subject: Another MsDos batch programming challenge
Organization: University of Vaasa, Finland
Date: Sat, 29 Aug 1992 06:35:52 GMT

I have another MsDos batch programming challenge for you (I already
have a solution).  Write a batch that returns (sets an environment
variable) to give the current directory.  Only MsDos internal and
external commands are allowed.  (The MsDos command.com command
interpreter is to be assumed.  Not 4DOS, not DRDOS.)

As you'll recall, I'll utilize these tricks in the next version
TSBAT37.ZIP batch file and tricks collection.  (Yes, Yossi, your
inventive config.sys shell nul trick has been noted, and amplified
just a bit.  Forthcoming).  The current version of TSBAT is
 88069 Aug 7 02:16 garbo.uwasa.fi:/pc/ts/tsbat36.zip. 

..................................................................
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
Xref: sparky comp.os.msdos.programmer:9062 comp.os.msdos.misc:5052
From: amichiel@rodan.acs.syr.edu (Allen J Michielsen)
Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
Subject: Re: Disk Drive Purchase?
Date: 3 Sep 92 02:06:48 GMT
Organization: Syracuse University, Syracuse, NY

In article.144538.1@ttd.teradyne.com> rice@ttd.teradyne.com writes:
>In article <@jts.com>, pat@jts.com (Patrick Perroud ) writes:
>> I will be purchasing a disk drive in the near future and was wondering if
>> anybody had any thoughts on the type, speed etc. (ESDI vs. SCSI).
>> I was looking in the 200MB range. My present system config is 386SX-16,
>> 40MB ESDI drive. 

>I'm running a pair of 200MB Seagate IDE drives (ST1239A) in my 486. They're
>fast (15ms access) reliable and I've been very happy with them. I have an 
>ST1144 (130mb IDE) in a 386 that's also been fine. ...
>My personal preference is for IDE over SCSI, only because from what I read,
>SCSI seems to be a constant battle with incompatible drivers, ...

1. I find it between difficult and impossible to believe that you have a 40Mb
  ESDI drive.  ESDI drives smaller than about 80Mb are very very rare.

2. It a recent microsoft technical seminar, we were presented with the 
  following info, fact or fiction, I don't know for sure...  The 32 bit
  disk swapping enhancement of windows 3.1, will _never_ be compatible
  with existing scsi drives or controllers.  A ESDI driver is being worked
  on, and may be available sometime.  Sometime may or may not = Never.
  ESDI drives have the advantage that as you have more money, and things
  come down in price, faster and faster controllers (cached controllers,
   etc...) can be purchased.

3. IDE drives and controllers, could already be windows 32 bit disk access
   compatible.  IDE drives and controllers are about as fast as they are
  ever going to be, or are capable of being.  However, they do have plenty
  of throughput, and i/o headroom for faster systems, today.  They will
   start showing age, as systems keep doubling in speed, and larger and
  larger software becomes available.  On the other side, the tremendous
  cost of ESDI drives and controllers will be a serious drawback to the
  wide acceptance of these systems.

al
--
Al. Michielsen, Crouse Hinds School of Management, Syracuse University
 InterNet: amichiel@mailbox.syr.edu  amichiel@sunrise.acs.syr.edu
 Bitnet: AMICHIEL@SUNRISE 
Newsgroups: comp.os.msdos.programmer
From: sap@sactoh0.sac.ca.us (Stephan A. Puga)
Subject: Environment variables when using system(...) command
Organization: Sacramento Public Access Unix
Date: Tue, 1 Sep 92 19:45:08 GMT

If an environment variable is set before a program is run and the
program makes use of the system(...) command, how can I use the
environment variable in the system command?  I am writing a program
to be used on a network and there is a variable "username" set
before the program is run (this variable by the way is very
important to how WordPerfect 5.1 runs on the network), my program
invokes WP51 and tries to pass it the username variable, but it
doesn't work!  Is there no way I can get the new "local" command
shell to use the same "old" command shell's variables?

-- 
#############################################################
# "Its been surreal!"         #     sap@sactoh0.SAC.CA.US   #  
#     -- Gogo Dodo            # UUCP=..ames!pacbell!sactoh0 #
#############################################################
Newsgroups: comp.os.msdos.programmer