HDTenEightyP/NetNews huggingface dataset:
From: harrison@lclark.edu (Mark Harrison)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Reading ALT keys with bioskey in TC++?
Date: 3 Sep 92 20:30:01 GMT
Article-I.D.: lclark.1992Sep3.203001.21161
Organization: Lewis & Clark College, Portland OR

In article <rvs.41@parst1.UUCP> rvs@parst1.UUCP (Roelof van Suilichem) writes:
>In article <1992Aug25.184207.7825@lclark.edu> harrison@sun.lclark.edu (Mark Harrison) writes:
>
>>Hi.  I am reading ALT+<key> from the keyboard with bioskey (in TC++ 3.0.)
>>But that gives me values that map to the physical layout of the keyboard. 
>>Is there an easy way to translate this value into one that will tell me
>>the Ascii code of the key?  For instance, how do I transform 0x3100
>>(ALT+N) to get the ascii code of N?  Will I need to write a function that
>>will do this for all the ALT values I want to check for?  If so, then no
>>problem.  I just don't want to reinvent any wheels.
>
>OK, here is my invented wheel.  Might save you some typing.
>Use as you want, at your own risk.  If you are going to use it
>just Email me so I get some satisfaction of knowing that somebody
>is actually using it.
>

I tried e-mail, but it bounced.  So I'll post in case anyone else is
interested.

Thanks for replying.  I havn't look at your code real well yet, but it
looks like the way I ended up doing it.  I got tired of waiting, and did
it myself.  I looked the code up in an array of ALT Keys.  It was sorted
alphabetically.  Then I returned the index of the array + 65.  So Alt-D
would be the fourth value in the array.  Index of the array is 3.
3 + 65 = 68.  68 = 'D'.  Basically the same type of thing.  Maybe if the
need arises to expand my routine, I can combine ours.  But for now I just
need to know the ASCII letter pushed with the ALT key.  CTRL keys are
handled just fine.

Thanks again.  Yours is only the second reply I have gotten in two weeks,
and the first guy told me to use getch().

Mark

-- 
=============================================================================
Mark Harrison           |  "We are the Priests, of the Temples of Syrinx
harrison@sun.lclark.edu |   Our great computers fill the hallowed halls."
              -- Me     |                                    -- Rush
Newsgroups: comp.os.msdos.programmer
From: kennu@mits.mdata.fi (Kenneth Falck)
Subject: Re: Novice question: how to boot from a bat file?
Organization: Microdata Oy, Helsinki, Finland
Date: Mon, 31 Aug 1992 18:39:57 GMT

In article <Bttt82.53K@NCoast.ORG> brown@NCoast.ORG (Stan Brown) writes:
>>>My problem is I don't know how to emulate the cntry-al-delete boot that
>>>the user would normally type in to have these new files take effect.
>>
>>Since it seems to be a twice-a-week question, here is a uuencoded program
>>that will do it:
>
>[code deleted]
>
>and, if you're running SMARTDRV or other write-behind disk caches, it
>stands an excellent chance of trashing your hard disk.

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.

(Sure some caches re-vector IRQ1 to capture C-A-D but that's
not the point. I can hardly think someone would write a batch
file or program that reboots without asking for a keypress
first, since any programmer should know background-write caches
exists, and as a matter of fact I don't think even straight DOS 
will save modified files instantly.)

>-- 
>Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
>"Self-esteem, n.  An erroneous appraisement."
>"Self-evident, adj.  Evident to one's self and to nobody else."
>                                               --Ambrose Bierce

-- 
kennu@mits.mdata.fi

Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
From: kennu@mits.mdata.fi (Kenneth Falck)
Subject: Re: Why ms-dos is non reentrant
Organization: Microdata Oy, Helsinki, Finland
Date: Tue, 1 Sep 1992 16:01:33 GMT

In article <bws.35@ccs.carleton.ca> bws@ccs.carleton.ca (Brian Sullivan) writes:
>When performing a DOS call, some routines use Static data space, (rather than
>allocating memory on a stack). If you interrupt a DOS call to perform the 
>same function(or on fro the same family, (even if you save all the 
>registers) you can still trash the original data. And after your TSR exits
>DOS continues with corrupted data. 

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.

-- 
kennu@mits.mdata.fi
From: brown@NCoast.ORG (Stan Brown)
Subject: comp.os.msdos.programmer FAQ diff 4 of 4
Expires: Sun, 20 Sep 1992 00:24:33 GMT
Organization: Oak Road Systems, Cleveland Ohio USA
Date: Wed, 26 Aug 1992 00:24:33 GMT
Followup-To: comp.os.msdos.programmer

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


Please see part 1 for explanations.

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

-260>    versions that have been called 2.0 are actually hacked versions of
-261>    that beta-test version and are completely unauthorized.
+261>    versions that have been called 2.0, 2.01, or 2.2 are at best hacked
+262>    versions of that beta-test version and at worst trojans that trash
+263>    your hard disk.
+265>    By the way, if you're attempting to register a shareware copy of
+266>    PKZIP 1.1, be aware that PKWARE's address has changed.  The current
+267>    address, according to a CIAC (ciac@llnl.gov) bulletin, is
+269>        PKWARE Inc.
+270>        9025 N. Deerwood Drive
+271>        Brown Deer, WI 53223 USA
+272>        Voice: +1 414 354-8699    BBS: +1 414 354-8670

-328>QB05. What's in Borland C++ 3.0, Turbo C++ 3.0, Application Frameworks?
-330>    BC++ 3.1 is now the current version; this information on 3.0 will be
-331>    removed from the next FAQ list (replaced, I hope, with 3.1 info).
-333>    Send mail to bc30-info@borland.com.  The mail server will ignore the
-334>    subject and text of your message and will email a text file about
-335>    Borland's family of C and C++ compilers to the reply-to address in
-336>    your message.  The file includes features, list prices, and upgrade
-337>    prices.

-363>    inter30a.zip, inter30b.zip, and inter30c.zip.  At Simtel it's in
-364>    PD1:<MSDOS.INFO>INTER30A.ZIP, INTER30B.ZIP and INTER30B.ZIP.  At
-365>    garbo it's in /pc/programming/inter30a.zip, inter30b.zip, and
-366>    inter30c.zip.  These versions were uploaded in late April 1992;
+363>    inter31a.zip, inter31b.zip, and inter31c.zip.  At Simtel it's in
+364>    PD1:<MSDOS.INFO>INTER31A.ZIP, INTER31B.ZIP and INTER31B.ZIP.  At
+365>    garbo it's in /pc/programming/inter31a.zip, inter31b.zip, and
+366>    inter31c.zip.  These versions were uploaded in late July 1992;

-397>    (18.72.1.58) in files with names like
+397>    [18.172.1.27] in files with names like

-- 

Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
From: tswingle@oucsace.cs.ohiou.edu (Tom Swingle)
Newsgroups: comp.os.msdos.programmer
Subject: Re: WarmBoot on ALT-CTRL-DEL {Re: The smallest TSR contest}
Date: 3 Sep 92 02:28:06 GMT
Organization: Ohio University CS Dept,. Athens

In article <k-jn5m=.messina@netcom.com> messina@netcom.com (Tony Porczyk) writes:
>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.

Are you using VSHIELD on your computer?  VSHIELD forces a cold boot on Control-
Alt-Delete, unless you run it with the /NB parameter.  Viruses stand a lesser
chance of surviving a cold boot than a warm boot, although it might still be
possible; I don't know for sure.

One solution, if VSHIELD is not the culprit, might be to write a program that
writes the "warm boot value" 0x1234 to the appropriate location (check the FAQ
for the address to write it to, and double check that that is the correct 
value to write, as I am simply trying to remember the details).  That way, it
is there when Control-Alt-Delete is pressed (I don't know the exact rebooting
process, so I am not sure whether this would even work, it is just one
suggestion to try).
-- 
"The problem you are experiencing is  |  "To be sure of hitting the target, 
not with the network nor with the     |  shoot first and, whatever you hit, 
station.  Please adjust your set."    |  call it the target." 
More ramblings from: tswingle@oucsace.cs.ohiou.edu/tswingle@bigbird.cs.ohiou.edu
Newsgroups: comp.os.msdos.programmer
Newsgroups: comp.os.msdos.programmer
Subject: Re: How can you set an environment variable in a program?
From: dueck@brandonu.ca
Date: 31 Aug 92 14:46:35 CST
Organization: Brandon University, Brandon, Manitoba, Canada

In article <1992Aug24.143641.1@camins.camosun.bc.ca>, morley@camins.camosun.bc.ca writes:
> In article <690@aardvark.Rain.COM>, tyrant@Aardvark.Rain.COM (Rex Goode) writes:
>> dmh@superb (Daniel Hermans) writes:
>> 
>>>hi,
>>>i am using turbo c v2.0 to generate a temporary file name,
>>>place some data in the temporary file and then close the file. the temp
>>>file is then to be used on the command line of another program. both
>>>programs are called within a batch file something like:
>> 
>>>@echo off
>> 
>>>program1
>>>program2 < %tempfile%
>> 
>>>   system("set tempfile=tmpx.$$$");
>> 
>>>i tried using system(command) as above but the variable is not set when the
>>>program exits probably because system starts a new command.com shell each
>>>time
>> 
>> Absolutely right about the new command.com, with its own environment. That
>> is what happens when you use system(). Try setenv(),
>> 
>> setenv("TEMPFILE=TMPX.$$$);
>> 
> 
> Sorry, but setenv() also only modifies the "local" environment.  It will not
> change it "permanently".
> 
> MARK
> morley@camins.camosun.bc.ca
> 

The best way I have found to set a global environment variable is to use 
interrupt 2e, the back door to the command interpreter. Construct a string 
with a command like "set x=y\r" and pass it to INT 2E via DS:DX. 

Since 2E destroys all regs except CS:IP, you must restore the SS:SP from
a place addressable from CS, and restore DS from the stack. 

If you have set a global environment variable and wish to access it
subsequently using getenv(), free the program's local environment and
point the environment segment in the PSP at its parent's environment.
If you do this, set the environment segment in the PSP to zero before
exiting, or program cleanup will attempt to delete the master environment.

Gery Dueck
dueck@brandonu.ca
From: aki@cruzio.santa-cruz.ca.us
Newsgroups: comp.os.msdos.programmer
Subject: Re: 32-bit DOS
Keywords: 32-bit, DOS, Advanced Operating Systems
Date: 30 Aug 92 08:02:33 GMT
Reply-To: aki@cruzio.santa-cruz.ca.us

In article <1992Aug28.103942.19508@newsroom.bsc.no>, izahi@bsc.no (Raul Izahi Lopez Hernandez) writes:
> 
>    Is a 32-bit version of DOS, viable or desirable?
  Yes. maybe.
>    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?
  no;  besides if you make a 32 bit DOS it's not going to be DOS
compatible;  thus say adios to 640 k limits.
>    I would like to be able to declare arrays larger than 64KB and be able to
> do 32-bit disk accesses.
  no problem
>    Would it be possible to run 16-bit DOS underneath such engine?
  I sincerely hope so; I love Falcon 3.0.
>    I would not like the added complexity of OS/2 or Windows, just a true
> 32-bit DOS.


Ny understanding is that this is precisely what Microsoft is working
on at this moment.  It's not DOS 6,  but something about a year later;
Comdex Spring/Fall '94.  I believe they are even going to throw in a
Windows kernel for those folks who like linking objects to virtual
unthreaded inanimate frame structures.  Hey, let's talk about this
before MS makes the best guys around here sign an NDA...

If DOS 6 is DOS 5 with a bunch of third-party goodies thrown in;
what is _DOS 7_ ???

Are the guys in Redmond smart enough to realize that there is need
for both a gooey picture thingie _AND_ a DOS-like creature??

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.  /
Newsgroups: comp.os.msdos.programmer
From: elan@tasha.cheme.cornell.edu (Elan Feingold)
Subject: fclose() messes up heap
Reply-To: elan@tasha.cheme.cornell.edu (Elan Feingold)
Organization: Cornell University
Date: Thu, 3 Sep 1992 21:05:32 GMT


In a program I'm writing, after I fclose() a file, it seems to mess up the free space of the core, and I'm really not sure why.  It seems that this sequence of events messes up the memory.

1. Open file
2. Allocate and deallocate memory
3. Close file

I know that you're all going to say that I have a bad pointer or something, but I don't think that this is the case (although it might be...). I'm using BC2.0.  Is there any reported bugs with fclose, or does anyone have any similar experiences?  Thanks, very much,

 ESF 

--
 
Newsgroups: comp.os.msdos.programmer
From: venaas@siri.unit.no (Stig Venaas)
Subject: Re: Efficient byte/word mirroring request
Organization: University of Trondheim
Date: Fri, 28 Aug 92 07:28:11 GMT

In article <1992Aug28.083405.164422@dstos3.dsto.gov.au> egg@dstos3.dsto.gov.au writes:
>Does anyone know how to quickly and efficiently mirror a byte.
>ie
>    11001010 to 01010011
>
>the only way I know is this
>
>   mov  al,byte_to_shift
>   mov  cx,8
>ShiftLoop:
>   rcr  al
>   rcl  ah
>   loop ShiftLoop
>   mov  shifted_byte,ah
>
>There must be an easier (and smarter) way to speed this up using logical
>op's perhaps ?
>Any Help appreciated.
>
>Themie Gouthas
>egg@dstos3.dsto.gov.au


The fastest way of doing this is to use look up tables.
You could make a look up table for the nibbles. 0000 to 1111. That's
just 16 bytes. You could squeeze it into 8 bytes, but the code
would be longer and it would take more time. Then to mirror a byte,
you just look up the two nibbles, and swap them. This procedure can
be used for words etc. of course.

I don't think this algorithm including the table would take much
more space than yours.

If time is more important than size, use a look up table for the
bytes.



-- 
Stig (venaas@siri.unit.no)
Newsgroups: comp.os.msdos.programmer
Subject: reading CMOS (was Re: Read BIOS - whoops)
From: phys169@csc.canterbury.ac.nz
Date: 3 Sep 92 14:47:19 +1200
Organization: University of Canterbury, Christchurch, New Zealand

Yes, it is possible to read the CMOS clock and RAM quite easily, but do you
mean a PC or an AT? (the original, 8088, PC CMOS is totally different).

For an 8088 PC, to read the CMOS (assuming it has it), you need to know the
starting port address, which varies from board to board.  The best idea is to
try some likely ports, avoiding known system ports of course, and see if one
has a valid hex number seems to be cycling 1000 times a second (or something 
like that).

For an AT, there is always ports 70h and 71h, and you use them like this...

output a number (0 to 3Fh) to port 70h, saying which CMOS clock/RAM cell you
want, then

read or write port 71h (1 byte of data).  Be careful not to access port 70h
without also accessing port 71h - apparently it can ruin the chip. Also be
aware that you can get "false" readings (255) from the clock registers at
times.

The PC/XT CMOS RAM has a separate port addresses for each cell (but has less
cells, and the clock cells are in a different order.

For more information, have a look at the documenation file that comes with my
program CMOS299.ZIP, or at the INFOPLUS package, that has sources.  (Actually,
you can get the sources to my CMOS setup program too if you ask nicely).

Hope this helps,
Mark Aitchison, University of Canterbury.
From: israel@unixg.ubc.ca (Robert B. Israel)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Another MsDos batch programming challenge
Date: 2 Sep 92 23:45:10 GMT
Organization: University of British Columbia, Vancouver, B.C., Canada

In <92246.142230F13@psuvm.psu.edu> Kevin <F13@psuvm.psu.edu> writes:

>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)

TRUENAME does exist in DOS 5, but not in DOS 3.3.  In this case, though,
you want CD (which only returns the name of the current directory), not
TRUENAME (which returns directory+filename).

The whole point of the exercise is to find ways of setting environment
variables to what a command returns.  In UNIX it would be easy, but in
DOS you have to resort to tricks.

BTW, Yossi's solution should work if you run it as "FOO.BAT" rather than as
"FOO".  

-- 
Robert Israel                            israel@math.ubc.ca
Department of Mathematics             or israel@unixg.ubc.ca
University of British Columbia
Vancouver, BC, Canada V6T 1Y4
Newsgroups: comp.os.msdos.programmer
Subject: Intercepting DOS messages...
From: choate@acs.harding.edu (Brad S. Choate)
Date: 26 Aug 92 18:00:04 -0500
Reply-To: choate@acs.harding.edu
Organization: Harding University

I'm needing some information/code samples on how to intercept any one of
the DOS error messages (i.e. "Bad command or file name").  Is there some
vector I can hook to for catching these things?  Or would I have to
physically change the system files to print my own messages?

 Suggestions/help anyone?
Please e-mail to   choate@acs.harding.edu

Thanks!
I'll post a summary.
--
 Disclaimer: "I really don't care."

 |) |) /\ |\  | Brad S. Choate                      | 1314 E. Market, Apt. 6
 |) |\ || |/  |                                     | Searcy, AR  72143
 --------_--  | choate@acs.harding.edu              | (501) 279-2584
  <||()/\|[   | V.P., Software Extensions, Inc.
Newsgroups: comp.os.msdos.programmer
From: kennu@mits.mdata.fi (Kenneth Falck)
Subject: Re: Novice question: how to boot from a bat file?
Organization: Microdata Oy, Helsinki, Finland
Date: Wed, 2 Sep 1992 15:23:54 GMT

In article <+1jnzbp.messina@netcom.com> messina@netcom.com (Tony Porczyk) writes:
>And of course, if your software grabs the critical error and reboots
>the software while running an unattended process (for example at
>night), you are going to wait for the user to press a key, right?
>Get real.

Uh? I'm sorry but I'm not quite sure what's the point here. If
the process wants to reboot at night, I believe it has no standard 
way of making sure the cache buffers have been flushed before
the reboot. (Except maybe waiting for a couple of seconds, but
I wouldn't rely on that myself since who knows what kind of
update-every-30-minutes caches people use.)

My "solution" was merely meant for batch files that need to
reboot after an automatic replacement of autoexec.bat or
config.sys and that sort of stuff.

-- 
kennu@mits.mdata.fi
From: exuhag@exu.ericsson.se (James Hague)
Newsgroups: comp.os.msdos.programmer
Subject: Re: 4-DOS vs COMMAND.COM
Date: 1 Sep 92 15:55:26 GMT
Reply-To: exuhag@exu.ericsson.se
Organization: Ericsson Network Systems, Richardson, TX

Amit J. Patel writes:
>
>Well... I don't see many people still using EDLIN as their editor.  Why
>does everyone use COMMAND.COM as their command processor?

True, 4DOS *is* a great improvement over COMMAND.COM, one which I can no
longer live without (yes, I have registered my copy).  But I can see how
some people loathe spending $69 for something so fundamental--filling in
all the holes in MS-DOS can be an expensive proposition:  $69 for 4DOS,
$99 for Norton Utilities, $xx for FastBack, $55 for QEdit, $46 for
PKLite, $xx for Viruscan, etc.  You can get by without any of these; the 
standard DOS utilities plus some freeware will work nicely.  For more money 
you can get more functionality.  For some people it isn't worth it, just
as everyone does not need a 50 MHz 486.

--
James Hague   
exuhag@exu.ericsson.se
From: resnicks@netcom.com (Steve Resnick)
Newsgroups: comp.os.msdos.programmer
Subject: Call for Beta Testers
Date: 26 Aug 92 18:26:19 GMT
Followup-To: sender
Organization: What? Me organized? You should see my checkbook!


I wrote a command shell replacement for MS-DOS. I will eventually release
this as shareware but I would like for it to be as bug free, and anomoly free
as possible. I would, therefore, like for a few beta testers to play with 
this. I am primarily looking for programmer types, as I have geared this 
towards programmers (but not specifically). If you would like to be
a beta tester please contact me and tell me what your capabilities are, and
what type of hardware you will be running this on. 

Thanks, in advance, 

Steve

-- 
------------------------------------------------------------------------------
Steve Resnick - resnicks@netcom.com steve@axebbs.kludge.com FidoNet: 1:143/105
"Sometimes you're the windshield, sometimes you're the bug." - M. Knopfler
-----------------------------------------------------------------------------
Newsgroups: comp.os.msdos.programmer
From: brown@NCoast.ORG (Stan Brown)
Subject: Re: Novice question: how to boot from a bat file?
Organization: Oak Road Systems, Cleveland Ohio USA
Date: Mon, 31 Aug 1992 02:21:38 GMT

In article  [reference deleted because I don't want to embarrass the
poster publicly]

>>My problem is I don't know how to emulate the cntry-al-delete boot that
>>the user would normally type in to have these new files take effect.
>
>Since it seems to be a twice-a-week question, here is a uuencoded program
>that will do it:

[code deleted]

and, if you're running SMARTDRV or other write-behind disk caches, it
stands an excellent chance of trashing your hard disk.

There's a reason we have an FAQ list, folks, not just to reduce the number
of repetitive questions posted but also to reduce the number of
incomplete or (as in this case) dangerously incomplete answers posted.

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.  But when a topic
has been done to death, as this one was maybe two months ago, please
don't start all over with the old disinformation.
-- 
Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
"Self-esteem, n.  An erroneous appraisement."
"Self-evident, adj.  Evident to one's self and to nobody else."
                                               --Ambrose Bierce