[mod.computers.ibm-pc] Info-IBMPC Digest V5 #29

Info-IBMPC@USC-ISIB.ARPA (Info-IBMPC Digest) (03/01/86)

Info-IBMPC Digest     Friday, 28 February 1986     Volume 5 : Issue 29

This Week's Editor: Richard Gillmann

Today's Topics:
                      dBase File Format (3 msgs)
                 Date & Time in Turbo Pascal (2 msgs)
                     DG One Comm. Ports (2 msgs)
                 PC/AT Xenix "C" Compiler Huge Model
                   MASM Segment Override Detection
                      Kermit and Turbo Lightning
                     Public Domain Backup Program
                       RS Model 100 <--> IBM XT
                      Connecting to NBI Machines
                          Screen Attributes

Today's Queries:
                          Parallel I/O Query
                Can a process open more than 20 files?
                        Chi-Writer & T3 Query
                 Questions about 132 Column Displays
                       ITT Xtra XP Info Wanted
                      Zenith Z-150 Speedup Query
                 General Purpose Menu Package Wanted
                    Generic Fast Screen I/O Query

----------------------------------------------------------------------

Date: 27 Feb 1986 21:09:39 EST
From: DASG@USC-ISID.ARPA
Subject: dBase File Format
To: info-ibmpc@USC-ISIB.ARPA, Ahlstrom@HI-MULTICS.ARPA

> Can anyone point me to a reference that clearly describes the internal
> file formats used for dBASE II and dBASE III "dbf" files.  I am
> interested in being able to have a program that writes files the
> be read as dBASE database files.

I downloaded the following information from the COMPUSERVE Ashton Tate
SIG on 20 FEB 86.  I think this will answer most of your question.
Sorry, but did not download the dBASE II structure information.

 --Gary Swallow
   DASG-AMZ, The Pentagon
   AV 225-1633, Comm (202) 695-1633

[Info stored in [ISIB]<INFO-IBMPC>DBASE.FILE-FORMAT. -Ed.]

------------------------------

Date: Fri, 28 Feb 86 11:54:08 EST
From: John Shaver  STEEP-TMAC 879-7602 <jshaver@apg-3>
Subject: dbase 3 files
To: info-ibmpc@usc-isid

The following information is courtesy of Scott Mueller of Palatine IL who
teaches a mean DBASE III Course.

[Info stored in [ISIB]<INFO-IBMPC>DBASE.FILE-FORMAT. -Ed.]

------------------------------

Date: 28 Feb 1986 23:58:58 EST
From: DASG@USC-ISID.ARPA
Subject: dBase II File Structure
To: Ahlstrom@HI-MULTICS.ARPA, info-ibmpc@USC-ISIB.ARPA

Here is the rest of the information requested on dBaseII file
structure.  It was downloaded from the Ashton Tate Forum portion of
Compuserve today.  Hope this additional information will be of
assistance.

[Info stored in [ISIB]<INFO-IBMPC>DBASE.FILE-FORMAT. -Ed.]

------------------------------

Date: Fri 28 Feb 86 02:03:04-EST
From: Barbara H. Liskov <LISKOV@XX.LCS.MIT.EDU>
Subject: Date/Time in Turbo Pascal
To: info-ibmpc-request@USC-ISIB.ARPA

In respons to the request by bschaar@usc-isif, I am including the
program SHOWDATE.PAS which prints out the date and time and day of
the week. 

Nate Liskov

[SHOWDATE.PAS has been added to the Info-IBMPC library. -ed.]

------------------------------

Date: Fri, 28 Feb 86 00:36:34 EST
From: Howard_Chu%UB-MTS%UMich-MTS.Mailnet@MIT-MULTICS.ARPA
To: info-ibmpc@isib.arpa
Subject: Date & Time from Turbo Pascal

This is a listing of the DOC files included on the Turbo
distribution disks... They are also listed in the back of the
Turbo manual... The Interrupt routine returns the time, and the
example with MsDos returns the date. Both could easily be
achieved with just the MsDos procedure though.

{*  The following program uses the Intr function in Turbo to
    get the time.  Registers have to be set correctly according
    to the DOS technical reference manual before the function
    is called.

    The program simply returns the time in a string at the top
    of the screen.*}

program TimeInterrupt;
type
  TimeString = string[8];

function time: TimeString;
type
  regpack = record
              ax,bx,cx,dx,bp,di,si,ds,es,flags: integer;
            end;

var
  recpack:          regpack;             {assign record}
  ah,al,ch,cl,dh:   byte;
  hour,min,sec:     string[2];

begin
  ah := $2c;                             {initialize correct registers}
  with recpack do
  begin
    ax := ah shl 8 + al;
  end;
  intr($21,recpack);                     {call interrupt}
  with recpack do
  begin
    str(cx shr 8,hour);                  {convert to string}
    str(cx mod 256,min);                       { " }
    str(dx shr 8,sec);                         { " }
  end;
  time := hour+':'+min+':'+sec;
end;

begin
  writeln(time);
end.


 (This is the file Dosfcall.Doc)

{* The following program uses the MsDos command in Turbo to
   retrieve the system date.  This is achieved via DOS function
   call 42 (or 2A hex).  The function call is placed in the AH
   register according to the technical reference manual. *}

program GetDate;
type
  DateStr = string[10];

function Date: DateStr;
type
  regpack = record
              ax,bx,cx,dx,bp,si,ds,es,flags: integer;
            end;

var
  recpack:       regpack;                {record for MsDos call}
  month,day:     string[2];
  year:          string[4];
  dx,cx:         integer;

begin
  with recpack do
  begin
    ax := $2a shl 8;
  end;
  MsDos(recpack);                        { call function }
  with recpack do
  begin
    str(cx,year);                        {convert to string}
    str(dx mod 256,day);                     { " }
    str(dx shr 8,month);                     { " }
  end;
  date := month+'/'+day+'/'+year;
end;

begin
  writeln(date);
end.

------------------------------

Date: Fri, 28 Feb 86 04:24:27 cst
From: cmkuo@im4u.utexas.edu (Chin-Ming Kuo)
To: info-ibmpc@USC-ISIB
Subject: Data General One Comm. Software Query

Our department just got 150 units of Data General one PC from Data
General Corp and the main purpose of those PCs is for faculty and
grad students use as terminals. The problem is although DG people
claim the 100% compatibility with IBM PC, we still can not find a
suitable terminal emulation program for our DG one. But other software
is fully compatible (like Lotus). Could you help us resolve this
problem?

Any information will be appreciated!

C.M. Kuo

ARPA:cmkuo@im4u.utexas.edu	UUCP:....!ut-sally!im4u!cmkuo
     Ics.cmkuo@r20.utexas.edu	

------------------------------

Date: 28 Feb 1986 11:47:23 PST
Subject: Re: Data General One Comm. Software Query
From: Richard Gillmann <GILLMANN@USC-ISIB.ARPA>
To: cmkuo@IM4U.UTEXAS.EDU (Chin-Ming Kuo)
cc: info-ibmpc@USC-ISIB.ARPA

The Data General One uses the 8251 UART chip for RS232.  This chip is
said to be superior to the 8250 used in the IBM PC, but it's
apparently not compatible with the 8250.

Dick Gillmann

------------------------------

From: Herm Fischer <hermix!fischer@rand-unix.ARPA>
Reply-To: HFischer@ada20
To: info-ibmpc@isib.arpa
Subject: PC/AT Xenix "C" Compiler Huge Model
Date: Fri Feb 28 00:35:41 1986

Experimenting with the huge model provision in the latest Xenix C compiler
release, I find that in order to link programs successfully, you have to
first kludge a program which defines the constant __AHSHIFT as 3. I made
a routine memh.s as follows:

   PUBLIC	__AHSHIFT
   __AHSHIFT EQU 3
   END

and compiled it with as.  You then put memh.o on your cc line, such as
"cc -Mh memh.o myprog.c".

It appears that the only way to make huge arrays is to declare them stat- 
ically; I do not know how to malloc them (because malloc is only given an 
unsigned integer size request, and in large model, the maximum malloc is 
now about 65500).  

It appears furthermore that you can make huge arrays in small and medium
model programs (which makes code for regular arrays much more efficient).
You put the word huge before the name of the array, such as:

   long huge myarray[100000];

or before the * on a pointer reference:

   long huge * pointbig;

Of course, the indices for such arrays need to be long (I guess that
should be obvious).  And you need to compile a small model program with
a huge static and huge pointers as "cc -M2es memh.o myprog.c".  And you
need to endure warning messages about having multiple data segments in
non-large programs (unless you make your program huge or large).

Hand checking a large number of test cases, generated code seems good.  I
haven't pushed for bugs yet.  pointer++ on huge properly handles crossings
of the segment boundaries, but I have no idea what system subroutines will
do with strings crossing such boundaries!  (don't expect miracles)  I also
worry about nonaligned data on segment boundaries (a long with one half in
either segment).

With all the precautionary warnings, this still is a fantastic addition to
Xenix, being able to have enormous single data structures, even if there
are restrictions and things to watch out for!  And to be able to have them
in small/medium model makes my day.  (Hoping I won't find any severe bugs
later.)

------------------------------

Date: Fri, 28 Feb 86 11:13:28 pst
From: tweten@AMES-NAS.ARPA (Dave Tweten)
To: info-ibmpc@usc-isib.ARPA
Subject: MASM Segment Override Detection

Before the Info-IBMPC source library acquired its MASM include file to
generate NEC V20 extended instructions, I had been working on one of my
own.  It was targetted for MASM 3.0 (first version to include the
8018[68] instruction set extensions, which are shared by the V20).
After trying the library version, and concluding that it didn't work
very well, I continued work on my own.

There is now one remaining serious problem to overcome before I'm
satisfied with my macros: I haven't been able, in all addressing modes,
to detect segment overrides in instructions which generate memory
references.  The code shown below detects and handles overrides when the
instruction's offset field is two bytes long, but it generates bad code
if there are zero or 1 bytes of offset and a segment override.

A short offset results from an indexed and/or base-register reference
with an explicit override.  Implicit overrides (which result from
relocatable references) do not cause the problem, because they always
generate two-byte relocatable offsets.

_genmem MACRO   opcod,arg1,arg2,arg3     ;; Internal: generates memory refs.
        LOCAL   memref,nxtbyt
        .XCREF  memref,nxtbyt
memref: lock    inc     arg1 arg2 arg3
nxtbyt: org     memref
        IF      nxtbyt-memref GT 5       ;; Allow for segment override bytes.
        inc     arg1 arg2 arg3
        org     memref+1
        inc     arg1 arg2 arg3
        org     memref+1
        ENDIF
        db      0fh, opcod
        org     nxtbyt
        ENDM

Does anyone have a flash of insight on how segment overrides can be
detected for memory reference instructions with zero or one byte(s) of
offset?

I'd be eternally grateful.  And, oh yes, naturally I'll contribute the
macro file to the Info-IBMPC library when I'm satisfied with it.

------------------------------

Date: Fri 28 Feb 86 19:12:39-PST
From: HOWALD%ECLD@USC-ECL.ARPA
Subject: Re: Kermit and Turbo Lightning
To: info-ibmpc@USC-ISIB.ARPA

I have sent files with Kermit and Turbo Lightning with no problem.
However, perhaps you should try changing the Turbo Lightning
environment to the "K" choice ("Modem Communications") and see if that
works.

James Howald

------------------------------

Date: Thu, 27 Feb 86 12:22:28 EST
From: John Shaver  STEEP-TMAC 879-7602 <jshaver@apg-3>
Subject: Re: Public Domain Backup Program
To: info-ibmpc@usc-isib

Forwarded from Kenneth Van Camp <kvancamp@ardc>:

Here's a copy of a piece of the (I think) current pc-blue.crc file:

MICRO:<PC-BLUE.VOL104>
        -CATALOG.104.2          ASCII     1792  3E2DH
        IBU.COM.1               BINARY    9344  923BH
        IBU.DOC.1               BINARY   71296  C3EEH
        IBUREAD.DOC.1           BINARY    3712  9D23H

IBU is Incremental Backup Utility

------------------------------

Date: Fri, 28 Feb 86 03:14:23 EST
From: James H. Coombs  <JAZBO%BROWNVM.BITNET@WISCVM.WISC.EDU>
To: INFO-IBMPC@USC-ISIB.ARPA
Subject: RS Model 100 <--> IBM XT

> I am interested in software that allows me to use the XT hard disk
> as a remote disk for a TRS Model 100 portable computer.

I have not heard of anything that enables one to use a PC drive as if
it were an external drive for the Model 100.  Sigea Systems, however,
has a very nice package for transferring files at 9600 baud, optionally
with XMODEM.

Sigea Systems, Inc.
19 Pelham Road
Weston, MA 02193
(617) 647-1098

------------------------------

Date: Fri, 28 Feb 86 08:02:55 pst
From: Gerry Key <key%tetra@nosc.ARPA>
To: info-ibmpc@usc-isib.ARPA
Subject: Re: Connecting to NBI Machines 

Re Jeff Edelheit's reply to Paul Birkel's inquiry about converting NBI 
disks, the Canadian company that makes the conversion box is:  

		Keyword Office Technologies, Inc. 
		2816 11th Street NE 
		Calgary, Alberta, T2E 7S7
		(800) 227-1817 x825A

Both US offices I have for them are on the West Coast: 

		649 Mission at New Montgomery 
		San Francisco, CA 94105 
		(415) 543-5426 
		Contact: Deborah McAfee 

		2047 E. Hamilton Ave. 
		San Jose, CA 95125
		(408) 371-7770 

The list price I have for the Keyword 7000 is $7996 (US).  

--Gerry 
(key@nosc.arpa)

------------------------------

Date: 27 Feb 1986 23:49-EST
Subject: Screen Attributes
From: ABN.ISCAMS@USC-ISID.ARPA
To: info-ibmpc@USC-ISIB.ARPA, pz@MIT-VAX.ARPA

>From: John Pezaris <pz@mit-vax>
>The recent discussions on setting colors have brought back an old query
>I was never able to resolve:  is there any way to *read* (not write) the
>current attribute that dos will use in writing to the screen?
>Clearly, this information must be kept within dos, and is accessible
>through some venues, for ansi.sys and various other packages are able
>to modify it.  However, I have not seen any hooks for retrieving the
>information.

Peter Norton's Programmers Guide to the IBM PC states (in reference to
reserved memory locations at the base of memory):
"465 (one byte). This byte contains the CRT mode setting.
 466 (one byte). This byte contains the color-palette mask bit setting."

However, in my monochrome PC clone (PC-DOS 3.1), poking new values into
either of these locations makes no change in screen appearance at the
DOS command level.

The IBM Technical Reference Manual, page 5-32, confirms the CRT mode setting
is stored in the Video Display Data ARea at 0065H, and the pallette
value at 0066H.  Poking new values there make no change either!

The Reference Manual, page 5-80, shows how the ROM BIOS gets that CRT
mode byte, uses it to offset in a table of mode sets, and saves the
produced table byte to the video port.

Page 5-81 indicates the ROM BIOS also reads the CRT mode byte when setting
up the Overscan Register for 640x200 graphics.

Page 5-83 indicates the ROM BIOS uses the CRT Pallette byte to set
background and foreground values (using the low bits per Norton's,
pages 76-83).

So ... yes, the current screen attribute values appear to be kept in
accessible memory.  Unfortunately (maybe my mono system, or just guessing
at the wrong "magic numbers"), I can't make any changes to screen attributes
by changing those memory locations.

I thought I recalled something about screen mode or attributes being tucked
away in the Program Segment Prefix (PSP) (the first 256 bytes of a .COM
file), but can't find anything on that.

This doesn't exactly answer the question as to how DOS finds and keeps
those attributes .. but since DOS uses the ROM BIOS so regularly anyway...

Hope you can make something of these pickings.

David Kirschbaum
Toad Hall
ABN.ISCAMS@USC-ISID.ARPA

------------------------------

Date: 27 Feb 1986 18:08-EST
Subject: Parallel I/O Query
From:  Dave Owens  <dowens@bbna.arpa>
To: info-ibmpc@USC-ISIB.ARPA

I have a 64k static RAM which I would like to read in a byte
serial fasshion thru the parallel printer port.  The circuit out
lines are shown below:


     ------ 8 data pins -----
RAM  ------ address clock --- PC printer port
     ------ Read/Write ------
     ------ Ground ----------

It's a very primitive device and the idea is that when I plug it
in to my PC, I wish to send a pulse to the R/W and put it in the
write state.  The first word will then appear on the data lines
which will then be read into a buffer at which time the PC will
send a pulse to the address clock which will increment the
counter and send the next word to the PC.

Are there any packages available to do this, or should I massage
the data some more in hardware and send it thru the COM port.
Which is the best way to go.  Any suggestions appreciated.

Dave Owens   dowens@A.BBN.COM.ARPA

------------------------------

Date: Thu 27 Feb 86 16:00:52-PST
From: Yitzhak Birk <FAT.BIRK@SU-SIERRA.ARPA>
Subject: Can a process open more than 20 files?
To: info-ibmpc@USC-ISIB.ARPA

Is it possible to enable a single process to open more than 20 files?
If so, how?  (I am using DOS 3.1 both on an XT and on an AT)

birk@sierra.stanford.edu

------------------------------

Date: Thu 27 Feb 86 15:47:50-PST
From: David John Buerger  <D.Buerger%SCU%PANDA@SUMEX-AIM.ARPA>
Subject: Chi-Writer & T3 Query
To: Info-IBMPC@USC-ISIB.ARPA

I'm interested in impressions from those who might have used either of these
technical word processors.  Apparently Chi-Writer is quite inexpensive as 
compared to T3.  Is it worth paying more for T3?

Dave Buerger
Director, PC Center
Santa Clara University
Dave%SCU%Panda@SUMEX-AIM.ARPA

------------------------------

28-Feb-86 04:20:15-PST,753;000000000011
Date: 27 Feb 86 15:32:17 PST (Thursday)
Subject: Questions about 132 Column Displays
From: LaBerge.osbunorth@Xerox.COM
To: INFO-IBMPC@USC-ISIB.Arpa

I am looking for a way to display more than 132 characters on my IBM
PC/XT.  I know that TSENG Labs and Genoa Systems make boards that
allow 132 column character display.  Genoa supplies a driver for LOTUS
1-2-3.

My questions are:
-Will I need a driver for each software package that I use, or is there a
 generic driver that will support multiple programs?
-Is there anyway to display more than 80 col. without a special board?
-Is there anyway to display more than 80 col. with a special board, but
 without special drivers?  If so, what are some of the packages?

Thanks in Advance

------------------------------

Date: Fri, 28 Feb 1986 10:54 O
From: Henry Nussbacher <Vshank%Weizmann.BITNET@WISCVM.WISC.EDU>
Subject: ITT Xtra XP Info Wanted
To: <info-ibmpc@usc-isib.ARPA>

I have just recently bought the ITT Xtra XP and would like to hear
from users who have used it and can point out any incompatiblities
between it and the IBM XT.  It supposedly runs 3x as fast as the XT
but can be slowed down to XT speed.  Also, if you know of any
published articles on this box please send me the references.

Thanks,
Hank

------------------------------

Date: Fri, 28 Feb 86 10:52:18 EST
From: Praveen Kumar <phaedrus@eneevax.umd.edu>
To: info-ibmpc@usc-isib.arpa
Subject: Zenith Z-150 Speedup Query

I would like to speed up my Dad's Z-150 and came up with the following
strategy:

1) Buy the NEC 8MHz 8088 emulator
2) Buy the corresponding faster clock crystal
3) Buy faster memory chips

Install all of these things and my Z-150 should be faster, right?
Well, that is my question.  Will it work and will it really be faster?
Will it break anything?

I am not much of a hardware whiz so, any suggestions comments etc.
would be greatly appreciated.

praveen

------------------------------

Date: Fri, 28 Feb 86 12:09:14 EST
From: Bob Clements <clements@bbnccq.ARPA>
Subject: General Purpose Menu Package Wanted
To: info-ibmpc@usc-isib.arpa

I would like to find a general purpose menu package. This would be a
set of routines to which I hand a title string and a group of
selection strings and which hands me back the index of the selection.
It would operate by reading the arrow keys and/or a number typed by
the user to select the item. It should probably highlight the
selections as the cursor is moved around among them.

Also, a routine to collect a text string from the user, in the context
of the above menus.  Other functions like help strings for each
selection, and screen attribute/color control would be nice, too.

My mental model of this package is something like the TOPS-20 COMND
function, but screen-oriented rather than line oriented.

Surely you don't all sit down and write these routines from scratch
every time you put together a new application.  Do you buy such a
thing?  Have you written one you could submit to the library?

Ideally, I'd like one for Microsoft C V3, but of course anything would
be helpful as a starting point.

Comments and suggestions welcomed.  Thanks.

/Rcc

ARPA: CLEMENTS@BBN
Usenet: {ihnp4, decvax, linus, ...}!bbncca!clements

------------------------------

Date: Fri 28 Feb 86 14:16:53-EST
From: Bard Bloom <BARD@XX.LCS.MIT.EDU>
Subject: Generic Fast Screen I/O Query
To: INFO-IBMPC@USC-ISIB.ARPA

How does one write quickly to the IBM PC's screen from Turbo Pascal?  
I have a generic MSDOS version of Turbo, running on a very incompatible 
Rainbow; I'm trying to write a program that will run on IBMs as well.
I also need to know how to set video attributes, at least underlined,
bold, and reverse video.
  Thanks,
    BARD @ XX.LCS.MIT.EDU

------------------------------

End of Info-IBMPC Digest
************************
-------