HDTenEightyP/NetNews huggingface dataset:
From: P0LU000 <P0LU@UNB.CA>
Subject: RE: Using INT86x(): Problem solved
Organization: The University of New Brunswick
Date: Tue, 8 Sep 1992 14:36:46 GMT

Regarding my earlier problems with int86x...h

The reason why I can't get it to work is because I have to use
another routine to read the disk info: int86().  This, along with
correcting the structure (instead of using a long int variable),
fixed the problem I was having.  I solved this about two hours
after I posted the earlier program.        ogi

If any of you need the same type of routine, here is my C version
(original came from PC Magazine, July 1992, pg 496 written in
Pascal)


#include <stdio.h>
#include <dos.h>
#include <signal.h>
#include <process.h>

void main( int argc, char *argv[] );

int get_disk_serial( unsigned char diskno,
      char          *ser  );

int get_byte_form( unsigned char diskno,
       long int      *i );

void main( int  argc,
     char *argv[] )
{
 char ser[10];           // disk serial number
 int res;                // result of function call

 res = get_disk_serial( (unsigned char) 3, ser );
 if ( res == 0 ) {
  printf( "The serial number of drive C: is: %s\n", ser );
 } else {
  printf( "Call barfed. Big Bad Ugly Error.\n" );
 }

 return;
}

struct infobuffer
{
 int      infolevel;         // should be zero
 long int serial;            // serial number in byte form
 char     vol_label[11];     // volume label
 char     file_sys[8];       // file system
};

//
// I grabbed quite a bit of this procedure from:
//          PC Magazine, July 1992, page 496
// Written: 92/09/04
//
int get_disk_serial( unsigned char  diskno,
      char           ser[] )
{
 char     *hexdigits = "0123456789ABCDEF";
 int      res;
 struct infobuffer x;             // where we are putting info

 union REGS   inregs, outregs;

 inregs.h.ah = 0x69;     // DOS fcn call 69h : serial number code
 inregs.h.al = 0x00;     // read from disk, don't write!
 inregs.h.bl = diskno;   // read from disk number in diskno
 inregs.x.dx = (unsigned int) &x;       // data pointer

 res = int86( 0x21, &inregs, &outregs );
 if ( outregs.x.cflag ) {
  printf( "Little Fluffy took a round, better take him to the vet.\n" );
  return( 15 );
 }

 //*- Now long int variable serial should have disk serial number

 ser[0] = hexdigits[  x.serial >> 28 ];
 ser[1] = hexdigits[ (x.serial >> 24) & 0xf ];
 ser[2] = hexdigits[ (x.serial >> 20) & 0xf ];
 ser[3] = hexdigits[ (x.serial >> 16) & 0xf ];
 ser[4] = '-';
 ser[5] = hexdigits[ (x.serial >> 12) & 0xf ];
 ser[6] = hexdigits[ (x.serial >>  8) & 0xf ];
 ser[7] = hexdigits[ (x.serial >>  4) & 0xf ];
 ser[8] = hexdigits[ x.serial & 0xf ];
 ser[9] = '\0';

 return( 0 );
}


Newsgroups: comp.os.msdos.programmer
From: jle9162@zeus.tamu.edu (ECKHARDT, JASON LEE)
Subject: T8900 tech. info, 3270 emulation, more.
News-Software: VAX/VMS VNEWS 1.41    
Organization: Texas A&M University, Academic Computing Services
Distribution: usa
Date: Mon, 14 Sep 1992 20:19:00 GMT

 1. Does anybody have any example code for trident 8900 card? specifically
    bankswitching, and setting modes (w/o using BIOS).

 2. Is there a 3270 terminal emulator for the PC? 

 3. Is there a public domain windowing-form entry library for Turbo C?
    (I tried window Boss, but it only has the library for the small memory 
     model...I need one that works with compact model.)

thanks, jason.. please reply by mail to jle9162@venus.tamu.edu
From: ralf+@cs.cmu.edu (Ralf Brown)
Newsgroups: comp.os.msdos.programmer
Subject: Re: XMS memory manager for C/C++ needed
Date: 5 Sep 92 02:56:28 GMT
Article-I.D.: cs.Bu3465.33I.2
Organization: School of Computer Science, Carnegie Mellon

In article <1992Sep4.065429.25559@zooid.guild.org> ross@zooid.guild.org (Ross Ridge) writes:
}cambler@zeus.calpoly.edu (Christopher J. Ambler, Phish) writes:
}>I'm looking for an XMS memory manager package that can make XMS available
}>to the heap via malloc() or new calls transparently. Protected mode
}>interfaces do not qualify for my application.
}
}Protected mode interfaces are really your only choice to do this
}transparently.

You can do it at least semi-transparently in C++; there's a virtual array
class on SIMTEL20, though I forget the name.

}The problem is that XMS memory isn't in the 8086's addressing space,
}so you can't access it directly in real mode, only through handles and 
}XMS service requests.  It is in theory possible to write a compiler
}that could hide all this for you, and I believe MAC compilers do

It's already been done for EMS with a special pointer type (Zortech C and
I believe MS C 7.0), and shouldn't be much more complex for XMS.

-- 
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
Xref: sparky comp.os.msdos.programmer:9220 comp.databases:6650
Newsgroups: comp.os.msdos.programmer,comp.databases
Subject: Very good report writer?
From: regy106@csc.canterbury.ac.nz (John, Registry)
Date: 10 Sep 92 17:51:29 +1200
Organization: University of Canterbury, Christchurch, New Zealand

Hi,
	I am looking for a report writer.
	I have Borland's dBase IV 1.5, and although its report writer is not bad,
it is not as powerful as I would like.  I would rather get a specific report
writer that understands dBase files rather than buy and learn a new database 
product.  If somebody out there really thinks they know of the best thing 
since sliced bread, I am willing to have a look.
	I am running on a 386, with os/2 2.0 and have access to novell.  I am
very open to ideas.  It has to be a flexable report/form writer as I spend a
lot of time writing adhoc reports that change the day I write them.
Thanks for any info.

John
Xref: sparky comp.os.msdos.programmer:9235 comp.os.msdos.misc:5148
From: exuptr@exu.ericsson.se (exuptr@exu.ericsson.se)
Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
Subject: Re: Disk Drive Purchase?
Date: 10 Sep 92 16:50:31 GMT
Organization: Ericsson Network Systems, Inc.

In article <BuCBp5.1MF.2@cs.cmu.edu> ralf+@cs.cmu.edu (Ralf Brown) writes:
>From: ralf+@cs.cmu.edu (Ralf Brown)
>Subject: Re: Disk Drive Purchase?
>Date: 10 Sep 92 02:17:27 GMT

>In article <exuptr.458.716059101@exu.ericsson.se> exuptr@exu.ericsson.se (exuptr@exu.ericsson.se) writes:
>}In article <2aab4eed@ralf> Ralf.Brown@B.GP.CS.CMU.EDU writes:
>}Now this one makes sense.  Except that BIOS does not limit you to 1024
>}cylinders, that is DOS.  So theoretically you could have 2048 x 64 x 63.

>Sorry, but that is indeed a BIOS limit, since the BIOS only uses ten bits
>to specify the cylinder (there are a couple of BIOSes which use twelve
>bits, but they aren't "standard").  

Find me a 386 with bios that will not support a 1224 cylinder drive.

>DOS is simply using the standard BIOS
>interface--you could always write a device driver that knows about the
>two nonstandard cylinder bits if you have such a BIOS.

Which almost everyone does, which is why Disk Manager works and can format
things like the MAXTOR XT-4380.  I haven't seen a BIOS that cannot do this
since 1987.  Admittedly I stay away from older AT's and PS/2's.

Realistically, what machine today has this limitation?

 ----------------------------------------------------------------------------
    "This must be Thursday.  I never could get the hang of Thursdays"
                                                       - Douglas Adams
  - Patrick Taylor                                       (Arthur Dent)
    Ericsson Network Systems
    exuptr@exu.ericsson.se                       "Don't let the .se fool you"
    or exuptr@ZGNews.Lonestar.Org, exu.exuptr@memo.ericsson.se
Xref: sparky comp.os.msdos.programmer:9255 comp.lang.c:13491
From: frampton@vicuna.ocunix.on.ca (Steve Frampton)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: Pretty printer program.
Date: 11 Sep 92 02:46:03 GMT
Reply-To: frampton@vicuna.ocunix.on.ca
Followup-To: poster
Organization: Vicuna Systems, Kingston, ON (613) 547-5066

Hi everyone:

I was wondering -- is there a public domain or shareware program out 
there that will print my C source to my line printer with functions 
bolded, comments italicized, etc?

I'm not necessarily looking for a formatter, I prefer my own "style" of 
code and don't want anyone/thing messing with it.  But something to 
output the program to the printer in an intuitive fashion would be great!

Thanks in advance.  Please respond via e-mail as I do not have read 
access to these groups, I'll be more than happy to follow-up with a 
summary of replies received.

+-----------------------------------------------+--------------------+
| Steve Frampton - frampton@vicuna.ocunix.on.ca | Steve Frampton     |
| I collect postcards!  If you send me one from | 501-A Princess St. |
| your area, I'll send one in return.  Send to >| Kingston, Ontario  |
| (Don't forget both email and mailing address) | CANADA   K7L 1C3   |
+-----------------------------------------------+--------------------+
From: bu254@cleveland.Freenet.Edu (Stephen Groundwater)
Newsgroups: comp.os.msdos.programmer
Subject: Re: New and farcoreleft()
Date: 5 Sep 1992 03:45:24 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: bu254@cleveland.Freenet.Edu (Stephen Groundwater)
NNTP-Posting-Host: hela.ins.cwru.edu


In a previous article, wright@epx.cis.umn.edu (Mark Wright) says:

>In article <HOLLEN.92Sep3114500@peg.megatek.UUCP> hollen@megatek.UUCP (Dion Hollenbeck) writes:
>>In article <1992Sep3.134102.17553@news2.cis.umn.edu>
>>wright@epx.cis.umn.edu (Mark Wright) writes:
>>
>>Mark>      In a C++ program I've been writing, strategically placed
>>Mark>   farcoreleft()'s seem to be saying that my objects are not being
>>Mark>   de-allocated correctly when I 'destroy' them.  Should I worry about
>>Mark>   this, or is farcoreleft() designed for use with malloc()?  If so,
>>Mark>   is there a C++ function which will tell me how much mem. I have
>>Mark>   left?  I'm using Borland C++ v3.1.
>>
>>Yes it is designed for use with malloc().  It is probably working
>>correctly, you probably do not know how it is working.
>[...]
>>-- 
>>Dion Hollenbeck       UUCP: {uunet, ucsd, sun}!megatek!hollen
>>                      INTERNET:            hollen@megatek.com
>>Megatek Corporation  9645 Scranton Rd.  San Diego, Ca.  92121
>
>I don't think I stated my problem very clearly.  My concern is that allocating
>space with 'new' may confuse farcoreleft().  I know that combining C style 
>memory allocation routines (ie. malloc()) and C++ memory allocation routines
>(ie. new) will cause problems - I guess what I want to know is 'Is 
>farcorleft() C++ aware?'  Does farcoreleft() know about 'new', or is it
>specifically a C function.  And if so, is there a C++ version of farcoreleft()?
>
This problem does not occur, new is a function, just like any other, and
when it is called it uses the standard routines to get its memory. So
that:
buf=(char *)new char[100];
is functionally equivilent too, and is turned into eventually:
buf=(char *)malloc(100);
Well, you get the jist of it anyway. Your problem
is a non-problem. If you are really paranoid, you could define
a new
operator new () {}
for all your classes with your own memory allocation done there.

The thing that most concerns me is that you talk of malloc with farcoreleft
you better be sure you are using the large, compact or huge models there,
otherwise you should be using farmalloc (or equivilent in your compiler)
because otherwise you are allocating memory in the data segment, an area 
of memory that does not change size for farcoreleft, because the data 
segment is allocated when the program starts, and is dumped when the 
program stops, and doesn't change size when the program is running.
And the memory is allocated by the compiler with no reference to things
that are far.

Steve
From: jamshid@ut-emx.uucp (Jamshid Afshar)
Newsgroups: comp.os.msdos.programmer
Subject: Re: BC++ Far new()
Summary: if you need to cast, it's probably wrong; "new far char[100]"
Date: 10 Sep 92 19:44:06 GMT
Reply-To: jamshid@emx.utexas.edu
Organization: The University of Texas at Austin; Austin, Texas

In article <18j1t9INNbs3@usenet.INS.CWRU.Edu> bu254@cleveland.Freenet.Edu (Stephen Groundwater) writes:
>>Question : how can I call the far version of 'new()' from a small memory
>>           program ?
>
>char far* MyBuf;
>MyBuf=(char far *)new[100L];
>Voila, 100 bytes of far memory, the important bit is the L.

When I first saw this I thought it contained a syntax error because
you didn't specify the type (eg, "new int[100L]").  I'm still not sure
whether its legal but BC++ 3.1 does accept it.  The code is still
wrong, though, because BC++ assumes you're allocating 100 'int's.  The
fact that you had to cast should have tipped you off that something is
wrong with the code.  Unlike malloc(), 'new' always returns a pointer
of the correct type.
	char far* MyBuf = new char[100L]
	// calls 'void far* operator new(unsigned long)' in all memory models

I would recommend using a different, more explicit syntax, though:
	char far* MyBuf = new far char[100];
	// calls 'void far* operator new(unsigned long)' in small&medium,
	// calls 'void* operator new(size_t/*unsigned int*/)' in large&huge
	//   (pointers/heap are 'far' in compact, large and huge models) */

You can also use this syntax to allocate 'huge' objects (objects over
64K requiring 'huge' pointers):
	char huge* MyBuf = new huge char[80000];
	// always calls 'void far* operator new(unsigned long)'

Remember, though, that anytime you use the 'far' or 'huge' keywords,
you're using a non-portable (even to other MS-DOS compilers) syntax,
and that it isn't thoroughly documented (actually, I don't think this
'new' stuff is documented at all).  Compile with and heed all
warnings, and make sure you know what you're doing if you put in a
cast.  Also, BC++ 3.1 users, make sure you have the 'operator new()'
patches in BC31P1.ZIP from Simtel's BORLANDC directory.

Jamshid Afshar
jamshid@emx.utexas.edu
Newsgroups: comp.os.msdos.programmer
From: amichiel@rodan.acs.syr.edu (Allen J Michielsen)
Subject: Re: PRINT.EXE a binary file?
Date: Sat, 5 Sep 92 00:11:05 EDT


In@usenet.ucs.indiana.edu> yawei@bronze.ucs.indiana.edu (~{QG9p~}) writes:
>...
>PRINT.EXE via the DOS multiplex interrupt calls so that it can
>be printed in the background. Everything worked perfectly 
>until some bytes with values 0x0D or 0x1B sneaked into the files.

>It turned out that PRINT.EXE was only equiped to handle non-binary
>files! (This was confirmed after checking the manuals.) An 

I didn't see it my manuals either, but many dos level programs intended
for text files, have a hidden (or poorly documented) /b switch for
use with binary files.  Try print /b file.ext

al
--
Al. Michielsen, Crouse Hinds School of Management, Syracuse University
 InterNet: amichiel@mailbox.syr.edu  amichiel@sunrise.acs.syr.edu
 Bitnet: AMICHIEL@SUNRISE 
Newsgroups: comp.os.msdos.programmer
From: gin503@cdc835.cdc.polimi.it (Maurizio Sartori Masar)
Subject: Re: BC++ Far new()
Date: Wed, 9 Sep 1992 07:49:59 GMT
Organization: C.d.C., Politecnico di Milano

bu254@cleveland.Freenet.Edu (Stephen Groundwater) writes:

>
>char far *MyBuf;
>MyBuf=(char far *)new[100L];
>
>Voila, 100 bytes of far memory, the important bit is the L.
>
>Steve>

Look this program :

/**************************/
#include <stdio.h>

void far * operator new( unsigned long size );

int main ()
   {
   char far * alpcStringArray [10];

   for (int i = 0; i < 10; i++)
      {
      alpcStringArray[i] = new (char[10000L]);

      printf ("Array %i is %Fp\n", i, alpcStringArray[i]);
      }

   return (0);
   }
/**************************/

Its output is :

Array 0 is 1F2F:0792
Array 1 is 1F2F:2EA6
Array 2 is 1F2F:55BA
Array 3 is 1F2F:7CCE
Array 4 is 1F2F:A3E2
Array 5 is 1F2F:CAF6
Array 6 is 1F2F:0000
Array 7 is 1F2F:0000
Array 8 is 1F2F:0000
Array 9 is 1F2F:0000


So it uses near malloc() !

How can I call far new() ??

					Maurizio

--
  ))    ))    ))      ))))))    ))    )))))))      Maurizio Sartori Masar
  ))))))))  ))  ))   ))))))   ))  ))  ))    ))   gin503@cdc835.cdc.polimi.it
  )) )) )) ))))))))       )) )))))))) ))))))       Politecnico di Milano
  ))    )) ))    ))  ))))))  ))    )) ))    ))            ITALY
From: CHEGC@LURE.LATROBE.EDU.AU (CROSS,Graeme)
Newsgroups: comp.os.msdos.programmer
Subject: Floating point conversion in asm
Date: 14 Sep 92 04:59:13 GMT
Organization: La Trobe University
X-News-Reader: VMS NEWS 1.24


I am trying to convert a 32 bit floating point number (what Turbo Pascal calls
SINGLE type) to an ASCIIZ string in 8086 assembler. I have the format of the
number: 1 bit sign, 8 bit exponent, 23 bit mantissa, but have not been able to
convert a sample number to its real value - not even manually.
Would someone be so kind as to give me some pointers on decoding 32-bit floating
point numbers, in assembler? Information on determining the value, or even
source code, would be greatly appreciated.

Thanks.

Graeme Cross 		| chegc@lure.latrobe.edu.au
Dept of Chemistry       | One day, by accident or magic, a sig will  
LaTrobe Uni, Bundoora   | just mysteriously appear here, sparing me  
Victoria, Australia     | the task of creating my own clever sig...
From: bu254@cleveland.Freenet.Edu (Stephen Groundwater)
Newsgroups: comp.os.msdos.programmer
Subject: Re: BC++ Far new()
Date: 8 Sep 1992 19:54:45 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: bu254@cleveland.Freenet.Edu (Stephen Groundwater)
NNTP-Posting-Host: slc5.ins.cwru.edu


In a previous article, gin503@cdc835.cdc.polimi.it (Maurizio Sartori Masar) says:

>
>From Borland C++ 3.00 Run Time Library :
>
>/* filename - new.cpp */
>void *operator new( size_t size );              //    use  malloc(size)
>
>/* filename - newf.cpp */
>void far * operator new( unsigned long size )   //  use  farmalloc(size)
>
>/* filename - CS.LIB */
>NEW             size = 83
>        operator new(unsigned int)        set_new_handler(void(near*)())
>        __new_handler
>NEWF            size = 77
>        operator new(unsigned long)
>
>
>
>Question : how can I call the far version of 'new()' from a small memory
>           program ?
>
char far *MyBuf;
MyBuf=(char far *)new(100L);

Voila, 100 bytes of far memory, the important bit is the L.

Steve>
Newsgroups: comp.os.msdos.programmer
From: fox@rei.com (Fuzzy Fox)
Subject: Re: BCC 2.0: What is the right way to use make & tlink?
Date: Fri, 4 Sep 1992 22:46:43 GMT
Organization: Recognition Equipment, Inc.

levin@world.std.com (Levin F Magruder) writes:

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

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

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

>worked until the command line overflowed.

You will always run into this problem anytime you try to put $(OBJECTS)
onto a command line.

A work-around:  Create a library and have each source file inserts its
object file into the library as part of its build action.  Have the exe
file depend on the object files, but have it link from the library.
Don't let the library get out of sync with the objects.

-- 
#ifdef TRUE         | Fuzzy Fox                  fuzzy@netcom.com
#define  TRUE   0   | a.k.a. David DeSimone      an207@cleveland.freenet.edu
#define  FALSE  1   |
#endif              |         How's my posting?  Call 1-800-ALT-FLAME
Newsgroups: comp.os.msdos.programmer
From: rbt@tous.oau.org (Robert B. Tate)
Subject: Re: Recommendation on editor for C / Brief only $99 now
Organization: Tate Enterprises
Distribution: na
Date: Mon, 7 Sep 1992 21:08:39 GMT

In article <1992Sep7.053018.21433@news2.cis.umn.edu> wright@epx.cis.umn.edu (Mark Wright) writes:
>In article <Bu4BEy.91@world.std.com> levin@world.std.com (Levin F Magruder) writes:

>3) The package you receive will not find the matching brace for you , but a
>   macro is available from the Systems Solutions BBS (oh - maybe that's gone
>   now that Borland took over, if so just mail me) which will find it
>   automatically.


Is the BBS still up? (what phone number?) Is there any place on the net
where some macros, etc are keept for brief?

I just got my copy from borland and would like to redo the key layout to
be like an editor I already know. Then I can add on the new goodies that
brief has. That way I don't have to start all over again learning Yet
Another Editor (YAE). I have heard that it has been done, but haven't
seen an example of it yet.



-- 
 rbt@tous.OAU.ORG  (Robert B. Tate)       | A little knowledge is a dangerous
 {ucf-cs,peora,tarpit}!tous!rbt           | thing. Any less can kill you.
Newsgroups: comp.os.msdos.programmer
From: @gemstone.inel.gov ()
Subject: Determining Conventional Memory
Keywords: Total Bytes Memory
Organization: Idaho National Engineering Laboratory, Idaho Falls, Idaho
Date: Thu, 10 Sep 92 22:46:17 GMT


I am having a difficult time determining the total conventional memory value
as reported by CHKDSK and MEM.  MEM reports both total conventional memory 
and bytes available to DOS.  I know that the memory available to DOS can be
determined with BIOS interrupt 12h.  But I'm not sure about total conventional
memory.  Is this value calculated, or is there a service available which will
report this value?  Perhaps in the mysterious list of lists?  Can someone 
point me in the right direction?  Thanks for any help. 


-------------------------------------------------------------------------------
 Kevin Hemsley                             |
 Information & Technical Security          | If you think that you have someone
 Idaho National Engineering Laboratory     | eating out of your hand, it's a
 (208) 526-9322                            | good idea to count your fingers!
 kev@inel.gov                              |
-------------------------------------------------------------------------------
========== long legal disclaimer follows, press n to skip ===========

Neither the United States Government or the Idaho National Engineering
Laboratory or any of their employees, makes any warranty, whatsoever,
implied, or assumes any legal liability or responsibility regarding any
information, disclosed, or represents that its use would not infringe
privately owned rights.  No specific reference constitutes or implies
endorsement, recommendation, or favoring by the United States
Government or the Idaho National Engineering Laboratory.  The views and
opinions expressed herein do not necessarily reflect those of the
United States Government or the Idaho National Engineering Laboratory,
and shall not be used for advertising or product endorsement purposes.
Newsgroups: comp.os.msdos.programmer