HDTenEightyP/NetNews huggingface dataset:
From: Ross Ridge <ross@zooid.guild.org>
Subject: Re: Results of the smallest TSR contest
Organization: ZOOiD BBS
Date: Wed, 2 Sep 1992 21:35:36 GMT

Ralf.Brown@B.GP.CS.CMU.EDU writes:
>}In the category : HLL with Assembly
>}  Ross Ridge
>}  64 bytes for a TSR counter
>
>I didn't see this one.  That must be in a UMB, as DOS won't let a program go
>TSR with less than 96 bytes.

Actually, strictly speaking its not a TSR as it doesn't use the MS-DOS
Terminate and Stay Resident service.  What it does is copy a simple ISR
to the end of conventional memory, or to a UMB if available.  

							Ross Ridge

-- 
Ross Ridge - The Great HTMU					     l/	 //
								    [OO][oo]
ross@zooid.guild.org						    /()\/()/
uunet.ca!zooid!ross						     db	 //
Newsgroups: comp.os.msdos.programmer,news.answers
From: kennu@mits.mdata.fi (Kenneth Falck)
Subject: Re: Novice question: how to boot from a bat file?
Organization: Microdata Oy, Helsinki, Finland
Date: Tue, 1 Sep 1992 15:57:02 GMT

In article <1992Aug31.214211.20267@midway.uchicago.edu> pynq@midway.uchicago.edu writes:
>In article <1992Aug31.183957.1391@mits.mdata.fi> kennu@mits.mdata.fi (Kenneth Falck) writes:
>>Of course you can trash your hard disk if you boot prematurely,
>>but it has nothing to do with whether you do it by jumping
>>to FFFF:0000 or pressing Ctrl-Alt-Del or the Reset button.
>
>How long ago was it that we were hashing this one out before?
>
>(As in, is it just  my imagination or has the recycle rate gone ski-high
>in just that last few weeks?)

I don't know, I haven't been following the traffic 100% constantly,
though I remember some discussion about Smartdrive.

>Anyway, for the record, it makes all the difference in the world whether
>you use JMP FFFF:0 or emulate C/A/D, if you are using a write-behind cache.
>
>Some people think this is a bug in SmartDrive...  (If you don't get
>this, you really haven't been paying attention!)

Well, I suppose the major difference is that Smartdrive probably captures
IRQ1 and checks for Ctrl-Alt-Del before continuing with the keyboard
interrupt, and cannot check for a jump to FFFF:0000. (I wonder can it
be done, by the way, by placing some odd statement in FFFF:0000....
I've never checked out what that address really contains anyway.)

But anyway, my point was meant to be that nobody should reboot the
computer before making sure all buffers have been flushed, no matter
who does the flushing. (Smartdrive after a timeout or the user by
pressing a key combination or running a "sync" command.) It just
seemed strange to flame someone who posts a reboot.com program
because this program could be "dangerous" or something. (Unless
I misunderstood that posting.)

>Anyway, somebody ought to get Ralf to post the one true solution to the
>auto-reboot program.

Hmm... sounds like something my religion teacher might say... (Yes,
religion is compulsory at school in Finland.) But anyway, if someone
wants to reboot from a batch file, why not just first ask the user
to press a key to signal that he has flushed the cache buffers,
and then reboot freely?

Unfortunately I just don't remember what exactly was the original
purpose of this rebooting from a batch file ... Just wanted to
add my opinion on auto-rebooting in general.

Actually, in this age of background-writing caches, the next MSDOS
release should probably contain a "flush cache buffers" interrupt
service which could become a standard point for all different
caching software to check for a call to flush. (Though I doubt
that even Microsoft's own software would reliably support it....:-)

-- 
kennu@mits.mdata.fi

Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
From: Ross Ridge <ross@zooid.guild.org>
Subject: Re: Why ms-dos is non reentrant
Organization: ZOOiD BBS
Date: Fri, 4 Sep 1992 06:19:54 GMT

kennu@mits.mdata.fi (Kenneth Falck) writes:
>So, the question remains, why don't the Microsoft programmers bang
>their brains together and rewrite MSDOS to be fully re-entrant and
>all the routines to use dynamic memory allocation instead of static?

ross@zooid.guild.org (Ross Ridge) writes:
}Well the reasons why this wasn't done for MS-DOS 5 and earlier releases
}is fairly straight forward:

[ MS-DOS is single user, single tasking and big enough ]

ralf+@cs.cmu.edu (Ralf Brown) writes:
>Where have you been? 

Not Europe.

>It's been done already....  MSDOS 4.00 was multitasking, but practically
>nobody ever got to see it.

I'd forgotten about this, but I imagine the reasons that practically
nobody saw it are pretty much the same as I wrote above.

>MSDOS 4.00 allowed one foreground and up to 30 background tasks (limited by
>conventional memory), with interprocess communications, semaphores,
>scheduling, etc.  And it supported asynchronous device drivers, where the
>split into strategy and interrupt routines actually meant something.

Do you think any of MS-DOS 4.00 will make it in to a future multitasking
MS-DOS or will they just ignore it?

							Ross Ridge

-- 
Ross Ridge - The Great HTMU					     l/	 //
								    [OO][oo]
ross@zooid.guild.org						    /()\/()/
uunet.ca!zooid!ross						     db	 //
From: sonix@schunix.uucp (Duane Morin)
Newsgroups: comp.os.msdos.programmer
Subject: Invalid Media:  Correction??
Date: 27 Aug 92 14:14:56 GMT
Organization: SCHUNIX Public Access Unix for Worcester County, Massachusetts, USA

Ok, so, I stay home for ONE sick day, and when I come back, the boss tells me
that his computer is dead.  This is what it says:  Missing Operating System.

Ok, no problem.  I try to boot from a floppy.  Works.  Access C drive.  Works.
Do a directory of C?  Invalid Media Type.  Darn.  Try to SYS from A to C?
Write failure.  

What I figure happened is this (figured, with a little help from PCTOOLS):  
Somehow, he managed to COMPLETELY trash his boot sector. A status report of 
whatever PCTOOLS thought his hard disk was showed things such as the 
following:

	0 - bytes total disk space
178,327,832 - bytes in 0 files and 0 directories   <-- Its NOT a 178M disk!
-,178,327,832 - bytes available on disk

	512 - bytes in each sector
	  0 -sector in DOS boot record
  	  0 - sectores in each FAT ( 0 copies )
	  0 - sectors in root directory (0 entries)
 	  0 - sectors in logical disk

	00h - media descriptor
	12 bit - File Allocation Tables
	0 - bytes in each allocation unit (cluster)
	0 - sectors in each allocation unit (cluster)
	0 - total allocation units for data storage
 
Logical Drive C: is accessed as a device driver.

FDISK shows a recognized partition of the correct size, (102M), but says 
"system: UNKNOWN".

My question:  We don't want to completely reformat this disk, there's alot 
of information on it that we hope not to lose.  I would figure that the 
boot sector has been trashed, not the file allocation tables, so maybe 
we can resurrect some of the data.  Does anyone know the best way to tackle
this fairly nasty problem?  Like, can I get to the hard disk to write a new
media descriptor?  How would I go about doing that?

Any suggestions, other than to back up the computer more frequently, greatly
appreciated.  Thank you.

Duane Morin
Software Development Manager
Walker Sonix, Inc.
Worcester, MA 01604
sonix@schunix.uucp
sonix@aol.com
From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Novice question: how to boot from a bat file?
Date: Wed, 02 Sep 92 17:24:50 CDT
Organization: Villa CyberSpace, Minneapolis, MN

Ross Ridge <ross@zooid.guild.org> writes:

> brown@NCoast.ORG (Stan Brown) writes:
> >If you think something is wrong or missing in the FAQ list, by all means
> >let me know and I'll be happy to make the improvement. 
> 
> It's way too long.  I think there are more questions answered there
> than are typically asked here in a month.

There's a reason for that, y'know.

It means the FAQ is doing its job.  Cut the size down, and you'll soon
see those questions popping up on the net again.

Come to think of it, this is the first time I've ever seen anyone
complain about getting too much information. :-)
--
Roy M. Silvernail --    [my machine ] "Sometimes, you're the windshield....
roy%cybrspc@cs.umn.edu  [my opinions]            sometimes, you're the bug!"
cybrspc!roy@cs.umn.edu  [my $0.0275 ]                      --Mark Knopfler
From: epp@mala.bc.ca (Lorne Epp)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Algorithm for ordering vertices of a polygon
Date: 3 Sep 92 17:55:19 -0700
Organization: Malaspina College

In article <1992Sep3.194209.10620@athena.mit.edu>, gleung@athena.mit.edu (Gilbert Leung) writes:
> 	I have a polygon with known vertices, but these points are
> arranged in random order.  I need an algorithm to put these points
> in an order such that I can trace the perimeter of this polygon.
> 

It can't be done in general.  Look at these points:

        *   *     
  
      *   *
  
        *   *
   
You could connect them like this:

        *---*     
       /    |
      *   * |
       \ / \|
        *   *

or like this:

        *   *     
       / \ /|
      *   * |
       \    |
        *---*

There are more possibilities, even without allowing edges to cross.

For polygons with only 3 vertices there is no problem.  If you allow 
only convex polygons you should be able to do it as well (sorry, I
don't have an algorithm handy).

> Note that this arbitrary polygon can be concave and weird-shaped,
> but it is simple enough that there is only ONE way to connect all
> these points to form a polygon.

The only way I can see for there to be only one way to connect the
points is if the polygon is a triangle.  In that case it doesn't matter
in what order you connect the dots.
----------------------------------------------------------------------
Lorne Epp                                               epp@mala.bc.ca
Newsgroups: comp.os.msdos.programmer
From: jdz1@Ra.MsState.Edu (John D. Zitterkopf)
Subject: WarmBoot on ALT-CTRL-DEL {Re: The smallest TSR contest}
Summary: -possible Smallest TSR?-
Organization: Mississippi State University
Date: Tue, 1 Sep 1992 01:41:44 GMT

	I'm not able to do this at the moment because I don't know how to 
program a TSR. But, Maybe it already exists OR can be done for this contest.
What I need is a TSR that will intercept a CTRL-ALT-DEL sequence that would
normally cause my AT to do a ColdStart to do a WarmStart. This should
have the affect of rendering the MEMORY and IO port resets inoperative!

AAny Ideas?
John


--
 ____________   _------_  |||IBM & |      EE majors Do it Best 8-)
  --------\\ ] ~-______-~ |||Atari |~~~~~~~~~John D. Zitterkopf~~~~~~~~~~~~~
     (~~~~~\\|_(__ ~~    / | \Rules!jdz1@ra.MsState.edu  jdz1@MsState.bitnet
      \______| (        /  |  \    |AOL: zitt@aol.com  jdz1@isis.MsState.edu 
Newsgroups: comp.os.msdos.programmer
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: The smallest TSR contest
Organization: Computer Science, University of Melbourne, Australia
Date: Sun, 30 Aug 1992 16:36:55 GMT

beaurega@ireq.hydro.qc.ca (Denis Beauregard) writes:

[...]
>One advantage of Pascal over C is that the Pascal is
>embedded in the code and C is not (C must call standard library while
>standard Pascal can expend more directly some statements like the
>print (Fortran do the same).  

This is not true.

A C compiler may well expand calls to standard functions, like
	printf("%s\n",s);
with equivalent but more efficient code, eg.
	puts(s);
Indeed such compilers do exist, although they are not common.

See the recent discussion on comp.lang.fortran.

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
From: Jwf.Thirion@p0.f115.n7102.z5.fidonet.org (Jwf Thirion)
Newsgroups: comp.os.msdos.programmer
Subject: Re: How to change file attributes using Turbo C ??
Date: Tue, 01 Sep 92 20:20:01 GMT
Organization: FidoNet node 5:7102/115.0 - Integrated Systems, CT

Well to change the file attributes, you can use inline assembly. The function
is:

To call:

AH    <--- 43h
AL    <--- 00h, Get file attributes
           01h, Set file attributes
CX    <--- New attribute (See bottom)
DS:DX <--- Pointer to buffer

Returns:

Carry flag clear if successful
CX = Attribute if get (See bottom)

Carry flah set if error
AX = 01h, Invalid function (file sharing)
     02h, File not found
     03h, Path not found
     04h, Access denied

6543210  Meaning
......1  Read Only
.....1.  Hidden
....1..  System
.1.....  Archive

A sample Quick C function would probably be like this:

void SetFAttr (char *p)  /* Not sure how to use pointers, I am an ASM progr.)
{

_asm {
mov ah, 43h
mov al, 01h
mov cx, 03h       /* Make hidden and read only  (0000011b)
push cs           /* May not   */ 
pop ds            /* be needed */ 
mov dx, p         /* Point to file */
int 21h           /* Set attribute */
}
}

I dont know if the above will work, since I havn't tried it yet (too busy), but
for know that should work. (I used it in one of my ASM programs). If you have 
any trouble, i'll write you the functions in C. 

Cheers,
JWF Thirion


--  
INTERNET: Jwf.Thirion@p0.f115.n7102.z5.fidonet.org
via:  THE CATALYST BBS in Port Elizabeth, South Africa.
       (catpe.alt.za)   +27-41-34-1122 HST or +27-41-34-2859, V32bis & HST.
From: rv0s+@andrew.cmu.edu (Rahul Verma)
Newsgroups: comp.os.msdos.programmer
Subject: Curses?
Date: 28 Aug 92 09:19:22 GMT
Article-I.D.: andrew.8eba0Oi00UhWA4OJ4X
Organization: Freshman, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

Does anyone know what curses is?

Rahul Verma
From: brown@NCoast.ORG (Stan Brown)
Subject: comp.os.msdos.programmer FAQ diff 2 of 4
Expires: Sun, 20 Sep 1992 00:23:45 GMT
Organization: Oak Road Systems, Cleveland Ohio USA
Date: Wed, 26 Aug 1992 00:23:45 GMT
Followup-To: comp.os.msdos.programmer

Archive-name: msdos-programmer-faq/diff2
Last-modified: 22 August 1992


Please see part 1 for explanations.

- 12>Last-modified: 19 July 1992
+ 12>Last-modified: 22 August 1992

- 94>    Windows mavens are found in comp.os.ms-windows.programmer.tools and
- 95>    comp.os.ms-windows.programmer.misc.  According to the FAQ list in
- 96>    the latter, comp.windows.ms.programmer has been replaced by those
- 97>    two plus comp.os.ms-windows.programmer.win32.

+116>    - misc.forsale.computers is where you post notices of equipment,
+117>      software, or computer books that you want to sell.  Please don't
+118>      post or crosspost those notices here.

+124>    - comp.sys.ibm.pc.hardware is for more hardware-oriented discussions
+125>      of the machines that run DOS.

+252>    First, is that the actual message, or did it say "floating point not
+253>    loaded"?  If it was the latter, see the next Q.

+279>Q205. Why did my program bomb with "floating point not loaded"?
+281>    That is Microsoft C's run-time message when the code requires a
+282>    numeric coprocessor but your computer doesn't have one installed.
+284>    If the program is yours, relink it using the xLIBCE or xLIBCA
+285>    library (where x is the memory model).

-- 

Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
Newsgroups: comp.os.msdos.programmer
From: zzang@whale.uucp (Zhuo Zang[~{j0WA~}])
Subject: C beautifier wanted
Organization: University of Florida
Distribution: usa
Date: Sat, 29 Aug 92 19:24:27 GMT

Hello,
Sorry if this is a FAQ.
I don't know if there is a good
C beautifier out there.
Can someone give me some info on it ?

Thanks in advance !


-- 

Zhuo Zang[~{j0WA~}]
University of Florida            email: zzang@stat.ufl.edu
Organization: University of Illinois at Chicago
Date: Tuesday, 1 Sep 1992 08:08:03 CDT
From: <U24226@uicvm.uic.edu>
Newsgroups: comp.os.msdos.programmer
Subject: Simple Terminal in QBASIC

Hi! I'm trying to write a simple terminal
program in QBASIC. I've managed to get
the COM port set up and can get the
program to dial. I'm having problems
getting data from the modem. Every time
I use the get command (GET #22,t) I
get a bad record error. I think it's
because at the time I get the data
there is nothing to get. I tried using
the ON COM GOSUB routine. It goes to
my GET command I still get the same
error though.
Any Suggestions?
From: izahi@bsc.no (Raul Izahi Lopez Hernandez)
Newsgroups: comp.os.msdos.programmer
Subject: 32-bit DOS
Summary: Is 32-bit DOS viable or desirable?
Keywords: 32-bit, DOS, Advanced Operating Systems
Date: 28 Aug 92 10:39:42 GMT
Organization: Bergen Scientific Centre, Bergen, NORWAY


   Is a 32-bit version of DOS, viable or desirable?
   Is it possible to change DOS in a way that all the non-RAM above 640K
can be moved somewhere else and that DOS can execute in a flat memory model?
   I would like to be able to declare arrays larger than 64KB and be able to
do 32-bit disk accesses.
   Would it be possible to run 16-bit DOS underneath such engine?
   I would not like the added complexity of OS/2 or Windows, just a true
32-bit DOS.
-- 
         -----> All opinions expressed here are my own, not IBM's <-----
Raul Izahi Lopez	Izahi Engineering
izahi@bsc.no		IBM Bergen Environmental Sciences and Solutions Centre
			Thormoehlensgate 55, 5008 Bergen, NORWAY (47-05)544653
Xref: sparky comp.os.msdos.programmer:9010 comp.os.msdos.misc:5018
From: ralf+@cs.cmu.edu (Ralf Brown)
Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
Subject: Re: Why ms-dos is non reentrant
Date: 3 Sep 92 02:44:03 GMT
Article-I.D.: cs.BtzE9H.53G.2
Organization: School of Computer Science, Carnegie Mellon

In article <1992Sep2.065315.19027@zooid.guild.org> ross@zooid.guild.org (Ross Ridge) writes:
}kennu@mits.mdata.fi (Kenneth Falck) writes:
}>So, the question remains, why don't the Microsoft programmers bang
}>their brains together and rewrite MSDOS to be fully re-entrant and
}>all the routines to use dynamic memory allocation instead of static?
}
}Well the reasons why this wasn't done for MS-DOS 5 and earlier releases
}is fairly straight forward:

Where have you been?  It's been done already....  MSDOS 4.00 was multitasking,
but practically nobody ever got to see it.  (Note: this was a version that
came between 3.2 and 3.3; the mass-market MS equivalent to PC-DOS 4.0x was
MSDOS 4.01).  And if you're open to buying from a Microsoft competitor, you
can get Digital Research's DR Multiuser DOS (former versions were called 
Concurrent PC-DOS, Concurrent DOS, and Concurrent DOS/XM).

MSDOS 4.00 allowed one foreground and up to 30 background tasks (limited by
conventional memory), with interprocess communications, semaphores,
scheduling, etc.  And it supported asynchronous device drivers, where the
split into strategy and interrupt routines actually meant something.


-- 
Internet: RALF+@CS.CMU.EDU   |The University would disclaim this if it knew...
FIDO: Ralf Brown 1:129/26.1  |
BIT: RALF%CS.CMU.EDU@CARNEGIE|"Success has a simple formula: do your best,
AT&Tnet: (412)268-3053 school| and people may like it."   -- Sam Ewing
From: messina@netcom.com (Tony Porczyk)
Newsgroups: comp.os.msdos.programmer
Subject: Re: WarmBoot on ALT-CTRL-DEL {Re: The smallest TSR contest}
Date: 1 Sep 92 04:42:17 GMT
Organization: Messina Software

jdz1@Ra.MsState.Edu (John D. Zitterkopf) writes:

>What I need is a TSR that will intercept a CTRL-ALT-DEL sequence that would
>normally cause my AT to do a ColdStart to do a WarmStart. This should

?  All machines I know do warm reboot on Ctrl-Alt-Del.  Are you sure
yours does cold start?  It would be most unusual...

t.
Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
From: jkenton@world.std.com (Jeff Kenton)
Subject: Re: Why ms-dos is non reentrant
Organization: Kenton Systems Corporation, Weston MA
Date: Tue, 1 Sep 1992 18:10:46 GMT

In article <1992Sep1.160133.19060@mits.mdata.fi> kennu@mits.mdata.fi (Kenneth Falck) writes:
>
>So, the question remains, why don't the Microsoft programmers bang
>their brains together and rewrite MSDOS to be fully re-entrant and
>all the routines to use dynamic memory allocation instead of static?
>
>If this really is so difficult for them, I must have understood
>something wrong about this.
>


Because some of the data is naturally not sharable between routines
which can interrupt each other.  Consider the FAT (allocation table)
for a disk.  You don't want a routine to start allocating a new disk
sector for a file, and have it interrupted by another routine which
allocates the same sector.

Now, you can put software locks around critical data structures to
avoid this, but it's a lot of work to add this to a system and it
won't buy you much in DOS.  In a system that supports multi-processing,
it's a requirement, and all such systems do it.  You won't find it
added to DOS until it supports multi-processing.  That's what NT is
all about (that, and real 32-bit software).


-- 
-------------------------------------------------------------------------
=			Jeff Kenton	(617) 894-4508			=
=			    jkenton@world.std.com			=
-------------------------------------------------------------------------
Newsgroups: comp.os.msdos.programmer
From: alawrenc@sobeco.com (a.lawrence)
Subject: Re: file positioning with buffered/unbuffered I/O
Reply-To: alawrenc@sobeco.com
Organization: Lawrence & Assc.
Date: Tue, 1 Sep 92 08:41:13 GMT

In <1992Aug31.150850.2188@brandonu.ca> dueck@brandonu.ca writes:

>In article <1992Aug25.153322.13793@jhunix.hcf.jhu.edu>, gregg_c@jhunix.hcf.jhu.edu (Christopher H Gregg) writes:
>> Hi, I am writing an assembly language program and I am having some
>> problems with it.  The program is memory resident and it traps int 1Ch.
>> After it traps the interrupt, it checks if a certain amount of time
>> has passed and then it deletes a certain file on a directory.  The
>> problem is that when I try to use either DOS function 13h (delete file)
>> or DOS function 41h (which I would prefer), the program crashes.
>> 
>You have become stuck on one of the worst problems in DOS: its not
>re-entrant. However, you can tell when its safe to call DOS by checking
>the DOS-safe flag. This is a one-byte value located one byte past the 
>address returned in DS:SI by interrupt 21 function 5D06 and it is zero
>when it is safe to call DOS. Unfortunately the flag lies: It is safe to call
>DOS if DOS is busy with a call <= 0x0C, mostly standard input and output
>calls. However, when DOS is in a keyboard-polling loop, it invokes
>interrupt 28, the DOS-idle interrupt.

>Your program should acquire its data via int 1C and write it out from a
>routine called via int 28.

>This solution will break if you have hot-keyed back into a TSR, thereby
>activating via int 28. The TSR can't use int 21 subfunction <= 0C, and
>int 28 can't be re-entered. Does anyone know the solution to this problem?

Yes.  But its very long to publish here.  It would recommend the following
readings:

     Strategies and Techniques for Writing State-of-the-Art TSR's, 
     Douglas Boling, Microsoft Systems Journal, Vol 7 No 1, Jan-Feb 92.

     The MS-DOS Encyclopedia, Ray Ducan etal., Microsoft Press, 1988.

     The Waite Group's MS-DOS Developer's Guide, 2nd Ed., Howard W.
     Sams & Co., 1989

TSR programming is no longer the dark secret is once was, but there 
are a lot of considerations.  Basic TSR's need to trap at least 3 or
4 different interrupts, and further complications are created for
a TSR running in a Windows environment.


-- 
On a clear disk you can seek forever.
-------------------------------------------------------------------------
Andrew Lawrence, Informaticien Conseil           |  alawrenc@sobeco.com
3605 St-Urbain, #1605                            |  uunet!sobeco!alawrenc
Newsgroups: comp.os.msdos.programmer,news.answers