HDTenEightyP/NetNews huggingface dataset:
From: m1phm02@fed.frb.gov (Patrick H. McAllister)
Newsgroups: comp.os.os2.programmer
Subject: Compute-intensive performance in WIN-OS2
Date: 17 Aug 92 16:00:49 GMT
Reply-To: m1phm02@fed.frb.gov (Patrick H. McAllister)
Organization: Federal Reserve Board, Wash, DC

I have been playing around with a graphical statistics program, XLISP-STAT by Luke Tierney. There is a Win port, and my eventual objective is to port to OS/2 as well. I have noticed an interesting thing: the most compute-intensive parts of the program display the biggest speed degradation in WIN-OS2. As an example, one particular kernel regression computation takes about 20 sec. under native Win 3.1 on my machine in enchanted mode and about 75 sec. under WIN-OS2. (The machine is a Northgate 486 ISA, if tha


t matters.) The kernel regression routine is basically a tight inner loop with lots of floating point computation, addressing computation, and subroutine calls. (Uses very little memory -- paging is not a problem.) Other parts of the program display much less performance degradation. Does anyone out there know what is going on?

By the way, the same calculation done in a 16-bit native OS/2 port runs in about 7 sec. It seems to me that if vendors of compute-intensive software were able to get the same kind of speed-up with native OS/2 applications, it would have a big effect on the Windows vs. OS/2 controversy, whereas relying on WIN-OS2 emulation for the same programs may have the opposite effect. 

I would like to see of we can have some discussion here on the architectural features of these operating environments that produce such dramatic speed differences. At first glance, it would seem that, if any kind of code should display about the same speed under these different environments, it would be a small, floating point-intensive computation like this. 

Pat
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: Bug in GCC / OS 2 ??
Keywords: GCC
Date: 14 Aug 92 19:29:07 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1992Aug13.094911.49327@news.th-darmstadt.de> rb532@rbhp17.rbg.informatik.th-darmstadt.de writes:
>include <stdio>;
>
>main()
>{char c
>
>  printf("begin of program");
>  do { c = getchar ();
>	printf("%d",c)}
>   while (c != "X");
>  printf("End");
>}
>
>(perhaps ther are some syntax Errors now, but this doesn't matter)
>I compile this program with GCC 2.1.
>The result is an executable file.
>I run it, and it asks for input, until I press X, and then prints 
>"begin of program", then prints the digits, and then prints the "end"
>why is this disorder ?

Your output in stdout is being buffered.  Use the setvbuf() function
to set the stdout stream to unbuffered or to line-buffered.

>The second is that the getch() is not in the library (I get an Error 
>when I compile.

getch() is not ANSI.  According to the Unix man page here, it's a
<curses.h> function.  Curses hasn't been ported to OS/2.  In the DOS
world, it's a common language extension.

GCC only supports ANSI functions, and a limited subset of Unix
functions.
-- 
   |)  David Charlap           "I don't even represent myself
  /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
 ((|,)
  ~|~  Hi! I am a .signature virus, copy me into your .signature file.
Newsgroups: comp.os.os2.programmer
From: polu@archimedes.engr.umbc.edu (Polu Harinath)
Subject: How to spawn a DOS shell 
Keywords: Spawn a DOS shell??
Organization: University of Maryland Baltimore Campus
Date: Sat, 15 Aug 1992 19:42:35 GMT



Hi,

I would like to know how to spawn a DOS shell from OS2/1.3 command line.
Also, is it possible to shuffle windows (physical location with respect
to other windows) from the command line. Finally, is it possible to
intercept Ctrl-esc, Alt-esc and Alt-tab keys under OS2.

Thank you very much,
Hari Polu

polu@archimedes.engr.umbc.edu
polu@umbc4.umbc.edu
Newsgroups: comp.os.os2.programmer
From: wcn@cs.brown.edu (Wen-Chun Ni)
Subject: Re: Question and problem with GCC/2
Organization: Brown University Department of Computer Science
Distribution: na
Date: Thu, 20 Aug 1992 03:14:05 GMT

If gcc/2 is going to be ANSI-compliant, I think there are something wrong 
here.  According to W Richard Stevens' book "Advanced Programming in the
Unix Environment," pp 123, about "stdio" library:

	ANSI C requires the following buffering characteristics:

	 1. Standard input and standard output are fully buffered, if
	    and only if they do not refer to an interactive device.
	 2. Standard error is never fully buffered.


I've tried all the I/O operations under both SunOS and my Linux and
they comply to the above requirement. While the OS/2 gcc/2 doesn't
seems to get it right. Somebody mentioned that "buffering" was 
supposed to be ANSI-compliant, but I think it's kind of misunderstood.


Wen-Chun Ni

In article <1992Aug20.010531.28610@mdd.comm.mot.com> lmorris@mdd.comm.mot.com (Larry Morris) writes:
>In <1992Aug19.212328.15304@talon.ucs.orst.edu> hilmera@ucs.orst.edu (Andrew Hilmer) writes:
>
>>Compiler: gcc/2 2.1
>>Problem: problem and question about gcc/2
>
>...
>
>>/*
>>  This program takes the input of two numbers, one
>>  integer, one floating point, and prints them back out.
>>*/
>
>>#include <stdio.h>
>
>>main()
>>{
>>  int x;
>>  float y;
>
>>/*  fflush(stdin); */
>>  printf("This is my first C program.\n");
>>  printf("Enter an integer: ");
>>  scanf("%d", &x);
>>  printf("Enter a floating point number: ");
>>  scanf("%f", &y);
>>  printf("The value stored in x is %d\n", x);
>>  printf("The value stored in y is %f\n", y);
>>}
>
>...
>
>>When run, it prints nothing but a line or two and a blinking cursor.
>>As a shot in the dark, I entered 3, hit enter (got another big
>>nothing), then entered 93.9 and hit enter.
>
>Read  the FAQ.  Nothing says when stdout will flush unless you specify it.
>The program did exactly as requested. 
>    printf() some stuff   --  it gets buffered to stdout
>    scanf() some stuff    --  you typed 3
>    printf() some more    --  stdout buffers some more
>    scanf() some more     --  you typed 93.9
>    exit()		-- stdout gets flushed at exit and you see the printfs()
>
>If you want to handle the flushes yourself, just fflush(stdout)  before each
>of the scanfs().  Takes full advantage of any buffering and gets you exactly
>what you want.
>
>
>-- 
>Internet:    <lmorris@mdd.comm.mot.COM>   |  Larry Morris
> ...uw-beaver!sunup-----\                 |  Motorola/Mobile Data Division
> ...uunet-----------------!mdisea!lmorris |  19807 North Creek Parkway
> ...van-bc!mdivax1------/                 |  Bothell, WA  (206) 487-5810


Newsgroups: comp.os.os2.programmer
From: linville@garfield.catt.ncsu.edu (John W. Linville)
Subject: Re: Where am I going wrong????
Organization: Computer and Technologies Theme Program, NCSU, Raleigh
Date: Mon, 17 Aug 1992 22:21:01 GMT

In article <1992Aug17.211639.21335@ncsu.edu> linville@garfield.catt.ncsu.edu (John W. Linville) writes:
>There is a port of curses available from ftp-os2.nmsu.edu as curs13-2.zoo under
>/pub/os2/1.x/programming.  I am trying to compile it now, using C Set/2.
>
>John W. Linville

I got all of it to compile, but I had to comment out some exception handling
routines in one of the modules (cursesio.c), so I'm not sure if it will work
or not.  If there is any interest, I'll upload it somewhere.

John W. Linville

----------------------------------------------------------------------------
|  John W. Linville                Amateur radio:  KD4KHC                  |
|  #include "std_disclaimer.h"     E-mail:  linville@catt.ncsu.edu         |
----------------------------------------------------------------------------
Newsgroups: comp.os.os2.programmer
From: mg@elan (Michael Golan)
Subject: Idle dos box/giveup time slice, how?
Keywords: dos under os2
Organization: Princeton University, Dept. of Computer Science
Date: 18 Aug 92 06:24:40 GMT

I thought that the DOS program
main() { while(!kbhit()); }

is going to be detected as idle, but alas, under both borand & MS compilers
it does not.
How exactly DOES os2 detect an idling dos program?

Also, if someone knows for sure what the best way for a dos program to
give up its timeslice under OS2 (same as topview? the 'idle' bios call?)
please post (code would be even nicer)

Thanks
  Michael Golan
  mg@princeton.edu

Newsgroups: comp.os.os2.programmer
From: sip1@ellis.uchicago.edu (Timothy F. Sipples)
Subject: Re: How to spawn a DOS shell
Keywords: Spawn a DOS shell??
Reply-To: sip1@midway.uchicago.edu
Organization: Dept. of Econ., Univ. of Chicago
Date: Wed, 19 Aug 1992 00:14:37 GMT

In article <1992Aug15.194235.1290@umbc3.umbc.edu> polu@archimedes.engr.umbc.edu (Polu Harinath) writes:
>I would like to know how to spawn a DOS shell from OS2/1.3 command line.
>Also, is it possible to shuffle windows (physical location with respect
>to other windows) from the command line. Finally, is it possible to
>intercept Ctrl-esc, Alt-esc and Alt-tab keys under OS2.

I can answer the first question.  Yes, there is, starting with OS/2
1.3.  I believe there's a small utility which will perform this feat
located on ftp-os2.nmsu.edu.  Unfortunately I have forgotten the name,
but check in the /pub/os2/1.x directory.

If you are unable to find this utility at that site, try calling the
OS/2 Shareware BBS.  The telephone number is given in the OS/2
Frequently Asked Questions List.

-- 
Get the OS/2 FREQ. ASKED QUESTIONS LIST | Timothy F. Sipples
from 128.123.35.151, anonymous ftp,     | Internet: sip1@ellis.uchicago.edu
directory pub/os2/all/faq, or from      | Dept. of Econ., U. Chicago, 60637
LISTSERV@BLEKUL11.BITNET (send "HELP"). | Tsongas > Perot > Clinton.  Yay.
From: ameline@vnet.ibm.com (Ian Ameline)
Date: Thu, 20 Aug 92 12:39:29 EDT
Subject: Does Long Double Work With Math Function?
Newsgroups: comp.os.os2.programmer
Organization: C-Set/2 Development, IBM Canada Lab.
Disclaimer: This posting represents the poster's views, not those of IBM

In article <1992Aug19.210132.12143@cbnewsh.cb.att.com>,
gkm@cbnewsh.cb.att.com (gary.k.mc nees) writes:
>
>Does the C Set/2 compiler support long double math operations?
>I tried a simple power calculation which should have resulted
>in an answer with an exponent of 400 and the program never
>finished. The reference specifies (double) but I thought that
>long doubles were supposed to be supported.
>
>Any help will be appriciated, Gary McNees
>

   Long doubles are supported. They use the 80 bit IEEE format.

Regards,
Ian.
Newsgroups: comp.os.os2.programmer
From: ramdas@natinst.com (Malathi Ramdas)
Subject: OS/2 2.0 device drivers
Organization: National Instruments, Austin, TX
Date: Fri, 21 Aug 1992 19:40:48 GMT


   Thanks for your reply. You misunderstood my question about the address
format. What I wanted to know was during an I/O transfer if the device driver
provides an IOCtl interface to the application (instead of requiring the application t[C
cation to do a DosRead or DosWrite) would the data address was passed in by the
application 
to the driver (I know that it goes through the kernel and gets formatted to a 
request packet form) be in a 16:16 or 0:32 bit form. Since the kernel does
not do the locking and the virtual to physical address conversion in the 
case of a IOCtl call, I am concerned if for 16-bit applications the data
address (virtual address) that gets passed to the driver would be in a 16:16
form. I want to be able to do data transfer above 64K at a time.
   When you say that you have been compiling your OS/2 2.0 drivers using 
MSC 6.0 and CSET/2 have you been generating 32-bit driver code. (I thought
MSC 6.0 is a 16-bit compiler) If I generate a 32-bit assembler code (for the
entry points) using MASM 6.0 will the code be able to recognize the 16:16 bit
format of the request packet address.
 Also, would anyone happen o know how expensive the DevHlp call VML'VMLock' is ?
When you set the flag to return immediately if enough physical memory is not
available does the page manager (or whatever is in charge of allocating physical
memor) try its levels best to allot pages for you or does it immediately return
after a search for free memory?  Does setting the falg to block till memory 
becomes available cause some active swapping to be initiated?
  I am a little confused by this 16-bit 32-bit hybrid OS/2 model. I would really
appreciate it if you could explain to me the real implications of the OS/2
device driver architecture being 16-bit from a device driver writer's point
of view.
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: Whats wrong with floor()?
Date: 21 Aug 92 20:08:19 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <2118@lunic.luth.se> ulf@goliat.dc.luth.se (Ulf Ruthberg) writes:
>If I do the following:
>
>double tmp=33433.740234;
>
>printf("%f %f",tmp,floor(tmp));
>
>I expect the result "33433.740234 33433"
>but what I get is "33433.740234 33433.740234
>
>A bug in GCC or in me?

Did you remember to #include <math.h>?
-- 
   |)  David Charlap           "I don't even represent myself
  /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
 ((|,)
  ~|~  Hi! I am a .signature virus, copy me into your .signature file.
From: "robert eidswick" <robert.eidswick@execnet.com>
Newsgroups: comp.os.os2.programmer
Subject: disk compressor out now!!
Date: 21 Aug 92 00:04:46 EST
Reply-To: "robert eidswick" <robert.eidswick@execnet.com>
Distribution: comp
Organization: Executive Networks Information

August 10, 1992
Proportional Software Corporation today announced the DCF/2
Disk Compression Facility for IBM's'@ OS/2@ Version 2.0.
  In response to the needs of IBM OS/2 users, Proportional
Software has introduced the first dynamic disk compression
technology for OS/2 Version 2.0. The DCF/2, or Disk
Compression Facility/2 allows users to increase their local
physical disk storage without affecting applications software
or system behaviour.
  On-the-fly disk compression using the DCF/2 results in 35%
to 70% additional disk space, depending on the types of
information on the disk and the level of compression selected.
The Proportional Software DCF/2 uses native OS/2 file
structures to compress standard file information into less
physical space -- resulting in making a hard disk appear
bigger than it really is!
  According to Fred Schmidt, Sales Vice President at
Proportional, the typical OS/2 user requires over 50 MB of
physical disk space for the OS/2 operating system, it's
swapfile, and basic utilities. Even though OS/2 includes both
a complete DOS and Windows environment, this still means that
there is a real crunch for space when a user upgrades from a
DOS or Windows environment. The DCF/2 offers a quick, easy,
and simple solution to this problem.
  Proportional Software is introducing the DCF/2 at $99.95
through December 31, 1992. The U. S. list price is $129.95.
We have a special price of $64.98 (50% of list for IBM
employees(for personal use, only) if they fax the order with a
copy of their IBM badge.
  Contact Herb Smith at 1-800-666-4672 or by
FAX at 1-800-955-4672, for further information.
  Also, please mention my name when you call,  thank you.
                Robert Eidswick.
--
Executive Network Information System  (914) 667-4567
International ILink Host
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
From: das9674@usl.edu (Stephenson Daniel A)
Subject: Re: GNU Plot (faster version ....)
Organization: University of Southwestern Louisiana
Distribution: comp.os.os2.programmer
Date: Thu, 20 Aug 1992 00:15:57 GMT

In article <18AUG199212074739@rigel.tamu.edu> wjb5106@rigel.tamu.edu (Walter Barnett) writes:
>In article <1992Aug18.040607.28429@regina.cs.uregina.ca>, skagos@hercules.uregina.ca (panagiotis skagos (187802923)) writes...
>>Hi,
>> 
>>  A couple of days ago a message was posted that mentioned that a faster
>>version of GNU Plot for PM was uploaded to hobbes.  I took a look on
>>hobbes and the only version I could find was the same as the first, slow
>>version.  Where is the faster version supposed to be?  Any help would
>>be most greatly appreciated!  Thanks!
>> 
>
>The new version is in pub/downloads, for now.  Did you actually download
>it and look at it?  I did and it is many times faster than what was
>there before. 

The text files that came with GNUPlot were really not informative.
I am totally new to GNUPlot.  Does anyone know were some documention/
examples might be ftp'd from?

Thanks mucho-

>Walter Barnett        Aerospace Engineering        Texas A&M University 


-- 
Dan Stephenson das9674@usl.edu 
"Is it that Blake has a genius for leadership, or merely that *you* have a 
 genius for being led?" -Avon, from Blakes 7
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: Where am I going wrong????
Date: 17 Aug 92 21:41:49 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1992Aug17.162137.17414@stortek.com> eldenbrg@stortek.com (Dave Eldenburg) writes:
>In article <1992Aug17.093809.24122@Informatik.TU-Muenchen.DE> rommel@Informatik.TU-Muenchen.DE (Kai-Uwe Rommel) writes:
>>Yes it looks like this. Remember, if OS/2 is ported to a RISC, it would
>>not have a concept like the PC screen buffer, so the VIO/MOU/KBD calls
>>are useless.
>>
>>Part of the work can be done with 32-bit IOCtl calls, for the rest you
>>have to call 16-bit API's on PC's.
>
>So, IBM says I should take all my fairly sophisticated command line
>applications and convert then to PM.  Now because of the above mentioned
>problems (i.e. RISC not having a concept of PC screen buffer or a mouse)
>the OS/2 that ends up on another platform does not support PM.

Where do you draw this conclusion?  Unix boxes have no screen buffer,
either.  But they run X-Windows just fine.  PM doesn't need a screen
buffer to run.

>I'm looking at another major conversion just to get my code to run on
>the very same operating system. And the conversion will probably be
>back to the command line, at least till IBM get some other user
>interface working.  And IBM says this is _better_???

Again, I don't know what you mean.  PM will be on other platforms.  It
wouldn't be running OS/2 without PM and without text sessions.  Do you
think RISC boxes are teletype-based?  Give it a rest.  Develop for
what's out and stop worrying about systems that won't be available for
a few years anyway.  RISC-OS/2 won't be around until version 3.0,
anyway! 

>I guess the days of programming for the least common denominator are
>gone.

Among what?  How many Commodore developers are annoyed that their C-64
code won't run on an Amiga?  Face it, there is no least common
denominator among incompatible hardware.

>It also sounds like the days of the small time programmer are
>numbered too, at least in the IBM environment.  I don't have the
>resources to support a major conversion with every hardware platform
>change.  And can you imagine the maintenance problems!?!?

Can you imagine what would happen to the software indistry if every
developer would fly off the handle like this from mis-reading one
message on Usenet?
-- 
   |)  David Charlap           "I don't even represent myself
  /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
 ((|,)
  ~|~  Hi! I am a .signature virus, copy me into your .signature file.
Xref: sparky comp.os.os2.programmer:4391 comp.lang.c:12670
From: car@btr.BTR.COM (Carlos Rimola-Sarti  car@btr.com)
Newsgroups: comp.os.os2.programmer,comp.lang.c
Subject: Re: malloc causes a segmentation violation!?
Date: 22 Aug 92 16:34:28 GMT
Followup-To: comp.os.os2.programmer
Organization: Connective Strategies, Inc. (CSI).  Mountain View, California

In article <harris.714243433@garfield.catt.ncsu.edu> harris@garfield.catt.ncsu.edu (Michael Harris) writes:
-mn87504@cs.tut.fi (Naatula Mika) writes:
-
->I thought that OS/2 could detect writes to non-allocated areas and
->give me a segmentation fault right away.  Like it usually does. 
-
-What you have to understand is that the area IS allocated as far as the
-operating system is concerned.  It is allocated to your process.  Since your
-process owns it, the operating system is very happy to let you write there.
-
-Memory protection in OS/2 protects one process from another... not a process
-from itself.
-______________________________________________________________________________
-     Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
- System Administrator, Computer & Technologies Theme Program, NC State Univ.
-(My opinions are my own and do not represent those of NCSU or IBM Corporation)

If I am not mistaken, the MS C version of malloc allocates requested chunks
of memory from a single allocated OS/2 segement (created via DosAllocSeg).
Therefore, as Michael indicates, writes to the non-allocated portions of
this segment are not protected by the OS.

I believe that when the mallocs exceed the size of the segment it is either
augmented or a new segment is allocated.

Hope that helps!

+---------------------------------------+-----------------------------------+
| Carlos Rimola-Sarti                   |         email: rimola@csisdn.com  |
| Connective Strategies Inc.            |                      car@btr.com  |
| ISDN PRI Connectivity Group           |         phone:      415-903-2585  |
+---------------------------------------+-----------------------------------+

Newsgroups: comp.os.os2.programmer
From: jeffc@netcom.com (Jeff Cohen)
Subject: Re: Specifying little icon for system menu
Date: Tue, 18 Aug 92 00:59:49 GMT
Organization: Hacker's Anonymous

In article <14063@goanna.cs.rmit.oz.au> steveh@goanna.cs.rmit.oz.au (Steven Hayes) writes:
>I've noticed that some applications for PM have set their own 'small'
>icon for the system menu at the top-left corner of a window, instead of 
>letting PM dice up and use the normal sized icon associated with an 
>application.  Since I find the special-purpose small icons more attractive, 
>I'd like to know how to do it. Anyone know?
>
>Steve
>-- 
>   Steven Hayes                                    |  steveh@rmit.edu.au
>   Royal Melbourne Institute of Technology (RMIT)  |  +61 3 660-2693

The mini-icons are black&white device-independent bitmaps, 16x16 for VGA and
20x20 for 8514/A.  The Icon Editor can create these as well.  

I know, how can they be device-independent when the size depends on the
display resolution.  PM is to blame for that.  Both sizes ought to be
present, and PM picks the appropriate one.  If it's missing, it will
pick the closest alternative and scale it.

To see this in practice, look at an object's icon, such as the System
folder's icon using the Icon Editor.
-- 

==============================================================================
Jeff Cohen         | Standard disclaimer:  My views are my own and may or may
jeffc@netcom.com   |                       not represent the views of IBM.
==============================================================================
Newsgroups: comp.os.os2.programmer,comp.os.os2.networking