HDTenEightyP/NetNews huggingface dataset:
From: gould@pilot.njin.net (Brian Jay Gould)
Newsgroups: comp.os.msdos.programmer
Subject: How to set env var within a win prog?
Keywords: windows environment variable
Date: 17 Nov 92 03:05:16 GMT
Organization: Rutgers Univ., New Brunswick, N.J.

I'm hoping someone could help me figure this out...

I need to set an environment variable from within a windows
program so that the new value replaces the original value
set before windows was started.  Once the new value is 
placed, it has to remain in effect even after the setting
program terminates.

I know this must be possible.  Novell has a Windows version
of Logon and "logon" has to read the logon script "set"
commands.  How is this done?

Even if there are dos xx version specific structures, thats 
fine with me.  Please respond via e-mail.

Thanks.
-- 
--
Any disclaimers made for me, by me, or about me - may or may not accurately
reflect my failure to be reflecting the opinions of myself or anyone else.
********************************************
*  Brian Jay Gould - gould@pilot.njin.net  *
*                    609-799-2706          *
********************************************
Newsgroups: comp.os.msdos.programmer
From: mazzucch@ghost.dsi.unimi.it (massimo mazzucchi)
Subject: dtp programs
Organization: Computer Science Dep. - Milan University
Date: Wed, 18 Nov 1992 13:27:59 GMT


HI 

i am Max from Milan Italy

i will know if exist a PD program (not windows) or commercial

like publisher/page maker that:

- there aren't the difficultes to use it

- max 1 Mb di program

- and it can write A4 (21x29) ruotate (29x21) in which way 

 i can write on 2 page (15x21) but that left page must be

 an object and right page another object.

 ---------
 |        |                    ____________________
 |        |                    |        |         |
 |        |                    |        |         |
 |        |    --->            |        |         |
 |        |                    |        |         |
 |        |                    --------------------
 ----------
 Thanks for your help

 Bye


--------------------------------------------------------------------------------
!  Massimo Mazzucchi                         address    e-mail                !
!  University of State                       mazzucch@ghost.dsi.unimi.it      !
!  Departement of Computer Science            149.132.2.1                     ! 
!  Via Comelico, 41 -  20133 MILAN ITALY                                      !
 -------------------------------------------------------------------------------
Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer
From: amichiel@rodan.acs.syr.edu (Allen J Michielsen)
Subject: Re: Number of subdirectories limited ?
Organization: Syracuse University, Syracuse, NY
Date: Wed, 18 Nov 92 19:43:42 EST

In article > mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
>In > jav2d@faraday.clas.Virginia.EDU (Jason Adams Vanvalkenburgh) writes:
>>ernst@opal.cs.tu-berlin.de  writes:
>>> I know there is a limitation on the number of subdirectories in the
>>> root directory, but is there any limitation in directories other
>>> than "\" ?
>>> Ernst Kloecker phone: ++49-30-6181635      e-mail: ernst@cs.tu-berlin.de

>>The FAT system only allows a maximum number of file entries.  I'm not
>>sure about numbers, but I remember reading that a 360K floppy couldn`t
>>have any more than 112 file entries.  Therefore 112 0-byte files would
>>actually fill up the disk, because the FAT tables were full.  Larger
>>capacity disks have proportionally more space allocated for the FAT
>>tables, etc.  I had never heard of limitations for the root directory,
>>though.

>Just backwards.  The root directory is the ONLY one with a limit. ..
>...Once you are off the root directory, the 'directory listing'
>is just another file, and it can be however large a file is allowed...

One more piece of this, is that 360K system disks have a limit of 112 files,
114 for non-system disks.  However, in eithercase...   The root FAT can also
run out of room.  This occurs when you have lots and lots of little files and
the disk is heavily fragmented.  This (probably) is impossible for a 360K
floppy but not for other disks.  But, again, subdir's help to eliminate this.

al
Newsgroups: comp.os.msdos.programmer
From: holbrook@apollo.HP.COM (Alan R. Holbrook)
Subject: 'All Possible Combinations' Algorithm
Date: Fri, 20 Nov 1992 17:51:17 GMT
Organization: Hewlett-Packard Company, Chelmsford, MA
Keywords: combinations

Can someone provide me with an algorithm suitable for writing a program
to dump all possible combinations of 'n' elements taken 'm' at a time?
That is, given the string 'abcdefghijklmnop', I'd like to be able to produce
all possible combinations of, say, 'abcde', then of 'abcdf', or of 'cfilnop'
then 'aceghilmp', etc.  I think you get the idea.

I'm sure anyone who has taken any statistics knows the formula for doing
this, but I never took any statistics.

I know, by the way, that I'm talking ._!LOTS!_. of combinations.  I don't
really need to be able to print or file all of them, I just need to know
how to.

Oh, yeah, in case anyone is tempted to wonder, this isn't for a class or any
other kind of assignment.  Actually, I need to be able to demonstrate a point
to my wife...

Thanks,
Alan Holbrook
holbrook@apollo.hp.com
No .sig, I just post on impulse.



Newsgroups: comp.os.msdos.programmer
From: mjr@ursa.calvin.edu (Matt Ranney)
Subject: BC++ & Serial IO - is there an easy way?
Organization: Calvin College
Date: Sat, 21 Nov 1992 22:04:27 GMT

I'm using BC++ 3.1, and I'm trying to write a program that does some
simple serial IO at 9600 baud on COM1.  I typed in the bioscom example
from the book, but that doesn't work.  Every time it goes to send a
character, the machine hangs for like 2 seconds, and it never thinks
there is any data waiting to be read.  It does this on every machine
I've tried it on, although they are all the same kind of machine:
386sx's.  Has anybody else had this problem?

Also, is this the only way to talk to the serial port?  It seems
rather foolish that C++ with its derived iostream classes would still
require you to use these BIOS calls.
--
Matt Ranney -  mjr@calvin.edu
  "You know, I don't think theres a man, woman, or child alive today
   who doesn't enjoy a lovely beverage."  -DL
Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: DLL format description needed
Keywords: DLL format
Organization: Queen's University
Date: Tue, 17 Nov 1992 03:14:47 GMT

In article <AEnNr1hav2@isi.itfs.nsk.su> hady@isi.itfs.nsk.su (Hapugin Andrey) writes:
>Can anybody help me to find description of .DLL
>files format for MS/DOS,OS/2 & Windows? I need
>it to implement dynamic loader/linker for DLLs and
>unfortunately I can't find its description here.
>Any help well be greatly appreciated.

The DLLs used by Windows, OS/2 1.x and the DOS extender in Borland Pascal 
are just the same format as the segmented .EXE files used by all of those.  
(OS/2 is according to the Borland Pascal manual; I haven't tried it.  I 
assume from the fact that it says 1.x that 2.0 has a new format.)

There's a sketch of this format in Ralf Brown's interrupt list; I think it 
shows up near the EXEC call.  

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: egg@dstos3.dsto.gov.au
Newsgroups: comp.os.msdos.programmer
Subject: How is fread/fwrite implemented ?
Date: 16 Nov 92 14:05:38 CST
Organization: Defence Science and Technology Organisation

Does anyone know how the fread/fwrite functions in Borland C are implemented.
I would like to write a small model function to read/write to far data.

Thanks
Themie
Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Borland C++ 4.0 - Who knows What? (actually TP 7)
Organization: Queen's University
Date: Fri, 20 Nov 1992 18:55:23 GMT

In article <1992Nov19.215351.3077@kronos.arc.nasa.gov> raymond@kronos.arc.nasa.gov (Eric A. Raymond) writes:
>>From what I can spot on a quick read through the BP 7 manual, there's no 
>>special support for interrupts.  That is, you'll have to use the DPMI 
>>services directly.
>
>What sorts of services does DPMI provide?

You'd be better off looking at a long writeup on it (e.g. the book 
Extending DOS), but in summary it provides an interface between 
a protected mode program and real mode DOS.  (I think) you can set up 
interrupts to be serviced in either real mode or protected mode, but I've 
never done it.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.os.msdos.programmer
From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
Subject: Re: Fast Square Root (All integer?)
Organization: University of Illinois at Urbana
Date: Wed, 18 Nov 1992 03:21:55 GMT

wagner@main.mndly.umn.edu (Rick Wagner) writes:

>Does anyone have any ideas (or code) on how to implement a FAST square root 
>algorythm in C that only uses integers?  Obviously this only needs to be 
>an approximation of the square root, the key factor here is speed.

>Any Ideas?

   Well, from a Numerical Computing class, we have this algorithm:

   procedure square root of c with error <= E
       x := 1;  y := x;
       while abs(x-y) > 2*E do
	   x:=(x+y)/2; y:= c/x
       end while
       return (x+y)/2

   I wrote it in Microsoft inline assembly for int's, with an error
   of 1.  Enjoy.


int isqrt( int c )
{
	_asm {
	mov     cx, 1
	mov     bx, c
	jmp     skip_iterate

iterate:
	mov     ax, cx
	sub     ax, bx   ; AX = x - y
	cwd
	xor     ax, dx
	sub     ax, dx  ; AX = abs( AX )
	cmp     ax, 2   ; 2 is the allowed error * 2, so we're getting within 1.
	jl      done    ; if abs(x-y) > 2 then goto done
skip_iterate:
	mov     ax, cx
	add     ax, bx
	shr     ax, 1
	mov     cx, ax   ; x = (x+y)/2
	cwd
	mov     ax, c
	idiv    cx
	mov     bx, ax   ; y = c / x
	jmp     iterate

done:
	mov     ax, cx
	add     ax, bx
	shr     ax, 1
	mov     c, ax
	}
	return c;
}

-- 
-----------------------------------------------------------------------------
 John A. Slagel              "My old man used to tell me, before he left this
 j-slagel1@uiuc.edu           shitty world, never chase buses or women- you
 (217) 337-7930               always get left behind." -The Marlboro Man
Newsgroups: comp.os.msdos.programmer
From: s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth)
Subject: Re: BC++ & Serial IO - is there an easy way?
Organization: Monash University, Melb., Australia.
Date: Sun, 22 Nov 1992 00:46:08 GMT

mjr@ursa.calvin.edu (Matt Ranney) writes:

>I'm using BC++ 3.1, and I'm trying to write a program that does some
>simple serial IO at 9600 baud on COM1.  I typed in the bioscom example
>from the book, but that doesn't work.  Every time it goes to send a
>character, the machine hangs for like 2 seconds, and it never thinks
>there is any data waiting to be read.  It does this on every machine
>I've tried it on, although they are all the same kind of machine:
>386sx's.  Has anybody else had this problem?

I do not use BC++, however the source of your problem may be the fact
that you are trying to use 9600 baud, for polled serial communications.

Using this method the data speed should be limited to 1200 bps.  For
speed greater than this you need to install an interrupt handler to
handle interrupts generated by your serial port.

>Also, is this the only way to talk to the serial port?

No.

Lee Hollingworth
s1110238@giaeb.cc.monash.edu.au
Newsgroups: comp.os.msdos.programmer
From: gt8741b@prism.gatech.edu (Chris Adams)
Subject: Programming the speaker
Organization: Georgia Institute of Technology
Date: Wed, 18 Nov 92 04:25:32 GMT

How do I play digitized sounds through the PC speaker?  I know how to drive
a square wave frequency through it, but I want to play digitized sounds in my
program.  I have a program called REMAC that plays Mac format sounds at sample
rates up to 22000, and at 22000, it sounds great.  How is this done?
--
Chris Adams                       | "If tin whistles are made of tin,
Georgia Tech                      |  what do they make foghorns from?"
Internet: gt8741b@prism.gatech.edu|       --  Lonnie Donegan
----------------------------------+ 
Xref: sparky comp.os.msdos.programmer:10703 alt.msdos.programmer:2757
From: pshuang@zurich.ai.mit.edu (Ping Huang)
Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer
Subject: Re: Number of subdirectories limited ?
Date: 17 Nov 92 13:40:10
Organization: M.I.T. Artificial Intelligence Lab.
NNTP-Posting-Host: rolex.ai.mit.edu
In-reply-to: ernst@opal.cs.tu-berlin.de's message of Tue, 17 Nov 1992 11:11:30 GMT

In article <1992Nov17.111130.17833@cs.tu-berlin.de> ernst@opal.cs.tu-berlin.de (Ernst Kloecker) writes:

 > I know there is a limitation on the number of subdirectories in the
 > root directory, but is there any limitation in directories other
 > than "\" ?

Why, sure. Each subdirectory you create takes up its own cluster plus 32
bytes in the parent directory's "file", so the amount of free disk space
becomes the limiting factor, probably, unless the DOS code for handling
directory "files" breaks if it becomes larger than 64Kb, which I don't
think it does, because I think I've had directories with over 2,048
entries in it. But if you need to ask this question, you are probably
trying to solve a problem the wrong way. :) Why do you ask about this
possible limit? Performance-wise, DOS badly loses on big directories.

--
| 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: raymond@kronos.arc.nasa.gov (Eric A. Raymond)
Subject: Re: Borland C++ 4.0 - Who knows What? (actually TP 7)
Organization: NASA/ARC Information Sciences Division
Date: Wed, 18 Nov 1992 22:29:36 GMT

What sort of support does it have for interrupts?

That is, if you do a setvect does does the handler perform in real or
protected mode?  Is there any control over doing this (i.e., a real
mode handler)?
Newsgroups: comp.os.msdos.programmer,comp.os.os2.programmer
From: mark@snark.itc.gu.edu.au (Mark Hessling)
Subject: Release of PDCurses 2.0; curses library for DOS and OS/2
Keywords: curses
Organization: ITC, Griffith University, Brisbane, Australia
Date: 19 Nov 92 21:14:34 GMT


Announcing the release of PDCurses 2.0; a public domain curses screen
handler for DOS and OS/2.

PDCurses v2.0 is an almost total rewrite of PCCurses 1.4 done by John
'Frotz' Fa'atuai, the previous maintainer. PDcurses 2.0 has been written
to be compatible with System V 3.2 curses and includes support for pads
and colour.

This version has been tested with Microsoft C v6.0, QuickC v2.0 and
Borland C++ 2.0 under DOS and Microsoft C v6.0 and TopSpeed c v3.02
under OS/2 2.0. Also the library has been compiled successfully with
emx 0.8e, C Set/2 and Watcom 9.
Most testing was done with the large memory model where applicable.
The large memory model is probably the best model to use.

The amount of testing has not been as extensive as I would have
liked, but demands on releasing a product have outweighed the
product's quality. Nothing new with that !!
Hopefully with wider circulation, more bugs will be fixed more quickly.

I have included just 1 makefile which is suitable for dmake 3.8 for
both DOS and OS/2. The makefile does not rely on customisation of the
dmake.ini file.

If you discover bugs, and especially if you have fixes, please let me
know ASAP.

The source to the library is available from SIMTEL-20 in pd1:<msdos.screen>
directory and in the equivalent SIMTEL-20 mirror sites. The source has been
packaged with Info-Zip's Zip 1.9. You will need Info-ZIP unzip 5.0 to unzip.
The source should also be appearing in comp.sources.misc shortly.

Follow the directions in the readme file to compile the library.

Currently there is an e-mail user's list that informs the PDCurses users
regarding the latest news about this software.
Contact Robert Wolf at rwolf@dciem.dnd.ca to join the e-mail list.

Cheers, Mark
------------------------------------------------------------------------
Mark Hessling                         Email: M.Hessling@gu.edu.au
DBA,ITS                               Phone: +617 875 7691
Griffith University                   Fax:   +617 875 7877
Nathan, Brisbane QLD 4111 Australia   *** PDCurses Maintainer ***
------------------------------------------------------------------------
From: 00clcoffing@leo.bsuvc.bsu.edu
Newsgroups: comp.os.msdos.programmer
Subject: Re: ***4DOS vs DRDOS 6.0***
Date: 22 Nov 92 19:05:08 GMT
Organization: Ball State University, Muncie, In - Univ. Computing Svc's

I figure I should put on my $.02 about DRDOS 6.0....
     I was drawn to DRDOS 6.0 because of the compress program, Super Stor.
I have heard before that DRDOS is not totally compatible, now I believe it.
While compressing my hard drive, DRDOS locked up tight.  In the end I had
to reset my computer, no other way out.  My data was the electronic equiv-
alent of scrambled eggs.  Let my make a point that my system is a completely
compatible 386, AMI BIOS, and DRDOS still locked up.
     My friend down the hall also used (note past tense) DRDOS and SSTOR.
Somehow part of SSTOR's data file became corrupt.  When SSTOR loaded, it
displayed a message to the effect of "...file corrupt, mounting device as
read only."  The DRDOS manual advised us to run CHKDSK to correct the problem
then reboot.  How is it possible to correct the problem when SSTOR has the
drive write protected?  We backed up all data which wasn't corrupted, and
removed DRDOS for good!
     DRDOS may have its good points, but I data integrity and compatibility
problems outweigh the good in my opinion.
     AN ALTERNATIVE-- I would suggest using 4DOS instead of DRDOS.  4DOS adds
new commands, enhances the rest, allows the user to define/redefine commands,
adds pop up help, and more.  --And I have not had a single compatibility
problem with it.
---
charles
Newsgroups: comp.os.msdos.programmer
From: wstef@hubcap.clemson.edu (W. Gregg Stefancik)
Subject: BC++ 3.1 Symbol Bug?
Organization: Clemson University
Date: Tue, 17 Nov 1992 14:15:46 GMT

After talking with Borland Tech Support for over an hour (+ 1/2 hour on
hold) yesterday trying all the basic tech support things, I think I have
uncovered a BC++ 3.1 debugger bug.

Both the IDE and TD are displaying the wrong symbol names for procedures in
both the CPU window, Stack window, and other places.  However the source
code displayed is proper and when asked to Goto a particular symbol it
goes to the right place but still shows the wrong label if in CPU
window.  The source window is affected by this all.  The symbol names
displayed are always for the procedure previous to the one desired.

Has anyone else seen this bug?  If there is some work around I would
love to know what it is.  While this bug is not crippling it is very
annoying.

Gregg
-- 
W. Gregg Stefancik
wstef@hubcap.clemson.edu
Newsgroups: comp.os.msdos.programmer,news.answers
From: smhkotmans@mswe.dnet.ms.philips.nl
Newsgroups: comp.os.msdos.programmer
Subject: Help: Programming a SVGA card in 800x600 mode
Date: 20 Nov 92 11:49:00 +0100
Organization: Philips Medical Systems Nederland

Hallo netters,

I have three questions regarding programming my video card:

1)  Is there a standard way to detect if the graphics card used in a system
    can work in SVGA mode?
2)  For my application, i need the 800x600x256 SVGA mode. 
    Switching to SVGA mode 800x600x256, is this the same for all video cards 
    (Trident, Tseng, ATi) or do i need special code for each of them? If there
    is a difference, please give me information on how to set this mode.
    (I have an ATi-Wonder XL card my self)
3)  I know that a have to use bank switching to fill the video memory.
    What register addresses are used for this on an ATi-Wonder card?


Thanks in advance,
Henk Kotmans
From: nyeda@cnsvax.uwec.edu (David Nye)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Help with TSR's
Date: 21 Nov 92 16:08:11 -0600
Organization: University of Wisconsin Eau Claire

In article <id#@byu.edu>, curtisn@SAS (Curtis Nelson) writes:

> What is the best way to unload a TSR from memory (ie: kill the TSR and free 
> up it's memory )?

If you are asking how to remove a TSR that wasn't written with a self-unloading
option, use the PCMag utilities INSTALL and REMOVE or equivalent.  The first
is run before the TSR(s) are installed, the second removes all TSRs installed
since INSTALL.  If you need to know how to write the part of the code for a
TSR that allows it to remove itself when you ask it to, read the chapter on
TSRs in Undocumented DOS.

David Nye
nyeda@cnsvax.uwec.edu
Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer
From: jinli@gpu.utcs.utoronto.ca (Jin Tonic Li)
Subject: redir LPTx to separate files on disk
Organization: University of Toronto Computing Services
Distribution: na
Date: Tue, 17 Nov 1992 02:16:56 GMT


I am thinking about writing a TSR program to redirect output from LPTx
to disk and store them into *separate* files, instead of appending them
into one big file.

I have a good idea on how to use int28 to do background work and int17 to
capture LPTx.  However, I don't know how to detect the start and end of
a printed document when there are multiple ones being sent to LPTx and
possibly being sent from different programs.

For example, if a user prints Doc1 to LPT1 from WordPerfect and then prints
Doc2 to LPT1 from MS Word, when I capture LPT1, how do I know if Doc1 is
being printed(so that I can redirect it to a file called temp1 on disk)
and if Doc2 is being printed(then I can call it temp2)???  

Is this possible? or am I forced to write some kind of a device driver to
capture the output?

Thanks in advance,

-- 
  		    Jin Li		      >>    Gin & Tonic mix well
   University of Toronto Computing Services  <<
jinli@gpu.utcs.utoronto.ca   uunet!utgpu!jinli>>      No bugs, no bucks
Newsgroups: comp.os.msdos.programmer
From: macg9505@uxa.cso.uiuc.edu (Michael Alan Corn)
Subject: BC++ time related Global Variables - need Help
Organization: University of Illinois at Urbana
Date: Mon, 16 Nov 1992 00:53:15 GMT


      
      This is probably too simply for you C/C++ gurus out there, but how does
one set the global variables for timezone and day light savings in BC++?
The following doesn't work:
misc includes
extern long timezone;
extern int  daylight;
long getuservalue(void);

main()
{
time_t t;
struct tm *gmt;
timezone = getuservalue();
daylight = 1;                 //default is 0;
t = time(NULL);
localtime(&t);
gmt = gmtime(&t);
printf("GMT is:    %s",asctime(gmt));
return 0;
}

No matter what value is entered for timezone, the gmt value doesn't change. 
Since the gmt is a function of localtime, timezone, and daylight, it should
change. If the above code (with appropriate #includes) is run, the gmt
computed is the same regardless of the value timezone is set to, or the value
of daylight.  Using the tzset alternative has little value as well:

main()
{
time_t t;
struct tm *gmt1, *gmt2;
char *tzstr1 = "TZ=PST8";
char *tzstr2 = "TZ=PST8PDT";
putenv(tzstr1);
tzset();
t = time(NULL);
localtime(&t);
gmt1 = gmtime(&t);
putenv(tzstr2);
tzset();
t = time(NULL);
localtime(&t);
gmt2 = gmtime(&t);
printf("gmt1 = %s, gmt2 = %s",asctime(gmt1),asctime(gmt2));
return 0;
}

I've yet to get the gmt, or any other time function to respond differently by
any setting of the "TZ" variable, save for the middle number.  So if someone
could please explain, either what I'm doing wrong,( I'd like to have the user
enter the difference between gmt and local time, and whether daylight savings
is in effect, and set the appropriate values myself), or confirm something is
amiss, I would be greatly indebted.  I wouldn't even complain if Borland
responded, since I've already spent 90 min. on hold over the last week and
have given up on tech support. Post or email to macg9505@uxa.cso.uiuc.edu 
Thanks in advance.  Mike

Xref: sparky comp.os.msdos.programmer:10744 comp.os.ms-windows.programmer.misc:3524