• No results found

Micro Cornucopia #34 Feb87 pdf

N/A
N/A
Protected

Academic year: 2020

Share "Micro Cornucopia #34 Feb87 pdf"

Copied!
100
0
0

Loading.... (view fulltext now)

Full text

(1)

$3.00

February-March 1987

Hardware

Designing With the 80386 .

.

.

....

..

.

.

.

.

.

.

.

.

.

...

...

....

6

A designer's view of Intel's new screamer.

Build A Simple Oscilloscope ...

.

....

.

.

.

..

.

....

.

. 16

Bruce Eckel gives us practical analog to digital conversion.

Software

A

Cheap 68000 Operating System ...

...

...

..

. 12

The latest on the Micro C 68000 project.

A

Concurrent Operating System .

.

.

...

.

.

....

.

....

.

26

Modula-2 was designed for writing multi-tasking operating systems.

Here's how it's done.

,

Recovering Directories

And FATs

On 360K Disks ...

.

"

...

.

.

.

...

.

... 34

Recovering data from disks with damaged directories and dinged FATs.

N

0

Micro C Contest

Res~lts

...

...

...

.

.

...

.

.

42

'"

The winners of Micro Cs C contest. .

00 00 I"'l

0-

PC Schem.e ....

...

...

...

.

..

..

...

.

....

.

.

46

....

0

I"- A close look at a variation on LISP, an early AI language.

-4".

-4"

(2)

Features:

• 8 MHz 80186 microprocessor with true 16-bit data bus.

• True PC compatability with our own custom ROM BIOS and PC cardslots for the video of your choice.

• Standard 512K zero wait DRAM, or

~

1 M options.

~8087

numeric coprocessor support on board. • On-board floppy disk controller for up to

four 5 %" drives.

• On'-board SCSI hard disk controller port.

~

Supports WD1002 SHD., WD1003 ACS, ~ OMTI 5100, 5300 ADAPTEC ACB 4000.

• 2 On-Board Serial Ports.

• Battery Back-Up Real Time Clock.

Designed, Manufactured and Serviced by:

PC

IEeH

=O~· ~~~h1~~h

Street

Lake

City,

MN 55041 (612) 345-4555

I.

Assembled and Tested

NEW LOWER

PRICES

W/O SCSI, serial ports, clock .. 1-4 $ 440.00 5-9 $ 525.00

SCSI Port ... add $ 20.00

Serial Ports ...•.. each - add $ 12.50

• 1h MEG Add-On ... $ 105.00

• XT Style, Enclosure ... $ 75.00

• 150 Watt Power Supply, Tested ... $ 105.00

• 8087-2 Coprocessor ...

$

Call

~f.~

,

Total Solutions

Assembled and Tested Systems

• Mono-Chrome System ... $1099.00

Includes: 512K, Power Supply, Enclosure,. Keyboard, Monitor, Two Drives, and Printer Port, 1 Serial Port, Real Time Clock.

• Quantity Discounts Upon Request

(3)

-HARD

DISKS-SEAGATE ST225 ... $39900 -WITH CONTROLLER

-20 MB 1f2 HEIGHT -1 YEAR GUARANTEE

RODIME 202E ... $27995 -20 MB FULL HEIGHT

-55 MS ACCESS -30 DAY WARRANTY

WITH CONTROLLER (XEBEC) $34985

RODIME 352 ... $19900 -10 MB, LOW POWER

-3%" SHOCK MOUNTED IN 5%" FRAME

-PERFECT FOR YOUR PORTABLE! -FULL HEIGHT BEZEL

WITH CONTROLLER (XEBEC) $249'5

WITH WD CONTROLLER $27905

HAZELTINE 1500 TERMINAL

USED, TESTED, GOOD $8995

VARACTOR TUNER

$795

-UHFIVHF

-133 CHANNEL CABLE READY -VOLTAGE CONTROLLED CHANNEL

SELECT

-DOCUMENTATION INCLUDED!

SYNC·SEPARATOR KIT

$1295

USE WITH ANY 3 LINE TTL MONITOR ALLOWS YOU TO RUN A 3 LINE MONITOR FROM A COMPOSITE

VIDEO SOURCE

6" BINDERS CASE OF 28 - $24.95

-STANDARD 6" 3 HOLE BINDERS -COMES WITH DISK ENVELOPE

PAGE

-PERFECT FOR SOFTWARE MANUALS!

-CONVERTS INTO A STAND U MANUAL HOLDER!

• 10 or 20 MB

• CONTROLS 2 HARD DRIVES • CUSTOM CONFIGURATIONS

AVAILABLE

- DISK DRIVES

-8" SHUGART SA801 R ... $17995 -SINGLE SIDED DOUBLE DENSITY -600 KB FORMATTED CAPACITY -BRAND NEW

-HARD DISK

CONTROLLERS-

-DISKETTES-SHUGART DSDD 8" BOX OF 10 .. $1250 VERBATIM SSSD 8" BOX OF 10 .. $ 4'5 XEBEC 1210A ... $7995

-FULL LENGTH

-CONTROLS 10 & 20 MB -CUSTOM CONFIGURATIONS

AVAILABLE

WESTERN DIGITAL WX2 ... $11995 -WITH CABLES

OMTI 5520 ... $12495 -WITH CABLES

-SHORT SLOT

-CONFIGURABLE BIOS

-RUNS ANY 3" OR 5" HARD DISK -SOFTWARE

XEBEC 1410A ... $109'5 -ORIGINAL XEBEC SASI

CONTROLLER

-CONTROLS 2 HARD'DISKS

CORVUS EXTERNAL HARD DISK CHASSIS

$9995

-ATTRACTIVE, RUGGED CHASSIS -INCLUDES FAN & POWER SUPPLY

(220v, STRAPPABLE FOR 110V) -BRAND NEW

SAME AS ABOVE

WITH 5MB HARD DISK

&

VCR BACKUP CONTROLLER

$14995

INTEL 86/30 . ... $49500 -8086 MONOBOARD COMPUTER -MULTIBUS

-NEW, SCHEMATICSINCLUDED

5%" MPI FULL HEIGHT ... $4995 -DOUBLE SIDED

-IBM COMPATIBLE

TANDON TM 50·2 ... $7995 -DOUBLE SIDED, HALF HEIGHT -IBM COMPATIBLE

TEAC 55BV ... $10995 -DOUBLE SIDED, HALF HEIGHT -360K IBM COMPATIBLE

TEC FB503 ... $9995 -IBM COMPATIBLE, HALF'HEIGHT -SIMILAR TO TEAC

DUAL FLOPPY CONTROLLER ... $1995 -IBM COMPATIBLE

-48 & 96 TPI DRIVES

-DOES NOT INCLUDE CABLES &

BRACKET

'>oj

\

HALTED SPECIALTIES

co.,

INC.

827 E. EVELYN AVE., SUNNYVALE, CA 94086

MAIL ORDERS CALL: (408) 732·1573

3 CONVENIENT LOCATIONS Store Hours:

Mon.·Frl. 8:00·7:00

HSC Electronic Supply of Santa Rosa 6819 S. Santa Rosa Ave.

Cotati, CA (707) 792·2357

HSC Electronic Supply 5549 Hemlock Street

Sacramento, CA (916) 338·2545

Saturday 9:00·5:00

WE SHIP

C.O.D.

(4)

AROUND THE BEND

Duplicating

My Efforts

Copy Protection

By

David

Thomps~n

Copy protection used to be the exclusive bane of the Apple world. CP/M just didn't lend itself to such curses - too diverse a hardware base and too sophisticated a user base.

The PC world, on the .other hand, was perfect for copy protection, and copy protection it got. Soon there were copy protectors copying copy protectors (a bit incestuous I'd say).

PC users suffered through it, stoically at first. (What was the alternative? Nearly everything worthwhile was protected.) Later, they purchased unprotectors and suf-fered with the compatibility/incompatibility problems they caused.

Through all of this, purchasers were voting with their wallets. Given an alternative, they weren't voting for copy protection.

Thus, we've seen a rash of recent announcements as major software manufacturers have dropped copy protec-tion. Shucks.

Shucks?

I kind of like copy protection.

Sure it's a pain in the you-know-where if you can't make backups. Sure you can lose a hard disk while un installing a copy protected program. Sure it may cost you (and the software company) $XXX.XX per system for the hardware attachment that lets the software run (and there's no guarantee the hardware will always work).

But think of the advantage of protectionism. It leaves the market wide open for newcomers.

Businesses are willing to pay extra for the very best. They buy name, name, name. But they are very leery of copy protection. If someone offers a non-copy protected version, that means a lot.

Also, ... businesses are made up of people (you heard it here first). And one or more of those people (often the house computer freak) makes the decisions on which packages to purchase. The house freak may well have a purloined copy of someone's spreadsheet, and. someone else's database - as well as a couple of word processors.

(5)

February-March 1987

Issue No. 34

Features

6

12

16

26

34

42

46

48

Dean A. Klein

Designing With The 80386

This new processor is a lot more than fast.

Joe Bartel

A Cheap 68000

Operating System

Joe Bartel creates an operating system for the 68000.

Bruce Eckel

Controlling

The Real

World With

Your PC: Build

A Simple

Digital

Oscilloscope

More on controlling your environment from Bruce Eckel.

ON CABLE

FOR EACH PORT

2 HANDSHAKE) (COMPUTER +5V)

WIRE TO FIT IN

41)-PIN

WIRE WRAP SOCKET

Brad Justice, Stan Osborne, & Vivian Wills

A Concurrent Operating System

A short course in writing a multi-tasking operating system.

David Thompson

Recovering Directories And FATs

On 360K Disks

Directories and FATs are a disk's Achilles heel. ' Here's how to recover.

Larry Fogg

Micro C Contest Results

Exciting new utilities highlight the

C competition.

Steve Witkowski

PC Scheme

Scheme is TI's entry into the list processing (and AI) market.

Larry Fogg

A Quiet Morning At

Mi~ro

C

Actually, not many mornings are quiet, but the tech calls are always interesting.

50

62

David Thompson

Slowing Your

Fan

If the relationship between resistance, voltage, and current isn't obvious, here's help.

Mark J. Boyd

CONTENTS

- 30oba Resistor

-I I

- - I I

-I I

- 30-0_ a •• 1Dtor -Is equivalent to the following:

150_ aui.tor

-Automatic Capitalization

Fancying up the inexpensive FTL Modula-2 editor (for both CP/M and MS-DOS).

'Columns

43

44

54

58

68

74

78

82

Culture Corner

On Your Own

Running a profitable computer store.

86 World

More fatalities as the Middle East Clone War continues.

In The Public Domain Who owns public domain software?

C'ing Clearly

How to handle graphics quickly.

Kaypro

256K on an '84 Kaypro. (Did I really say that?)

Pascal Procedllres

Moving from Pascal into Modula-2. Plus, a tale of two Modulas.

The 5-100 Bus

Dave replaces his ancient hard drives.

92

Technical Tips

Future Tense

By Gary Entsminger

90

96

Tidbits

Borland's Lightning gets a flashy companion.

The Last Page

Gary covers CD ROMs: those zingy little optical disk readers.

(6)

MS-DOS Goodies

I recently switched from my BBI to a PC clone, mainly because there was no more software being written for CP/M. While I kind of miss the old machine, I really like the advanced software that I can run on this new machine. One product that I haven't seen much about is Homebase v. 2.0. I've used Sidekick, and Homebase is a far supe-rior product.

During a recent business trip to San Jose, I went to a computer swap meet and ran across a couple of products you might be interested in. Microware Exceltek had a 2 meg Above Board without RAM for $109 plus tax. It came with the software for the device drivers and sample CONFIG.SYS files, but no RAMdisk or print spooler. (However, VDISK.COM (IBM) works fine. I still haven't found a print spooler that works in the Above Board memory - if you know of one I'd like to hear about it.) Microware Exceltek's address is:

Microware Exceltek

100 Produce Ave., Unit E So. San Francisco, CA 94080 Phone: 415-952-5375/5377

I wanted to be sure that the thing worked before I returned to Texas, so I asked for the best place to buy RAMs and was referred to Fry's Electronics.

It was an experience. When I first walked in I looked to my left and saw toothpaste, shaving cream, and other assorted items. Looking straight ahead, I saw TVs, VCRs, and stereo equipment. I thought I was in some sort of consumer store, not an elec-tronics shop. But, looking a little fur-ther, I saw components for RS-232 cables, printer cables, extension cables, plus PC cards, computers, printers, and lots of software.

Anyway, after I recovered from my shock (I've never heard of, much less been in, a store like this), I was pleasantly surprised when the bill for nine 256K RAM chips came to $21.08. Now in all fairness, I saw their ad in a local magazine advertising the same chips for something like $27.00. Still, if you're trying to fill out one or two megs of 256K RAM, you might want to give them a call. Their address is:

Fry's Electronics 541 Lakeside Dr. Sunnyvale, CA 94086 Phone: 408-733-1770

ming algorithms, has software on disk, and the great part is the cost - $59.95, plus tax and shipping. It's available through Micro Mart (201-654-6008), and is made by:

Sterling Technology 1010 12th st. Spar:ks, NV 89431 I also ran across an inexpensive

EPROM programmer. It plugs into a PC parallel printer port, uses an exter-nal wall type power supply (included), and programs 2716-27256 EPROMS. It

uses both standard and fast program- Now I want to put in a request for a

~

NEW LOWER 16 BIT PRICE

SPEED -

POWER -

VERSATILITY

-Most EXPRESS users are converts from the GIANTS of WORD PROCESSING ••••••

•••••• and you couldn't pay them to go back ••• HERE'S WHY

FULL ACCESS TO CP/M USERS AREAS (up to 32) with any editor commandl NAMED DIRECTORIES supported on MSDOS VERSION!

MEMORY MAPPED VIDEO AVAILABLE FOR IBM PC and PC clones!

BUILT·IN CP/M LIKE COMMANDS (RENAME, COPY, ERASE, TYPE, DIR, LOG)! POWERFUL KEYBOARD MACRO'S (as many as you want)1

FULLY RECONFIGURABLE COMMAND KEYS (emulate any other editor if you like)1 FAST, FAST, FAST SEARCH!

TERMINAL DATA BASE ... INSTANTLY configure for over SO predeflnedtennlnals! FILES LARGER THAN MEMORY handled with easel

CONTROL and HIGH BIT CHARACTERS may be entered and editedl

DYNAMIC WORD WRAPIUNWRAP· FULL CURSOR CONTROL (and then some) EASY to SET TAB STOPS· GLOBAl.JSELECTIVElLITERAUIGNORE CASE REPLACE FULL BLOCK INSTRUCTIONS including PRINT, SAVE, INCLUDE, MOVE, COPY, DELETE VARIABLE SPEED (FASTI) BI·DIRECTIONAL AUTO SCROLL. GOTO PAGE N / LINE N COMPACT on disk and in RAM. (even the 16-bit versions are only 25k bites) I

NOT COpy PROTECTED!

AFFORDABLE ... High performance at a fair price is our motto

EXPRESS 1.0 SAMPLER available FREE on your Local Bulletin Board or for $10.00 from TCI

GENTLEMEN ... I'm ready to step up to EXPRESS ... please send: _ _ copies EXPRESS 2.2 at $29.95 + $5.00 shipping and handling _ _ copies EXPRESS 1.0 at $10.00 + $2.00 shipping and handling

My computer uses: PCDOS - MSDOS - CPM-86 - CCPM-86 - CPM-80 (Cirle One) Disk format: Kaypro " - Kaypro 2X,4, 1 0 - Osborne 1 SSDD - EPSON QX-10

(Circle One) Morrow MD2 - Morrow MD3 - MS-PCDOS SrD 5- DSDD - XEROX 5- DSDD IBM CPM-86 5- SSDD - Zenith Z90 - 8- SSSD - Apple 35 TRK CPM

Other 5-Computer Sides Den

Send Check or Money Order to: Name

Tel

Address-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-=

1n33 205th Ave. NE City _ _ _ _ _ _ _ ~State _ Zip Woodinville, WA 98072

Washington residents must Phone Day Night

-add 8.1% Sales Tax MastercardNlSa - - - Exp

MASTER

CARD

PHONE ORDERS

1·206·644·3133'

VISA
(7)

future User Disk. I'd like a hard disk utilities disk. It would have programs to do such things as return the heads to the home position before you turn the power off, clean up scattered out sectors (like Disk Optimizer), and check memory (both main memory and expanded).

Thanks for a nice publication. John Scott

2206 Cambridge Court N League City, TX 77573

Chrono Pascal Strikes Again

In issue #33, in your call for material for the April 87 issue, you refer to times when you've "run science fic-tion as science fact." This probably explains how you work your excellent retrospective mailing system, which brought me your December-January issue today, December 2, while the postmark on the envelope, proves con-clusively that it will not be mailed from Bend until December 24.

BUILD YOUR OWN IBM XT &

J:

Sot)e

IBM AT COMPATIBLE SYSTEMS

QlJe

• Add only monitor and keyboard to run. Highest possible quality. • Up to

1

Megabyte on Mother Board w/ 256K installed

• Choice of color graphic card or TTL monochrome graphics • 4 drive floppy disk controller w/ TEAC 360K DSDD

• Flip-top or slide on case. 135/150 watt XT power supply

• Clock/calendar ONLY

• Parallel printer & ga.me ports

$595.00

MORE XT OPTIONS

• Teac 55BV 360K ... $109

• 20 meg Seagate kit ... $395

• 20 meg Lapine 3%" kit ... $395

• 30 meg 238 kit. ... $465

• 88 meg Vertex kit ... $1295

• BEST 286 accelerator • Panasonic 1 Q80i . ~ .... ; ... $245

CPU-MOTHER BOARD

WI OPERATING SYSTEM

• 640K 64180 Miniboard very complete CPIM 3.0 ... $495

• Kit 68000 SBC add 1 MB Keyboard Monitor & Drives (March delivery) wi K-OS ONE ... $495

• 1 meg PCII Super deluxe XT wi clock & game OK wi DOS 3.1 $235 • 640K XT ORAM wi DOS 3.1 .. $140

• Toshiba - Zenith Laptops ... cost plus 10% G 0'1

~

E~'f

6 "8~¥i~yl'lap.!:!IItll!!! ... t~"1.;~IP.!.lIIij~_ • Newest AT style ... .... $99

• Old AT style ... , $75

• PC-XT wiLED ... $65

MONITORS

• Packard-Bell EGA CGA ... $450

• Sony EGA P.GA CGA Herc ... $800

• Sharp RGB monitor-TV ... $350

• Sony 13" RGB monitor-TV ... $550

• Samsung tilt swivel TTL ... $129

• Samsung TTL kit (no case) .... $40

We will format hard disks & include DOS 3.1 & public domain software ...• add $60 3%" drives & hardware ... $150

1.2 meg floppy for XT ... $175

~

ES'f

aO'l

---,

10meg reconditioned for XT/AT $145

All Cards FuHy Tested. Assembled & Warranteed / School & Institutional P.O. Accepted OEM Dealers Welcome - Please call for our Special Dealer Prices

A..;OK COMPUTERS

Visa & Mastercard add 2% 2005 S.E. 82nd Ste 2 • Portland, Oregon 97216. 503/771-6758 503/771-6862

IBM is a trademark of International Business Machines Corporation

You are obviously leaving no stone unturned to ensure prompt delivery to Australia. This is far more than can be achieved simply by shipping across the International Date Line. If our postal system had a service like that, I might even come close to meeting writing deadlines.

John S. Innes

120 Macpherson St. Cremorne NSW 2090

Australia

Editor's note:

Thanks for the note, John. It arrived here only a week before we sent out your December/January issue. I must confess however, that we didn't use Chrono Pas-cal, just an old trick. We had the shipping company fly it across the date line back-wards, 22 times.

Support Problems

As a microcomputer enthusiast who's been involved in buying, build-ing, interfacbuild-ing, and using this equip-ment since the introduction of the Altair, I want to warn your readership about dealing with a firm which is well-advertised in the microcomputer journals. The firm in question is:

Express Systems, Inc.

1254 Remington Rd. Schaumburg, IL 60195

In October 1985 I purchased a hard disk drive/controller from Express Sys-tems. The unit was supposedly backed by a one-year repair/replace warranty, and the text of the two-page advertise-ment was sufficiently credible that I was led to believe they would support it.

After nine months of normal opera-tion, the drive failed. I began trying to contact Express through their "Techni-cal Help" phone line. This proved to be a feat in itself, but I finally obtained authorization to return the unit for repair, which the representative esti-mated would require two weeks. I packed the unit as prescribed and returned it.

. After nearly two months had elapsed, I began trying to contact Express once more for some kind of progress report on the unit. This time

(continued on page 76)

(8)

Designing With The 80386

By

Dean

A.

Klein

PC Tech Inc. 904 N. 6th St.

Inside Intel's Latest Processor

Lake City, MN 55041

To say that the 80386 was one of the stars of Comdex is like saying that MS-DOS is a well-known operating system. From the words I was hearing from speakers and writers, the 386 was the magic for the next century. (1 heard that it would run UNIX, sup-port multiple users, run programs written for any processor, and do it all at speeds that would make a Cray proud.)

If you believe all that, then you probably work for Intel's marketing department. However, there's just enough truth there to make the chip interesting. Very interesting.

I

've just come from Comdex Fall '86 where I witnessed about as much of the latest computer software and hardware accessories as a designer can stand. The writing was on the wall. Allow me to elaborate ...

Firs.t Entries

By now most of you know that Compaq has introduced the Compaq Deskpro 386. Corona (Cordata) has also introduced an 80386:.based prod-uct, as have several other manufactur-ers. Intel is promoting its new child both as a chip for people like us to build into our products, and also for several products of its own, s.ome for the PC market.

Companies with, deep roots in other 32-bit processors are also branching toward the 80386. Sun Computer, a longtime leader in 68000 workstations, announced at Comdex a Network Ex-tensible Windows System (NEWS) for the' 80386.

Eric Schmidt, vice president of Sun's Software Products Division, has said,

"If you want to establish the stan-dards you go after the major plat-forms." Apollo Computers, another 68000 workstation manufacturer,' is suspiciously tight-lipped regarding the 80386.

Most of the big software houses demonstrated their products on the Compaq 386. Certainly a large percent-age of Compaq's initial production of 80386 computers has gone to places like Microsoft, Novell, Goldhill, Bor-land, and dozens of others.

The point is - the 80386 is THE major computing platform for the next few years.

[image:8.618.402.560.68.180.2]

There will be at least two dozen new 80386-based computers on the market within the next six months, probably none of them from IBM. Most of these computers will be similar, and quite frankly, similar for a good reason: it's going to be tough to design an 80386 that's much different from the rest. (Oh come on Dean, where's the fight-ing spirit?)

Figure 1 -80386 Pinout

Yet designing with the 80386 is anything but easy, and 80386 comput-ers will differ widely in performance. Let's look closer at designing with the 80386, some of the factors which affect performance of the design, and the techniques used by some of the lead-ers in 80386 machines.

The Part

The 80386' s 132-pin grid array pack-age is quite formidable. See the pinout in Figure 1.

How's that for density? So many pins in such a small area is a key problem in designing with the 80386. It's difficult, to say the least, to con-nect all the pins on the chip to the connections on the board. So expect most '386 designs to have four or

P N M L K J H G F E D C B A

2

3

4

6

7

8

9

10

11

12

13

14

0 0 0 0 0 0 0 0 0 0 0 0 0 0

A3~ A27 A26 A23 A21 A2f/l AI7 A16 AI5 AI4 AU A8 vss vce

0 0 0 0 0 0 0

vee A3t A29 A24 A22 VSS AlB

0 0 0 0 0 0 0

vee VSS AI3 AI" A7 A!5 VSS

o

0 0 0 0 0 0

03' VSS vee A28 A2~ VSS AI9

0 0 0 0 0 0 0

vee vss AI2 A9 A6 A4 A3

0 0 0

029 vee vss

0 0 0

026 027 03t

0 0 0

VSS 025 028

0 0 0

DZ4 vee vee

0 0 0

vee 023 vss

0 0 0

022 DZI D2Q1

0 0 0

019 017 VSS ·0 0 0

018 016 OIlS

o 0 014 012

o

o

o 0 01" vee

o

0

013 011 vce 08

0 0 0 0

vss 09 HLOA 06

P N M L

0 0 0

A2 Ne Ne

0 0 0

vee vss vee

0 0 0

Ne NC vss

0 0 0

Ne INTR vee

0 0 0

PEREQ NMI ERROR'

0 0 0

RESET 8USY# VSS

0 0 0

LOCK' WIR# VCC

0 0 0

vss VSS D/CI

o 0 0 0 0 0 0 0 0 0

07 VSS Dill vee eLK2 BEiJII vee vee NC MIlO'

o 0 O. 0 0 0 0 0 0 0

05 VSS 01 READY, Ne NC HA' BEl' 8E2# BE3#

o 0 0 0 0 0 0 0 0 0

04 03 02 vee VSS ADS# HOLD 8516# VSS vee

K J H G F E D C B A 2

3

4

6

7

8

9

10

tl

12

13

(9)

more signal layers on the printed circuit board.

Because of the high frequency of the signals in a typical 80386 system, the circuit board will also have a minimum of two power planes - one for

+

5 V and one for ground.

A six or 'eight layer board is spendy. A six layer board costs about 1.8 times as much as four layers. This seems at first to be a serious drawback, how-ever, the additional circuit layers will allow designers to pack the chips much more densely, yielding boards that will be smaller than four layer versions.

Two other benefits come to mind. The potential reduction of board size helps to keep the signal traces shorter, a very important factor at these speeds, and the reduction in size should result in a reduction in board cost, though not enough to offset the cost of the additional layers.

Address & Data

The 80386 uses a non-multiplexed address and data bus. This differs from much of the Intel family - 8088, 8086, 80188, and 80186 - which use the same pins to output an address during the first part of the, bus cycle and then to write or read data to or from an 110 device or memory.

In contrast, the 80286 and 80386 can simultaneously give the address on the 34 address lines and read or write data over the data lines. There are several advantages to this type of bus configu-ration.

First, the bandwidth requirements (how fast they must generate or re-spond to data) of the pins are reduced since each pin has only one function. A second advantage is that some sys-tems won't have to latch the address lines from the processor. This may reduce component costs.

I mentioned earlier that the 80386 has 34 address lines. But that's not entirely accurate. The 80386 actually has 30 address lines and 4 byte-select lines. Because it has to read or write one, two, three, or more of the bytes of data which may be addressed with- ' in the 32-bit word act~vity, each byte is controlled by an individual byte select line. See Figure 2.

Those patterns which never occur are patterns which aren't contiguous byte operations.

Having 30 address lines and the 4 byte enables allows the 80386 to direct-ly address an outrageous amount of memory - 4 gigabytes.

Just for the fun of it, imagine you're using the new 1 megabit DRAM chips. 4 gigabytes of memory would be four thousand sets of eight chips, or 32 thousand memory devices (36 thou-sand if you used parity!). At the price of 20 dollars per chip (after all we'd be buying in volume, right?), this comes to a mere $640,000. One heck of a RAMDISK. Certifi~d check only, please.

Editor's note: I wonder how long the power up RAM check would take.

Other Control Signals

Several other control signals are pro-vided by the 80386 which indicate the type of operation being performed. WI

R distinguishes between write and read cycles. DIC distinguishes between data and control or code cycles. MIlO

distinguishes between memory and II

Figure 2 -80386 Byte Enable Signals

IBE3 IBE2 IBEl IBEO

1 1 1 1

1 1 1 0

1

1

0 1

1

1

0 0

1

0

1

1

1

0

1

0

1

0 0

1

1 0 0 0

0

1

1

1

0 1 1 0

0 1 0 1

0 1 0 0

0 0

1

1

0 0 1 0

0 0 0

1

0 0 0 0

Figure 3 - Control Signals

MIlO

DIC

WIR

0 0 0

0 0

1

0 1 0

0

1

1

1

0 0

1

0 1

1 1 0

1 1 1

o

cycles. These operations are summa-rized in Figure 3.

Halt and shutdown cycles can be distinguished by observing BEO, which is low for shutdown and high for halt. Halt occurs when the processor exe-cutes the HLT instruction. A non-maskable interrupt or a normal inter-rupt with interinter-rupts enabled will cause the processor to exit the halt state and resume program execution. Reset will also bring the 80386 out of the halt state.

Shutdown occurs when a severe error is detected while operating in the 80386's Real Mode. For example, if a hardware interrupt or software excep-tion occurs and the interrupt vector is larger than the Interrupt Descriptor Table, then Shutdown. This could be the case when there is no interrupt handler for the interrupt.

A second shutdown condition occurs if a 'CALL, INT, or PUSH instruction

(continued next page)

Operation

none

DO-D7

D8-D15

DO-D15

D16-D23

never occurs

D8-D23

DO-D23

D24-D31

never occurs

never occurs

never occurs

D16-D31

never occurs

D8-D31

DO-D31

Bus Cycle Type

Interrupt Acknowledge

does not occur

I/O

Data Read

1/0

Data Write

Memory

Code

Read

Halt or Shutdown

Memory Data Read

Memory Data Write

(10)

DESIGNING WITH THE 80386

(continued from page 7)

attempts to wrap around the stack segment when the stack pointer is odd.

Shutdown can be exited by NMI if the Interrupt Descriptor Table limit is greater than 17H and the stack pointer is greater than 5. Otherwise only a reset can restart the 80386. Most 80286 and 80386. PC designs detect shutdown and automatically reset the processor.

Dynamic Bus Sizing

An interesting aspect of the 80386 is its ability to change the size of the data bus in response to a control input. This input pin, called /BS16, is sampled at the end of every bus cycle.

If the signal is sampled low at the completion of a 32-bit bus cycle, the 80386 will ignore the data it received on the upper half of the data bus and perform. a second bus cycle to read or write the other half of the data using the lower half of the data bus.

This feature is called dynamic bus sizing and is found on several of the newer 32-bit processors, including the 68020.

If /BS16 is permanently tied low, the 80386 then behaves much like an 80286 with its 16-bit data bus. Beware of

80386 / I accelerator" boards which

sim-ply replace the 80286 with an 80386 on a daughter board, however. Unless these boards have a much faster clock they will be no faster than the original 80286 system. The only merit might be the ability to begin working on 80386 specific software on such a system.

The 80386 provides the address for the next operation half way through the current bus cycle, using a tech-nique called address pipelining. This early availability of the address allows additional time for system components to get ready for . .the upcoming bus cycle.

These components (outside the pro-cessor) look at the address and decide how quickly the data will be available (i.e. whether they'll have to slow down the processor with wait states).

In an interleaved memory system (many banks) the next data will be available sooner if it's not from the current bank. . In a system with two banks of memory, it's faster if it's hom "the opposite memory bank. If the

system has cache memory, the circui-try must figure out whether the new address is already available in cache RAM or if it must be loaded.

This address pipelining may be disa-bled on a cycle-by-cycle basis through a control inp~t called /NA. When /NA is high, the 80386 generates address timing which is very similar to the 80286.

Memory Systems

The bus bandwidth of the 80386 running at 16 MHz is an impressive 32 megabytes per second. Each bus cycle is a minimum of two processor clock cycles long. This places some interest-ing requirements on the memory sys-tems used with this processor.

Adding one wait state to the bus cycle reduces the bus bandwidth to 21.33 megabytes per second. Adding two wait states reduces it to 16 mega-bytes per second. While these num-bers are nothing to sneeze at, they show a considerable performance pen-alty for a poor design. Obviously there are trade-offs in a design, and it is in the design of memory systems that the 80386 machines will differ the most.

There are· four· basic memory system architectures which are used in such a system: Static RAM, the static/dynam-ic cached system, the dynamstatic/dynam-ic inter-leaved system, and the dynamic static column system.

Static RAM offers the highest per-formance of any memory system for the 80386. With static RAM access times as low as 80 nsec for 8K by 8 parts, the 80386 can run in . non-pipelined mode with never a wait state. The power consumption of these devices is low and battery backup may be used as well.

The downfall of such a design is the cost per bit of memory and the physi-cal size of the parts. A 32K by 8 static RAM costs approximately 10 times as much as a 256K by 1 DRAM, even though both devices have the same _ amount of memory. The static RAM also takes up over four times more board space than dynamic RAM, ~nd

ten times as much as the DRAM moduies we use at PC Tech. So we won't see much static RAM in PCs.

A static/dynamic cached memory system uses a small amount of static RAM, a large amount of control

circui-try, and a large amount of low cost dynamic RAM to provide avery high performance system .. System perform-ance is dependent on the amount· of static RAM (the size of the cache) and the methods used for cache control. (Cache as cache can.)

A cached memory system expects most memory accesses within a pro-gram to be confined to a relatively small area of memory. In fact, it relies on it. This is true of both instruction fetches and general memory refer-ences.

A cached system moves data from the slower dynamic RAM into the static RAM when that memory loca-tion is first addressed. The address is also stored in fast static RAM. Often several adjacent memory locations will be brought into the static RAM cache.

If the CPU performs a memory op-eration to a location which has been moved to the cache, a cache "hit" occurs and no wait state is needed. If, however, the operation is a write, both the cache and the DRAM should be updated. This results in a one or two wait state penalty for the write opera-tion.

Cached memory systems can become quite complex, and several types of cache control methods exist. See the table in Figure 4 _ (from the Intel 80386

Hardware Reference Manual, order #

231732-001) which shows the effective-ness of several cached memory sys-tems.

Skeptical Timeout

Personally I'm skeptical. If our ma-chine is doing lots of task switching the cache may frequently be incoher.;. ent, resulting in performance degrada-tion. Also consider this: the Motorola 68020 has an on-chip 512-byte cache. According to Intel, the performance of such a system would be less than that of a -non-cached DRAM system. Hmmmmm, what do you 68020 guys think of that? I think it's bunk!

(11)

There's a setup time for the address and a precharge time between access-es. The precharge time is what really slows down the access, requiring as much as 90 nsec for a 120-nsec DRAM. This indicates that even 80-nsec DRAM cannot keep up back to back memory cycles with the 80386. A technique called interleaving helps somewhat.

With interleaved memory, two or more banks of DRAM are arranged so that adjacent words lie in different banks of memory. Since most pro-grams and data are sequential in na-ture, there's little likelihood of consec-utive memory accesses to the same bank. However, when it does happen, the system must add wait states.

Many of the 80386 machines present-lyon the market use interleaved mem-ory. In a PC Magazine benchmark test, one unit was found to be only slightly faster than a 16-MHz 80286 system. Intel provides a great deal of informa-tion on the design of these interleaved memory systems, so I guess it's no surprise that many systems use it.

Within the last year we've seen a new type of 256K by 1 DRAM. This is the static column DRAM. Generally these parts are CMOS technology, so they draw very little power.

[image:11.620.56.409.467.734.2]

They ~tart the memory cycle with a

Figure 4 -Effectiveness Of Cached Systems

Cache Configuration

row address, row address strobe, and column address strobe, just like nor-mal DRAM. But the column address can be handled differently. The col-umn address strobe (/CAS) becomes more of a chip select signal, enabling and disabling the outputs of the de-vice.

The access time for a static column DRAM is the same as for a normal DRAM in the normal type cycle. But as long as the row address remains the same, and only the column address is changed, the access time may be very short, typically 70 nsec.

Relatively simple circuitry is needed to detect a required change of row address and insert wait states while the memory controller precharges the DRAM and initiates another cycle. The precharge time for static column DRAMs is often shorter.

The Compaq Deskpro 386 uses static column DRAM with this type of mem-ory controller. A disadvantage of static column DRAM is that it's about twice as expensive as standard DRAM. As these chips become more popular, their price should approach that of standard DRAM.

To optimize performance in such a design, multiple banks of memory could be used for code, data, and stack, so that the DRAM row changes

Cache Performance

---+---

I

I

I

Hit

I

Performance Ratio

Size

I

Associativity

I

Line Size

I

Rate lOver Non-Cached DRAM

---+---+---+---+---1K direct 4 bytes 41% 0.91

8K direct 4 bytes 73% 1.25

16K direct 4 bytes 81% 1.35

32K direct 4 bytes 86% 1.38

32K 2-way 4 bytes 87% 1.39

32K direct 8 bytes 91% 1.41

64K direct 4 bytes 88% 1.39

64K 2-way 4 bytes 89% 1.40

64K 4-way 4 bytes 89% 1.40

64K direct 8 bytes 92% 1.42

64K 2-way 8 bytes 93% 1.42

128K direct 4 bytes 89% 1.39

128K 2-way 4 bytes 89% 1.40

128K direct 8 bytes 93% 1.42

---+---+---no cache-2 CLK SRAM access 1(100%)

I

1.47 no cache-4 CLK piplined DRAM I 1.00

less frequently. The 80386, with its demand paged virtual memory, could well take advantage of this architec-ture, however the designers of the Deskpro 386 didn't go that far.

At PC Tech we're evaluating a varia-tion on the static column scheme. Most standard DRAMs may be operat-ed in page mode, where many column addresses may be strobed into the DRAMs following the row address strobe, resulting in a much improved access time. The speed appears to be good, but the jury is still out.

Numeric Processors

The 80386 has three different numer-ic processor options, each with its own level of performance and price tag. The highest price and performance solution comes from a joint venture with the Weitek floating point acceler-ator people and Intel.

This multi-chip solution, called the Weitek WTLl167, puts a 2.5

+

megaf-lop floating point processor chip to-gether with the 80386 for some fantas-tic number crunching' power. (One megaflop is one million floating point operations per second.) This number crunching is supported in software by Intel's compilers. It is not code com-patible with the 8087 or 80287!

The next step down in performance is the 80387, for which data sheets will be available "real soon now." Intel claims this part will be eight times faster than a 5 MHz 80287, which should put it between 0.8 and 1.0 megaflops.

But it won't be available for some time, and in fact may be more expen-sive than the higher performance Wei-tek solution. I hope more software folks support the Weitek.

The 80287 may also be used with the 80386. This can provide from 0.1 to 0.2 megaflops. The 80386 can determine the coprocessor type at reset by sam-pling the IERROR signal. If the copro-cessor is an 80287, ·the 80386 will automatically convert the 32-bit data to 16-bit data for the 80287.

Other Considerations

Now that we have a fast processor and lots of memory, let's consider a bottleneck which has been a more

(continued next page)

(12)

DESIGNING WITH THE 80386

(continued from page 9)

limiting factor than processing horse-power - I/O. I wonder if most people who. are so concerned with processing all of their data on their PCs ever consider how slowly that data moves through their system.

With the IBM AT, data can move from hard drive to memory at less than SOOK bytes per second. At that rate it would· take more than two and a . half hours to fill the memory of our

386 4G system. Sure that's a lot of memory, but remember that the 80386

is a virtual machine which can handle up to 64 terabytes of virtual memory - memory which should be moved to and from mass storage devices as the operating system sees fit.

The 80386 can execute several multi-megabyte tasks given less than a me-gabyte of memory, but oh how slow that will be with a SOOK per second 1/

o

data rate. The solution is to use faster hardware for the disk interface, hardware which resides somewhere besides the PC/AT bus (i.e. an on-board SCSI port).

The SCSI port can transfer data as fast as 5 megabytes per second in synchronous mode and 2.5 megabytes per second in asynchronous mode. I think this is the minimum for an effective 80386 machine ~ Enough said.

Final Words

There is little doubt that the 80386 is a well designed chip and that it can be the heart of a very high performance personal computer . Certainly perform-ance has its price in most all areas.

But don't let 386 fever take hold before you put the machine through some real world tests. Let it earn your respect. Price/performance is still im-portant.

•••

XT CLONE SYSTEMS

(One YEAR guarantee on system)

Turbo Mother Board 4.77 and 8 MHz.

640 K Ram installed on board

Serial, Parallel, Game Ports

Clock/Calendar

Color Video Board (CGA)

Monochrome Opt.

150 watt Power Supply

Flip Top Case

AT Style Keyboard

ABOVE t'/ITH 2 FLOPPY DISK DRIVES $ 699.00

t'1ITH 1 FLOPPY AND 20

~1EG

$1100.00

WITH 1 FLOPPY AND 30 MEG

$1299.00

Assembled and Tested for 24 Hours

Color Monitor RGB (CGA)

Color Monitor RGB (EGA)

Monochrome TTL (Green)

f'.tonochrome TTL (Amber)

EGA Color Video Card

HS DOS 3.1

$ 310.00

$ 530.00

$ 115.00

$ 125.00

$ 195.00

$

50.00

CLONE PARTS

Motherboard Standard 4.77 MHz

$

Motherboard Turbo 4.77

&

8 MHz $

Color Video Card (CGA)

$

Monochrome Video TTL

$

Floppy Disk Controller

$

Hard Disk Controller

$

Disk I/O

$

RS 232 Serial Card

$

Power Supply 150 watt

$

Flip Top Case

$

AT Style Keyboard

$

HARD DISK DRIVES

110.00

135.00

65.00

75.00

40.00

100.00

90.00

35.00

75.00

45.00

65.00

20 Meg Seagate

S~4026

(for AT)

$

399.00

30 Meg Seagate ST4038 (for AT) $ 499.00

30 Meg CDC Wren 1

(for AT) $ 499.00

Does NOT include controller

CITIZEN PRINTERS

MODEL 120D

120 CPS

9

n

$

f.IODEL

r~SP-IO

160 CPS

9"

$

l-tODEL MSP-15

160 CPS 15"

$

l-tODEL MSP-20

200 CPS

9"

$

NODF,L MSP-25

200 CPS 15"

$

MODEL 35 35 CPS LETTER QUALITY $

ALL PRINTER

CO~tE

WITH CABLES

CASCADE ELECTRONICS, INC •

ROUTE 1

BOX 8

RANDOLPH, MN

55065

507-645-7997

200.00

300.00

400.00

350.00

500.00

500.00

Please ADD Shipping on all Orders

COD Add $3.00

Credit Cards ADD 5%

(13)

TEXT LINE 6 COL: 12 FILE: VEDPLUS.TXT INSERT

••

VEDIT PLUS is an advanced editor that makes your program development and word processing as efficient and easy as possible. VEDIT PLUS is simple eno!!9h to learn and use for the novice,flet has the speed, flexibility and power to satisfy the most demanding computer professional. VEDIT PLUS is particularly suited for writing all types of programs and lengthy documents such as reports or manuscripts.

This shows how VEDIT PLUS can perform windowing. One window is used for word processing, a second for program development, and the third for commands.

INSTALL .EXE LlHARD ENVI .COM LONG RAM2 .DIC KEYS RAM3 .DIC PRINT

VEDIT PLUS has been the·#1 choice of professionals since 1980. Our latest release is even better - you can open windows to simultaneously edit several files, ac-cess many editing functions with pop-up menus, use keystroke macros to speed editing, and run other pro-grams or DOS commands from within VEDIT PLUS.

Whether your needs are program development, tech-nical writing or word processing, VEDIT PLUS is your answer. With over 40,000 users you can depend on VEDIT PLUS to perform consistently and reliably. It is simple enough to learn for the novice, yet has the speed, flexibility and power to satisfy the most de-manding professional.

Compare. No other editor is as powerful - unlimited keystroke macros, instant 'off-the-cuff' command mac-ros utilizing a complete programming language, sin-gle command file comparison, special word process-ing and programmprocess-ing features. No other editor is as easy to use - on-line help, pop-up menus, 75 page tutorial, 380 page manual, and VEDIT PLUS is com-pletely customizable.

Fully supports colorwindowson IBM CGA & EGA, and even windowson most CRTterminals (including CRT's connected to an IBM PC). Available for IBM PC, TI Professional, Tandy 2000, DEC Rainbow, Wang PC, MS-DOS, CP/M-86 and CP/M-80. Order direct or from your dealer. $185

"To sum things up, VEDIT PLUS is a small,fast., sophisticated editor with a wealth of features and a good macro language. It offers many rewards forthe dedicated programmer."

Computer Language, Chris Wolf, ·Scott Lewis, Mark Gayman 6/86

"VEDIT PLUS is a wholly remarkable program: blindingly fast, extremely powerful, and highly flex-ible." .

Profiles Magazine, Robert Lavenda 4/86

VEDIT and CompuView are registered trademarks of CompuView Products, Inc. MS-DOS is a registered trademark of Microsoft. CP/M is a registered trademark of Digital Research. WordStar is a registered trademark of MicroPro.

CHOICE IN

PROGRAMMABLE

EDITORS

VEDIT PLUS FEATURES

• Simultaneously edit up to 37 files of unlimited size. • Split the screen into variable sized windows. • 'Virtual' disk buffering simplifies editing of large files. • Memory management supports up to 640K.

• Execute DOS commands or other programs. • MS-DOS pathname and CP/M user number support. • Horizontal scrolling - edit long lines.

• Flexible 'cut and paste' with 36 text registers.

• Customization - determine your own keyboard layout. create your own editing functions, support any screen size, any CRT. • Optimized for IBM PC/XT/AT. Also 132 column & up to 70 lines. EASY TO USE

• Interactive on-line help is user changeable and expandable. • On-line integer calculator (also algebraic expressions). • Single key search and global or selective replace. • Pop-up menus for easy access to many editing functions. • Keystroke macros speed editing. 'hot keys' for menu functions. FOR PROGRAMMERS

• Automatic IndentlUndent for 'C'. PUI or PASCAL. • Match/check nested parentheses, i.e.

T

and'}' for 'C'. • Automatic conversion to upper case for assembly language

labels. opcodes, operands with comments unchanged. • Optional 8080 to 8086 source code translator. FOR WRITERS

• Word Wrap and paragraph formatting at adjustable margins. • Right margin justification.

• Support foreign. graphic and special characters. • Convert WordStar and mainframe files.

• Print any portion of file; separate printer margins. MACRO PROGRAMMING LANGUAGE

• 'If-then-else', looping. testing, branching, user prompts key-board input, 17 bit algebraic expressions. variables. • CRT emulation within windows, Forms entry.

• Simplifies complex text processing, formatting, conversions and translations.

• Complete TEeO capability.

• Free macros: • Full screen file compare/merge • Sort mailing lists. Print Formatter. Main menu

CotnpuView

1955 Pauline Blvd., Ann Arbor, MI 48103 (313) 996-1299, TELEX 701821

(14)

A

Cheap

68000

Operating System

Update On The 68000 Project

One of the hot topics at SOG V was the continued lack of an inexpen-sive, standard operating system for the 68000. The processor is cheap, dirt cheap, considering its power. But that .lack of a generic system has really stifled its use by individuals.

Joe offered to create a single-user version of his nearly-finished multi-user operating system and to sell it for $50 per copy. Complete. He's been as good as his word and in this article on the operating system he begins a series on the 68000.

T

he end of July 1986, at SOG V, we demonstrated a large single-board multi-user 68000 system. At that time it would multitask, but it had no. native software. There was also almost no interest in it because it was an unknown operating system with no applications software.

However, we were able to use that almost-finished operating system as a model for our single-user K-OS ONE. The two are compatible so that any programs that run with K-OS ONE will run with the multiuser system once it's available. (Next summer.)

Operating System For Experimenters We put K-OS ONE together for experimenters. With the new ICs like the 68000, it's possible to create power hardware with little effort.

The software, though, is a big prob-lem. When building a 6502 or 6800 system, a simple PROM monitor would be fine. For a Z80 or HD 64180, you can purchase CP/M or one of the work-alikes. There was no cheap, readily available, portable operating system for the 68000 and other large processors. So we wrote K-OS ONE.

We decided it had to be simple, small enough to run in 128K of RAM, and require one (or no) floppy drive. We didn't include low level support for graphics or sound because they

weren't standardized hardware. If they're desired, they can be treated as standard devices.

The Amiga, Atari, Macintosh, and Sinclair QL all use the 68000 micropro-cessor. All of them have operating systems, but none of their software runs on other machines.

Also, none of the systems software is available separately. You get it with the machine. There are a few generic operating systems for the 68000, but for the most part they're expensive or difficult to use or both. The field is not dominated by a single system such as CP/M or MS-DOS.

The Base Operating System

The most c'iJmmon disk format today is the 360K PC variety. Because it's so common we chose to support it in K-OS. Thus we'll have access to a lot of public domain data and source code.

This choice of disk format also means that we can share text files with the PC. We can do our editing on a PC and then use the files directly on our 68000 machine. We can also use any PC based tools such as cross compilers, cross assemblers, debug-gers, disk inspectors, and the like.

Though K-OS ONE is not public domain, we provide source code for the base operating system and com-mand processor. That way you can see what's going on and experiment with modifications.

We wrote the system in HTPL, a high level language, to make it easier to understand. If it were in assembler the listing would have been several hundred pages.

Purpose Of The Operating System The operating system manages sys-tem resources and provides a defined hardware interface for programs. Most of the services deal in some manner with storage or 110.

We divided the functions into four areas: 110, program control, batch con-trol, and non-disk miscellaneous.

By Joe Bartel

Hawthorne Technology 8836 SE Stark Portland, OR 97216 503-245-2005

In system design what you leave out is as important as what you put in. A complex system is more powerful but is larger and harder to learn. We wanted a system that was no more complex than CP/M or MS-DOS. Where we could simplify, we did.

System Calls

We used a common format for all system calls. We also used parameter blocks in memory instead of processor registers or a stack, so it's easier to move our design to other processors.

The use of parameter blocks made it easier to write the OS in a high level language. It also means that it's easier to make changes without . affecting current applications, and it's generally easier to access system services.

All input and output is device inde-pendent. You open' a channel by sup-plying the path name of the file or device. Once you've opened the chan-nel you supply only the chanchan-nel num-ber and the numnum-ber of bytes to read or write. This format is familiar to anyone who uses UNIX or MS-DOS. Disk storage is transparent.

Command Processor

We included some functions to make it easy to write a command processor.

K-OS imposes no structure on pro-gram area. There are no reserved areas like the PSP in MS-DOS or the facili-ties below 100H in CP/M.

Programs must call the operating system to get command line argu-ments (the OS can return any string). A program figures out what its envi-ronment is like through system calls.

The user interface part of the com-mand processor is as easy to modify or replace as any standard program. Our command processor is a simple one that looks a lot like MS-DOS. With a little effort you could modify the com-mand processor to look like just about any other operating system.

(15)

com-mand processor. Or, for a vertical market system, it could be replaced by a menu - only making available what's needed (and safe).

The current command processor does not support batch processing. (So we could release the package quickly.) It would not be hard to modify the current system to include batches. We have included calls to start a batch file, to get the next line of the batch file, and to get the command line that started the batch file.

Editor

The editor is a simple line editor. Line editors don't need to be installed to be usable. Until someone ports over a really good editor, it's easy to use an MS-DOS machine for words work.

Assembler

The assembler is a simple two-pass absolute assembler. It supports Moto-rola mnemonics and most standard pseudo ops. It generates a .HEX file so there is no provision for linking or relocation. You can include the assem-bler's .HEX files in HTPL programs. You can specify include files but not macros. It does have listing control.

HTPL Compiler

The HTPL compiler is a simple two-pass compiler that converts the source program into a position-independent, ready to run, .BIN file.

We supplied HTPL so you could customize the operating system. The purchase or licensing of a standard compiler would have made the cost prohibitive. (General 68000 software isn't cheap yet.) While HTPL is a new language, it's been, a very easy lan-guage to use. Almost all of K-OS ONE is written in HTPL.

We considered using assembler, Modula-2, C, Pascal, and FORTH. If we had used assembler, the operating system would have been a little small-er and it could have been placed in PROM. We'd also have spent a lot

longer developing the system. (We may still use the assembler for special OEM versions.)

The Modula-2 compiler we looked at generated huge files and required lots of memory. Our 256K Sanyo wasn't up to the task. We would have used Small-C if we'd had it, but we didn't. Same problem with Pascal. FORTH is OK, but it's hard to follow and is not well suited to variables. It's also hard for non-FORTHers to understand.

I wrote HTPL after reading DDJ's special issue on FORTH. HTPL has the structure of Modula-2 (which I like a lot). But it doesn't have the overhead garbage.

We had already written the structur-al part of a conventionstructur-al compiler. Plus, we had the lexical and symbol table routines. The hard part of writ-ing a compiler is makwrit-ing it produce good code.

An RPN (reverse Polish notation) compiler can generate good code with a simple, compact code generator.

Even though HTPL uses RPN ex-pressions, it is neither threaded code nor an interpreter. It's a true compiler. HTPL has worked out so well that 95% of the system, including the edi-tor, assembler, and compiler, is in HTPL.

The programs are about the same size as they would be if we'd used assembler. Even with a floppy disk, the compiler is fast.

The runtime library for HTPL is written in assembler. We include the source so you can modify or customize it.

Installation

K-OS ONE is available in two forms: a generic form that's easy to port to a new machine; or ready to boot on the TinyGiant board.

If you purchase the portable version you have to install it. This means, you write a driver program for the disk and for the system console. To make it easier we supply a sample BIOS and

boot program in assembly language. You can modify these to fit most machines.

First you have to create a monitor or boot PROM for your hardware. Then you load the binary copy of the patch-able system into the machine.

Then you patch in the addresses for the 110 drivers and run the operating system. At this point you can edit the source code to make a better custom installation for your system.

Summary

Since SOG V we've had good re-sponse to K-OS ONE, and there's an active group of users (including our-selves) working on new software. We will be publishing any changes made to the operating system so everyone will stay up to date.

We're also working on utilities to make the system easier to use. And we're seeing public domain programs showing up already in the 68000 con-ference on Micro C's RBBS. (503-382-7643, 24hrs, 3-12-2400 baud, 8 bits, no parity, one stop bit.)

Joe has also spent a good deal of time since SOG looking for powerful, but inex-pensive 68000 hardware to be a base for

K-os

ONE. He's found it, and the complete unit, with operating system, is $395. Contact him for more information.

•••

(16)

ERACCO.

8280 Clairemont Mesa Blvd. ,Suite 117

San Diego, California 92111

19) ·569-1864

Call for our Test Equipment Mailer!

*5 ECIAL*

IBM/PC COMPATIBLES

DBASE BOOK OF BUSINESS APPLICATIONS

by Michael J. Clifford

Reg. $19.95 I

While they last ONL Y .

$2.95

KAYPRO EQUIPMENT

9" Green Monitor ... $35.00 12" Green Monitor ... 45.00 Keyboard (Kaypro) ... 75.00 Keyboard Siemens w/case ... 65.00

KAYPRO MAINBOARDS K2 Populated - Tested ... $129.00 K4 Populated - Tested ... 159.00 K2 with PR08-3 Mod ... 239.00 K2 PR08-3 Mod. EXCHANGE ... 149.00 WD1002-5 Hard Disk Controller. 200.00 Host I nterface Board ... 15.00

KAYPROICS

81-189 Video Pal ... ' .. $15.00 81-194 RAM Pal ... 15.00 81-146 K2 Character Gen ... 10.00 81-149A K2 Monitor ROM ... 10.00 81-232A 484 Monitor ROM ... 10.00 81-235484 Character Gen ... 10.00 81-187 K1D Character Gen ... 10.00 81-292A 484 Monitor ROM ... 10.00 81-302C K10 Monitor ROM ... 10.00

MISC. CABLES

9" 50 Pin - 50 Pin Header ... $2.50 14" 40 Pin - 40 Pin Header ... 2.25 9" Hard Disk - 20 Pin Header .... 2.00 14" Duallnline 16 Pin Male (2) ... 2.00

CPU/SUPPORT

MC68000-8 CPU ... $9.99

l80 CPU ... 1.00 l80A CPU ... 2.50 l80A PIO ... 2.50 l80A SIO ... 5.00 l80A DMA ... 10.00 8088 ... 10.00 8089-3 ... 29.00 ' D8284A ... 2.50

TEST EQUIPMENT

OSCILLOSCOPES

Tek 485 350 MHz ... $2995

H-P 1725A 275 MHz ... 2095

Tek 454 150 MHz ... 825

Phillips 3260E 120 MHz ... 995

Phillips 3214 25 MHz ... 575

SPECTRUM ANALYZERS Tek 491 10 Mhz-40 GHz ... .4600

H-P 851B/8551B 10 MHz-40 GHz 1500 HOURS: Mon.· Fri. 9 . 6 - Sat. 10 ·4 MINIMUM ORDER - $15.00 TERMS: VISA, MasterCard, Certified Checks, Money Order, NO COD. Visa and MasterCard add 3%. Personal checks must clear BEFORE we ship. Include shipping charges. California residents add 6% Sales Tax. For more info please call - DON'T WRITE! We don't have time to answer your letters. Mainboard, 8 Slot, Case, Power Supply ... $225

To make this a complete system, add' Ai Memory B) Floppy Controller C) Drive D) Keyboard E) Video Card ' F) Video Monitor G) Multifunction Card A) MEMORY 256K 150NS ... $25

512K 150 NS ... .; ... 50

640K 150 NS ... 68

B) FLOPPY DISK CONTROLLER Card for 2 Floppy Drives ... $36

Card for 4 Floppy Drives . . . .. 42

C) 5114" FLOPPY DISK DRIVES JVC MDP-200 DSDD 40 Tr ... $99

Mitsubishi M4853 DSDD 80 Tr ... 99

Fujitsu M2551A DSDD 40 Tr ... 99

Panasonic JU455 DSDD 40 Tr ... 105

Shugart 475 DS Quad ,1.2Mb ... 159

D) KEYBOARDS Cherry Keyboard (no case) .. ~ .. $38

AT Style Keyboard. . . . .. 69

E) VIDEO CARDS Tomcat with Parallel and Lightpen Port ... $53

Hercules compatible Video Board 75 Color Graphics Adapter . . . .. 69

Enhanced Graphics Adptr-(EGA) .275 F) VIDEO MONITORS Roland MB-122G, 12" (no case) $39 Samsung MD-1254G, 12" Green 82 Samsung MD-1254A, 12" Amber 88 Goldstar MBM-2015, 12" Amber 106 Mitsi AT-1332A 13" RGB TTL .. 295

Goldstar MCH-4015 13" RGB .. .420

Goldstar MCL4333 12" Composite Color Monitor ... 159

1 year parts & labor. Apple & Commo-modore compatible. with audio amp & volume control. Great for VCRs. G) MULTI FUNCTION CARD Parallel & Serial Port, Game Port Floppy Controller, Clock & Cal. $96 SIO Card ... 36

EGA PACKAGE DEAL Package consists of Intergraph + 4 EGA Card and the Autoseek 2000 EGA Mon-itor by Int'I Graphics. No software patches necessary. 1 yr. guar. ... $795

EPROMS 2716 ... $3.50 2732 ... 3.75 2764-25 ... 3.50 PRINTERS Centronics 703 ... $395.00 Centronics 588 - As Is ... 125.00 NEC2000 w/Single Sheet Feed .. 999.00 Sweda Cash Registers Models 303, 2640 & 2650 From major supermarket ... $99 ea. SYSTEM· EXAM PLE #1 For the Hacker (Cheap) Mainboard, Case, Power Supply .. $225

256K Memory 150 NS .. . .. .... 25

Floppy Controller (2 Drives) . . . . .. 36

Floppy Drive 112 Ht DSDD... 99

Keyboard Cherry (no case) ... 38

Video Board with Parallel and Lightpen Port. . . . .. 53

Roland MB-122G, 12" Green Monitor (no case) ... ~ $515 SYSTEM EXAMPLE #2 FCC Approved (Not Cheap) Mainboard, Case, Power Supply .. $225

640K Memory 150 NS . . . .. 68

Multi 1/0, Parallel, Serial, Floppy, Clock/Cal. ... . . .. 96

2 DSDD Floppy Drives (minimum) . 198 EGA Package. . . . .. 795

AT Style Keyboard ... ~ $1451 Oh, you wanted a turbo board .... 40

and a 20M Hard Drive & Controller. 410 Now how much would you pay? JUST $1901 HARD DISK DRIVES 10M Seagate 212 ... 200

10M Rodin RO-252 ... 230

20M ST-225 ... 385

20M Tandon TM252 ... 350

20M Tulin (Oki) ... 345

20M Half Height with Controller ... 410

32M Half Height with Controller. .. 667

40M Quantum Q540 . . . .. . . .. 650

60M with Controller ... 1150

70M Vertex V170 . . . .. 725

HARD DISK CONTROLLERS WD-1002-WX2 with Cable ... $156

Omni-5510 ... . . . .. 150

Adaptec 2070A (Get 15M on 10M Drive) 156 Kanan KXP230 15 Meg ... 165

POWER SUPPLIES

Elgar 400W Unint. Power Sup .. $195.00 + 5V/1A, - 5V/.2A, + 12V/1A, -12V/.2A, - 24V/.05A ... 15.00 +24VI2.2A ... 8.00

SWITCHERS

5V/9.5A, 12V/3.8A, -12V/.8A $39.00 5V/3A, 12V/2A, -12V/.4A ... 29.00 5V/10A ... 25.00 5V/75A, + 12V/8A, + 24V/5A .. 55.00 5V/30A ... 39.00

MISCELLANEOUS

(17)

$89Price

• Separate Compilation

• Native Code Generation

• Large Memory Model Support

• Multitasking

• Powerful Debugging Tools

• Comprehensive Module

Library

. NEW,

improved Turbo

Pascal to Modula-2

Translator!

Call for information about our VAX/VMS version. Site License. University Discounts. Dealer & Distributor pricing.

To place an order call our special toll free number:

• Available for the PC

and the VAX

Move up to LOGITECH

MODULA-2/86. Whether

MODULA-2/86

800-231-7717

In California:

800-552-8885

you're a single programmer or part of a team, with LOGITECH MODULA-2/86 you'll decrease your overall development cycle and produce more reliable, more main-tainable code. Build your program using our extensive library modules, your own modules or those from a growing list of available third-party software vendors. If

you're a Turbo Pascal user you can even take your existing code along with you with the h

Figure

Figure 1 - 80386 Pinout
Figure 4 - Effectiveness Of Cached Systems
Figure 1 - Wiring The PIO Socket (and PIO Pinout)
Figure 2 - A to D Convertor Circuit
+7

References

Related documents