HDTenEightyP/NetNews huggingface dataset:
From: gin503@cdc835.cdc.polimi.it (Maurizio Sartori Masar)
Subject: BC++ far new(): Results
Date: Fri, 11 Sep 1992 09:04:41 GMT
Organization: C.d.C., Politecnico di Milano


Thanks to all who replyed.


This is what I've discovered about using 'new' in small memory model with
Borland C++.


/***************************************/
/* Uncomment the Case you want examine */
/***************************************/

//                                  // Case | Class | New  |  Result
//                                  //      |  Def  | Call |
//                                  // ----------------------------------------
//#define FOO_DEF        FOO        //  1   |  near |      |
//#define FOO_NEW        FOO        //  1   |       | near |  near alloc
//#define FOO_DEF   far  FOO        //  2   |  far  |      |
//#define FOO_NEW        FOO        //  2   |       | near |  near alloc
//#define FOO_DEF        FOO        //  3   |  near |      |
//#define FOO_NEW   far  FOO        //  3   |       | far  |  Compile error
//#define FOO_DEF   far  FOO        //  4   |  far  |      |
//#define FOO_NEW   far  FOO        //  4   |       | far  |  far  alloc
//#define FOO_DEF   far  FOO        //  5   |  far  |      |
//#define FOO_NEW  (far  FOO)       //  5   |       | far  |  Compile Error

#include <stdio.h>

class FOO_DEF
   {
   char cFoo [10000];
   };  /* end-class FOO */

int main ()
   {
   FOO far * alpFoo [10];

   for (int i = 0; i < 10; i++)
      {
      alpFoo[i] = new FOO_NEW;

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


/****************************/

Results: If you declare a class as 'far', you can alloc it 'near' or 'far'
         as you want.
         If you declare it 'near' you must alloc it 'near'.

Note: Don't use parentesis with the 'new' operator: Compiler error.


						Maurizio

--
  ))    ))    ))      ))))))    ))    )))))))      Maurizio Sartori Masar
  ))))))))  ))  ))   ))))))   ))  ))  ))    ))   gin503@cdc835.cdc.polimi.it
  )) )) )) ))))))))       )) )))))))) ))))))       Politecnico di Milano
  ))    )) ))    ))  ))))))  ))    )) ))    ))            ITALY
Newsgroups: comp.os.msdos.programmer,comp.lang.c
From: zzang@stat.ufl.edu (Zhuo Zang)
Subject: Re: BC++2.0 lseek problem(ALSO:lseek() question)
Originator: zzang@manta
Organization: University of Florida
Distribution: usa
Date: Sun, 13 Sep 92 01:14:28 GMT

Hello,
I have a typo in the code, so there is no
question in comp.lang.c .
the bug in BC++2.0 is still unsolved.

In article <1992Sep12.235241.23213@eng.ufl.edu> zzang@stat.ufl.edu (Zhuo Zang) writes:
>Hello,
>the following program using lseek will
>give different results in BC++2.0 than
>that of in UNIX.
>the BC++2.0 will print the last character twice.
>
>------- foo.c ----------
>/* use bcc -DMSDOS foo.c to compile in BC++i
>   use cc foo.c to compile under UNIX */
>#include <stdio.h>
>#include <fcntl.h>
>#ifdef MSDOS 
>#include <io.h>
>#else
>#include <sys/file.h>
>#endif
>
>char *sp, buf[BUFSIZ];
>int fd;
>int get(int fd, long pos, char *buf, int n);
>
>int main()
>{
>  sp = buf;
>  fd = open("foo.c", O_RDONLY, 0);
>  get(fd, 3, sp, 20);
>/* I have question here, where does the sp point now? 
>   please notice the assignment sp = '\0', and the output
there is a typo here, should be *sp = '\0', sorry.
no question! :-)
>   of the program */
>  puts(sp);
>  sp = '\0';
>  puts(buf);
>  return 0;
>}
>
>int get(int fd, long pos, char *buf, int n)
>{
>    if (lseek(fd, pos, 0) >= 0)
>	return read(fd, buf, n);
>    else
>	return -1;
>}
>


-- 
Zhuo Zang[~{j0WA~}]
Department of Statistics
University of Florida            Email: zzang@stat.ufl.edu
Newsgroups: comp.os.msdos.programmer
From: hshamans@magnus.acs.ohio-state.edu (Harry T Shamansky)
Subject: Need ethernet software example code
Keywords: ethernet, ftp, telnet, tcpip
Organization: The Ohio State University
Distribution: comp.os.msdos.programmer
Date: Thu, 10 Sep 1992 15:02:39 GMT

   Hello...

   We are looking for any example software that would
   help us send and receive tcp/ip packets to/from
   a unix workstation.  We hope to find examples that
   would help us format up packets similar to telnet
   or ftp or finger etc. (we know what the details
   of the packet are, from Comer's book). We need to
   send/receive data via ethernet to a unix workstation 
   from our program(s) on the pc.

   BTW: We have *all* the sources to the NCSA packet
   driver information; but it looks like a huge effort
   to extract out the key parts we really need to do
   our task.

   Any help or pointers would be most appreciated....
   Post or e-mail will be fine, we will summarize if
   there is interest.

   thanks

   Harry Shamansky, hts@hertz.eng.ohio-state.edu
   WeiHung Lin, whl@gauss.eng.ohio-state.edu
Newsgroups: comp.os.msdos.programmer,comp.sys.novell
From: joe@eng3.sci.com (Joe LaRocque)
Subject: Task Swapping
Reply-To: joe@eng3.sci.com (Joe LaRocque)
Organization: SCI Technology, Inc., Huntsville, Al.
Distribution: usa
Date: Tue, 15 Sep 92 18:00:43 GMT

Here's the problem:

	We are currently using PC/FTP and Novell 3.11 without any problems.
We also have a product (home grown) called McShell.  McShell provides the
capability for swapping tasks on the PC.  That is, you can be running
a DOS program, press a set of control keys and start another task.  Thereby
allowing you to swap back and forth between the tasks with hot keys.  The
background task(s) are not active except in foreground.

	The main problem is that where as McShell runs just fine with
the PC/FTP product, we always lose our file handles for any open files
on the Novell server.

	If anyone has any suggestions as to where we should look (we have
started deengineering the NETX) please feel free to jump in. Our group
would really like to start a converstation with one or more individuals
who might lead to a fix for the problem.


------------------------------------------------------------------------
A. Josesph La Rocque Jr. - joe@eng3
SCI Systems, Inc.                                       TANSTAAFL
Huntsville, Alabama 35807	(205) 882-4721
------------------------------------------------------------------------


Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
Subject: Re: Why ms-dos is non reentrant
Organization: Texas Instruments Inc
Date: Wed, 9 Sep 1992 22:00:42 GMT

In <1992Sep4.061954.24900@zooid.guild.org> ross@zooid.guild.org (Ross Ridge) writes:

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

Didn't this (sort of) eventually grow up to become OS/2 1.0?

-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
Newsgroups: comp.os.msdos.programmer
From: Louis.Mandelstam@p2.f42.n7101.z5.fidonet.org (Louis Mandelstam)
Newsgroups: comp.os.msdos.programmer
Subject: studying executables
Date: Fri, 11 Sep 92 14:33:05  -2
Organization: FidoNet node 5:7101/42.2 - Lakeside BBS, Roodepoort

 > Actually, assemblers have their own way of producing
 > executables, too.
 > There is a share-ware assembler (I think it is called
 > A86) that even
 > says that it creates opcodes different from other
 > assemblers.  This
 > way, the author can sue unregistered owners for not
 > registering.

Any court that accepts THAT as evidence needs a 1 exavolt discharge in the right place..

What if the programmer created the executable in DEBUG, hand-changed some of the bytes in the executable after linking or <gulp> did it in machine language?

Cheers
The Poltergeist


--  
INTERNET: Louis.Mandelstam@p2.f42.n7101.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.
Newsgroups: comp.os.msdos.programmer
From: kannarr@mk1501.dseg.ti.com (Galen Kannarr)
Subject: How to use '386/'486 debug registers
Keywords: 386 debug register breakpoint
Organization: Texas Instruments Incorporated
Date: Thu, 10 Sep 1992 18:25:49 GMT

I need to solve the following problem for which the 386/486 debug registers 
sound like just the ticket, but I have no documentation on their usage:

I have a system that has several custom boards which generate hardware 
interrupts on a 486.  One of the interrupt service routines is trashing 
several specific locations in memory, but I haven't been able to 
determine how.  I'd like to detect when one of the locations is trashed 
and invoke (another) interrupt service routine to help me trace the 
problem.  I can't use the 386 debug support of CodeView or other debuggers 
because they don't behave well when the debug trap occurs inside an 
interrupt.

My code runs in Dos--real mode, no windows, no memory managers (for now!).  
One of my specific concerns is that I might have to enter protected mode to 
use the debug registers--I'm not sure I want to learn all about the 
intracies of that!

Can anyone can point me to some good references (hopefully with examples)?  
Better yet, does anyone have any snippets of code that set up the debug 
registers and provide the shell of an isr for the interrupt generated?  
Please respond by e-mail.  I'll post a collection of the responses.	

--
Galen Kannarr
kannarr@mk1501.dseg.ti.com
Texas Instruments Incorporated
From: kennu@mits.mdata.fi (Kenneth Falck)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Another MsDos batch programming challenge
Date: 4 Sep 92 21:38:42 GMT
Organization: Microdata Oy, Helsinki, Finland

In article <1992Sep4.032836.7299@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
>Yes, I tested it. It works. It relies on the way DOS does batch file:
>	
>	1. Open file.
>	2. Seek in file to current statement. 
>	3. Interpret statement. 
>	4. Close file.
>	5. Execute statement
>	6. Goto 1 if not done.
>
>This is why Batch Programming is so inefficient.


By the way, does MSDOS store the current statement of
a batch file as an absolute byte location from the
beginning of the file, or perhaps as the line number
(lines separated by CRLF's)?

I began wondering about this when I accidentally edited
a board.bat file which about 30 nodes on a network were
currently running. (They just got some "Bad command or
filename"'s and recycled, I think...)

-- 
kennu@mits.mdata.fi
From: Mischa_Sandberg@mindlink.bc.ca (Mischa Sandberg)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Threads/Coroutines for DOS
Date: 12 Sep 92 22:39:15 GMT
Organization: MIND LINK! - British Columbia, Canada

You can implement this "by hand" quite tidily, using setjmp, longjmp
and a bit of jiggery-pokery. You need a small function that uses
"setjmp" to calculate the amount of stack used, then save that portion
of stack as the "thread". Then, a small table that identifies each
stack, and "invoke" and "respond" routines that let you pass
arguments and results through. All this takes is a little experimentation
as to the contents of the JMP_BUF struct as your compiler sees it.

Then comes the hard part: getting each thread to stay out of each other
threads globals :-).


--
Mischa Sandberg ... Mischa_Sandberg@mindlink.bc.ca
                 or uunet!van-bc!rsoft!mindlink!Mischa_Sandberg
*-*-*-*-*-*-*-*-*-*-*
Engineers think equations are an approximation of reality.
Physicists think reality is an approximation of the equations.
Mathematicians never make the connection.
From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail)
Newsgroups: comp.os.msdos.programmer
Subject: Re: BCC 2.0: What is the right way to use make & tlink?
Date: Sat, 05 Sep 92 11:24:38 CDT
Organization: Villa CyberSpace, Minneapolis, MN

fox@rei.com (Fuzzy Fox) writes:

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

with BCC 2.0, that should be make 3.0, yes?  If so, the solution is to
have make build a response file on the fly...

prog.exe: $(OBJECTS)
    tlink @&&|
\bc\t0s.obj $(OBJECTS)
$*
$*
\bc\ts.lib other\libs\here
|

I do this all the time, and it saves having to keep a linkfile in sync
with the project.
--
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
Xref: sparky comp.os.msdos.programmer:9282 comp.lang.c:13555
From: rkt@bjcong.bj.co.uk (RAKESH TANDON)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: MicroSoft C6.00 Link option CP
Keywords: CP
Date: 11 Sep 92 16:33:48 GMT
Organization: Boldon James Limited (UK)

Hi,
	I'm tring to write a LARGE MODEL C program which uses alot of memory
which it gets via malloc/calloc. I'm interested in anyone who has used the Link
option CP to reduce the amount of memory the program needs to load.

I'm not sure how it can help me but (using exehdr) when I reduced the 'max
paragraphs wanted' to 'min paragraghs needed' plus 0x20 I was able to
allocate more memory.

The manual states that with Link option of CP:1 will give me no near heap,
do I need any near heap in a large model program? and if not how can this
help me allocate more memory from the far heap?

			Thankyou
-- 
Rakesh Kumar Tandon          :  email - rkt@bj.co.uk
Boldon James Limited         :  phone - 0260 280465
Damian House, West Street    :  fax   - 0260 298030
CONGLETON, Cheshire          :
Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer
From: cosc16to@menudo.uh.edu (Andy Hakim)
Subject: Re: Turbo C++--forcing vars into CSEG
Organization: University of Houston
X-Newsreader: Tin 1.1 PL4
Date: Thu, 10 Sep 1992 23:46:26 GMT

In Borland C++ the following method works:
 
Normally, the C compiler creates different segment names and classes
for various parts of your program, something like:
 
  DEFAULT NAMES                               NEW NAMES
   segment                                     segment
name     class                              name     class
--------------                              --------------
CODE     _TEXT                              CODE     _TEXT
DATA     _DATA   (initialized data)         CODE     _TEXT
BSS      _BSS    (uninitialized data)       CODE     _TEXT
 
Since you can rename these default values using BC's -z command line
option (maybe also using the IDE by some weird menu option)
set both those data segment values to CODE and _TEXT and they will wind
up in the cseg.  And compile via assembly.
 
This trick at least works in the tiny and small models, other models may
require additional groups to be changed.  If you wish to place just
a specific variable in the cseg, then you must compile to assembly
and tweak the asm file manually.
 
example:
CFLAGS = -mt -zACODE -zBCODE -zTCODE -zC_TEXT -zD_TEXT -zR_TEXT
 
Borland may be correct in saying that doing this may cause problems
with overlaying, but it CAN be done.

-andy
ahakim@uh.edu
From: ralf+@cs.cmu.edu (Ralf Brown)
Newsgroups: comp.os.msdos.programmer
Subject: New interrupt list available
Date: 13 Sep 92 20:28:09 GMT
Article-I.D.: cs.BuJA6y.F90.2
Organization: School of Computer Science, Carnegie Mellon


Release 32 of the MSDOS interrupt list is now available.  It has grown over
300,000 bytes (some 330 entries) since the last release, about half of that
details on the Novell NetWare API which were previously not included.

It is now available for anonymous FTP from
	CS.CMU.EDU [128.2.222.173] in /afs/cs/user/ralf/pub (change to
	that directory with a *single* command) as inter32?.zip.

It will shortly be available from WSMR-SIMTEL20.ARMY.MIL in PD1:<MSDOS.INFO>,
as well as GARBO.UWASA.FI and MSDOS.ARCHIVE.UMICH.EDU.

	Ralf

PS.  I will be unsubscribing from this group for the next several months in
order to concentrate on completing my degree.

-- 
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: as789@cleveland.Freenet.Edu (Francisco J. Diaz)
Newsgroups: comp.os.msdos.programmer
Subject: Sourcer disassembler
Date: 6 Sep 92 15:22:54 GMT
Article-I.D.: usenet.18d7oeINNmmb
Organization: Case Western Reserve University, Cleveland, Ohio (USA)
NNTP-Posting-Host: hela.ins.cwru.edu


 Hi! I'm looking for a good disassembler and many people have
recomended a program called Sourcer which disassembles .COM, .EXE
and .SYS files. Has anyone heard of it? How much does it cost?
I saw a very old version but don't know if it is good or not...
Thanks!
-- 
|     Francisco J. Diaz Rivera     |                           |
|     University of Puerto Rico    | If the shoe fits, buy it! |
|  "I hate calculus classes!" :-)  |           - Imelda Marcos |
|     STUD137@CUTB.UPR.CLU.EDU     |                           |
From: rlee@csugrad.cs.vt.edu (Richard Lee)
Newsgroups: comp.os.msdos.programmer
Subject: Tape Drive Functions
Date: 11 Sep 92 13:25:17 GMT
Organization: Virginia Tech Computer Science Dept, Blacksburg, VA



Does anyone have a text file that lists tape drive commands?  Or a
C or TP library that can access QIC-40/60 tape drives???  THanks
-- 
 |   Rich Lee     |   Richard Lee               |                         |
 | My Power is    |   1711 Whipple Dr.          | rlee@csugrad.cs.vt.edu  |
 | Beyond Your    |   Apt 11                    | or                      |
 | Understanding  |   Blacksburg,Va 24060       | rlee@earth.tjhsst.edu   |
From: c60b-1fk@e260-1c.berkeley.edu (Ahmon Dancy)
Newsgroups: comp.os.msdos.programmer
Subject: BSS ??
Date: 7 Sep 1992 20:41:58 GMT
Organization: University of California, Berkeley
Distribution: world
NNTP-Posting-Host: e260-1c.berkeley.edu
Originator: c60b-1fk@e260-1c.berkeley.edu


Greetings.  Often when I look through the assembly output of a C
compiler, the string BSS shows up several times in the code. Can
anyone explain what the BSS is?
From: tso@cephalo.neusc.bcm.tmc.edu (Dan Ts'o)
Newsgroups: comp.os.msdos.programmer
Subject: Divide by zero handling in MSC...
Date: 6 Sep 1992 23:48:23 GMT
Distribution: comp
Organization: Baylor College of Medicine, Houston,Tx


	I have been working on an interactive language (YAIL ?) and using
MSC 5.0, 6.0 as well as the Intel Code builder for C compilers. I want the
language to properly handle divide-by-zero traps. I have used _dos_getvect
and _dos_setvect to catch the traps and dispatch to routines, but I can't
seem to arrange to clear the error. I know I could have the catch routine
longjmp to a safe place, but I would rather have it set an error flag and
clear the condition. The observed behavior is that it loops because the
condition is never cleared and the divide is always restarted. I have tried
setting the divisor to a non-zero number in the catch routine, but I must be
doing something wrong. I thought that I could just set the AX register to
one, but perhaps it is being saved prior to entering the catch routine.
	Other suggestions ? Please email. It would be nice to have a
solution that could work both under MSC and the Intel compiler. Even better
if it was all in C, without assembly code. Thanks.


				Cheers,
				Dan Ts'o		212-327-7671
				Dept. Neurobiology	dan@rna.rockefeller.edu
				Rockefeller Univ.	...s5!rna!dan
				1230 York Ave.		tso@rockvax.bitnet
				NY, NY 10021

Newsgroups: comp.os.msdos.programmer
From: jim@n5ial.chi.il.us
Subject: Re: Text Windows
Originator: jim@eddie
Reply-To: jim@n5ial.chi.il.us
Organization: me?  have you seen my desk?  : -)
Date: Wed, 9 Sep 1992 18:30:15 GMT

In article <92253.093457PATRICKS@MAINE.MAINE.EDU> PATRICKS@MAINE.MAINE.EDU
(Patrick Stevens) writes:

>I'm looking for reviews/opinions on text windowing packages under MS-DOS.
>I know of CXL, Windows BOSS, and Borland Application Frameworks (but
>don't have a copy of yet!).  Are there any others? If so, what do think
>of them.  Any and all comments would be appreciated.

try UltraWin if you want to see something impressive.  :-)  I've just
submitted the latest version (2.10) for upload to SIMTEL --- watch for
the announcement on comp.ibm.pc.binaries.archives in the next few days
or so (don't really know how long it normally takes).

in addition to how nice the library itself is, I've found the support
from the authors to be absolutely top-notch, without exception.  your
mileage may vary, of course, but so far, that's been the case for me.

DISCLAIMER:  my only association with EnQue Software (UltraWin's authors)
is that of a satisfied customer.  nothing else, period.  the above thoughts
are purely personal opinion.  dih dah, dih dah, dih dah....

   --jim

\input std_disclaimer                     % 73 DE N5IAL (/9)
------------------------------------------------------------------------------
"[...] the plural of `mongoose' ought to be `polygoose'." [Jargon file 2.9.10]

INTERNET:  jim@n5ial.chi.il.us  |  grahj@gagme.chi.il.us  |  j.graham@ieee.org
ICBM:  41.70N 87.63W            UUCP:  gagme!n5ial!jim@clout.chi.il.us
AMATEUR RADIO:  n5ial@n9hsi (Chicago.IL.US.Earth)
------------------------------------------------------------------------------

Newsgroups: comp.os.msdos.programmer,comp.text.tex
From: dhosek@linus.claremont.edu
Subject: Re: porting cweb from UNIX to DOS
Organization: Harvey Mudd College
Distribution: comp
Date: 6 Sep 92 00:00:14 PDT

In article <ARA.92Sep6000611@camelot.ai.mit.edu>, ara@zurich.ai.mit.edu (Allan Adler) writes:
 
> Is there a book or article that explains techniques of porting stuff from
> UNIX to DOS. I'm working with an 80386 MSDOS system.
 
> The immediate problem I have is getting cweave and ctangle to work
> on the 80386 MSDOS system. I obtained the source from labarea.stanford.edu
> and downloaded it. I was able to compile it with no difficulty but
> when I try to run them on the demo files wc.w, treeprint.w, wmerge.w
> I get error messages about /dev/null. That sounds like UNIX talk to me
> and I am wondering what the corresponding DOS talk would be.

There's a 386 port of CWEB available from ymir.claremont.edu in
[anonymous.tex.ibm_pc.web]cweb386.zip
The code, obviously requires a 386 or better to run.

/dev/null becomes nul: on DOS.

You might want to join the litprog mailing list. I don't remember
details on subscribing, but doubtless someone else will supply them.

-dh

Don Hosek                  
dhosek@ymir.claremont.edu  
Quixote Digital Typography 
714-621-1291


Newsgroups: comp.os.msdos.programmer