HDTenEightyP/NetNews huggingface dataset:
From: frisk@complex.is (Fridrik Skulason)
Newsgroups: comp.os.msdos.programmer
Subject: converting filenames to uppercase..
Date: 11 Nov 92 19:32:49 GMT
Organization: Frisk Software International, Iceland

Does anyone know of a foolproof way to determine how a particular version
of DOS converts filenames to upper case ?

The problem arises when a file name uses characters in the range 128-255.
If you try to create a file with a name that contains a character in that
range, DOS attempts to convert it to the closest uppercase character.

For DOS 3.3 and above it is easy to determine what table DOS uses, by using
the INT 21H, AX= 6504 function.  DOS 4 and 5 also offers a function, INT 21H,
AX=6520, 6521 and AX=6522,

I guess I could use INT 2F, AX=1213 or 1211 for DOS 3.0-3.2, but (and now
comes the real problem)  Can anyone suggest a method which works with DOS 2...


-frisk
Xref: sparky comp.os.msdos.programmer:10629 comp.sys.ibm.pc.programmer:584
From: fazc016@hq.dla.mil (Don Costello)
Newsgroups: dla.pc,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Subject: Floppy Drive Readiness
Date: 13 Nov 92 17:30:23 GMT
Followup-To: dla.pc
Organization: HQ Defense Logistics Agency/DASC, Cameron Station, VA
X-Newsreader: Tin 1.1 PL4


Is there a decent way to check the "readiness" of a floppy drive in
Turbo C2.0?

I wrote an install program that copies files from a diskette and if the
drive door is open, or the drive is empty, I get the ever-so-inelegant 
"Abort, Retry, Fail?" message.  Not only is it annoying, it screws up my
CXL screens.

The Turbo C help (and some books I've read) say to call "getcurdir" for
the floppy drive.  If an error occurs, getcurdir is supposed to return
-1.  Well, it sort of does but only after you select "Fail".

4dos will tell me the drive door is not closed, or the drive
is empty but I can't seem to get my C program to trap the error before
DOS (4DOS) does (COMMAND.COM also gets in the way).

I've seen "drvrdy.com" from PC magazine (without source, of course) but
I need to check the drive status without calling an external program.

If anyone has done this in the past, please e-mail me the solution.
I'll post a summary if necessary.

Thanks in advance -- don
-- 
+------------------------------------+---------------------------+
| Don Costello, DASC-ZSC             |  It's hard to cram this   |
| DLA Cameron Station, VA            |  signature into just 4    |
| TEL: (703) 274-7215  AV: 284-7215  |  lines!!!                 | 
Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Environment size hack in DOS 5?
Summary: Don't tell me about SHELL= in CONFIG.SYS!
Organization: Queen's University
Date: Fri, 13 Nov 1992 05:01:45 GMT

In article <1992Nov12.234502.22273@midway.uchicago.edu> pynq@quads.uchicago.edu (George Jetson) writes:
>BTW, patching COMMAND.COM *is* the only correct solution.  CONFIG.SYS
>only affects the first loaded copy of COMMAND.COM.  Further, there are
>various kludge solutions floating around, e.g., ENV.ARC (from 1988 [!]) in
>MSDOS.SYSUTL on Simtel, et al, but I am not interested in kludge solutions.

A simpler way is just to create a variable called FILLER that takes up lots 
of space in your first loaded copy of COMMAND.COM; when you need space in a 
child shell, get rid of FILLER.

e.g. Use the option to COMMAND in the SHELL= line of config.sys to get a 
great big environment block, then in autoexec.bat 

  SET FILLER=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and in a child shell

  SET FILLER=

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: sasdgh@cedar.unx.sas.com (Glenn Horton)
Subject: I need code to access serial port
Originator: sasdgh@cedar.unx.sas.com
Date: Thu, 12 Nov 1992 12:46:07 GMT
Organization: SAS Institute Inc.


	I am doing a project for school that will need to do I/O 
through the serial port on a MS-DOS PC. I would like to use Quick C
but I can't find any info on how to use the serial port from Quick C.
If anyone can help that would be great. Please send e-mail and I'll
summarize if there is any interest.
-- 

Glenn Horton            SAS Institute Inc.
sasdgh@unx.sas.com      919-677-8000 x6640
From: au240@cleveland.Freenet.Edu (Ari Pitkanen)
Newsgroups: comp.os.msdos.programmer
Subject: Batch problem
Date: 12 Nov 1992 19:18:03 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: au240@cleveland.Freenet.Edu (Ari Pitkanen)
NNTP-Posting-Host: hela.ins.cwru.edu



How do I pass '%%f' to 'DoIt'?  This approach don't work.

---
:Main
cd scene
for %%f in (*.*) do goto DoIt   REM copy filename to %%f
goto End

:DoIt
cd..
trace scene\%%f                 REM %%f don't contain the filename :(
copy scene\%%f traced
del scene\%%f
cd..
goto Main

:End
cd..

---

Ari

-- 
Ari Pitkanen : au240@cleveland.freenet.edu
From: curtisn@SAS (Curtis Nelson)
Newsgroups: comp.os.msdos.programmer
Subject: HELP - Can't access SVGA from within C
Date: 10 Nov 92 18:03:42 GMT
Organization: BYU

Hello!
I have a question/problem that has been bugging me now for a coupla' days.  
I use MSC 5.0 at work and I was able to write a graphics program that used 
MRES256 mode ( 320x200 ) in 256 color.  At home I use Borland C 3.0 and I am 
completely LOST!  I don't even see that mode listed!  The best I can do is 
VGA w/16 colors!  I tried using the IBM8514 driver, but that dodn't seem to 
do a thing!   _What_ am I missing here!   Also, how would I go about writing 
graphics routines in SVGA?  Do i need a new BGI file?  If so, where can I 
find one?  
I would REALLY appreciate ANY help.  If it's good enough, maybee I'll name 
my firstborn after you.

Thanks!
Curtis Nelson
curtisn@sasb.byu.edu
Newsgroups: comp.os.msdos.programmer
From: silvia@rcf.rsmas.miami.edu
Subject: DOS and Windows
Reply-To: silvia@rcf.rsmas.miami.edu
Organization: RSMAS
Date: Sun, 8 Nov 92 17:05:52 GMT

I have Dos program that detects Microsoft WINDOWS in order to make processor pauses. But this program access the modem in oder to wait for calls. If it is left running and you switch to say Procomm to callout it will take away teh access to COM 2 from my app. What I would liek to know is: is it possible for a DOS app to detect when one uses Alt-TAB in windows? This is in order to tell the program to re-initialize its access to the modem and regain control over it.

Any ideas? Or suggestions?


           Manolo
Newsgroups: comp.os.msdos.programmer
From: yawei@bronze.ucs.indiana.edu (~{QG9p~})
Subject: Re: Batch problem
Organization: Indiana University
Date: Sat, 14 Nov 1992 02:45:59 GMT

In article <1dualbINN52t@usenet.INS.CWRU.Edu> au240@cleveland.Freenet.Edu (Ari Pitkanen) writes:

>How do I pass '%%f' to 'DoIt'?  This approach don't work.

Others have suggested two-file solutions. Here's a one-file
solution:

[I justed added one line at the beginning, and did some changes
with the for line and the lines with %%f. Not responsible for
any other syntax problems. :-) ]

  Ya-Gui Wei

--------------
if not /%1==/ goto DoIt
:Main
cd scene
for %%f in (*.*) do call %0 %%f   REM copy filename to %%f
goto End

:DoIt
cd..
trace scene\%1                 REM %1 contains each instance of %%f in
                                   recursive calls
copy scene\%1 traced
del scene\%1
cd..
goto Main

:End
cd..

Newsgroups: comp.os.msdos.programmer
From: keithp@merlin.dev.cdx.mot.com (Keith L. Petry)
Subject: Re: 386 Assembler Question - Easy one...
Originator: keithp@melkur.dev.cdx.mot.com
Organization: Motorola Codex, Canton, MA
Date: Thu, 12 Nov 1992 14:53:42 GMT


In article <1992Nov11.114831.6643@ufhx1.ufh.ac.za>, cssjs2@ufhx1.ufh.ac.za (Mr I Scheepers) writes:
|> In <1992Nov9.162931.1@camins.camosun.bc.ca> morley@camins.camosun.bc.ca writes:
|> >In 386 assembler I need to fill an extended register with 4 copies
|> >of the same byte.  Right now I'm using the following:
|> 
|> >   mov  al,VALUE
|> >   mov  ah,VALUE
|> >   shl  eax,16
|> >   mov  al,VALUE
|> >   mov  ah,VALUE
|> 
|> >I'm curious... is there a better/faster way to stuff the register?
|> 
|> How about:
|> 	mov al,VALUE
|> 	mov ah,al
|> 	mov eax,ax
         ^
         ----------- This last statement does nothing eax and ax 
                      are the same register.

How about :

    mov bl, VALUE
    mov al, bl
    mov ah, bl
    shl eax, ax
    mov al, bl
    mov ah, bl

This will be faster because you have your data in the bl register.
Instead of doing a memory fetch 4 times, you only memory fetch once.
And all the actions occur internal to the x86 chip. 

Let me just say one other thing though. If you have a 486 then the first
answer is as good as mine, because the 486 has an internal cache and this
is as good as using a internal register. If you are running on a 386 my
answer is faster.

Keith

Newsgroups: comp.os.msdos.programmer,comp.lang.c++,comp.lang.c
From: sl14@crux3.cit.cornell.edu (Stephen Lee)
Subject: 'new'ing >64K Objects in BC++
Organization: Fantasy Zone Ithaca, Inc.
Date: Sun, 8 Nov 92 18:18:52 GMT

Is there an equivalent of farmalloc() in BC++ for 'new'?  It seems
that the BC++ uses size_t to calculate the size of the memory chunk
it's getting with 'new', thus limiting it to 64K-1 in size.  (size_t,
I believe, is unsigned int in BC++)

Given the fact that BC++ uses a signed int for an array index, and
you'll find maintaining a large array is difficult.  Perhaps I should
switch to djgpp :(

Stephen

P.S.  What's the difference between djgpp and g++ other than that
they're maintained by different people?  The g++ source have files
like something.com in it so is it possible to compile g++ under DOS?
--
Stephen Lee
Internet: sl14@crux2.cit.cornell.edu
Lines: 24
Date: Thu, 12 Nov 92 16:57:19 MST
Newsgroups: comp.os.msdos.programmer
From: $dougn@sasb.byu.edu (Douglas R. Nebeker - MIS_SAS)
Subject: Capturing Mouse Interrupts
Keywords: mouse capture interrupt IRQ
Organization: Brigham Young University

Help!

I am trying to hook the mouse interrupts so that each time the mouse is 
moved, my routine can be notified.  I've tried hooking Int 33h, but found 
that didn't work since Int 33h is only called to initialize the mouse and/or 
driver.  Int 33h, AX=24h returns the IRQ number and tells me that my mouse 
is using IRQ 4 (I have comfirmed this with other utilities).

However, when I hook IRQ4, the mouse still works great, but my routine is 
never notified of any mouse movements.  When I check those routines that 
show the owner of the different IRQs, they DON'T show my program (but they 
DO show my program owning other interrupts that I've hooked in the same way).

Now...could it be that everytime I go into a program that uses the mouse 
that the program itself initializes the mouse, which "unhooks" my process 
from the interrupt chain?  If this is so, how can I keep my mouse routine 
hooked?!?


Thanks in advance for ANY help!

____

Douglas R. Nebeker         Internet: $dougn@sasb.byu.edu
Newsgroups: comp.os.msdos.programmer,comp.os.os2.programmer,comp.sys.ibm.pc.programmer,alt.msdos.programmer
From: mkd@cbnewsj.cb.att.com (mark.k.darby)
Subject: MSC 6.00A time() function use.....HELP!
Organization: AT&T
Distribution: na
Date: Fri, 6 Nov 1992 18:19:37 GMT


HELP!!!

I have an application where I need to use the time() function in the
time.h include file for MSC 6.00A. I need to be able to compile the source for
both DOS and OS/2.

From what I can see in the documentation, there's little or no
sample source from which to draw on to correctly call this function
and store the return value.

I have tried what I believe to be every plausible possibility however
I seem to never be able to finish the compile.  However, since I am not
a C expert by any means, I don't know that for certain.

Does anybody have any real-live examples of how to use this function?

If you've got a sample, please include any variable declarations
and #include statements that are in the source file.

Please respond by e-mail, and a dose of large THANKS in advance for
any help given!

Mark K. Darby
mkd@mtung.att.com / mkd@mtung.lincroftnj.ncr.com

Newsgroups: comp.os.msdos.programmer
From: hutch@bellman.lanl.gov (John Hutchinson)
Subject: Re: Compuserve costs (was:  Microsoft's ...)
Reply-To: hutch@bellman.lanl.gov
Organization: Los Alamos National Laboratory
Date: Thu, 12 Nov 1992 17:52:24 GMT

For those looking for a less expensive, international online service, you
might want to consider GEnie.  I dumped CIS in favor of GEnie long ago, 
primarily due to the big $$$ delta between the two.  GEnie Star*Services
costs a flat $5.95 per month (or is that $4.95?) and for that you get
unlimited mail privileges and a host of other standard features.  The
computer roundtables (forums, software libraries, etc) and other specialized
areas of interest cost you $5.95 per hour (evenings/weekends/holidays) at
300/1200/2400 baud.  And their automated telecomm package, Aladdin, is free
and is available in PC, Atari ST, Mac and Amiga versions.  It's worth a
look, anyway.  I can dig up the toll free 800 number which you can dial up
for a free trial run if anyone wants it.

BTW, I'm not affiliated with GEnie in any way... just a happy customer.
---

___________________________ John "HUTCH" Hutchinson _________________________
_________________ Fair Dinkum Technologies     Member - IAAD  _______________
________________ "No worries, mate... it's from Fair Dinkum!" _______________
____________ email: hutch@bellman.lanl.gov   GEnie: FAIR-DINKUM _____________
From: jdsmith@novell.com (Doug Smith)
Newsgroups: comp.os.msdos.programmer
Subject: DPMI Specification
Date: 12 Nov 92 20:22:48 GMT
Distribution: usa
Organization: Novell NPD

I have a friend who wants to write DPMI compliant software in assembly 
language without the use of a DOS extender such as PharLap.  Does anyone 
know of a good book or another source of information on how this might be 
done?

Doug Smith
Novell NPD
jdsmith@novell.com
From: reeves@rocky1 (Malcolm Reeves)
Newsgroups: comp.os.msdos.programmer
Subject: Re: fread-inf >= 64K in Borland C++
Date: 10 Nov 92 02:12:55 GMT
Reply-To: reeves@rocky1
Organization: University of Saskatchewan

From article <67760001@acf3.NYU.EDU>, by gans@acf3.NYU.EDU (gans):
> Bill Denton writes:
>>/* acf3:comp.os.msdos.programmer / bill@sees.bangor.ac.uk (Bill Denton (AD)) /  4:55 am  Nov  9, 1992 */
> When I try to fread 64K or more in Borland C the PC locks up. This occurs with
>>all memory models and with version 2.0 and 3.0. Is this serious bug fixed in
>>version 3.1 ? How do I fix it, without the obvious, but unsatisifactory, solution of reading the data in chunks smaller the 64K ?
>>

I suspect the problem is not the fread() but the structure you are freading
into. In Borland C you can't have a structure bigger than 64K even using
the large and huge memory models. The same applies to MSC. I don't know of
an effective work around other than to read in 64K chunks.


--
------------------------------------------------------------------------------
Malcolm Reeves, Geological Engineering, University of Saskatchewan, Saskatoon,
SK, S7N 0W0 aka reeves@rocky1.usask.ca aka reeves@dvinci.usask.ca
------------------------------------------------------------------------------
From: hhochhei@jade.tufts.edu (Harry S. Hochheiser)
Newsgroups: comp.os.msdos.programmer
Subject: Exceptions/Error Codes in TD386
Summary: What do these error codes mean?
Keywords: TD386, TASM, Exceptions/Error Codes
Date: 9 Nov 92 17:27:08 GMT
Followup-To: comp.os.msdos.programmer
Distribution: usa
Organization: Tufts University - Medford, MA


I've run into a bit of a problem while attempting to debug a TSR using
TD386.  The debugger has responded to me with messages such as: 

"Exception xx, Error Code 0",

with xx being 6 and 13 at various times.

According to the Turbo Debugger manual, Exceptions are due to illegal
opcodes, and they are described in the "Intel Processor
Documentation".

The program is written in assembler code, and assembled using TASM.

My questions:
	1) what do these codes mean?
	2) what documentation is being referred to by "Intel Processor
Documentation"?
	3) Why would TASM output something that may be an illegal
opcode?

Any assistance would be appreciated.  Please respond by e-mail, and
I'll summarize if needed...(of course, apologies if any of these are
FAQs).

-------------------------------
Harry Hochheiser                                 harry@jade.tufts.edu
Tufts University, Rehabilitation Medicine     hhochhei@jade.tufts.edu
75 Kneeland Street, 5th floor                 (617)956-5036
Boston MA 02111
From: pshuang@zurich.ai.mit.edu (Ping Huang)
Newsgroups: comp.os.msdos.programmer
Subject: Re: way to power off my PC.
Date: 5 Nov 92 19:40:14
Organization: M.I.T. Artificial Intelligence Lab.
NNTP-Posting-Host: freeside.ai.mit.edu
In-reply-to: a1001032@cdf.toronto.edu's message of Wed, 4 Nov 1992 22:17:48 GMT

In article <1992Nov4.221748.29322@cdf.toronto.edu> a1001032@cdf.toronto.edu (Fiona Wong) writes:

 > A crazy question. Can I power off my PC automatically using C
 > or assembly programs? :-) Assume any hardware necessary is available..

While the standard PC architecture does not provide a way for it to
power itself off (unlike many Macintosh models, where choosing
"Shutdown" from the Finder will power the machine off), if customized
hardware is available, it should be easy to make this work. Basic TLL
logic should be able to detect when the data lines on the printer port
are raised, so you only need to write a program to output data to the
printer port and the customized hardware can kill the power.

--
| 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: oldach@Informatik.TU-Muenchen.DE (Oliver Oldach)
Subject: Re: way to power off my PC.
Originator: oldach@hphalle6i.informatik.tu-muenchen.de
Organization: Technische Universitaet Muenchen, Germany
Date: Fri, 6 Nov 1992 11:31:05 GMT
Distribution: world 


Hi Fiona, 

all you need is any means to signal any outside hardware you want to 
pull the plug! You could use a special I/O card using the IC8255 chip
to provide you with extra ports, but much easier would be if you 
use one of your com ports and utilize i.e. the DSR (data set ready) line.
The state of the line can be controlled directly by setting/resetting 
the corresponding bits at the I/O port adress.

The outside hardware could probably be realized with a couple of resistors,
a transistor and a relay for switching the computer off.

 
Oliver



Newsgroups: comp.os.msdos.programmer
From: reindorf@us-es.sel.de (Charles Reindorf)
Subject: Re: 'new'ing >64K Objects in BC++
Organization: SEL-Alcatel Line Transmission Systems Dept. US/ES
Date: Wed, 11 Nov 92 10:58:17 GMT

In article <83366@ut-emx.uucp>, jamshid@ut-emx.uucp (Jamshid Afshar) writes:
|>
|> [ etc ]
|>
|> Maybe.  At least then you can write real C code without relying on
|> compiler extensions.  Btw, PharLap sells a DOS Extender that works
|> with BC++ or MSC.  I believe that a 16-bit Extender allows you to
|> access all your machine's memory (up to 16MB), but size_t and int are
|> still 16-bits, so each object is limited to 64K.  A 32-bit Extender
|> (like the one in DJGPP) makes them 32-bits so there are no 64K limits.
|> 

At this stage it should be pointed out that you need more than a 32-bit
extender to get rid of the annoying DOS limitations. You need a compiler
which generates code using 32-bit addresses in a flat addressing structure
(in protected mode). Currently, for DOS, this is the Zortech compiler, which
I personally have not used but which people say is good. It also has the 
necassary DOS extenders.

On the other hand, a 16-bit DOS extender can generally be used with code generated
by a normal 16-bit compiler and uses some mind-boggling jiggery-pokery to get it to
work.

|> [ etc ]
|> 
|> Jamshid Afshar
|> jamshid@emx.utexas.edu
|> 
|> 
|> 
Newsgroups: comp.os.msdos.programmer
From: s2942275@techst02.technion.ac.il (Yaniv Golan)
Subject: reading the joystick
Reply-To: s2942275@techst02.technion.ac.il (Yaniv Golan)
Organization: Technion
Date: Sun, 8 Nov 1992 11:55:33 GMT

I need to read the joystick X,Y values and then buttons state. Is there
any standard way to do this? How can I detect if the joystick is 
connected at the port?

Thanks,

Yaniv Golan



-- 
E-Mail : s2942275@techst02.technion.ac.il
Newsgroups: comp.os.msdos.programmer
From: oauld@ponder.csci.unt.edu (orion okotu auld)
Subject: Re: COMPILING SPEED
Organization: University of North Texas
Date: Fri, 13 Nov 1992 17:20:56 GMT

In <1992Nov12.201534.17928@prism.poly.edu> ssnyder@prism.poly.edu (Sharon Snyder) writes:

>Maybe the person who started comparing TP to C forgot to mention
>a couple of important facts:
>1. Pascal is a 1-pass compiler......of course it's faster than MOST/ANY(?)
>   2-pass compiler (like C)
>2. Pascal, because it is 1-pass has limitations that C does not have.  Any
>   extensions to Pascal to improve the language have had to make "weird"
>   syntax demands.  

You can compile C in one pass.  I don't see where you can assume that Turbo
C is a two-pass compiler.  Further, the Borland Rep said that 90% of athe
speed difference between the two compilers is due to precompiled headers
and the advantages of the .TPU format (in eliminating the link step).

        --Orion


Newsgroups: comp.os.msdos.programmer
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: What is MicroSoft's usenet address?
Organization: Queen's University
Date: Tue, 10 Nov 1992 16:05:29 GMT

In article <1dj8itINN6ru@matt.ksu.ksu.edu> danodom@matt.ksu.ksu.edu (Dan Odom) writes:
>I've found another corporation that behaves this way: Borland.
>If you send mail to customer-support@borland.com, they send you
>a message saying that they don't offer support on the Internet and
>you'll have to ask them on Compu$erve.  What a rip!

It's just inefficient for them to offer tech support by email.  If you ask 
your question in an open forum (like Compuserve or Usenet), then lots of 
other people will see your question and their answer.  

I suspect they'd be quite happy to have a tech support forum on Usenet, if 
it could be demonstrated that

 a) There'd be no objections to "commercial" use.
 b) There's the right kind of audience here to justify it.

I don't think a) is a problem, because there are several other companies 
providing tech support this way.  I think b) is the big problem:  the Usenet 
audience is strongly biased towards Unix users, and Borland doesn't do Unix;
it's strongly biased towards academic users, and Borland doesn't make money 
from them; and it's smaller than the Compuserve audience.

For example, the traffic on BPROGA, the Compuserve forum dealing with Turbo 
Pascal, is at least 10 or 20 times heavier than the traffic on 
comp.lang.pascal, the closest Usenet equivalent.  (Comp.lang.pascal also has 
discussion of other Pascals, but TP dominates the traffic there, so it's not 
a bad comparison.)

Compuserve isn't that expensive; if you live in a big city so that it's a 
local call, and you use a session automator, you can get a lot of 
information for $5/month.  If you can't afford to spend $5/month, then the 
sad truth is that Borland probably isn't interested in helping you.  
They aren't helping you out of some noble feeling that since they sold you 
something they should support it; they help you because they hope to sell 
you something else.

Duncan Murdoch
dmurdoch@mast.queensu.ca
Newsgroups: comp.os.msdos.programmer,comp.msdos.programmer,comp.os.ms-windows.programmer.tools