Micro Cornucopia #45 Jan89
Micro Cornucopia #45 Jan89
Micro Cornucopia #45 Jan89
95
January-February 1989
No. 45
THE
TECHNICAL
MICRO
Computer
Aided Design
Thinking of setting up shop as a hardware
designer? Schematic capture and board
layout tools will not only make you more
efficient, they'll really put you in demand.
CAD In A Consulting
Business
page 8
page 16
page 22
page 26
page 34 .~_,_.,.
Plus:
The Turbo Debugger Arrives
MASM5.1
And Much, Much, More
12
74470 19388
50
54
J 0 URN A L
#1
Until now, if you wanted the best Undo, the best compiler support, regular expressions and column blocks you chose
BRIEpM. If you wanted unlimited keystroke macros, the best
configurability, "off the cuff" command language macros and
blazing speed, you chose VEDIT PLUS.
PROGRAMMABLE
EDITOR
Completely Configurable
Change a few keys or redefine the entire keyboard, VEDIT
PLUS adjusts to your editing style in minutes. You can even
create new editing functions using simple keystroke macros or
fine tune existing ones. VEDIT PLUS is so configurable that it
easily emulates other editors and word processors (WordStar
and Word Perfect emulation included). Quickly access editing
functions with a single key or through the pull-down menus.
YOUC811
deliver itr~~e::~o:::~m~~t
re
199
~~~~~~
Software: Most PC-DOS and MS-DOS application
programs; programs specific to Microsoft Wmdows
1.03-21, GEM 1.1-3.0, ffiMTopView 1.1- Media:
th 5-1/4" '11/2"
allabl
DF5Qvi~w 2.O!Sav
eonel er
or.:r
floppy diskette.
~.
.
Trademarks are property of theIr respective holders:
mM, CY3/2, fX?/2, 1-2-3, Paradox, Word Perfect,
rq~~..J~~ Ventura Publisher, AutoCAD, Intel, Above Board,
M
CA 90405
AST, RAMpage, Advantage, Hercules, Mouse
150 p.ICO BI.vd. , S
anta
omca,
Systems,Hayes,Microsoft, Wmdows, TopView.
~~o/J'-'l\,v~-YfJ<1~1 J ~
-='~,......-.
RUN CODEVIEW
IN~~LY8K!
..
I~
~~~
Soft-ll
Hardware-level break points
REAL~ TIME
Save $36
MagicCV
Soft-ICE
$199
$386
Both require 80386 AT compatible or IBM PS/2 Model 80. MagicCV requires at ~._lIIiiiiiiiJ"_iiiiiii"_."
least 384K of extended memory. CodeView is a trademark of Microsoft Corporation.
MagicCV
with Soft-ICE
Using Soft-ICE with CodeView gives you the features
necessary for professional
level systems debugging.
MagicCV and Soft-ICE can
work in concert with CodeView to provide the most
powerful debugging
platform you will find
anywhere.
THE
M I C R 0
TECHNICAL
J 0 URN A L
NiICRO CORNUCOPIA
JANUARY/FEBRUARY 1989 - ISSUE NO. 45
"C:f2 M c::,fnlfn/D)(i;;{c;;)
1rl.5l.'; \ _ ~tn)15e)
Sam Azer
50
C'ing Clearly
The Turbo Debugger is coming. The Turbo Debugger is
coming. The Turbo Debugger is here!
54
86 World
Laine disects MASM 5.1.
62
ShareWare
Tony inspects the troups fighting the ARC wars.
64
66
On Your Own
75
84
CP/M Notes
Sources of software for your favorite antique.
90
Tech Tips
16
22
26
34
Scott Baker
Walter Bright
40
47
Larry Fogg
r-------,---- ------.-------,
86
Tidbits
Computers are time traps. Gary, however, discusses traps
of another sort.
96
Last Page
Gary tackles huge numbers. I mean HUGE numbers.
Printer Graphics
What does Micro C have that Borland doesn't. We have
Larry, and we have BGI-like printer graphics.
Thomas Gettys
@bWJ~yf(~r@
By David J. Thompson
THE
MICRO
TECHNICAL
JOURNAL
MICRO CORNUCOPIA
Editor and Publisher
David J. Thompson
AROUND
THE BEND
Associate Editors
Gary Entsminger
Cary Gatton
Technical Department
Larry Fogg
Director of Advertising
& Distribution
Jackie Ringsage
Accounting
Sandy Thompson
Order Department
Tammy Westfall
Graphic Design
Carol Steffy
MICRO CORNUCOPIA (ISSN 0747-587X) is
published bi-monthly for $18 per year by Micro
Cornucopia, Inc. 155 NW Hawthorne, Bend, OR
97701. Second-class postage paid at Bend, OR and
additional mailing offices. POSTMASfER: Send
address changes to MICRO CORNUCOPIA, PO
Box 223, Bend, OR 97709.
SUBSCRIPTION RATES:
1 yr. (6 issues)
2 yr. (12 issues)
3 yr. (18 issues)
1 yr. Canada & Mexico
1 yr. Other foreign (surfaca)
1 yr. Foreign (airmail)
$18.00
$34.00
$48.00
$26.00
$36.00
$50.00
MICRO CORNUCOPIA
P.O. Box 223
Bend, Oregon 97709
CUSTOMER SERVICE: For orders and
subscription problems call 503-382-8048, 9 am to 5
pm, Pacific time, M-F.
For technical help call 503-382-8048,
9 am to noon Pacific time, M-F.
ISSN 0747-587X
Continued on page 70
~.....
'.:0
1-800-221-0440(O~~~de
(NJ and
Outside U.S.)
Telex:
4995812MANX
Fax: 201/5428386
ebyMJ\NX
SOFTWARE SYSTEMS
le~terrs
Only $99
(!gf!~';t; (&!tiWiJlI:j~li[tl(!IH~l
,;
(!r'::"!~i;,'II'I~I!I:-~
(!r;,Y:.\;J.~ I'I(
!.
(m..:~!
,J~.!):gY:.~.#lE;;
'~.l:Ii\.'.'/I';li,,(;kH~[i1ill:'l' 1~1;~i-"i
,lil"!l~I!I"'i'il!Hr~,
No More SearchingThrough
Books
Each DBASE !l.!LlJ.nL reference
database is a complete and thorough
reference library eliminating the need
for tedious time-consuming searches
through books and manuals. All
reference databases are organized so
you can find relevant information/ast.
Comprehensive DBASE
Reference
DBASE ~ gives you quick
reference to important information
such as; syntax, description, options,
notes, library, example of use and
complete cross reference to all related
keywords.
II
"/i!:HH:":;t.", leJ('l!lf:li'"
, 1:'\~I\_i~ii\'jIH,,;::_~,'~tl I~~I.~.:'''''
1'-:1
.,'1,i!c':):Ji,
,'0'II1i
'(!JI' -fUll"lliti ,
i:lil!lh(:l
'!~~i~)'lilill~(Hi;l~ I lit:.: 1~'Wil!li'
(q!ll!t~"i Ij;H:.jt:lirtj:),il;'hI.!1~~1;
,fi!1 i iHl Ito). ,:1 iti I! 1111:,01 'iH!iWH, [! I
l'J,il~,lf!,'~~:ti\l:,
l'I!HIr l!lW"
'~:WI{ol'I.!;"~l!lrm~l
60 Day Guarantee
DBASEOA
11M
Free Upgrades
Ya Done Good
Just wanted to let you know that your latest issue of Micro C
(Nov.-Dec. 88) is a winner! Would you believe I spent the whole
evening reading it?
I liked the editorial of course (I never miss that!). But, about
your "fly around": that would have given me quite a scare if I
had known about it while you were in flight.
Then there was Laine Stump's travelogue from Turkey. Oh, I
skipped over the few references to computers, but mostly it was
good. The comments on SOG VII made me proud, especially
the mention of Debee and the hit she made with everyone. I
liked what Barbara Hall wrote, too. Actually, this issue tripled
my reader interest.
"Bits From Your Past" was okay, but I could fill you in a
little on that. Like when you were in Junior High and refused to
write even one paragraph in English class and did a balsa wood
project in place of a theme. And when you were in college and
wrote those six-line weekly letters home.
Actually your new format and cartoons and color are all impressive - and yes, even the plastic bag. If I could understand
computers at all, I'd read the whole magazine. But just the
same, I'm proud of you and love to display your brainchild on
the coffee table.
Now to get back to Better Homes.
p.s. Even though we haven't paid for it yet (we're saving for
a trip to Turkey), please keep our subscription coming. Many
thanks.
Continued on page 82
YOU'LL LOVE
/f ~~'il S~~~??T:;:~.ESo
~\i
'0
~
b
The breakthrough
fast screen toolkit for
generator Turbo Pascal 5.0
It doesn't matter which language you program in. With Saywhat, you can build beautiful.
elaborate, colorful screens in
WiE
GUrARANTEE IT'
6?
!J.)
ORDER NOW. YOU RISK NOTHING. Thousands of satisfied users have already ordered from us. Why not call toll-free, right
now and put Saywhat and Topaz to the test yourself? They're fully guaranteed. You don't risk a penny.
SPECIAL LIMITED-TIME OFFER! Buy
Saywhat?! and Topaz together for just
$85 (plus $5 shipping & handling).
That's a savings of almost $15.
To order: Call toll-free
o YES. 1want to take advantage of your special offer! Send me _ _ copies of both Saywhat?!
and Topaz at $85 per pair (plus $5 shipping & handling!. That's a savings of almost $ 15.
In California: 800-231-7849
NAME _______________________________________________
International: 415-467-6840
ADDRESS _____________________________________________
CAD In A
onsulting
Business:
ShouldYou Use
OrCAD,
smARTWORK,
,
Hi Wire,
Generic CAD D,
or So"!ething, Else?
__ . _ - - - - - - - -
By Sam Azer
AzerTech
2095 Patricia Ave. #1
Montreal, PQ
Canada H4B 1Y7
Desktop Publishing
Yup, I know, Desktop Publishing is a
strange place to start a CAD review. In
fact, it isn't really even CAD. But I'm
trying to paint a picture of a consultant
using CAD. So I think a few digressions
in the early going will help you understand my comments about specific CAD
systems later.
Text is fundamentally important to
the CAD consulting process. The con-
Over a year
ago, I decided to
bring PC-based
CAD software into
my business. I
hoped it would
.
Improve my
productivity. It did.
Libraries
If you type "G27256<enter>" WHAP! - a 32K by 8 EPROM appears
on the screen. Move it to where you
want it, then type "P" (Place) to put it
down. Move it some more, then type
"P" again; until you've nailed down all
10
FLDSTUFF
FLDATTRB
COMPOSER
and DECOMP
and the following indispensable utilities
; NETLIST - currently generates 26
different kinds of netlists. It lets you
communicate the structure of your schematic to other programs such as simulators and PCB CAD packages. It also
generates a list of connections which
can be used as a checklist for wire
wrapped prototypes. (Editor's note: A
netlist is a list of all the parts and their interconnections. It's usually generated by the
schematic capture program for use by the
board layout package.)
CROSSREF - generates a whole
slew of handy cross reference tables. For
example, it can actually figure out if
you've got any spare gates available
and list them for you!
ERC - an error checking program.
This program does basic electrical rules
checking. I've found that it helps
highlight obvious flaws in a schematic.
Sometimes these are just drawing errors, but (during the wee hours?) they
can also be conceptual errors. At any
rate, you don't always have to wait
until you're awake before you find out
about the obvious ones with ERC on
hand.
Command line options are consistent
across all the programs in the package
- a small detail, but it does make the
programs easier to use.
The manual is a bit repetitive at
times, but it's understandable and fairly
well organized. Although there isn't a
quick reference section, it's still very
complete. For example, one of the many
appendices contains sample device
driver listings and an explanation of
how they work.
OreAD, The Company
The company's simply a joy to deal
with. I needed to get some schematics
out of OrCAD and into Ventura one
night, so I wrote a simple program to
convert the output from their generic
plotter driver (something they invented
to help out in such emergencies) to a
DXF file. I called them up a few days
later and mentioned what I'd done.
A couple of weeks later, I received
an update with a new DXF driver. Then
Bruce Eckel (see his piece this issue)
asked me if they had a PostScript driver
(he needed one). A few days later,
another update arrived. This one included a file called PSCRIPT.DRV!
@ Edit Advanced
the
~7
66Q1lJ11Cn
editor??
0
By SEMWARE
QEdit is one of the smallest,
fastest, most easy to' use multifile editors available for IBM
Compatible Computers with
many features to enhance
your productivity.
D Extremely Fast
D Completely Configurable (Including Key-
board')
D Easy to Use Macro
Facility
D Utilize up to 8 Windows
to View Files
Q Edit Advanced requires an
$ 5 4 95
MASTERCARD &.
VISA ACCEPTED
11
or a really
complicated board,
you'll still have to
scribble wire
routing ideas on
paper before
putting down the
pads.
doesn't even remotely resemble anything a human can read. It's just plain
hard to figure out if there's a mistake.
smARTWORK helps in two ways:
First, the EDIT program makes the
knife, tape, and mylar that we're used
to working with obsolete. Dry transfer
symbols and the burnishing tool are
partly replaced by commands that
handle a number of common parts. A
manual router automatically draws a
trace between two pads, using the
shortest path it finds.
The second form of help is even
more valuable: it loads a netlist (in my
case, from OrCAD) then shows me
missing pads and traces.
A Simple Example
I once got into a friendly argument
with a fellow consultant about the value
of something like smARTWORK. Since
we were both sitting in front of my system at the time, I tried the following demonstration:
First, I went into OrCAD's DRAFT
program. I loaded the schematic for a
speech synthesizer board, and exported
CASES &
POWER SUPPLY
DTK 101 key XT~AT .................. 49.00
KB101 Keytronic ....................... 61.00
Focus 101 Key, Tactile, Switchable,
control caps lock, Dust cover... .. 89.00
-Chosen #1 Find by Micro C Staff-All keyboards switchable to XT or ~ T-
MONITORS
HARD DRIVES
VIDEO CARDS
Color /Graphics/Parallel ........... . .. 52.00
Mono/Graphics/Parallel.............. 49.00
EGA, CGA, VGA (640x480) ....... 129.00
VGA Analog, STB Extra .............. 239.00
EXPANSION CARDS
Clock Card ............. " .............. " 22.00
Dual Floppy Disk Controller ........ 25.00
Game Port .... :....................... . . . . 19.00
XT Multi~Function, 1 ser/par/clk/
game/2 floppy........................ 49.00
Parallel (Supports LPT 1, 2or3) ....... 18.00
Serial Port Card - 1 installed
switch able Com 1,2,3, or 4 ...... 22.00
Kit for 2nd Port.... .. .. .. .. .. .. .. .... 20.00'
XT 640K RAM (elK installed) ......... 35.00
XT 2 MB Intel EMS (elK installed) '" 99.00
XT/ATMulti IIO
Serial/Par/Game .................... 41.00
Kit for Second Serial.. .. .. .. .. .. .... 30.00
AT 2 MB Intel EMS (elK installed) ... 139.00
XT / AT Multi Drive Controller Supports 1.44, 720K, 1.2, 360K
drives on XT or AT................. 39.00
MOTHERBOARDS
XT/Turbo 4.77/8 mhz ................ 89.00
XT/Turbo 4.77/10mhz ............... 89.00
AT 6/10 mhz Choice of Award,
Phoenix or DTK Bios ...... r ...... 279.00
AT 6/12 mhz Choice of Award,
Phoenix or DTK Bios ............... 340.00
Baby AT 6/12 mhz
AMIIDTK Bios ...................... 299.00
802866/16 mhz DTK Bios .......... 495.00
803868/20 mhz/DTK Bios ....... 1295.00
For XTI AT memory ..................... $Call
& CONTROLLERS
KIT OPTIONS
MS DOS 3.21 w/GW Basic ............ 49.00
MS DOS 3.31 w/GW Basic ............ 95.00
25MS 3053 HD for 3650 add .......... 110.00
*Color Options:
(Includes video card & monitor)
eGA Color ......................... 175.00
CGA/EGA Color ............ ' ....... 380.00
CGA/EGAIVGA Color
(Multi Sync) ...................... 450.00
VGA (analog) Color ................. 650.00
ASSEMBLY AND TESTING
XT Systems .......................... " 60.00
AT/803R6 Systems... .. .. ...... .... ... 80.00
SOFTWARE
MS DOS 3.21 w/GW Basic ......... 49.00
Flight Simulator 3.0 by Microsoft .. 39.95
ACCESSORIES
Generic Analog Joystick............... 25.00
Gravis Analog Joystick................ 49.95
V20~8mhz ................................ 14.00
1200 Baud Internal Modem.... ...... 79.00
2400 Baud Internal Modem .......... 119.00
EPROM Programmer (4 gang) ....... 175.00
Memory Chips ............ (call for prices)
MICE
BUILDING YOUR
OWN CLONE V2.1
80386 KITIncludes: 1MB RAM, 1360K floppy drive, 11.2
MB FD. 140MB HD, DTK bios, switch able
keyboard. monochrome monitor, monographics.
Serial/parallel ports, case, power supply, game
port, clock/calendar.
****FREE BOOKLET****
*90-day warranty 130-day money back
(subject to restrictions)
~MicroS'PhereN(;
~COMPUTER.S
855 N.W. Wall
Bend, Oregon 9770 J
(503) 388~1194
Hours: Monday.Friday
9:005:30
13
important.
All the problems listed above get
worked out quickly, though. And it's
infinitely easier than cleaning the tips
on plotter pens.
Smart Conclusions
smARTWORK does what it does
very well. The manual is complete and
relatively easy to follow. It's sprinkled
with little diagrams, and includes a tutorial and a command summary.
I was going to complain a bit about
the silly user interface, but I found out
that it's recently been modified. Since
my gripes with smARTWORK aren't really significant, I'll keep my mouth shut
until I get my hands on the update.
Support from the manufacturer is
probably about average. Again, they answer the phone, and they allow me to
speak to the guy who writes the software. (I like that.) They're helpful when
a problem comes up, and they know
what they're doing. They also send out,
two to four times a year, technical bulletins and newsletters. The only thing
that bugs me is having to send back the
previous update in order to get the new
one.
Overall, I would definitely recommend smARTWORK to a company that
has several simple boards to do per
year. It's so efficient that it'll pay for itself shortly. If you need something
more sophisticated, or if you don't do
many boards, check around before buying. Don't forget that Wintek has a 30
day money-back trial period.
HiWire+
I don't like HiWire. I bought it just
as it was being released for beta testing,
and I agreed at the time to live with
whatever bugs I found until they could
be corrected. As it happened, I didn't
have time to look at it too closely, and
my thirty day money-back guarantee
ran out. In all fairness to Wintek, it
must have been around three months
before I complained, so I suppose I
don't deserve to get my money back.
Essentially, the folks at Wintek are
technically competent. They produce
good, solid code. Unfortunately, my
main problem with HiWire is that it's
just too difficult to use. I've repeatedly
made suggestions that have gone unheard over the couple of updates that
I've so far received (and paid for, at $45
each.) It is getting better, but very
slowly. They're working on an autorouter, which is great, except that I feel
they should first improve the user inter-
Notes
The Generic CADD version that I've
got is 3.00. I'm sure it's out of date. The
latest version of Ventura Publisher
that's out is 1.20. Check the mail order
ads or the local computer outlets for
best price and delivery on these items.
I'm currently running smARTWORK
A twO-billion-power
Mandelbrot/Julia microscope.
Fast!
Aim-and-frame, quick draft,
animate, recolor, retouch, multiple
palettes, save and retrieve, cloud
chamber, help and more.'
Includes seven ready-made
pictures for immediate
gratification.
MANDELBROT
EXPLORER 2.6
$30
Peter Garrison
1613 Altivo Way
Los Angeles, CA 90026
(213) 665 1397
16-color VGAlEGA to 800x600
Specify VGA or EGA, 1.2Mb
OVerseas orders please add $4
15
16
Bv Scott Baker
o
ooo~oo
C. 0 0
~~
0;-
o~
:y
'I
o 0 0
~o+r~q~==.~o~0ft0~o~lo9F0r-F0ffi~0!lA=~I~ol~~o~I~~O~O~o~
reo 0",;
CI
00 0 0 0
00 0
0 0 0
0 - 0
0 .
0
0 ~ c
0 0 tN
0 0 PJ
III
1--
~""1:l1H-H-H+-+IH-H---t--,
0 10 0 0 iA 0 c o o 0 010 0
IT
t-T
0 CI
~r'~H_H_j---t-l._Q+t-IIrl----jI+HOI+0-lt-o-jI~-f2=~=3C0=-t-++-O~t-H-tt-_~IO-*0--t0t+--'ro ~
_
Jo
User Friendly
Quick response to common operations
(such as placing a route segment) is important. I can't maintain my concentration when I have to stop and wait after
each mouse click (and, of course, I hate
waiting).
I like pull down menus, particularly
while learning the system, but single-key
commands and a menu bypass are
handy once I'm comfortable with the
program.
Zooming in and out and windowing
sections of the PCB are definite requirements. Also I appreciate auto-panning,
where the view shifts automatically
whenever the cursor reaches the screen
boundary. It's easy to get lost when looking at the routes on a PCB, so another
useful feature is the ability to point to a
route, and see its name on the screen.
Analog
You'll run into special problems when
designing PCBs for high-speed analog
and digital circuits where trace inductance and intertrace capacitance are important.
For these circuits, you'll often need to
customize trace routes and widths. This
17
------.---
Editor's note: These copper planes, because of their proximity to the surface traces,
also tend to reduce cross talk between signal
lines.
Some designs may require multiple or
split ground planes (a digital ground and
an analog ground for example).
You'll face a very difficult problem if
you're doing an analog design that's restricted to two layers (for cost reasons)
and one of the two layers must be a
ground plane (for electrical reasons). In
this situation it may be necessary to also
run traces on the ground plane layer. If
you think you might run into this case,
it's worthwhile asking the PCB layout
vendor if his package will handle this.
Another useful feature for analog design is known as "area copy." This lets
you duplicate sections of your PCB layout. If you have to freehand draw a section of circuitry, and if that circuitry repeats several times, then area copy will
save you a lot of time.
Other Features
Post-processing capabilities that you
should look for are a design rule checker
(DRC), NC drill file output, and photoplotter file output.
A design rule checker should check
the trace-to-trace and trace-to-pad spacings on the PCB as well as verify that the
connectivity of the PCB matches the original netlist.
The industry standard drill file format
is the ''Excellon'' format. You can save
money if you create this file for the
board manufacturer, otherwise they will
charge you a tooling fee to hand-generate
it.
The drill file specifies the location and
size of all of the drill holes on a PCB.
Given this information, a numerically
controlled (NC) drill can automatically
drill all of the holes in your PCB (aren't
computers neat).
The industry-standard photoplotter
18
format is the "Gerber" format. Photoplotters create the films for a PCB directly
and tend to be more accurate than the
photo-reduction process.
If your package doesn't generate photoplotter output, then you plot the layers
on a precision plotter at two times actual
size. Use a low pen speed with a black
opaque ink. These layer plots can be
photo-reduced onto film in the same way
as tape-on-mylar.
Limits
Also look for the program's limits.
What is the minimum grid size? (1 mil
resolution is nice.) What is the largest
possible board? What's the maximum
number of routing layers? Can components be placed on both sides of the
board (for maximum density PCBs may
have surface-mounted components on
both sides)? What's the maximum number of ICs per board? How large is the
parts library? How easy is it to add new
parts to the library?
Autorouters
Autorouters come in two basic categories: gridded and gridless.
Gridded routers are most common.
These routers have a fixed grid on which
PCB traces (wires) can be laid. They
work best on moderately dense PCB designs and their main fault is that routing
time increases dramatically as PCB density increases. This is because the number
of nodes in the grid increases by the
square of the dimensions of the grid.
Gridless routers should more properly
be named variable-grid routers didn't
make up the terminology), since they use
denser grids to route areas of high congestion and sparser grids in the less congested areas. Gridless routers will vary
the grid size on the fly (on the board, actually) in order to complete a route.
In addition to gridded and gridle&s
routers, there and many sub-categorieS.
One very common router is known as
the Maze router, or Lee router (after its
inventor C. Y. Lee). The maze router
routes a single net at a time, starting at
the source pin and proceeding toward
the target pin. It does not remember previous routes, nor does it consider future
routes which may be blocked by the current route. Thus, the maze router tends to
be somewhat erratic and uses many unnecessary vias (feed throughs).
There are many (improved) versions
of the maze router, such as the costedmaze router, with better performance.
The pattern router is a specialized
router which recognizes repeated circuit
patterns. It is intended for routing struc-
$695.00
Draftsman E.E.
included
$200
yes
no
no
included
included
no
64 total
$1195.00
DC Design
included
$200
yes
no
manual
32" X 32"
included
included
included
64 total
$1995.00
DC 810
included
$200
yes
no
automatic
8" by 10"
included
included
included
64 total
$3495.00
DC CAD
included
$200
yes
no
autotripup
32" X 32"
included
included
included
64 total
Racal Redac
238 Littleton Rd
PO Box 365
Westford, MA 01886
(508) 692-4900
$995.00
Maxi/PC
included
yes
yes
yes
3 algorithms
Power & ground
Orthogonal
Memory
Plus Partial
included
included
included
16 signal
+ power & grnd
"Best price/performance:
a very short time ago we
charged $10,000 for
this kind of package."
AMS Inc.
1321 NW 65th Place
Ft. Lauderdale, FL 33309
(305) 975-9515
$250.00
PC Pro II
$100.00
no
(initial
placement)
yes
no
$250.00
Custom version
of Lee's algorithm
included
(Nov '88)
included
$100
(Nov '88)
255 total
"Intuitive to use,
no commands to memorize
online help. "
$1495.00
OrCAD PCB
$495.00
no
yes
yes
included
included
included
included
16 circuit
2 silkscreen
2 soldermask
"Productive work
within an hour."
Cadisys
624 E. Evelyn Ave
Sunnyvale, CA 94086
(408) 732-1832
$1295.00
AutoPCB 500
$1995.00
AutoPCB 1000
$2995.00
AutoPCB 2000
included
no
yes
no
no
$295
$495
included
included
no
yes
no
Pattern generated
$295
$495
included
included
no
yes
no
Pattern generated
incl surface mnt
$295
$495
included
16 signal
6 power & gnd
+ silkscreen
& soldermask
Design Computation
Route 33 Sherman Sq
Farmingdale, NJ 07727
(201) 938-6661
PCAD
1290 Parkmore Ave.
San Jose, CA
(800) 523-5207
$8495.00
Master Designer II
included
included
with either
auto router
yes
yes
$5995
maze type
$5995
ripup type
included
included
included
100 total
Visionics corg.
343 Gibralter r
Sunnyvale, CA 94089
(800) 553-1177
$995.00
EE DeSigner I
included
yes
yes
yes
included
50 mill orthogonal
included
included
included
3 total
$3995.00
EE Designer III
included
yes
yes
yes
included
25-50 mill ortho
& 45 deg
included
included
included
26 total
$975.00
Pads-PCB
$975.00
optional
$300
yes
yes
optional
std.$750.00
rip-up & reroute
$4500.00
included
included
included
30 total
"Equal to $100,000
CAD workstations."
Wintek Corp.
1801 South St
Lafayette, IN 47904
(317) 742-8428
$895.00
Hi-Wire Plus
included
no
no
no
$895.00
gridless
ripup &
reroute
included
$495.00
included
255 total
"Easy to use."
$695.00
ProCAD Plus
$795.00
ProCAD Extra
included
no
yes
part of
$1595
package
yes
part of
$1595
package
50 total
no
part of
$1595
package
no
included
single
command
single
command
Accel Technologies
7358 Trade St.
San Diego, CA 92121
(800)433-7801
$595.00
PCB Series"
optional
$495.00
With
toolkit
$295
yes
no
$495.00
multi-pass
multialgorithm
included
included
gerber
included
with auto
router
19 total
(6 signal)
Omation
1210 ECampbell Rd
Suite 100
Richardson TX 75081
(800) 553-9119
$975.00
Schema-PCB
$495.00
yes
yes
yes
$750.00
ripup &
retry
$300.00
$300.00
included
30 total
"Ease of use."
Generic Software
11911 N. Creek Pkwy S.
Bothell WA 98011
2064872233
(Schematic Capture Only)
$99.95
CAD Level 1
included
no
no
no
no
no
no
no
"Both do schematic
capture for OrCAD"
CAD Level 2
$199.95
included
no
no
no
no
no
no
"Faster version
snaps,trims, etc"
yes
3 book~nd!:~~in:!~!.~ s:!=:FRE:
3019 $39.95
Counts as 2
2671P $12.95
9824
$49.95
9n9P $22.95
3028
$27.95
alues
to $162.40)
2890
$32.95
3016P $16.95
, CI..:'
r:~ii)o'
(~CI\\S-:
".j'
..
IV
:fb,.
19
2937
$29.95
3026
$22.95
2855P $16.95
9808
11JJ1JJ!J fJ]:J[;J1L
1JJJ1DfJi:
A~LlnIJIot
rlrio_~
3080
$34.95
$34.95
9829
2951P $17.95
$45.00
3116
$27.95
TIlE
2897
$27.95
2845
$29.95
UNIX V
AND
XENIX'
SYSTEM V
PROGRA~~!!!:S
rOOCKlf
YOUR BENEFITS: You get 3 books for $1.95 plus shipping & handling when you join.
You keep on saving with discounts from\up to ,50% as a member.
YOUR PROFESSIONAL BOOKSTORE BY MAIL: Every 3-4 weeks, you will receive
the Computer Professionals' Book Society News describing the Main Selection and Alternates, as well as bonus offers and special sales, with hundreds of titles to choose from.
AUTOMATIC ORDER: If you want the Main selection, do nothing and it will be sent
to you automatically. If you prefer another selection, or no selection at all, simply indicate
your choice on the reply form provided. As a member, you agree to purchase at least 3
books within the next 2 years and may resign at any time thereafter.
BONUS BOOKS: Starting immediately you will be eligible for our Bonus Book Plan with
savings of up to 80% off publishers' prices.
IRONCLAD NO-RISK GUARANTEE: If not satisfied with your books, return them
within 10 days without obligation!
EXCEmONAL QUALITY: All books are quality publishers' editions especially selected
(Publishers' Prices Shown)
by our Editorial Board.
9786
$32.95
9813
$39.95
2751P $19.95
Describes and explores the role of software testing. Provides a realistic look at
analyzing. isolating, and preventing bugs!
...
..............................
I~I Compuler Professionals'
~
Book Society
2916P $19.95
2838
$19.95
2741P $19.95
Please accept my membership in the Computer Professionals' Book Society and send the 3
volumes listed below, plus my FREE copy of Testing Computer Software (2763), billing me $1.95
plus shipping/handling charges. If not satisfied, I may return the books within ten days without
obligation and have my membership cancelled. I agree to purchase at least 3 books at regular
club prices (plus shipping/handling) during the next 2 years and may resign any time thereafter.
Name
Name of Firm _ _ _ _ _ _ _ _~-::__------::--:------_
(If you want Society Bulletins sent to your office)
Address
City
State
Zip
____
Phone
Signature _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
2620
$25.95
2870
$24.95
2888
$28.95
All books are hardcover unless numbers are followed by a "P" for paperback.
1989 Computer Professionals' Book Society, Blue Ridge Summit, PA 17294-0870
Valid for new members only. Foreign applicants will receive special ordering instructions, Canada must remit
In U.S. currency. This order subject to acceptance by The Computer Professionals' Book Society. Me189
................................................
Reader Service Number 131
22
Eisys Consulting
501 N. 36th St. Suite 163
Seattle, WA 98103
24
RS-232
BREAKOUT BOX
~
o
SWitchable Lines
LED Indicators
Patch Terminals & Jumpers
Compact Size
$ 9 . 95
$1 7 95
IBM/ A
E SOFTWARE BLOWOUT!
laM TITLES
Visi On Graph
VisiOn Calc
VisiOn Word
Is,Word
VisiSpell
VisiTutor for VisiWord
Stretch Calc
* VisiCorp Closeouts
$ 9 9 0 0
APPLE TITLES
VisiSchedule
Applications Manager
DesktOP/Pian
Vis i File
Flash Calc
VisiAnswer
VisiTrend/Plot
~~
our I
,,
1~~~I~~~St~~~J~:C~J{~6'~~R
CONTROLLED!
F~a.shCalc
V,s,Ca/c
VisiLink
VisiDex
VisiTutor for VisiC I
V!S!C.alc (Advance~t
V,s,Flle
.
Prlced from $6 95
Mouse and Basi
Mitsumi UVEX-AW51 P
COMPUTER CHASSIS
with POWER SU PPLY
VARACTOR
TUNER
* 3 1/2" X 2" X 1/2"
* Pinout on Case
programs
~rr~ $17.95
to $12.95
;;~
UHF / VHF
$29.95
ENGINEERING! TEST! * DEVELOPMENT!
DELTEC
AC LINE CONDITIONER
AT/XT 3-SLOT
MOTHERBOARD
EXTENDER
TEAC FO-558
DISK DRIVE
400 WATT
Ideal for you PC or An~ Equipment
Eliminates AC Line NOIse and
Regulates to a Constant 120VAC
Reliable Ferroresonant Transformer
Attractive Case with power Cord,
Outlets, and Switch/Circuit Breaker
* 5 1/411
* IBM COMPATIBLE
* 360K
* 90-DAY WARRANlY
$149.00
$89.95
$89.95
WE SHIP C.O.D.!
HSC of Sacramento
5549 Hemlock St.
lise
Since
'63!
Ca II
Now!
...s
TERMS: Mnimlm Older $10. C8IiIomia lIItsIdants .tel 7% ..... lu. ~....Id orden ...... 'night C.O.D. or c.I tor ch.-ges. StiIll*1o wi btl .:Ided 10 a d en
C.O.D. orden. $2 Handing
c:Mge on orden less lhan $25. Prap.;d orders 0_ $100 UN mon81 Older or c:erllied chack. PI. .8 no naI send cash. Some ..... lrTiad 10 slock on hind. PrIces subject 10 chong8.
25
26
By Walter Bright
13928129th Ave. NE
Kirkland, W A 98034
The optimizer must follow the language rules to the letter (in this case the
ANSI draft standard for C). It must avoid
any "unsafe" transformations and always assume the worst will happen.
The optimizer should catch 90% of the
easy possibilities for optimization. Then
presume that catching the remainder
would greatly increase optimizer size,
complexity, and problems.
Machine and language independence
are important, as the language won't always be C and the target architecture
won't always be the 8088. I don't want to
be trapped into anyone machine; look
what happened to CP/M, the TRS-80,
etc. In fact, there are signs that the heyday of the 8088 architecture is drawing to
a close.
Aggressive optimization can be very
time-consuming, obviously making the
edit-compile-debug cycle unacceptably
long. Therefore, the compiler should
work just fine without the optimizer. The
programmer needs the choice of quick
compiles for development, only running
the optimizer on the final version.
But running the compiler without the
optimizer should still produce reasonable
code, since it's unacceptable for the unoptimized code to be so large it won't fit
in memory (and therefore can't be debugged).
In keeping with the philosophy that
the optimizer should relieve the programmer from dealing with tuning
details, the optimizer should do a reasonable job of register allocation: so the
register keyword becomes irrelevant.
The debuggability of optimized code
has always been seriously impaired by
the addition, deletion, and rearrangement
of code, and also by the addition of new
variables and removal of old ones.
Since this is an unsolved problem, I
decided not to let concerns about debuggability compromise my optimizer's
optimizations. The optimizer should try
to carry along things like source line
Model A Optimization
MICRO CORNUCOPIA, #4S,Jan-Feb 1989
~--------------------
27
RaCing the
optimizer right after
the parser gives it
full access to the
symbol tables,
aliasing, scope,
and type
information.
to the code generator so it can easily allocate registers.
The optimizer operates by reading in
all the information about one function,
optimizing that function as a whole, writing that function to the output file, and
then proceeding to the next function.
Compiling
Here's a quickie overview of how the
compiler works.
In the first pass, the compiler reads
the characters and divides them into
tokens. Macro expansion, parsing, and
semantic analyses are all concurrent
processes (i.e., occur in one pass). The resulting symbol table and expression trees
are written to the intermediate file.
The second pass (the optimizer) reads
the intermediate file, one function at a
time. Each function is optimized as a
whole, and then written to a revised intermediate file that is essentially in the
same format as the first one (thus the optimizer pass is optional).
The third pass generates code. It reads
and processes the intermediate file function-by-function. If you bypassed the optimizer, the code generator performs
some simple optimizations. If you ran the
= 5;
func(V);
/* v can be replaced with 5 */
= W;
func(V);
/* v can be replaced with W */
1,.,1
GAMES
o JET SET FLIGHT SIMULATOR
(102) Be a jet pilot at the
controls.
o CHESS (GAM9) Great. Many
levels. Save and playback
moves. 2-D or 3-D.
o GLOBAL THERMAL NUCLEAR
WAR (105) Frightening.
o ARCADE GAMES (106) Has
Kong. a 3-D Pac man. Bricks.
Pango. (Requires color.)
o BASIC GAMES (107) Pacman.
Lunar Lander. Startrek. Meteor. Breakout. and others.
o CARD GAMES (109) Bridge.
canasta. hearts. poker. etc.
STRIKER (110) Defender-like
game. "Top Gun" in space.
o FLiGHTMARE (112) Futuristic
fighter pilot game. (Requires
color graphics adapter.)
o CENTIPEDE (113) Like the
arcade game.
o SLEUTH (117) Who done it?
DONO (119) Like Dungeons
and Dragons.
o NEW TREK (121) Battle the
Klingons and Romulans.
o GAMES IN BASIC (124) Lander.
biorhythms. desert. Phoenix.
Star Wars. others.
o TRIVIA GAME (130-131) (Two
disks) Extensive trivia game.
o MONOCHROME GAMES (134)
Eight great games.
PROFESSIONAL BLACK JACK
(148) Become a pro.
o ACTION GAMES (149) Has
Tank. Space War. etc. (CGA)
o QUEST (152) Role playing adventure fantasy game. (Requires color.)
o MONOPOLY WITH GRAPHICS
(118) Color or monochrome.
BRIDGE PAL (171) Complete
game of contract bridge.
with tutorial.
CRIBBAGE (173) Also Pascal.
Maze. Firefight. Slot. Vampire.
etc. (Requires Basic)
18-HOLE MINIATURE GOLF
(176) Time honored game.
o WHEEL OF MISFORTUNE (181)
Guess the word. spin the
wheel and watch out!
o
o
o
o
MUSIC
o
o
o
o
o
o
o
o
EDUCATION
o
o
o
o
o
o
o
o
o
o
SPREADSHEET TEMPLATES
o LOTUS MACROS (601) Save
hours of work. (Requires Lotus
1-2-3)
o LOTUS SPREADSHEET TEMPLATES
(602) Ready made. (Requires
Lotus 1-2-3)
o LOTUS TUTORIAL (630) Great
for learning Lotus (requires
Lotus)
o
o
o
o
o
ACCOUNTING/ FINANCE
PC-GENERAL LEDGER (701)
Popular accounting system.
MR. BILL (702-703) (2 disks)
Billing customers: invoices.
client reports. audit trail.
CPA LEDGER (706-708) (3
disks) Complete GL
PC-STOCK(712) Analyze market trends. Graphics.
PERSONAL FINANCE MANAGER (715) Household budget
manager. Track checking.
savings. investments.
FINANCE MANAGER II (774775) (2 disks) For personal or
small business financial
management.
CHECKBOOK (752) Complete
system with online help.
o
o
o
o
o
o
o
o
o
DATABASE PROGRAMS
PC-FILE + 2.0 (801, 805, 837)
(3 disks) Rated better than
dBase III + by Consumer Reports. From Jim Button.
FILE EXPRESS 3.70 (803-804)
Powerful DB system that allows over 32.000 records.
Sorts up to 10 key fields.
DBASE III ROUTINES (815)
Over 60 helpful dBase III
routines.
WAMPUM (824,825,835) (3
disks) dBase III clone. dBase
III compatible.
GRAPHICS
KEYDRAW CAD (1001, 1002,
1065) (3 disks) Popular. Also
uses mouse. (Requires color
graphics - CGA).
3-D (1003) Create and edit
3-D objects. (Requires CGA)
SIDEWAYS (1007) Prints your
text sideways.
ANIMATOR (1011) Create animated pictures on Pc.
SIMCGA (1027) Use your Hercules card to run programs
requiring color graphics on
your monochrome.
READ MAC (1041) Digitized
pictures of Ashley. Cheryl.
Brooke. ADULTS ONLY!
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
TELECOMMUNICATIONS
o
o
o
UTILITIES
o
o
o
SECURITY /HACKING
o
o
o
BASIC
PC-PROFESSOR (1401) BASIC
tutorial.
BASIC PROGRAM GENERATOR (1402) The menu driven
way to write programs. .
SWISS ARMY KNIFE (1406)
Tools for programming in
BASIC.
APPLICATIONS
FORM LETTERS (1907) Commonly used form letters and
business applications.
EZ-FORMS (1908) Make forms
to meet different needs.
MAIL MASTER (1910) Create
mailing lists. Print letters.
ASTROLOGY 9.4 (1916) Calculate chart. Prints wheel.
LOTTO (1941) Chart strategies for picking lottery numbers.
LABEL MAKER (1965) Multiple
label maker. Great for mailing lists.
FAMILY HISTORY (2203-2204)
(2 disks) Create files and
genealogical reports.
DR DATA LABEL (2327) Powerful mailing list program. Customize labels to size and
format.
CITY DESK (2513) Simple desktop publisher.
o
o
MICRO STAR
800-444-1343
FOREIGN: 619436-0130
29
The live range of a variable is the section of code over which the value of a
variable needs to be retained. The live
range is extremely useful. Knowing it, we
can determine if two or more variables
have nonintersecting live ranges, and so
can share the same register. This is called
register allocation by coloring, and is
done by the code generator. The optimizer provides the live range information.
A by-product of live range analysis is
the detection of dead variables. Dead
variables are variables that are never
used, so storage needn't even be allocated to them.
I don't warn the programmer about
dead variables because many of the variables have already been replaced by the
optimizer. So my warning messages
would appear very mysterious!
Dead code is simply code that can
never be executed. So we remove it.
Common subexpressions are redundant computations that happen most
frequently in array address calculation.
For example, we can replace struct ABC v1[S)[3);
v1 [i) [j) = func (v1 [i) [j));
abc[i) = T;
=b *
= 0;
c;
We've removed an add and a multiply from inside the loop (the multiply
comes from converting i to an offset from
the start of abc[]).
30
Most of the above uncover possibilities for more optimization. For example,
when we replaced i with P, i is obviously
no longer needed and so the assignments
to i are probably unnecessary (i.e., dead).
Thus, the optimizer repeats all its optimizations until no more are possible.
The problem to watch out for, .of
course, is mutually inverse transformationS. In this case the optimizer would
GlObal variables
suffer from so
many obscure
aliasing problems
that under most
cases, you simply
can't optimize
them. (It's
preferable to avoid
globals as much
as possible.)
forever flip back and forth between two
states! (This bug occurred in a couple instances and was rather difficult to correct.)
And, after all this, the real test. The
compiler must successfully recreate itself.
Implementation
I started out armed with numerous
papers on how to optimize, and of course
the famous dragon book by Aho and
Ullman. Most other compiler books are
fairly useless. They typically devote less
than one chapter to optimization or gloss
over it in a cavalier manner.
I implemented all the algorithms per
the paper (after extending them, of
course) but the algorithms didn't cover
things like multiple types, and tended to
ignore aliasing problems. And, unfortunately, the algorithms for loop induction variables were seriously deficient.
Normally, a loop is written using a
signed integer as the loop index. Pointers, on the other hand, are unsigned.
They also have a different range. So I
+ 3;
TM
EDITING SYSTEM
ED is an editor that makes the very conception of other editors obsolete.
ED is an object-oriented open architecture system for editing programs and manuscripts, manipulating data files
and creating snazzy demos. ED's commands respond with no perceptable delays. Programmers have complete simultaneous control over multiple source files. Functions for creating manuscripts are part of ED's design, with stream
blocks, word-wrap, tabs, intelligent paragraph formatting, block justification, and pagination that behave correctly and
execute instantly.. ED can be used to create sophisticated sorts and futers. Macros, search and replace, column blocks,
and block sorts allow records to be sorted and selectively removed, and fields to be added, rearranged, and removed.
Flexibility, extensibility, and programmability are realized by providing programmers access to the objects which
ED itself manipulates. All aspects of ED's appearance and operation can be controlled by the programmer. ED, a
restricted or enhanced form of ED, or any of ED's objects, can be embedded in the programmer's applications with no
royalties. Objects such as dynamic arrays, ~indows, data entry windows, macros, menus, browsers, popup directories,
and regular expressions are manipulated through normal C function calls.
ED NUMBER OF BUFFERS LIMITED ONLY
TORY BRACKET/BRACE/PARENTHESIS
POPUP
VIEW
DIRECTORY FACILITY
SEARCH AND
REPLACE FORWARDIBACKWARD CASE
CREATION
MORE FUNCTIONS
SEMBLER .
BLOCK COM-
LATOR
TRANSPOSE L1NES/CHARACTERSIWORDS
EXTERNAL UTILITIES IN
HAROWARE REQUIREMENTS
TION
CALL 201-450-4545
VERSION 1.0
pmCE: $265.00
MASTERCARD, VISA, C.O.D, AND P.O:S
THE AMERICAN
31
I,-----=-I-=l~-1
c___
ACQUIRED
INTELLIGENCE
32
b;}
= func(d,e);
to be equivalent to:
c
= a = d), (b = e), (a
* b;
=d *
e;
Benchmarks
Many benchmarks suffer from being
"optimized away"; that is, the optimizer
discovered that the code produced no
useful result and removed it. Typical
causes of this are dead assignments.
These benchmarks don't really measure
true speed. That's because optimizers are
written to optimize real code, not the
endless empty loops and throwaway
variables that make up most benchmarks.
A way to prevent this is to have the
benchmark function return the result or
assign it to a global variable.
Benchmarks should minimize the use
of global variables, since globals make up
only a small percentage of variables in a
real program. Automatics are the most
common type.
Benchmarks should be carefully
scrutinized to make sure they conform
precisely to accepted programming practice and the ANSI C standard.
Making The Most Of The Optimizer
It's fairly easy to arrange things so
that the optimizer has the best chance of
improving your program. The key factor
is maximizing the amount of information
that it has. This is accomplished by:
(1) Make variables local. This means
declaring a variable in the innermost
block possible. Minimize the use of
global variables.
(2) Use function prototypes. This will
be of paramount importance to compilers
that are capable of passing arguments in
registers.
(3) Organize the modules so that as
many functions as possible can be made
static. The compiler knows all the calls to
static functions, and can do many more
optimizations because it is freed from the
constraints of the function call interface.
(4) Since the optimizer compiles by
moving forward through the file, place
lower level functions first in a file followed by the ones that call them. In other
words, if the function calls form a tree,
put the leaves first, followed by the
branches, and then the trunk.
The Future
It's entertaining to optimize a function, and then write it in assembly code.
Compare the two, and try to figure out
why the hand-coded assembly is better
than the machine-generated. Those are
the areas where the optimizer needs improvement. The improvements I see are:
(1) Better handling of function calls.
Most assembly language programs pass
arguments in registers. It's very wasteful
to push them on the stack. The compiler
68000
SK*DOS A 68000/68020
DOS containing everything
you expect in a DOS - on-line
help,
multiple
directories,
floppy and hard disk support,
RAM disk and/or disk cache,
I/O redirection, and more.
Supplied with editor, assembler, Basic, powerful utilities.
Supported by Users' Group
and BBS. Software available
from other vendors includes C
compiler, Basic, editors, disassemblers, cross-assemb lers,
text formatter, communications programs, etc. Priced at
$165 with configuration kit,
less if already configured for
your system.
HARDWARE - 68xxx
systems start at $200.
~_.... Call or write.
Systems Corp.
P. O. Box 209
Mt. Kisco NY 10549
(914) 241-0287 / Fax (914) 241-8607
Reader Service Number 40
-------"---------
33
You're tired of plugging together tinkertoy clones? Want to break out the soldering
iron and really build something? Well, the
surplus market is where you'll find cheap
ICs, boards, connectors, cables, drives,
power supplies, everything. (Well, almost
everything.) Here's the story.
or the hardware hacker on a low
budget, the surplus marketplace
offers real bargains. With some
planning and expertise, you can find
quality tools and equipment for very
few dollars.
And if you're just getting started in
hardware, borrow the expertise of a
friend when you go looking. Don't let inexperience deter you from enjoying a
little bargain hunting.
You'll save yourself much time and
trouble if you understand what's available and where to look for it. The surplus
market divides up into two areas; mail
order and local surplus stores. The kinds
of merchandise found in each span the
range from brand new to totally worthless.
What Is Available?
Don't make the mistake of equating
"surplus" with "junk." Surplus equipment is simply equipment no longer useful to its current owner. A manufacturer
may order 2000 top-quality power supplies, only to have the product to be built
with those supplies suddenly discontinued. The supplies are now surplus.
Power supplies, floppy disk drives,
computer terminals, line printers, modems ... I've seen them all available as
surplus at very low prices. If you're looking for this type of overrun surplus, try
to find items in the original packing
boxes, if possible, with incoming QC inspection slips proving that the item truly
works.
Sometimes a large company upgrades
34
a range of equipment, sending the replaced material out to brokers who sell it
to surplus shops. Often, the replaced
equipment works just fine. Items that fit
this category include computer terminals,
. hard drives, floppy drives, office furniture and fixtures, and line printers.
----
-_._---_._._---------_.----------------._-
By Karl E. Lunt
7349 W. Canterbury
Peoria, AZ 85345
35
36
-----------------
.-'
--.-.----------------
not expect to
James Electronics, one of the first advertisers in' BYrE and Kilobaud (anyone out
there remember Kilobaud?). They carry a
large selection of new ICs and components, PC clone parts and some Apple
equipment. Jameco often is the first large
mail-order house to carry some of the
newer chips. I've always gotten good
service from Jameco and I love their catalogs. Recommended.
Jameco Electronics
1355 Shoreway Rd.
Belmont, CA 94002
(415) 592-8121
cs
California Digital
17700 Figueroa St.
Carson, CA 90248
(213) 217-0500 (technical & California)
(800) 421-5041 (toll-free order line)
JDR Microdevices
110 Knowles Dr.
Los Gatos, CA 95030
(800) 538-5000
ERAC co.
AT
BABY AT XT/TURBO
$1581
$1531
Motherboard
5 &8 MHz Switchable
8088 - V20 Optional
Optional Coprocessor
8 Expansion Slots
ERSO or Bison Bios
640K RAM
150 Watt Power Supply
Hercules Compat. Video Bd.
Parallel Port
2 Serial Ports Active
Game Port
Clock/Calendar
Hard Disk and
Floppy Controller
20M 5%"Hard Drive
2 ea. 360K 5%" Floppy Drive'
AT Style Keyboard
Standard Slide Case
Amber Graphics Monitor
* *
$999
EGA ADD $429
40M HD ADD $150
5 & 10 MHz ADD $21
NiCds
AA Cells .6ah ................. $1.00
12V Pack AA Cells .6ah ......... 6.50
SubC Cells 1.5ah .............. 1.50
12V Pack SubC ................ 10.00
Double D Cell 2.5V 4ah unused ... 8.00
C Cells .................... '" .1.75
FCells ......................... 2.50
GEL CELLS
12V 2.5ah ..................... $8.50
D Cell 2.5ah .................... 2.00
ROBOTICS
5V DC Gear Motor with Tach 1"x2" . 7.50
Joystick, 4 switches, 1" knob ...... 5.00
Z80 Controller with 8Bit AID ..... 15.00
Brushless 12VDC 3" Fan ......... 7.50
Capacitor, .47farad 10V 1"x1 JA" ... 4.00
Solar Cells .5V .5A, .8"x1.6" ....... 2.50
High Voltage Power Supply
Input: 1530V DC
Output: 100V 400V 16KV ........ 6.50
ELGAR UNINTERRUPTIBLE
POWER SUPPLY
400 Watt MODEL SPR401 $149
These supplies may have some minor
cosmetic damage, but are electrically
sound. Squarewav'e output. Run on
internal or external 24VDC battery
when line goes down. Typical trans
fer time = 12MS.
$75
POWER SUPPLIES
08VDC 100A Metered ......... $249.00
Volt & Current Regulated
5V/1A. 5V/.2A, 12V/1A,
12V/.2A, 24VI.05A ............. 9.90
HOURS: Mon. Fri. 96 - Sat. 104
MINIMUM ORDER - $15.00
TERMS: VISA, MasterCard, Certified
Checks, Money Order, NO COD. Visa
and MasterCard add3%. Personal
checks must clear BEFORE we ship.
Include shipping charges. California
residents add 61/2 % Sales Tax. For
more information please call.
IC'S
81189 Video Pal .......... $15.00
81194 RAM Pal ............ 15.00
81Series Char. Gen. ROMs .. 10.00
81Series Monitor ROMs ..... 10.00
NEW
CPM COMPUTERS
K483 ..................... $350
K284 ...................... 400
K484 ...................... 425
K10 ........................ 500
SWITCHERS
TEST EQUIPMENT
OSCILLOSCOPES
TEK 7403N/7A18N/7B50A 60 MHz. $650
TEK 465 Dual Trace 100 MHz ..... 1000
ANALYZERS
TEK491 10MHz40GHz ........ $4500
Nicolet 500A 1 Hz 0100 KHz ..... 1800
Biomation 805 Waveform Rcrdr .... 259
Biomation 8100 2Channel
Waveform Recorder ............ 795
HP1600A Log ic Analyzer .......... 600
HP1600A/1607 A LogiC Anlyzr ..... 1000
FREQUENCY COUNTER
Optronics 550 MHz ............. $100
DBASE BOOK OF BUSINESS
APPLICATIONS by Michael J. Clifford
Reg. $19.95
NOW ONL Y
$3.00
tlI'm very impressed with the compiler, editor, and debugger. I've tried
quite a few different compilers for the
PC and have given up on all of the
others in favor of yours . .. I've gotten
to the point where I download C code
from a DEC rnx;VMs system just to
be able to compile it with the picky
flag set at 9. It finds lots of things
VMS totally ignores . .. "
lS, Oak Ridge, TN
'fh~~C8s.c~mpjJ~r . ln~i~a~::.
. . .\:. /.':
:!. . .t\f~n-featuredC~mpiler.with~.mem;;;
. ible.FullsOur~ i~avciUClbJe
.$~!i.()().attime()f order/;' .
-(jED,.a
muJltiple"
window prolgram
function
link fi1n~:~.~~~lt~i~~~.~~':~jlTI~.~~:j~,
.;, :.
38
Tri-Tek
9014 N. 23rd Ave. Suite 11
Phoenix, AZ 85021
(602) 371-0446
Most large cities with high-tech industry contain at least one (usually more)
major surplus electronic outlet. In
Phoenix, the place I do most of my surplus shopping is Apache Reclamation.
PCBs, pumps, motors, wiring, connectors, ICs ... you name it, ifs probably
somewhere in Apache. Any dedicated
bargain hunter passing through Phoenix
will certainly want to include a stop at
Apache Reclamation.
Apache Reclamation & Electronics
313 W. Apache St.
Phoenix, AZ 85004
(602) 254-0613
PS: If you do stop by Tri-Tek, you
might notice the cartoon of Ample Annie
behind the counter. I don't know how
many power supplies Annie sold in her
day, but she did have all the right parts.
FAST
o or 1 wait state
8 Expansion Slots
6 - 16 Bit
2 - 8 Bit
$475 00
20 MHz 80386
386.. 20
8/20 MHz Switchable
1 wait state
Expands up to 17 MB
2 Serial - 1 Parallel
Hardware Reset/Turbo Switch
Accepts 80387...20
8 Expansion Slots
2 - 32 Bit Memory
5 - 16 Bit
1- 8 Bit
Uses 80 NS DRAM
Norton SI = 24
8/20 MHz 80386 Motherboard
$95000
32 MB Memory Card for DTK 80386.
Holds up to 8 MB per card.
Accepts either 256K or 1 MB DRAM
16 MHz 80286
$99 00
~MicroSDhEreNc
~COMPUTERSr .
MicroSphere, Inc.
855 N.W. Wall St.
Bend, Oregon 97701
(503) 388-1194
Hours: Monday-Friday
9:00-5:30
Printer Graphics
Writing BGl-Like Printer Routines
When I called Borland about printer support for their BGl graphics interface, I got a
"yes we're getting lots of requests for
printer graphics but don't hold your
breath."
The following day, Larry mentioned he
was looking for something really esoteric to
work on for this issue. Boy, did this project
get esoteric all of a sudden.
eal programmers don't run applications. Therefore I try to avoid
any use of a computer that might
be construed as practical. But there
comes a time when even I must face reality.
So, at the risk of writing something
useful, let's continue on last issue's theme
and add printer graphics functions to the
Hercules graphics screen dump code.
Design Considerations
First off, we need an area of memory
to represent the paper surface in the
printer. Something to draw on, if you
will. Call it printer memory.
I wanted to use the same interleaved
memory organization as the Hercules
card so that functions from HERCLIB.C
would still work (see Hercules Primer in
issue #39). And one simple block move of
memory would suffice to load a video
graphics screen into printer memory.
Very nice when you consider the alternative: a byte by byte translation of video
memory to printer memory.
Persuasive arguments, I felt. Dave
thought otherwise. It got ugly for a while
with flying floppies, ballistic boards, and
uncalled-for comments. (Since Dave
learned C, he's been casting aspersions.)
You think I'm kidding? A few winters
back we lost an 8" drive power supply to
a direct hit from a snowball. Curious
management style.
But Dave came up with the final
word. With a linear space, organized as
40
....
~ ~
r,.;.t
.J114
(I)
0
N
*00
o
..-10
..-1-
II
..
II
..
.
...
..
..
.-.
fl.
II
Lf)
..-1
II
II
II
II
...
II
II
II
II
....
II
II
II
..
II
II
O+-------~------~------~------~-------T
20
40
60
80
-
100
(X)
Clipping
I usually try to keep code for the magazine simple. That means no error
checking on inputs, no checking for
successful file I/O, etc. These absolutely
necessary parts of a finished product
tend to obscure the more interesting
stuff.
But, in this case, one potential source
for disaster must be considered. What
happens if you get carried away and
By Larry Fogg
Micro C Staff
41
Fonts
42
43
Universality
Last issue I marveled over the apparent compatibility between printers in
the MS-DOS world. I've since had my
bubble burst. And to make matters
worse, from within the same product
line.
I've always liked Star Micronics for
their low-cost workhorse printers, but
they're the ones who tipped me off to the
dangers of printer programming. Their
LV 1210 and 1215 require ESC '2' to
enable 8/72" line feeds. Unfortunately,
ESC '2' sets 1/6" line feeds on the
Geminis. Oh well. So much for the "universal" printer interface.
If Figure 1 makes your printer do unnatural acts, check the escape sequences
in DUMP.C against your printer's documentation. One of them will no doubt be
the culprit.
We have a pretty fair printer museum
here at the world headquarters of Micro
Cornucopia. But even so, it covers only a
tiny percentage of the printer kingdom. If
you have a particularly peculiar printer,
why not send us the codes necessary to
make it jump through the hoops we've
talked about here. I'll compile the responses for an entry in Tech Tips.
And Furthermore ...
Some things come to mind as this article slips past three weeks overdue:
More fonts and more sizes would
be nice.
As would circle drawing capability for pie charts.
We need more than 64K of printer
memory for use with the higher
density printer modes or with
very large printouts (banners). I
think you can do this with a huge
pointer to printer memory and
use of callocO to allocate storage
of lines rather than mallocO to
_
store bytes.
But I leave these as exercises for the
reader. (The ultimate academic cop-out.)
44
...... .. ..-.
--.............. .........
_. .. ..........
.......
-- - -- - ..--.~
_ ----
------ .-.
.....:;:----
__
~r-w
- --
.~
~-
~--
RESEARCH CORP.
45
46
By Thomas Gettys
700 Snowberry Ct.
-Layfayette, Colorado 80026
(303) 665-5981
if C is alive
One Problem
Unfortunately, Life's usually pretty
slow. (Editor's note: we're still talking about
the game here.) So it's not unusual to
count progress in generations per minute
while many of the most interesting patterns require hundreds, sometimes even
thousands, of generations.
Which brings us to the point of this
article: making Life a little more interesting (and a lot faster) by using a more efficient algorithm.
The Basic Method
Let's look at the original, dumb algorithm. For each cell C do:
Data Structures
I've set up five lists (arrays). Four of
the lists - births, deaths, living cells, and
nonliving neighbors ~ contain X,Y
coordinate pairs (cell coordinates). These
are variable length lists. (If there were
two births, for instance, the birth list
would contain two coordinate pairs.)
The lists of living cells and nonliving
neighbors continue from generation to
generation. The lists of births and deaths
are created from scratch for each generation.
The fifth list is a fixed-length array of
neighbor counts where there is one element in the list for each of the cells. This
is a two-dimensional array with its dimensions corresponding with the cell's X
and Y coordinates. The only thing stored
in this array is the count of neighbors for
each cell.
Four Procedures
I've divided the main portion of the
program into four procedures.
The first scans the list of living cells to
determine which will die. These are appended to the list of deaths and deleted
from the list of the living.
The second scans the list of nonliving
neighbors of living cells to determine
where there'll be births. These cells are
appended to the list of births and deleted
from the list of nonliving neighbors. This
procedure also removes from the nonliving neighbor list any cells which no
longer have living neighbors.
The third procedure processes the list
of births. Each cell is appended to the list
of living cells and the array of neighbor
counts is updated by incrementing each
of the eight neighboring cells. If a neighbor count was zero, the cell must be appended to the list of nonliving neighbors,
as it now has a living neighbor.
The fourth procedure uses the list of
deaths to update the array of neighbor
counts. If the cell that died has living
neighbors (its own neighbor count is
nonzero), it must be appended to the list
of nonliving neighbors.
MICROCORNUCOPIA,#45,Jan-Feb1989
47
48
--_._-----_._---
...
. . . . . . . . . . . . . i............................ . . . .
'.. .. ...
'.
................. ................... .... .....
'
. :../;
........
...... .
~"d
. .....
.,
,
...
..... ,
.. ,
.......
. . ." 'LJ
......
'>. . . ;.:...i.
)i ;.~:
<"Pi
....
\/
)(
...>:
I.
.i
..........
);:;:.'
.. ...,...........
;..- .....
................) .....
...
{~i ~~
:,\'
);:)
. .. . . .
..................
'. ~
p~
...
' .
,;;J:?5ii
....
. . ii
:':"'.
,..;.:
...................
(........
../:~.~
.......
. ...
......)} .....i:
.; ....
........ .
iP'
.....
"
;.,
'.> 'i
.................
m~"'~i
....... .
.. . . ii.. ......,. . . . . . . . . . . . . \. . . . . . . . . I
:.L
........... )i
.........
)".
.)
:\'=:
Lnrlj
..iii.'U
,,..
I.j ...../.}
.'"
"i/'
iiii?
iii}
.......
.~
"\.)'" /i
ii/i.
......
}
i"-
... .i
'
.L
.i.
~~>i:
",
'~"
<
.. .
.'"
~.
r\\
'c"
....
;".'
~7~S
...
}
:.. iij
;>
'(
'
ii . . i. . . .
/y
.
.....
...
J.
i(
........
.? .
:"'....
;'
i.' . .
......
':':'.'
...........
....
......;
... /
~)!w.
.........
i/
II
..
:;/
i iiiy
. ...>. ./
i:
>i
~;
.........
........
,.}
t)
.....
...., .
......./ .... ~
'.(
iC
it
...
... ".
~.
/
.......
fr.
. .
~.
......:..
"
'.P}
"::",
A Subtle Problem
The array of neighbor counts includes
an extra count if the corresponding cell is
alive. I did this to deal with an especially
subtle situation. To see the problem, suppose I don't do an extra count for living
cells. Then consider the following situation:
12345
1
2
3
* *
* .. ,
living cells
= ,*,
nonliving cells
.....
= '.'
Mop-Up
Initialization zeros the array of neighbor counts and puts 1s into the neighbor
counts of cells where there'll be births.
Then it installs the pattern of living cells
into the list of births. Finally it calls the
procedure that processes the birth list.
After calling the procedure, the 1s are
subtracted back out of the neighbor
counts. This prevents the procedure from
appending any of the cells in the initial
pattern to the list of nonliving neighbors.
The initialization routine creates a
single pattern known as the "R pentomino" into the grid. The pattern stabilizes
after 1,103 generations, yielding 6 gliders,
4 blinkers, and 14 static forms 5.
Finally
You can update this algorithm for
three (or more!) dimensions by simply
adjusting the number of columns in the
lists and changing the routines that update the array of neighbor counts. Mter
that, the hard part is the graphics!
The parameters EL, EU, FL and FU
(environment and fertility low and high)
were borrowed from the article on threedimensional Life3. Use them if you'd like
to experiment with the change-of-state
rules.
Bibliography
1 Scientific American 9/84 (1dimensional Life)
2 BYTE 12/86 (1 dimensional life)
3 Scientific American 2/87 (3 dimensional Life)
4 Scientific American 4/84 (general
cellular automata)
5 Wheels, Life, and Other Mathematical
Amusements Martin Gardner 1984
49
Toolbox
t is now late September (as I write this). The
aspen have turned glorious gold, the air has
a nip, and I'm having a harder time getting
out of bed in the morning. At least my pants
and shoes (soaked at SOG) have dried out.
You'll notice the contents and organization
of this column have changed. C programmers
are a diverse lot so I'm trying to reach all of
you. You'll see I've broken the column into four
sections: Toolbox, C Explorations, News & Reviews, and Resources.
Toolbox will cover tools and how to use
them. There are many tools: compilers, linkers,
debuggers, profilers, etc. In this section I'll include in-depth reviews of noteworthy products,
or a tutorial on how to make the most of a
given tool. This time I'll talk about Borland's
new Turbo Debugger, and discuss how (and
when) to use a debugger.
Unlike some other C programming columns,
I don't want to rehash last year's algorithms.
Programmers have hundreds of resources
which teach them how to write linked-lists, binary trees, and sort functions. Instead, in the C
Explorations section, I'll be covering the poorly
documented areas of C - those facilities, functions, and theories no one talks about.
Due to the length of the Turbo Debugger review, Explorations will debut in the May /June
issue (#47). Future discussions will be about the
ANSI C time and date functions, interrupt handlers and optimization techniques.
News and Reviews will contain new product
mentions, industry news, and other nontechnical bits. I've had some very positive feedback
from folks who want to know what's going on
with vendors, products, and standards. Here's
where you'll find it. This issue contains quick
reviews of Turbo C 2.0, Turbo Assembler 1.0,
Quick C 2.0, and the latest news on the ANSI
standard.
Finally, there's the Resources part of the
Debuggers, however, aren't smartthey can only show you what's happening. It's up to you to interpret the information.
Turbo Debugger
Turbo C is a year-and-a-half old, but
until the release of version 2.0 it hasn't
had its own debugger. Instead, Borland
has suggested using third-party products.
Now, however, Borland is to be commended for producing an exceptional
product.
Borland's debugger is actually two:
the limited debugger built into Turbo C,
and the more-powerful standalone
Turbo Debugger sold with Turbo Assembler. This is part of the reason you
will see two Turbo C packages listed in
advertisements.
The standard Turbo C 2.0 package is
an integrated compiler (now including a
debugger), along with command-line
utilities (a linker, librarian, etc.) The
Turbo C 2.0 Professional package has
everything the standard package does,
plus the standalone Turbo Debugger
and Turbo Assembler. Turbo C Professional costs $250. The debugger and
assembler can be pU.rchased as a set for
$150.
Why two debuggers? Borland built
the most useful features of Turbo Debugger into the integrated package.
There just isn't memory space to include
all of the debugging features in the
package.
I'll talk about both debuggers, so you
know what you can (and can't) do in
each of them. In order to keep my fingers from wearing out, I'll refer to the
integrated debugger as ID, and the
standalone Turbo Debugger as TD.
Using The Debuggers
The integrated environment is automatically set up to compile your program with debugging information builtin; when using the command-line compiler, you need to use the -v switch.
A program compiled for debugging
contains references to the source. While
it may seem like the debugger is executing your source code, it's actually crossreferencing current execution with your
original file.
Both debuggers show you your
source while the program executes. A
pointer on the left side of the screen
flags the line as it's executed. You can
choose screen-swapping so your program's output (on one) doesn't interfere
with the debugger's display (on the
other). A single keystroke selects either
know this
51
in the lower 640K, where it will run almost exactly like it would without the
debugger. In all fairness, for $199 you
can purchase MagicCV (from Nu-Mega
Technologies) which does the same
thing for CodeView.
Some Conclusions
Borland provides some excellent tutorials (including example programs)
which guide you step-by-step through
debugging. Turbo Debugger has some
of the clearest and friendliest documentation I've seen.
I can tell that Borland spent a lot of
time studying CodeView and its users.
Don't be surprised if Microsoft adds
most of Turbo Debugger's features in
the next version of CodeView.
Mundane Debugging
Now that I've talked about the latest
in debuggers, I'd like to cover some
other (sometimes forgotten) techniques.
I know that this sounds like old advice, but it's truer of C than for almost
any other language: the best debugger
you have is your eyes.
I recently studied one of my programs and found that it included a
number of header files that weren't required! This certainly affected the compile time for this program, and it wasn't
something a debugger would have
caught.
Occasionally print out a copy of your
source, and read it. Sometimes "desk
checking" is faster than using a debugger. By the time you'd recompiled with
debugger options and loaded the program into the debugger, you could have
spotted the problem.
Build your programs in stages, if at
all possible. The longer the program, the
better it is to create and test portions
before you paste it all together.
Run your compiler with all of the
warnings turned on. Eliminate any
warnings, even if they seem trivial.
Compilers from Microsoft, Borland, and
Zortech provide excellent warnings
about mismatched pointers, unintentional assignments, and other nonfatal
problems. Use function prototypes, and
be sure to explicitly cast values in assignments between types.
C Ex lorations
Okay, okay - I said I wasn't going
to include this section for another
couple of issues. So I lied (grin)! I just
wanted to point out a simple technique
using the exclusive-or (1\) operator in C.
= *a:
= *b;
*b = c;
c
*a
Resources
Book Of The Issue
If you do any kind of scientific or engineering programming, Numerical Recipes in C by Press, Flannery, Teukolsky,
FOR XT
FOR XT
FOR XT
AT (40
AND AT
$ 299.00
(20 MEG)
(RLL 30 MEG) $ 319.00
$ 359.00
MEG)
MONITORS
Color Monitor RGB (eGA)
Color Monitor RGB (EGA)
Monochrome TTL (Green)
Monochrome TTL (Amber)
EGA Color Video Card
$ 255.00
$ 375.00
$ 85.00
$ 95.00
$ 129.00
CITIZEN
120
120D
180
180D
MSP-15E 160
MSP-40
240
MSP-45
240
300
MSP-50
300
MSP-55
$ 165.00
$ 185.00
$ 369 .. 00
$ 339.00
$ 469.00
$ 439.00
$ 539.00
MODEL
MODEL
MODEL
MODEL
MODEL
MODEL
MODEL
PRINTERS
CPS 9
CPS 9
CPS 15
CPS 9
CPS 15
CPS 9
CPS 15
53
- - - - - - - - - ._-_._----
By Laine Stump
PC Tech
P.O. Box 128
Lake City, MN 55041
54
value) and referencing, local variables, temporary labels, and a few new assembly time
directives, as well as a macro I wrote that handles parameter passing on the stack in a much
more readable fashion than normal.
Actually, I ended up with two examples: In
Figure 1, Fact returns the result in register AX.
In Figure 2, Fact returns the result in a V AR
parameter (sometimes referred to as "passed by
reference" or "passed by address"). First, I'll
just take a hop through Figure I, pointing out
things of interest.
The .MODEL Directive
The first line of the listing has the .MODEL
directive. .MODEL tells the assembler which
memory model and parameter passing conventions it should use as default. In my example, I
have chosen SMALL model (one code segment
and one data segment) and PASCAL parameter
passing conventions (parameters pushed in leftright order and cleared from the stack by the
called function).
I could just have easily chosen LARGE
mode (multiple code segments and multiple
data segments) and C parameter passing conventions (parameters pushed right-left and
cleared by the caller).
As well as initializing the assembler with
default values for "NEAR" and "FAR" when
none is explicitly given, .MODEL makes writing an assembly language routine callable by a
high level language almost completely painless.
For example, it even puts an underscore at
the beginning of all public symbols (if you
choose C parameter passing). And it will set up
the BP register to point to the parameters in the
stack frame and define text macros so that you
can refer to a variable as "COUNT" instead of
as "word ptr [BP-2]."
I chose the PASCAL parameter convention
for my example because, among other things, I
can forget about clearing the stack after returning from a procedure call. Instead, the assembler inserts a RET xx instruction (return and
subtract xx from SP) in place of each RET instruction. Besides, PASCAL convention is the
standard for OS/2, so I may as well get used to
it...
AX,l
PUSH AX
MASM 5.1'5
new simplified
segment directives
Bufferin nearly all
the segment
headaches.
ASSUME CS:_TEXT
Temporary Labels
The next unusual thing you'll notice
is that funny little label "@@:". This is
called a "temporary" label. Its main
advantage is that it doesn't take up
space in the symbol table in memory, or
clutter up the listing of symbols at the
end of the LST output or the MAP file.
It can be referenced with @F, which
jumps Forward to the next @@ label, or
@B, which jumps Backward to the most
recent @@ label.
The CALLS Macro
While I was looking through books
trying to come up with a topic for this
issue, I kept coming across examples of
calling OS/2 library routines and other
high level language routines. What was
actually happening was confused by a
plethora of PUSH instructions stringing
down the page. I decided that was ugly,
instead of
CMP word ptr [BP+4],1
BP,SP
SP,BP
pOP
BP
56
PUSH
AX
MOV
AX,Offset Array
PUSH
AX
PUSH
FirstNum
PUSH
LastNum
CALL
Xlate
29.00
16.00
49.00
35.00
***
* **
[EMERRLD ,
LMICROWRRc)
P.O. Box 1726, Beaverton, OR 97075
**
***
**..
*** ......
MatchPointPC by MicroSolutions
The MatchPoint-PC board for the PC/XT/AT works with your
standard controller card to let you read and write to NorthStar
hard sector and Apple II diskettes on your PC. INCLUDES a copy
of the UniForm-PC program, as well as utilities to format disks,
copy, delete, and view files on Apple DOS, PRODOS, and Apple
CP/M diskettes.
MatchPoint-PC Board ......................... $169.95
MatchMaker by MicroSolutions
Now you can copy your Macintosh diskettes right on your PCIXT/
AT with the MatchMaker. Just plug your external Macintosh drive
into the MatchMaker board and experience EASY access to your
3112" Mac diskettes. Includes programs to read, write, initialize,
and delete files on your single or double sided Mac diskettes.
MatchMaker Board ........................... $139.95
MatchMaker w/External Mac Drive .............. $325.00
57
--------,---
is equivalent to:
SUB
SP,2
Result EQU <word ptr [BP-2]>
RET
Although MASM
takes care of
allocating stack
space for the
pointer, you must
still write the code
for dereferencing
the pointer. And,
just as important,
but sometimes not
quite so obvious,
you must write the
code for
determining the
address to put into
the pointer.
lems caused by non-reentrant code.
Until I figured out the problem, I didn't
even realize that there was recursion in
the program, because it was indirect
(you know, PROCA calls PROCB calls
PROCC calls PROCA) and only occurred under certain conditions.
After all, there must be some reason
why Nicklaus Wirth, Kernighan,
Ritchie, and all those other guys decided that code should be reentrant.
Variable Parameters
The second difference in Figure 2 is
the passing of the result of Fact as a
variable parameter instead of through
the AX register. Any parameter de-
clared as "PTR xxxx" is a variable parameter. The effect is that a pointer to the
variable is passed instead of the contents of the variable. This allows the
called routine to modify the original
variable instead of just a copy of it.
Now comes the slight difficulty of
working with MASM in contrast to Pascalor C. Although MASM takes care of
allocating stack space for the pointer,
you must still write the code for
dereferencing the pointer. And, just as
important, but sometimes not quite so
obvious, you must write the code for
determining the address to put into the
pointer.
Dereferencing (a fancy word for
"getting the contents of") a pointer on
the stack is easy, especially because
MASM has declared the text macro to
let us address Result as "Result" instead of as "Dword ptr [BP+4]." We just
do an LES BX,Result, which loads ES:BX
with the address of the variable we
want to look at and modify. Then when
we want to do something with it, we
call it ES:[BX] instead of Result.
If I had used default Small model
pointer sizes when declaring Result, I
could have just used MOV BX,Result,
then referred to the variable as [BX].
Determining the effective address
can be a bit more confusing.
My first reaction was to use "offset
Result" when making the call to Fact.
This would work fine if Result were a
"direct reference" (Le., not relative to an
index register), but all variables on the
stack are relative to BP, and "offset [BP2]" makes no sense to the assembler
(since the value of BP can't be known
until runtime). That's where the LEA
(Load Effective Address) instruction
comes in.
LEA takes any memory reference as
its second operand, calculates the offset,
and places that offset in the variable
specified by the first operand. So, if BP
is currently 55FCh, the instruction
LEA BX, [BP-2]
McTek
LCD
Portable
(Also available in PlASMA PORTABLE)
(Including Hard Disk Only 19 lbs.)
~OO/T286
__
3 MB On-Board AT!
Our McTek 286A is the most integrated AT-compatible to date. It utilizes
the highly regarded Chips & Technology chip set, and includes memory
upgradable on board to 3 megabytes. No more worries about speed
compatibility with expanded memory cards! The 8/10 MHz, Jj-wait state
McTek 286A runs at 11.5 Norton Sl, and an effective 13.2MHz on the
Landmark test. Serial, parallel & game ports are all standard on board.
With Award 3.01 bios, 640k, 200W power supply, Samsung amber monitor
with Hercules-compatible controller, locking case, AT-style keyboard,
1.2MB drive, 20MB Seagate. Assembled & fully tested, with a full one-year
warranty. Get in on the most advanced AT-compatible $13~
on the market, at the lowest price ever offered!
'.7'.7
286-16 MHz W/IMB
() () ,,
$1699!!
$17'n n ,
:%~~MHZ $~~~~/
$729
XT Turbo
4.77/8MHz
Complete
Superturbo
4.77/10 MHz
Complete
$779
.
McTek Systems, Inc. -1411 San Pablo Avenue - Berkeley, CA 94702 - 415-525-5129
MISC.
DISK DRIVES
PRINTERS
MONITORS
PC/XT
PC/AT
DESKTOP
MODEMS
Everex in!. 300/1200 ......... $79
Everex 2400 external.. .... $195
Everex 2400 internal ...... $179
MOUSE
Logimouse C7 .................... $69
Logimouse Hl Res ........... $99
An Interesting Show
I was totally amused for at least an
hour by calling up version two of the
program, typing "g Fact" to get within
the scope of the parameters of Fact, then
setting watches (dynamic displays of
chosen points in memory) on "Result,"
"*Result," and "Number." Then I used
the Trace command (F8) to step through
the recursive calls to Fact one at a time,
watching the changes to the variables.
Notice that the actual variable displayed in the watch window for, say,
"Number," changes with progressive
calls. It always shows the current activation of Number.
When a variable is no longer valid
(for example, after you return to
MAIN), the display will show an error
message for that variable. It's something
like "out of scope." Assembly language
has truly never been at a higher level.
Oh, yeah. While you're stepping
through the program, pull down the
"Calls" window now and then to see
the nesting of calls and which parameters were passed during each call.
After a bit of playing around, you'll
probably be as excited as I am.
More Goodies
By the way, I haven't mentioned
MASM S.l's wonderful reference books
- including the Mixed Language Programming Guide, which gives explicit instructions for writing assembly routines
When a
variable is no
longer valid (for
example, after you
return to MAIN),
the display will
show an error
message for that
variable. It's
something like "out
of scope."
which are callable from the Microsoft
high level languages (Pascal, C, QuickBasic, FORTRAN), as well as how to
call anyone of those languages from
anyone of the others.
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
NEW!
MS-DOS File Compatibility Package (create, read, & write MS-DOS file systems on non-MS-DOS computers)
Bluestreak Plus Communications (two ports, programmer's interlace, terminal emulation) . . . . . .
CQL Query System (SQL retrievals plus windows) . . . . . . . . . . . . . . . . . . . . . .
GraphiC 4.1 (high-resolution, DISSPLA-style scientific plots in color & hardcopy) . . . . . . . . .
PC Ouses (Aspen, Software, System V compatible, extensive documentation) . . . . . . . . . . .
Greenleaf Busmess Mathlib (exact decimal math, formatting, depreciation, interest, cash flow, statistics)
Greenleaf Data Windows (windows, menus, data entry, interactive form design). . . . . . . . . . .
Greenleaf Communications Library (interrupt mode, modem control, XON-XOFF) . . . . . . . .
Thrbo1BX (TRIP certified; HP, PS, dot drivers; CM fonts; La1EX) . . . . . . .
Sherlock (Cdebugging aid) . . . . . . . . . . . . . . . . . . . . . . . .
Essential resident C (TSRify C programs, DOS shared libraries) . . . . . . . .
Greenleaf Functions (2% useful C functions, all DOS services) . . . . . . . . . . . . . . . . .
Essential C Utility Library (400 useful C functions) . . . . . . . . . . . . . . . . . . . . . .
Essential Communications library (C functions for RS-232-based communication systems) . . . . .
WKS Library Version 2.0 (C program interface to Lotus 1-2-3, dBase, Supercalc 4, Quatro, & Clipper)
OS/88 (U **x-like operating system, many tools, cross-development from MS-DOS) . . . . . . . . . . .
ME Version 2.0 (programmer's editor with C-like macro language by Magma Software; Version 1.31 still $75)
Thrbo G Graphics Library (all popUlar adapters, hidden line removal) . . . . . . . . . . . . . . . . .
Vmem/C (virtual memory manager; least-recently used pager; dynamic expansion of swap file)
ThrboGeometry (library of routines for computational geometry) . . . . . . . . . . . . .
CB1tee (B+tree ISAM driver, muItiplevariable-length keys) . . . . . . . . . . . . . .
Minix Operat~ng System (U ..x-like operating system, includes manual) . . . . . . . . . .
PC/IP (CMU/MIT TCP/IP implementation for PCs) . . . . . . . . . . . . . . . . . .
B-'free Library & ISAM Driver (file system utilities by Softfocus) . . . . . . . . . . . . .
Tele Operating System (ThleKernel, TeleWindows, TeleFile, & TeleB'free by Ken Berry) . . .
The Profiler (program execution profile tool) . . . . . . . . . . . . . . . . . . . . .
QC88 C compiler (ASM output, small model, no longs, floats or bit fields, 80+ function library)
Wendin Operatins System Construction Kit or PCNX, PCVMS OIS Shells . . . . . . . . .
C Windows Tholkit (pop-up, pull-down, spreadsheet, CGA/EGA/Hercules) . . . . . . . .
JAlli Async Thrminal Emulator (includes file transfer and menu subsystem) . . . . . . . .
Polyglot Lisp-to-C 'franslator (includes Lis{> interpreter, Prolog, and simple calculus prover)
MultiDOS Plus (DOS-based multitasking, mtertask messaging, semaphores) . . . . . . .
Kinetic Imase Synthesizer (3-D animation system ... Saturday morning on your PC!). . . . .
XT BIOS Kit (roll your own BIOS with this complete set of basic in{>ut/output functions for XTh)
TE Editor Developer's Kit (full screen editor, undo command, multlple windows) . . . . . .
Professional C Windows (lean & mean window and keyboard handler) .
Ip (flexible printer driver, most popular printers supported) . . . . .
Quincy (interactive C interpreter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
P1tee (parse tree management) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Icon-Thols (full-featured icon display and editing system) . . . . . . . . . . . . . . . . . . . .
Polyglot TSR Package (includes reminder, bookmark, virus catcher, cache manager, & speech generator)
HELP! (pop-up help system builder) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Multi-User BBS (chat, mail, me~us! sysop displays; uses Galacticomm modem card)
Make (macros, all languages, bUilt-m rules) . . . . . . . . . . . . . . . . .
Coder's Prolog (inference engine for use with C programs) . . ,
Virtual Memory System (least recently used swapping) . . . . .
C-Notes (pop-up help for C programmers ... add your own notes) .
Heap I/O (treat all or part of a disk file as heap storage) . . . . .
Biggerstaff's System Tools (mUlti-tasking window manager kit) . .
PC-XINU (Comer's XINU operating system for PC) . . . . . .
CLIPS (rule-based expert system generator, Version 4.2) . . . .
Tiny Curses (Berkeley curses package) . . . . . . . . . . . .
Polyglot RAM Disk (change disk size on the fly; includes utilities) . . . . .
SP (spelling checker with dictionary and maintenance tools) . . . . . . .
Clisp (Lisp interpreter with extensive internals documentatIOn) . . . . . .
'franslate Rules to C (YACC-like function generator for rule-based systems) . . . . .
6-Pack of Editors (six public domain editors for use, stud~ & hacking) . . . . . . . . .
Crunch Pack (14 file compression & expansion programs . . . . . . . .
Pascal CompHer & Interpreter (P-codes, standard Pascal . . . . . . . .
ICON (string and list processing language, Version 7) . . . . . . . . . . . . . . .
FLEX (fast lexical analyzer generator; new, improved LEX) . . . . . . . . . . . .
LEX (lexical an~~er generator, an oldie but a goodie) . . . . . . . . . . . . . .
Bison & PREP (YACC workalike parser generator & attribute grammar preprocessor). . .
Auto'frace (program tracer and memory trasher catcher) . . . . . . . . . . . . . . .
Data Handlmg Utilities in C (data entry, validation & display; specify Thrbo C or Microsoft)
Arrays for C (macro package to ease handling of arrays). . . . . . . . . . . . . . . .
ANSI Forms (forms manager based on ANSI codes) . . . . . . . . . . . . . . . . .
C Com piler Thrture Test (checks a C compiler against K & R) . .
Benchmark Package (C compiler, PC hardware, and Unix system)
A68 (68000 cross-assembler) . . . . . . . . . . . . . . . .
List-Pac (C functions for lists, stacks, and queues) . . . . . . . .
XLT Macro Processor (general purpose text translator) . . . . . .
KeySwap (swaps CapsLock and CRTL key functions on XTh and ATs)
OOPS (collection of handy C++ classes by Keith Gorlen of NIH) .
C/reativity (Eliza-based notetaker) . . . . . . . . . . . . . . .
$500
$400
$325
$325
$250
$250
$220
$175
$170
$170
$165
$160
$160
$160
$155
$150
$140
$135
$130
$125
$115
$105
$100
$100
$100
$100
$150
$70
$60
$35
$30
$30
$20
$15
$15
Data
.
.
.
.
$90
$80
$80
$80
$80
$80
$75
$75
$75
$70
$65
$60
$60
$60
$50
$50
$50
$50
$45
$40
$40
$40
$40
$35
$35
$35
$30
$30
$30
$30
$30
$30
$25
$25
$25
$25
$25
$25
$25
$25
$20
$20
$20
$20
$20
$20
$20
$20
$15
MasterCard/VISA
Anthony Barcellos
P.o. Box 2249
Davis, CA 95617-2249
(916) 756-4866
Guess Again
The Milwaukee Business Journal published a
report on the lawsuit that quoted from the confidential settlement agreement. Who was responsible for the leak? Apparently it was SEA
- which is all the more remarkable since they
were the ones insistent on sealing the outcome.
The papers filed by SEA in the public records of the Milwaukee County courthouse
contained the complete settlement. documents.
They were discovered by Karen Little, a technical writer, who visited the courthouse and
asked for the file on SEA v. PKWare. (Ms. Little
is not a PKWare employee, although she was
hired by Katz to prepare his documentation.)
Now the documents have been dumped
onto BBSs across the country, where they travel
in the company of a lengthening list of BBS sysops who are lining up in support of Phil Katz.
The text of the agreement contains nothing to
substantiate the claim that Katz borrowed code
from ARC. In fact, many people have already
pointed out that any similarities between ARC
and PKARC could derive from the public
domain algorithms that both used in their compression routines (though, as noted, Katz did a
much better job of it).
The backlash against SEA is dramatic. Sysops point out that the ARC standard lan-
A Prophylactic Postscript
Thanks to Deborah Rose of New
Haven, Conn., for being the first to advise me that CHK4BOMB is the handiwork of Andy Hopkins. Because the
program has been the target of crackers
who corrupted the file, Hopkins has recently withdrawn CHK4BOMB from
bulletin boards. If you don't have one of
the older, pristine versions of
CHK4BOMB, your best bet would be to
contact Hopkins at:
Panda Systems
801 Wilson Road
Wilmington, DE 19803
(302) 764-4722
CHK4BOMB has been repackaged as
part of the commercial set of programs
called the Dr. Panda Utilities. The
complete set of utilities costs only $50.
However, you can get CHK4BOMB
(now called LABTEST) for $20 (along
with a second program called MONITOR). Thanks again, Deborah.
v.
Kovacs
Penn Services
dBASE lll+
En:h~an~c~m~e~n~t~~""~~
FAST:
Up to 20 times faster than dBASE.
In one case, report generation on a 60,000
record file was reduced from 18 hours to 2
hours!
W.H. Whitney
McGraw Hill, Inc.
COPY
DELETE
FLEXIBLE:
Commands APPEND
RECALL
Call from a program file or DOS prompt.
REPLACE COUNT
Run on a stand alone PC or a network.
MANY MORE
EASY:
dBASE-like syntax - No need to learn
LTRlM[) UPPER[]
Functions'
another language.
TRIM[]
SUBSTR[]
COMPATIBLE:
Recognizes and creates dBASE III + files.
Transfer DBF data to DAT files for use with other languages (Basic, Pascal, etc.)
Introductory Offer
$99.00
Offer ends 12/31/88
IJ!fI
(215) 536-5858
63
The Rectangle
At The End Of The Julia
By Dave Thompson
KOALA COMPUTER
213-316-5866
9 to 6 PST M - Sat
!! VGA!! ATI VIP card and VGA Professional Color Monitor - $648
Analog 13" anti-reflective, non-interlaced, flicker free, .31 dot pitch monitor with an ATI improved VIP video card.
800x560 drivers for ACAD, Windows, GEM, and Ventura Publisher included. VGA, EGA, CGA, MDA, HGA selectable.
Up to 256 colors on screen at one time with VIP card. 37 lb.
31b.
TERMS - Cashiers check, immediate shipment - All others must clear. No COD. Prices FOB Torrance,
CA. Call us and give your ZIP code and we will quote freight charges. California residents add 6 '12%
sales tax. Add $2 handling to orders under $25.
._-_.
__._----
65
_.. -----.------
Gary L. Scott
Decision Technology
P.O. Box 5040
Aloha, OR 97006
Over the last few days Gary and I have been discussing this column. I like details. You know, real
numbers so you can compare your advertising results with those of the company mentioned.
However, Gary pointed out, the company is very
concerned about giving away information to competitors.
Gary also noted that marketing companies can be
very profitable ways to earn a living. They can be
more profitable (but riskier) than consulting practices.
f, like me, you're a voracious reader of technical magazines, you've probably seen a
TMI ad. TMI has been advertising its
Weather Pro in magazines such as BYTE,
Scientific American, etc., for over eighteen
months.
"Imagine having a sophisticated weather
station hidden inside your Pc."
As an habitual tinkerer, I've wanted a
weather station since I was making anemometers out of Dixie cups. TMI's weather station is
everything I've dreamed of. With such equipment I could ignore the airhead reading the
National Weather Service forecast off a tel.eprompter.
Limited growth
for a small one or
two person
company might be
acceptable.
------------,-------
compare that percentage with the percentages from other magazines. Or, we
could use this type of data to compare
current ads or quickly check the effectiveness of new ads and new magazines.
Let's the compare computer magazine response with the kinds of numbers produced by a weather-oriented
trade magazine. See Figure 2.
The first thing that jumps out about
Figure 2 is the much smaller response.
Keep in mind though that most trade
magazines have much smaller readerships. A closer look at both tables shows
that a much higher percentage of inquiries from the trade magazine were
turned into sales.
Editor's note: When you look at advertising costs, don't forget the costs of the inquiries. Someone has to answer the mail and
the phone, someone has to send out those
fancy ($) flyers, someone has to pay for calls
on the 800 line, and someone has to pay for
all those postage-due response cards.
It's not unusual to pay $2 (to $5 or
more) to respond to each inquiry. I've heard
stories of ads generating so many inquiries
that the companies simply went bankrupt.
They didn't have the capital left to make the
products and complete the sales.
And, of course, this adds another item to
the cost per sale. You'll need to add the inquiry costs to the advertising costs before
dividing by the number of sales.
Obviously the response in the trade
magazine is too small a sample to draw
hard conclusions, but you can see some
general trends in responses and sales.
And most often the effectiveness of
an ad campaign is determined by a
Customer Support
When was the last time that you
called a company for help with your
new fungus-growing kit and got a su pport person with an IQ of a toadstool?
Not that long ago, I'll bet.
As this column goes to press, TMI is
looking for an electrical engineer to
handle technical assistance. TMI's intent
is to help their customers, not frustrate
them.
Finally
TMI has laid a solid foundation to
grow on. Only time will tell if TMI has
chosen the right product, in the right
market, at the right time. During the latter part of 1989, I'll do a follow-up look
at how TMI has fared with its plans.
Anyone interested in more information on the Weather Pro product can
call TMI at (800) 247-5712.
Next issue the column will cover the
trials and tribulations of consulting. I
would like to thank the people that
have called to discuss consulting with
me since my initial request for information. Remember this is your column. If
you would like your company featured
or have an idea for a column, please call
or write.
GEMS
SUPER
DISCOUNT*
PRICES
MOTHERBOARDS
CASE
1/0 CARDS
Xl/8088
4.77/8mhz TURBO, 640K,OK .............. $69
4.77110mhz TURBO, 640K,OK ............. 76
4.77/10mhz TURBO, 1mb, OK, SNJ ...... 79
4. 77115mhz SUPER TURBO, w/l mb MEMORY,
2/3 size, 110% faster than 6mhz IBM AT. 420
AT/286 AT SIZE
6/10mhz, 1mb OK, DTK, Ows ............. 229
6/10mhz, 1mb OK, PC CALC, Ows ....... 259
6/12mhz, 1mb OK, PC CALC, ows ....... 289
6/12mhz, 1mb OK, EW, 12mhz CPU, Ows .. 289
6/16mhz, 1mb OK, PC CALC, Ows ....... 399
AT/286 XT SIZE
6/10mhz, 1mb OK, DTK, Ows ............. 239
6/10mhz, 1mb OK, ELTECH, Ows ........ 229
6/12mhz, 1 or 4mb, OK, MS, Ows '" ... 265
6/16mhz, 2 or 8mb, OK, NOVAS ......... 489
6/20mhz, 2 or 8mb, OK, NOVAS ......... 549
AT1386 AT SIZE
16mhz, w 11mb MICRONICS ........... 1399
20mhz, w 11mb, MICRONICS .......... 1449
20mhz, wI 1mb, 287 + 387 SOCKET,MS.1415
20mhz, w 11mb, up to 16mb on M/B,l par,
1 ser w I 2nd opt ......................... CALL
20mhz MYLEX motherboard ............. CALL
25mhz 38C w/l mb ........................ CALL
Multi 1/0 Ser Par Cal Clk Game Disk ..... $48
Multi 1/0 Above (DFI) ........................ 66
Magic 1/0 Ser Par Cal Clk Disk Ctlr 360K, 720K,
1.2mb .......................................... 49
1/0 Plus .. Ser Par Cal Clk Game ........... 42
Parallel Card (XT) ............................ 15
Serial Card 2nd Serial Optional
..... 18
Port Serial Card w/2 Port & Opt ........... 66
2nd Serial for XT ............................. 17
Game Card (2 Ports) ......................... 17
AT 1/0 CARD par, game, ser, 2nd ser opt. 42
2nd Serial Port for AT ....................... 19
HARD DRIVES
ST-225 Seagate (DRIVE ONLY) '" ... ~. $215
ST-225 with CONTROLLER ................ 255
ST-238 Seagate (DRIVE ONLY) ............ 229
ST-238 with CONTROLLER ................ 275
ST-251 Seagate 40ms HARD DRIVE ..... 339
ST-251-1 Sea gate 28ms HARD DRIVE ... 419
MR535 Mitsubishi RLL 65mb 28ms ..... 465
ST-125 Seagate 3-V2 format 20mb ....... 245
Miniscribe 3650 40mb (61 ms) MFM .... 315
Miniscribe 3675 63mb (61 ms) RLL ..... 335
MAXTOR .... Call For Special Prices ... $CALL
TOSHIBA MK130 65mb RLL 3-V2 form .. 575
HARD CARD 20mb Plus Development ... 545
HARD CARD 40mb Plus Development ... 729
SPECIAL CASES
Transportable (case PS KB Mono Monit)$435
Transportable EGA VER ................... 1250
LCD portable 640X400 Bracklite 181bs ... 759
Carrying Case for portables ................. 35
Tower Case 230W PWR SPLY, 6 half ht. 250
Tower Case w/digital display, 3 Dr. Front will
hold 7, 1/2ht Dr. 220W ..................... 225
POWER SUPPLY
150 watt XT Compatible
200 watt XT Compatible
200 watt AT Compatible
220 watt AT Compatible
250 watt AT Compatible
................... $36
..................... 49
..................... 59
..................... 63
................
69
KEYBOARDS
84 KEY At Style Keyboard ..............
$36
84 Key At Style Maxi Switch Keyboard .... 49
101 Key Enhanced Monterey ................ 42
101 Key Tronics Keyboard ................... 47
101 Maxiswitch Enhanced Keyboard ....... 64
101 Tactile Enhanced Keyboard ............. 49
MOUSE
Logitech M-8 Button .
. ............... $35
Logitech C-7 Button .......................... 69
Logitech HI-REZ .............................. 86
Microsoft Bus Mouse + Paintbrush/Menu . 99
Microsoft Ser Mouse + Paintbrush/Menu . 99
VIDEO CARDS
Monochrome WI Printer Port ............. $39
Monochrome 132 Column & Print Port .,. 53
Color Graphics Adaptor ..................... 39
Color Graphics Adaptor 11 print port ...... 53
Micro EGA Auto Switching ................. 129
Video-7 VGA .................................. 269
Paradise VGA Plus ........................... 259
Paradise VGA Professional ................. 389
Chips and Technologies VGA Card ........ 249
MODEM
1200 BAUD with Software ................ $52
2400 BAUD with Software .............. ... 95
Zoom HC 2400 w/Procomm Software ... 116
External 1200 w/PC Talk III S/W ............ 62
External 2400 wI PC Talk III SNJ .......... 109
Everex External 2400 Modem ............. 179
CHIPS
TAPE BACKUP
Teac 60mb MT2ST/45 (CASS) INT
$539
Everex 60mb Wangtek INT (Cart) ........ 679
Colorado 44mb (Cart) Inlernal .....
. 289
Desktop Publishing
Hi-Res 1024 15"MONITOR W/Video Controller
1024 X 768 Resolution ................... $499
SCANNERS
Mitsubishi Hand Scanner Full Page MH216
200 DPI, 8.5" X 11" ...................... $638
Mitsubishi 400 DPI MH 130 ............. CALL
Mitsubishi Paper Feeder For Scanner .... 176
Abaton 300 FB Full Page Scanner ...... 1349
MONITORS
Goldstar Amber Monochrome 720X348. $58
Samsung 1252 Mono 720X348 TllISW .. 66
Samsung 1464 EGB ......................... 219
Evervision 14 Amber Flat Screen .......... 119
Amdek 410A ............
. .. 139
Nec GS '"
.......................... 199
Taxan Composite Amber/Green ............ 89
Relisys EGA with TIlT & SWIVEL ........ 339
Relisys Multi Scan ......................... 499
Mitsubishi 1410XC EGA
....... 379
Mitsubishi 1381A Diamond Scan
. 539
Nec Multiscan II ........
569
Sigma Designs Laserview 1901-PC ... 1749
CAD PRODUCTS
MITSUBISHI HA3905 19VI20" MONITOR, ANALOGI
TIL, 1024 X 1024, 15.7 35.5khz ............. $1725
ACCELARATOR CARDS
MICRO 286-10 OK ........................ $269
SOlA 286i 10mhz OK ................... :. 298
SOlA 286i 12mhz OK ....................... 359
MOTHERCARDS
SOTA 5.0 MOTHERCARDS w/l mb, 10mhz.$779
SOlA 5,0 MOTHERCARDS w/lmb, 12mhz.879
Econo XT Compatible
8mhz Turbo M/B,OK, case,
Keyboard, 150w PIS, FLOP CTLR, 1 360K
Drive, Mono video B,D.
MONITOR .......................... " ...... $339
\;/
'~~~~~~------------------~
::--"'Lap Top Computer
'///If
G E 191 ST'
*AII prices shown are pre-paid or ordered by VISA or Mastercard. Charge card orders are subject to a 3% surcharge.
For C.O.D. or term orders on parts above add 10%.
& IBM" Are Registered Trademarks of International Business .M..a.c..h.in.e!lls. . . . . . . . . . . ..
I I '-332-GEMS
computers
Shipping: 40/( plus $3.00 handling on all part orders (except cases, 9o/c + $3.(0). APO/FPO
orders add 8o/c plus $3.00 on part orders. Call for exact charges on S~'stems and Monitors.
CA residents add 7O/C tax. Prices reflect 3o/c cash discount.
--------_._---------
THE SLY40XT
ANNOUNCING
THE DISKLESS WORK STATION
SLICERYM
70
Brian Garrison
Emerald Microware
P.O. Box 1726
Beaverton, OR 97075
(503) 641-0347
Dale Leisen
Cal Abco
6041 Varlel Ave.
Woodland Hills, CA 91367
(800) 321-4484 Ext. #295
Brian Garrison, Emerald Microware (Retailer)
"I'm still selling Miniscribes. For 20 megs I'm selling the
8438, MFM, 3 1/2" either 68 ms or 40 ms.
"For 30 megs it's the 8438 with an RLL controller. I've had
no trouble with that combination.
"For 40 megs I use the 3650s, half height. Not real fast, 60
ms, but they're very cheap. Or, if someone wants speed I give
them the 3053 MFM. At 25 ms it's hot, though it's relatively
new.
"For 80 megs I like the 3085. It's 22 ms, half height, 5 1/4"
and holds 71 meg.
"For controller cards the Western Digital 1002 WX1s are
good. For RLL I'm using DTC and Adaptec. The Adaptec is
very fast at 1:1 interleave.
"I've noticed that a lot of the house-brand OEM clones are
using Tandon, half height,.3 1/2" hard drives. They must be
awfully cheap.
"I'm not handling any Seagates now, at all. Seagate called
last week and told me all about their reliability, but I don't
know anyone who's using them."
A Little Reality
I must add something. If you have Seagates, don't panic.
Some of our 225s have run flawlessly for years. And, if you
purchase something else, remember that they too ship an occasionallemon.
If your drives have been error free for awhile, they'll probably be error free for a lot longer. Be sure to do a low level reformat (especially on the 225s and 238s) every six months
(wouldn't hurt with any drive).
Be sure to keep them as cool as possible. Don't stack a
floppy drive right on top of a hard drive, especially a Seagate.
After running the system for two hours, open it up enough to
place your hand firmly on top of the unit. If it's uncomfortably
hot, then move your hand. (I shouldn't have to tell you this,
you know.) Also move the drive.
Come to think of it, I should tell you about that big wad of
cables you have blocking air flow across your main board.
You know, those grey ribbons that hook up with the drives
and ports and all. Kinda zaps those fancy ceramic LSI chips,
being hot and all. (Remind me to mention it in this column
sometime.)
ONLY $249
The only affordable
device to test 256K and
64K RAM chips.
30 day money
back guarantee
(503)626-6333
The IIAS'lItItFUL
-----1!~!!irO
SOURCE~!
or
(800)3ARISTO
f:=;
.".. c:....
_.er..-
HD86 is a professionally
supported product and yet costs
no 1Il0re than "shareware". And of course. it's
not copy protected.
YKRSIOR 2 BOW AVAILABLE!
71
Ie
PROMPT DELIVERY!!!
DYNAMIC RAM
1Mx9
80 ns $525.00
1Mx9 100 ns 475.00
256Kx9
60 ns 175.00
1Mx1 100 ns
38.50
1Mbit
256Kx1 100 ns
13.25
41256
51258 * 256Kx1 100 ns 13.25
256Kx1 120 ns
12.50
41256
256Kx1 150 ns
10.75
41256
41264 + 64Kx4 120 ns 19.70
EPROM
128Kx8 200 ns $29.50
64Kx8 200 ns
13.95
32Kx8 250 ns
7.25
16Kx8 250 ns
5.95
STATIC RAM
62256p-10 32Kx8 100 ns $16.25
8Kx8 120 ns
10
SIMM
SIPP
SIMM
(918) 267-4961
9 PM CST can usually be delivered the next morning, via Federal Express Standard
Air @ $6.00, or guaranteed next day Priority One @ $10.251
XenoCopy-PC
ogtaf<'
~OOS?t C
?C is 'lout ?
\e
$79.95
Sales Tax
if;
$5.00 S/H
~/.A.
~! . ..
UPs
coo
READ/ WRITE I
I
FORMAT IDUPLICATE
Disks from over 300 other micros
s versions
'abe from prev,ou
upgrades ava'
. t' n
Can for Authonza \0
for only $2 5 . 00
To Order Contact:
BERKELEY, CA.
94710
(415) 644-9366
Reader Service Number 39
73
,"
,c.o~
~M-
Advertise In Russia
I read a short piece in the Wall Street Journal that I have to
pass along. It turns out that the Russians (with the help of
Computerworld's publisher) have started a magazine called PC
World USSR.
This wonderful new Russian magazine has an innovative
new feature - advertising. (You heard it here second.)
Anyway, their U.S.-based salesman sold 30 pages of ads at
$3,000 per page, but when the first issue came out it contained
only four ads. It turns out that the Soviet editors removed any
ads that "didn't contain enough technical information" and
decided the facts in 11 others repeated information already in
editorial copy. Apparently they didn't want to waste the
advertisers'money.
Waste? We're talking advertising, not ethics.
Do Svidan'ya (It's goodby in Russian, I hope.)
David Thompson
Micro Cornucopia
P.O. Box 223, Bend, Oregon 97709
1-800-888-8087
74
-------------------
Out Of Sorts?
And: Can You Spell Me?
By Michael S. Hunt
845 E. Wyeth
Pocatello, ID 83201
(208) 233-7539
This Time
Last time I introduced the problem of storing large amounts of information. In this issue
I will describe a dictionary unit and how it
works. The example unit (see Figure 2) uses a
disk based dictionary. A memory based unit
and the Modula-2 code are available on the
Issue #45 disk.
MICRO CORNUCOPIA, #45, Jan-Feb, 198~
75
SAMPLE
OUTPUT
Fully
automatic
Program
header
resetprn.1st
Sourcerllstlng
ResetPRN v1.01
19-Apr-88
4:05 pm
Page I
PAGE 60.132
il
0008
RESETPRN
15-Apr-88
1.01
Created:
Version:
data.le
equ
: (0040:0008'378h)
seg.a
resetprn
start:
proc
far
jmp
db
short locI
'ResetPRN-vl.OI', OOh
dw
db
40h
Ooh, OAh, 'Reset Printer?
push
pop
moy
Int
cs
ds
dX,offset data.3
ah,9
Zlh
658E:002E B401
658E:0030 CD 21
mov
Int
ah,l
21h
658E:0032
658E:0034
658E:0036
658E:00JA
65BE:003E
65BE:0041
65BE:0043
3C 79
7516
8E IE 0011
BB 16 0008
B3 C2 02
BO OB
EE
cmp
jne
41,79h
loc 3
ds,iiata_2
dx,ds:data.le
dX,2
al,8
658E:0044
65BE:0047
658E:0047
658E:0049
658E:004B
B9 8000
Assembler
directives
Determines
data areas
and type
Detailed
comments
Simulator
follows
segment
changes
Easy to
read
format
658E:0000
658E:0000
658E:0002
658E:0008
658E:000E
658E:0011
658E:0013
658E:0019
658E:00IF
658E:0025
658E:0025
658E:0026
658E:0027
658E:002A
658E:002C
E823
52 65 73 65 74 50
524E207631ZE
30 31 00
0040
00 OA 52 65 73 65
74 20 50 72 69 6E
74 65 72 3F 20 24
data 2
data=3
S'
10c_l:
OE
IF
.BA 0013
B4 09
CO 21
mov
add
moy
out
dx,al
cX,8000h
: (658E:0013'00h)
: DOS Services ahfunctlon09h
: al 8, Inltl411ze printer
10c100p.2:
E2FE
BO OC
EE
658E:004C
658E:004C B44C
658E:004E CD 21
loop
mov
out
10c100p_2
al,OCh
dX,al
mov
Int
ah,4Ch
21h
loc.3:
resetprn
seQ.a
: loop If cx
>
endp
ends
db
192 dup (OFFh)
stack_seg_b ends
6593:0000 OOCO(FFj
end
start
(Source code output and inline cross reference can also be selected)
BIOS SOURCE
SOURCER $99.95
USA Shipping & Handling $3; Outside USA $15; CA Residents add local sales tax 6, 6.5 or 7%; "requires SOURCER
All our products come with a 30 day money back satisfaction guarantee. Not copy
protected. To order or receive additional information just call!
1-800-662-VCOM
( 1-800-662-8266)
V COMMUNICATIONS
303 t Tisch Way, Suite 90S, Dept. M3, San Jose, CA 95 t 28 (408) 296-4224
PS/2. AT. XT. and PC are trademarks of IBM Corp.
76
--
--_._------_. __ ._.--------------_.-- - - - -
f every character
in the word list
required a node, the
dictionary would be
five times the size of
the word list.
Fortunately you can
save space by
taking advantage of
character repetitions.
Trees have overhead in the form of
pointers to other nodes in the tree. The
overhead for the dictionary tree is high,
for each node there is one byte for the
character and two bytes for each of the
two pointers to other nodes in the tree
(Figure 4). The ratio of node size to
stored information is 5:1.
The record dLtr is the node type and
has three components. The alpha variable contains the stored character. The
cross variable points to another letter allowed at this nth position in the word.
The down variable points to allowed
letters at the nth+1 position in the word.
If every character in the word list required a node, the dictionary would be
five times the size of the word list. Fortunately you can save space by taking
advantage of character repetitions.
Since "ask" and "assign" share the
MICRO CORNUCOPIA, #45, Jan-Feb, 1989
77
_-
AddWord
WordDe1ete
WordFound
3) Find a word.
4) Build dictionary BuildDict
from a word list.
5) Denote open
dictOpen
dictionary.
6) Open dictionary.
OpenDict
7) Close dictionary. CloseDict
Pascal
Ada
Modula-2
&
..-----...---------------W
PdSCal,Ada
&MOdula-2
One Year-6 issues
Individual
$26
Institution
$69
Outside the domestic u.s.
-Add $24/year for air service.
D Payment enclosed
D BiB Me
(U.S. Currency only)
Charge my D Visa D Mastercard
YES!
Card#'_ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Ada
-2
~-:::y-_-state~ZiP_
Modula
Expiration Date _ _ _ _ _ _ _ _ _ _ _ _ _ __
Nameoncard _ _ _ _ _ _ _ _ _ _ _ _ _ __
Signature _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Your Name _ _ _ _ _ _ _ _ _ _ _ _ _ __
L..................................._....................~
MICRO CORNUCOPIA, #45, Jan-Feb, 1989
79
entirely by a word already in the dictionary. In this and all other cases, the
eighth bit of the last character to be inserted is set to 1 at the end of AddWord. This is the flag for a valid end of
word.
Finding Words
The data structure I used for the dictionary is not optimum. The unit dict is
designed as a general storage and retrieval system. You can, no doubt, find
a better algorithm and data structure for
word storage. For instance, digging into
the relationship between the roots of
words and their prefixes and suffixes
might lead to a better method of storing
words. A short list of common words
(to check first) might also reduce search
time.
The dictionary did not save storage
space for the test data. The 25K word
list became a 42K dictionary. The small
list of words contained little repetition,
so storage requirements increased. A
large list of words with a greater number of character repetitions would yield
a dictionary equal to or smaller than the
word list.
The record pointers are two byte integers. You'll get an error if you use a
record number higher than MAXINT.
The dictionary tree can have up to
32767 nodes. This yields a maximum
file size of 32767*5+5=163840 bytes. The
extra five bytes is the root pointer (record zero). Of course, you can change
the record pointers, dLtrPtr, to four byte
longints.
If you change to longints, be sure to
change recsize to 9. This change will increase the node size from five bytes to
nine bytes. The node size to info ratio
will jump to 9:1.
The end-of-word flag uses the eighth
bit of the stored character. If the
character you need to store requires
eight bits, an additional flag will have
to be added to the dLtr record.
All words are stored in upper case so
the dictionary is not case sensitive. If
your needs require case sensitivity or
the stored information is not cased, remove the calls to UpCaseWrd in the
first lines of AddWord and WordFound.
The dictionary works well but is not
bullet proof. It does not have extensive
error checking. It is vulnerable to I/O
errors like disk full, and it doesn't check
for record sizes greater than 32767.
News Flash
It's here. Yes, it's actually here.
Turbo Pascal 5.0 came yesterday. I finally broke down and upgraded from
Turbo Pascal 2.0. Wow, what a difference. There's all these new goodies,
units, procedure passing, linking, EXE
files, debugger, 8087 support, limited
EMS support and BGI graphics. I have
lots to say next time.
Next Time
The theme of the next issue is soft- .
ware tools. Almost any unit presented
here could be considered a software
tool. But I've got BGI graphics now so
look for graphics tools to enliven your
user interface. Stay tuned ...
81
-----_._----------_.-------
Letters
knowledge of data communications (I
am well into my own commercial telecommunications program).
While I don't pretend to know all
there is to know about computers, I
have helped many people with the vast
range of questions generated by people
like Mr. Pettitt. I hope that next time
Mr. Pettitt goes to his favorite computer
store, the clerk on duty is not as intolerant as he.
As for you: well, you are forgiven for
this oversight and I will continue to
praise your magazine to all my customers. It is my personal favorite and I
thank you for all your hard work in getting this fine publication out on the
stands for all to enjoy.
John Mulligan
129 Lakeview Ave.
Syracuse, NY 13204
P.O. Box 33
Bulleen 3105 Australia
PT68K Update
I'd like to thank you and author Jack
Crenshaw for the excellent review of the
PT68K computer and SK*DOS in the
November-December issue. I got a
chuckle out of your comments about
"warts" in products.
As it turns out, Jack had sent us a
preliminary copy of his review last
spring, and during the summer of 1988
we removed virtually all of the SK*DOS
warts he'd found, although we did keep
the few we felt qualified as beauty
marks. Beauty is, after all, still in the
eye of the beholder. It's important to remember that SK*DOS is not MS-DOS; so
differences are not necessarily warts.
Here's what we did about the warts:
(1) SK*DOS now implements the "*,,
wild-card character for file names, extensions, and even directory names, although in a slightly different way from
MS-DOS.
(2) When SK*DOS deletes a file, or
copies a file over an existing file, it does
indeed ask you for confirmation. This is
something which we have no intention
of changing (and I'm told that PC-DOS
4.0 now does the same). Nevertheless,
there's an easy way for adventurous
(foolhardy?) users to defeat the system
- simply add "<Y" on the command
line and all the prompts will automatically be answered with "Y".
(3) Unlike MS-DOS, SK*DOS runs on
a variety of very different computers.
Hence, as Jack puts it, we "developed a
truly elegant system of I/O control, suitable for device-independent control of
a wide variety of devices." We provide
a sample driver to show people how to
use I/O, but have let users or vendors
write their own drivers.
(4) SK*DOS disk I/O on the PT68K is
slower than MS-DOS for several reasons. We don't have DMA, and SK*DOS
always defaults to "verify on." We have
now changed the verify scheme so that
in some instances verification will be
done on an entire file or an entire disk.
This has really sped things up.
(5) We've added subdirectories, but
not in the same way as MS-DOS.
SK*DOS lets you specify a default "system" drive/directory for loading programs, and a "work" drive/directory
for data files. System commands can
search within one directory, or across
many using the directory wild -card
character.
(6) The PT68K-2 now fully imple-
John Innes
120 MacPherson St.
Cremorne NSW,2090 Australia
MICRO CORNUCOPIA, #45,Jan-Feb1989
83
(512) 595-1937
... Verified 4/15/88'"
Catalog available.
AGS Software
Astrological software
94 Cranberry Hwy.
P.O. Box 28
Orleans, MA 02653
Catalog available.
(617) 255-0510
... Verified 4/15/88'"
Alcor Systems
Alpine Data
635MainSt.
Montrose, CO 81401
(800) 525-1040
Free brochures.
(303) 249-1400
... Verified 4/15/88'"
Alpha Systems Corp.
books. Z-80/Z-280/HD-
See Anapro
Anapro
Dealer-Heath/Zenith
M.A.G.I.C.-Stock market
analysis program.
available.
Anderson Techno-Products
Advent Products
Specializes in Kaypro
Anaheim, CA 92806
(714) 630-0446
current inventory-
Ottawa, Ontario
Canada, K2B 6R1
computers.
Free brochure available
mostly games.
No Catalog.
.. Verified 8/15/88'"
84
1706 Santa Fe
Kingsville, TX 78363
(805) 466-1589
(613) 722-0690
Application Engineering
TAXPAD-personal income
MAGICPRINT - Desktop
publishing
Suite lOA
(904) 264-4619
"Verified 8/31/88"
.. Verified 4/15/88"
Ashton-Tate
20101 Hamilton Ave.
Torrance, CA 90502-1319
(213) 329-8000
Greenville, SC 29611
(803) 294-0494
.. Verified 8/15/88"
"Verified 7 /29/88"
BO Software, Inc.
CompuView Products
Cambridge, MA 02138
(617) 576-3828
.. Verified 7/15/88"
.. Verified 8/15/88"
Borland International
Database Management
(800) 451-3267
(313) 971-8880
.. Verified 6/15/88"
c.c. Software
.. Verified 8/15/88"
1907 Alvarado Ave.
Walnut Creek, CA 94596
(415) 939-8153
.. Verified 8/31/88"
Masterful Disassembler
COE Software
CHECKS&BALANCES-single
401739thSW
entry accounting.
Free brochure available
Seattle, W A 98116
processor. Other CP /M
programs. Write for free
08550
.. Verified 7/29/88 ..
brochure.
"Verified 8/15/88"
WORDPATCH - Patches
(415) 947-1000
eqUipment scheduler,
etc.
WordStar
.. Verified 8/15/88"
(415) 685-7737
OynaComp, Inc.
.. Verified 4/15/88"
Scientific, engineering
financial, statistical,
Webster, NY 14580
(800) 828-6772(outside NY)
(716) 245-4040
Suite 510
programs. Disk
.. Verified 6/15/88"
Denver, CO 80222
(303) 691-5586
Echelon, Inc.
Elliam Associates
Fillmore, CA 93015
for CP /M computers.
(800) 533-8049
"Verified 8/31/88"
Ellis Computing
5655 Riggins Ct. Suite lO
.. Verified 6/15/88"
CompuMAGIC, Inc.
P.O. Box 437
Loan amortization.
Reno, NY 89502
CompuMAGIC Utility
(702) 827-3030
inventory. Cobol no
Severn, MD 21144
.. Verified 4/15/88"
longer available.
(301) 969-8068
SEARCH.
.. Verified 8/31/88 ..
85
By Gary Entsminger
1912 Haussler Dr.
Davis, CA 95616
$89.95 W/CABLE
$219.95
$69.95 w/cable
Yes!! These are for IBM compatible machines.
SHUGART # 465
--
~
_
.a
STEPPER MOTORS
_....-.
DSDD. 360 K
1/2 HEIGHT
BLACK FACE PLATE
(90 DAY WARRANTY)
Copal #SP-57
1/4" Shaft. 7.5 deg.{step. 36
Ohm.12VDC
$6.95
3/16" Shaft. 35 OZ: torque. 2.1A .. 5VDC
WITH BRASS GEAR. 20 TEETH. 1/2' DIAMETER
$89.95
59.95
LASERS
TOSHIBA 3.5" DISK DRIVES
IBM compatible
720K Byte
Double sided
Mounting kit
Power & Data cable adapter
Model # FDD 4210GOK
$119.95
$99.95 each
WARNING:
Voltages present and used by lasers con be lethal ... Permanent
eye damage could result from direct exposure to an on coming laser beam. Only
those persons qualified to handle such potentials should do so ...
$19.95
TECHNA-KIT
D-C Motor Controller
.Control 2 OC motors with a computer or
other logic source
.For motors rated 6-24 VOC
.Control forward/reverse/run/cw/ccw/stop
.Up to 6 Amp starting surge. 4 Amp cont.
.Oynamic breaking (capab!e)
CABLES-CONNECTORS-SEX CHANGERS
$12.95
529.95
AC POWER CORD
(6' COMPUTER STANDARD. MOLDED RUGS)
#10-001
2.95
#20-001
#20-005
#20-006
9.95
9.95
9.95
USMD-C
$29.95
Your price
$49.95
COMPUTER AUTOMATE
.Use your computer to provide automation
.8 separate drIver ports per card
.8 TIL/Cmos Inputs
.1 user defined sense switch
.6-24 VDC
.4 Amps/driver (max current)
$29.95
87
Micro Cornucopia
Schematics
Xl SCHEMATIC
5-3liJ pF
14.31818 MHz
2~
+5V
11
R2
5HZJ
RN1
4.7K
-=
II
1liJ 13
ROY
F/c
14
NC
EFt
1liJ
15
RES
ASYNC
1 CSYNC
8
-=
READY
RESET
CLK88
4.77 MHz
GNO
GNO
26
S~
27
S1
28
S2
NP NPI 32
INT
3liJ
29
NC 18
17
At last you can plumb the mysteries of your computer with this single sheet schematic of the
IBM Xl's main board. A wealth of Information for both True Blue and clone owners.
Need to know just how a non-maskable Interrupt occurs (and how to mask It)? Is your keyboard
dead (or do you just want to know how to disable It)? A trip through our schematic will answer
your questions.
Although clones use slightly altered board layouts and different chip location names, they're
close enough to the original for this schematic to be very useful. As an example - you have a
dead clone. III sucker won't even beep. A look at the schematic shows the location of parallel port A. You know that the power on self test loads a checkpoint number Into port A before
each test. So now all you have to do Is read port A with a logic probe to see how far the system
went before It puked.
We'll Include a list of these checkpoint numbers and some other pertinent trouble shooting Information with the schematic.
IBM PC-Xl Schematic $15.00
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . $20.00
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . $20.00
NOTE: These packages cover only the main boards. You're on your own when It comes to disk
drives, power supplies, video cards, etc.
Techtips
Paul F. Herman
Software Graphics Tools
3620 Amazon Dr.
New Port Richey, FL 34655
example, this isn't important because the Hercules card only fits in a PC compatible computer. But many times portability is a chief concern.
A more elegant solutiori to the filtering
problem is to use MS-DOS function call 44H
(I/O Control for Devices) to place the output
device channel in the "raw" mode. Raw in this
case means unfiltered, not uncooked. This can
be done with the code in Figure 1.
Of course you would also want to check for
a legal device name, device ready status, and so
forth, but you get the idea.
Micro Ads
A Micro Ad Is the Inexpensive way to reach over 22,000 technical folks like yourself. To place a Micro
Ad, Just print out your message (make It short and sweet) and mall It to Micro C. We'll typeset your ad
(no charge) and run It In the next available Issue. You can also send camera ready copy. Rates: $99
for 1 time, $267 for three times, $474 for 6 times (a best buy at only $79 per Insertion). Full payment
5-100
LAS
LIQUIDATION
II
Intercontinental Micro
CPZ-48006
CPS-B8A
CPS-B6A
$95
$50
$40
SAS-200
RPB-200
MPB- 100
$85
MD-1013
CROSS ASSEMBLERS
$10
$5
$4
, ,
EASY to Install
Cache up to 3 MEGS of EXTENDED
and or EXPANDED
Buffers up to 26 DEVICE driven drives
Comes with 2 FREE utilities!!!!!
ORDERNO~
Other Items
OMTI-5300
$35
Order/Info: 215-233-4199
Craig Tiano, 9303 Stenton Ave.
Erdenheim, PA 19118
PseudoCode releases version 2 of its cross assemblers. Assemblers for the 8048,8051,8096,8085, z80.
HD64180, 6301, 6303, 6502,1802,6800,6805,6809, and
68000 microprocessor families are available. Macros,
Conditional Assembly, Include Files plus extensive
expression handling. Virtually no limit to program
size. For IBM PC's and true compatibles with MSDOS 2.0 or greater, and 256K memory. Complete with
printed manual for $35.00. Each additional is $20.00.
(Michigan residents add 4% tax). Shipping and
handling $5.00 USA, $10.00 Canada, $15.00 elsewhere.
Visa/MC. Order from distributor: KORE Inc., 6910
Patterson. Caiedonla, MI 49316, 616-791.g333.
Reader Service Number 75
snOOp -
ONELINERS
$7500
Inside! Turoo C
program
. funclionbyfunclionl
Inside follows
your program
through execution counts,
minirrom. maxirrom. and tolal
elapsed times with microsecond
Inside.'.!TlItJo
... Pascal
inside! COO<
C
Inside! COO< Basic
inside! MlCIOSOft Pascal
==~~~=nted
detail now!
:=;:
Each
Fortran
lnsideiLDgl1ed1_2
VI_ata..,.rd Accepted
(800)537-5043
Paradigm Systems
"
:';l"'t'~lV,>(I~
ONLY
68000 SOFTWARE
HAWTHORNE TECHNOLOGY
1411 S.E. 31st Ave., Portland, OR 97214
(503) 232-7332
ACCELERATE YOUR
AT'S MATH
Most AT's and clones run their 80287 math coprocessors
at 4 to 6 Mhz. So if you have an 8 or 10 Mhz 80287 in your
system, it's loafing! The Solution: Speed-up your AT's
80287'5 clock rate to it's maximum frequency with a
coprocessor daughter-board. 8 or 10 Mhz versions
available for $29.95 (80287 not included). Simple
installation.
OPT-TECH SORT/MERGE
B051
ZB / SuperB
CCOMPILER
(702) 588-3737
(609) 4661751
Reader Service Number 100
16 Megabytes
EMS and/or
Extended Memory
~:s~~~::;ured,
Sold and Serviced by
XT and AT
Compatible
m~ ~\r?!k
~J(d~Lru
91
- - - - - - - - - - - - - - - - - - - - - - - _. _--
dx,3FAh
al,dx ;port 3FAh
test al,OF8h
jnz label ;port not there
Bit Pattern
xxxxOOOx
xxxxOOlx
2
3
xxxx010x
xxxxOllx
xxxxlOOx
----.
------
more
Micro
Ads ...
@ITUW@U'n@ITU
RcadcrSctvicc Numbcr124
LATEST
BASIC to C
@@\!@O@
PC/XT
BIOS
*AWARD
286 * 386
Support for:
~ Enhanced Keyboards
~ EGA & VGA Graphics
~ 3.5 inch Floppies
~ More ...
K
~
423-3400
KOMPUTERWERK, INC
851 Parkvlew Blvd
Pittsburgh, PA 15215
Mr. MOX
Modem operated by Epoch
power controller
for your PC.
Makes any PC with
external modem
remote- access sable!
Software included
Data
Order From:
.
_ _ _
~iIIi_
KENMORE
Override
COMPUTER
TECHNOLOGIES
RcadcrSctvicc Numbcrl23
Micro Cornucopia
Back Issues
To Order:
Phone:
Mail:
1-800-888-8087
PO Box 223
Bend,Oregon 97709
United States,
Issues #1-34
Issues #35-current
ADyE,~,TI~,~1!,,~,,:::~~,P1?X
Issue 45
Reader Page
Service Number
72
107
132
04
AcquiredIntelligence . . .
American Cosmotron . . .
Aristo Computers . . . . . .
Austin Codeworks ...
22 Integrand . . . . . . . . 4S
15
....
105
07
Cascade Electronics . . . . . . . 53
CC Software . . . . . . . 71
Computerized Processing Unltd. 63
CompuView . InsideFrontCover
127
19
108
40
32
31
71
61
79
88 KoalaComputers . . . . . . 65
17
42
....
37
SemWare . . . . .
Slicer ......
SofSolutions . . . . .
Star-KSoftware ..
11
70
.6
33
09 Ecosoft . . . . . . . . . . . . 38
10 EmeraldMicroware ..... 57
93 Erac Company . . . . . . . 37
39 Xenos oft . . . . . . . . 73
11 HaltedSpedalties . . . . . . . . 25
....
Secrets of Disassembly
95
By Gary Entsminger
1912 Haussler Dr.
Davis, CA 95616
Factoring Monsters
Simulating A Toss
In its simplest form, the oblivious
transfer could be used for a safe coin
toss.
Suppose you and your ex-partner
(let's call her Eliza) live in different cities, and you want to divvy up some
property. Whoever wins the toss gets
first choice.
(Or if you're more sports-minded,
consider two football teams playing a
game on different fields and needing to
toss in order to decide who kicks off.)
In a coin-toss simulation, we assume
that the two tossers distrust each other.
Otherwise, one could toss, the other
could call, and both would accept the
result.
Here's how a toss might work Eliza starts by selecting 2 primes:
say, 7 and 13. (Note: in a real-world situation, these primes will be very large,
say 60-80 digits.)
She multiplies them and sends the
product (91) to you, keeping her numbers (7 and 13) secret.
You win the toss if you can factor 91.
First, you make sure Eliza isn't cheating
by checking to see if the number is a
prhne (let's assume you have a little
program that does this; i.e., the program
checks for primes).
Now, you randomly (or by some
mysterious formula) pick a number between 1 and 91, say 11. You square it,
get 121, divide it (using modulo division) by 91, and get the remainder (30).
You send 30 to Eliza, keeping your
number (11) secret.
Eliza knows the original number
(91), so she looks for all numbers less
than 91 that generate a remainder of 30
when divided into her number.
She discovers two pairs (11 & 24).
If she sends 11, she wins the toss because you won't have received any new
information, and thus won't be able to
factor her number. If she sends 24,
you'll add 11 (your number) to 24, and
get 35. The greatest common divisor of
35 and 91 is 7, so you can now factor
Eliza's number. You win the toss.
Critical Details
In the high-tech world, the oblivious
transfer depends on two crucial mathematical details that we can determine whether a
large number (of 60 digits or
more) is a prime;
and that factoring large numbers
is hard.
Determining whether a large number
is prime (divisible only by itself and by
the number 1) is more or less trivial,
even for large numbers.
Factoring large numbers is hard. You
can prove it to yourself by using "trial
division" or "baby divide" on a small
number (N). Try dividing N by 2, then
3, then 5, then 7, etc., until one of them
Cisgreat!
C**is better!!
Performance benchmarks
20.54
Sieve
20.49
23.62
Rsieve
20.49
20.54
23.62
1.38
Integer
1.32
6.31
Float
0.22
52.29
0.17
"Float
32.73
37.74
52.39
17.96
17.13
Pointer
17.91
17.91
Rpointer
17.79
17.14
Loop
3.90
3.90
3.90
. ize
0.60
0.49
8.46
Benchmarks were run on an 80286 based IBM compatible at 6Mhz with no 8087.
The float benchmark was re-run without optimization.
Zortech C++ is the first native-code C++ compiler for MS-DOS compatible machines. This
means you don't need to spend a lot of money on a C compiler. In fact, Zortech C++
comes with a C++ compiler, a C compiler, a linker, a librarian, a fully integrated editing
environment, context sensitive help and the fastest graphics library you've ever seen!
YES/
Rush me
c++ as shown
below:
o Zorfech c++
........
........
........
. . . . ...
With Zortech C++, you can mix and match code in C++, C and assembler and link
.
them all together with a single command!
Zortech C++ comes with a complete ~++ and C library, including
$99.95*
compatibility with the ANSI C drah. Unique to Zortech C++ is support
ZORTECH
o
C++
Book
0 Intro C++ Book
for mice, fast screen writes, re-entrant floating point and speaker
$29.95*
$27.95*
support.
VISA/MCICOD CHECK ACCEPTED
Now you can move your Microsoft and Turbo C code over to
Zortech C++ - we've included compatible library functions!
Name .....................................................................................................................................
Also, we have made Zortech C++ compatible with
Address...................................................................................................................................................
Microsoft's Codeview debugger!
..........................................................................................................................
Phone ...................................................
Enter the world of Object Oriented Programming
(oops) with Zortech C++!
VISA or MC#: ....................................................................................................... Exp. date ...................................................
Sure, C is great - but C++ is better!
To: ZORTECH INC 366 Massachusetts Ave., Arlington, MA 02774. Tel: 677-646-6703. Fax: 677-643-7969.
Ml2
,.
The X24 combines the best of motherboard and backplane designs in a 100% AT compatibl e system . Incorporating a 16 MHz 80286, Ihe X24 processor is designed to operate with the PC Tech Advanced System Motherboard, which contains the peripheral interfaces (hard disk, floppy disk, two serial ports and a parallel port). The
X24 processor can also be used with other totally pas~ve bus backplanes. Most critical components including
the microprocessor and up to ~ megabytes of fast memory are contain ed on a single PC size plug-in card. This
allows the processor and main system memory to be serviced or upgraded without disturbing other peripherals
such as serial ports and disk drives.
PC Tech Mono-II
The TMS34010 is a true general purpose graphics processor. PC Tech makes the total processing power of the 34010 available to both programmers and end users. Our 34010 Monochrome Graphics
Adapter is designed to allow programming from the PCtxr/AT host bus. You can completely replace our 34010 software wij h yours to direclly harness the incredible image processing power of the TM S
34010 for your application. We make a complete set of development tools available, including an assembler, C compiler, program loader, 34010 debugger, and PC interface tracer/debugger. Our stand
ard product includes support for extended CGA, MDA and Hercules emulation as well as a host addressable graphics bit- map. We also support and recommend the DGIS graphics interface standard (from
Graphic Software Systems) for applications development as an alternative to native 34010 software development. Ready to run drivers are available for most major applications software packages as well.
About PC Tech
PC Tech has been designing, manufacturing and marketing high performance PC reproducts for over three years. Our standard product line includes processor,
J"Tlemory , and video products. All products are designed, manufactured and supported in our lake City, Minnesota facilities.
Ia,t~d