Home

Parallel Processing

image

Contents

1. M65 Sute pae The Transputer A Microprocessor Designed For Parallel Processing If your interests are anything like those of our SOG attendees you ll join in on this dis cussion At least here you won t have to stay up well into the morning to get the details omputer applications today are imis more and more w processor power Over the past decade these power demands have resulted in new processors with their powerful instruction sets large RAM ad dressing schemes and higher clock speeds Some say there s no limit to single processor technology but there is an al ternative parallel processing The British firm INMOS has designed the transputer the first com mercially available microprocessor spe cially designed for parallel processing In this article I ll first look briefly at parallel processing systems and then ex plore some of the hardware specifics of the transputer Finally I ll consider the transputer s instruction set and operation with emphasis on its parallel processing features Parallel Processing Parallel technologies have appeared in mini and mainframe computers for a long time Cray CDC and Floating Point Systems offer processing units that allow pipelining concurrent evaluation in structions arrays and digital signal processing Such systems aren t very flexible be cause these proc
2. will input to the A register one byte from I O location 004266H The original contents of the A register provide bits 8 through 15 of the port address Zilog s corresponding rendition of the 8080 OUT instruction is even less useful With the same original register con figuration the instruction D3 66 or OUT 66H will write the value 42H to I O location 004266H Evidently these in structions are casualties of a grander scheme Useful I O instructions are the Z80 type that now take port bits 0 through 15 from register pair BC Examples of these instructions appear in our Poor Man s Network driver for ZRP M2 The driver will be included with Poor Man s Net work from Anderson Techno Products Our Z280 emulator presently has all the Z80 instructions operational and enough of the new Z280 instructions to support simple programs such as the network driver Operating speed on a 4 77 MHz PC isn t spectacular but it s usable On a turbo PC the system has approximately the feel of a V20 system The structure of the emulator is such that its speed is de pendent on the number of instructions implemented SO meaningful benchmarks can be run with the present system Unlike the Hitachi 64180 which has a multiply instruction but not a divide the Z280 has signed and unsigned 16 bit multiply and divide instructions These operations are important to the perfor mance of servo systems such as those we use in our sawmill
3. The QL comes bundled WITH PSION Integrated Word Processor Spreadsheet Database and Presentation Graphics Programs PLUS Our FREEWARE Demos amp Utilities with all purchases Add 12 shipping and handling INMOS is registered to Inmos Where Innovation Reigns Supreme MICRO CORNUCOPIA 38 Nov Dec 1987 79 80 No Headline THIS PAGE INTENTIONALLY LEFT BLANK Editor s note This blank page was sent to us by Nothing On Pages NOP a memberless society whose unpublished goal is the preserva tion of the blank page After receiving this very nice blank page I visited the society based in a community which will no doubt remain nameless but failed to get more than a blank stare from the missing receptionist However after a little poking around I located a Mr M T Page a forgettable little man with no title It used to be that we didn t do much here at NOP After all it wasn t until recently that anyone realized the significance of the blank page Printers used to feel that a blank page lack ed something It wasn t until manuals became commonplace and people began seeing our motto This Page Intentionally Left Blank that public awareness picked up Otherwise the craft of printing blank pages a craft which I must say predates Gutenberg might have died out Of course now people realize the contribu _ tion that blank pages make Like 7 Well there s a special difference
4. Also its blacks are much blacker and 22 MICRO CORNUCOPIA 38 Nov Dec 1987 more even much easier for print shops to reproduce well and its engine is rated for 300 000 copies I calculate that over its lifetime a Ricoh based printer will produce copies for three cents each A Cannon based printer will run about ten cents each That s counting the costs of supplies toner paper drums as well as the cost of the printer 3 Other Engines There are numerous other companies coming out with newer sharper eventually higher resolution engines NEC for instance has designed its own engine based on a 300 dpi LED device Instead of directing a laser beam with mirrors NEC stuck a row of LEDs onto a bar directly above the drum Nothing moves the LEDs just turn on and off to control where the dots will fall This process should be cheaper and much less subject to alignment problems than the standard laser devices Printer Emulation This is a tricky one You re going to have to do some investigation on your own to see what you need and what you re willing to pay for Many of the cheapest laser printers 1800 2400 do little more than emu late dot matrix or letter quality printers They may come with 4 to 10 resident fonts in ROM but don t count on uploading more fonts or printing graphics Only a few of the systems in this price range emulate the HP LaserJet The LaserJet s printer control lan guage P
5. The powerful macro programming language helps you eliminate repetitive editing tasks The impressive demo tutorial is written entirely as a macro itshows that no other editor s macro language even comes close Go ahead Call for your free demo today You ll see why VEDIT PLUS has been the 1 choice of programmers writers and engineers since 1980 Available for IBM PC Tandy 2000 DEC Rainbow MS DOS CP M 86 and CP M 80 Yes We support windows on most CRT terminals including CRT s connected to an IBM PC Order direct or from your dealer 185 Compare features and speed BRIEF Norton PMATE VEDIT Editor PLUS Off the cuff macros No No J Yes Yes Built in macros Yes No Yes Yes Keystroke macros Only 1 No No 100 Multiple file editing 20 2 No 20 Windows 20 2 No 20 Macro execution window No No No Yes Trace amp Breakpoint macros No No Yes Yes Execute DOS commands Yes Yes Yes Yes Configurable keyboard Layout Hard No Hard Easy Cut and paste buffers 1 1 1 36 Undo line changes Yes No No Yes Paragraph justification No No No Yes On line calculator No No No Yes Manual size index 250 No 42 No 469 Yes 380 Yes Benchmarks in 120K File 2000 replacements Pattern matching search Pattern matching replace 1 15 min 34 sec 1 07 min 6 sec 20sec Cannot Cannot 2sec 2 40 min Cannot Cannot 11sec VEDIT and CompuView are registered trademarks of CompuView Products Inc BRIEF is a PMA MATE is a trademark of Ph
6. The replicated par statement in Figure 5 computes the square root of each ele ment in an array The replicated par construct s loop ex pression isn t restricted to simple expres sions It s possible for example to start a process for each element of a dynamic list See Figure 6 The Alt Construct Alt is another important language ex tension Like the par it s closely tied to hardware features of the transputer The alt construct is used to wait for certain events or it can be used instead of a C switch statement or nested if statements The syntax of the alt mirrors that of C s switch statement alt l guard guardexpression code 3 guard guardexpression code default code In the alt construct two new keywords appear alt and guard The keyword alt indicates the start of an alt statement guard compares to case labels in a switch statement However there are some principal differences Guards are evaluated at run 16 MICRO CORNUCOPIA 38 Nov Dec 1987 time whereas case statements are evaluated at compile time Therefore guard expressions aren t restricted to constant expressions but can use com plex expressions that must be evaluated at runtime The guards in an alt statement are evaluated in the order in which they re placed within the alt braces and the result of a guard expression can be active or inactive The code of the first guard that s active will be e
7. 5339 KEYBOARD UPGRADE HARD DISK DRIVES 20 Meg Seagate ST4026 for AT 30 Meg Seagate ST4038 for AT 30 Meg CDC Wren 1 for AT S Does NOT include controller Color Monitor RGB CGA Color Monitor RGB EGA Monochrome TTL Green Monochrome TTL Amber EGA Color Video Card MS DOS 3 1 UY UU UU UU X CITIZEN PRINTERS MODEL 120D 120 CPS 9 MODEL MSP 10 160 CPS 9 MODEL MSP 15 160 CPs 15 MODEL MSP 20 200 CPS 9 MODEL MSP 25 200 CPS 15 MODEL 35 35 CPS LETTER QUALITY ALL PRINTERS COME WITH CABLE CASCADE ELECTRONICS ROUTE 1 BOX 8 RANDOLPH MN 55065 507 645 7997 1095 00 100 00 50 00 30 00 495 00 595 00 595 00 300 00 410 00 110 00 120 00 195 00 50 00 200 00 300 00 400 00 350 00 500 00 500 00 INC Please ADD Shipping on all Orders COD Add 3 00 Credit Cards ADD 5 Limited to Stock on Hand Subject to change continued from page 33 The read write pins in Figure 4 are rather interesting They use LS05 inverter gates which have open collector out puts This means when the output is 0 it pulls down but when the output is 1 it just lets go of the line You ll note each LS05 has a pull up resistor on the out put this pulls the line up to 1 5V in this case when the output lets go Open collector outputs used to be very common They allowed many devices to share a bus the bus had pull ups on every line but
8. FALSE INDEX 0 WHILE INDEX NumBlocks DO IF BlockSpace INDEX NIL THEN IF CompareStr BlockSpace INDEX Handle Handle 0 THEN found TRUE A BlockSpace INDEX RETURN END IF CompareStr END If BlockSpace INDEX INDEX 1 END WHILE END FindBlock PROCEDURE PasteBlock Handle ARRAY OF CHAR UpperLeftX UpperLeftY CARDINAL NewPosition BOOLEAN VAR done BOOLEAN This can either paste the block in a new position if new position is true or replace it in its old position if new position is false VAR I J K NumRows NumCols Position CH PC FirstCol LastCol FirstRow LastRow CARDINAL A BlockPointer MODE PAGE WORD found checked BOOLEAN chr CHAR MASK TEMP BITSET BEGIN Find the Handle done FALSE found FALSE checked FALSE MASK 15 14 13 12 11 10 9 8 FindBlock Handle I A found IF found THEN Calculate the number of rows and the number of columns NumRows A LastRow A FirstRow 1 NumCols A LastCol A FirstCol 1 IF NewPosition THEN Check to see if the new position will fit IF UpperLeftX NumCols lt cols AND UpperLeftY NumRows lt rows THEN FirstCol UpperLeftX FirstRow UpperLeftY LastCol UpperLeftX NumCols 1 LastRow UpperLeftY NumRows 1 checked TRUE END ELSE FirstRow A FirstRow LastRow A LastRow FirstCol A FirstCol LastCol A LastCol che
9. specific EOI for IRQ7 f ffo deed he Ae de Ae EEK EKER KERR KEKE KKK KKK KEK KKK de ke de de ke ke de k k ke ke k kh k KEKE KKK main for TSR This installs the interrupt sets up the hardware and exits leaving the program resident Main is never used again SB180 FX features main setvect INT_NUMBER int handler passes the ADDRESS of the beginning of the int_handler function setvect is a Borland function change the bit on the parallel board to allow the ACK interrupt to pass through to IRQ7 on the PC card bus BIT4 allows the interrupt to pass BIT2 allows pin 16 to be read See circuit diagram outportb BASE 2 BIT4 BIT2 zero top bit of OCWl to allow IRQ7 to be serviced Note we get the current OCW1l force the top bit to 0 and put it back out this retains the rest of the word which affects other aspects of the machine to prevent undesirable side effects outportb PIC OCWl inportb PIC OCW1 amp 0x7 keep 0 PROG SIZE first parameter is exit status See Ref Manual Akkkkkkkkkkkkkkkkkkkkkkkikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk e Measures only 5 75 x 8 e 64180 CPU running at 6 9 or 12 Mhz Up to 512K bytes RAM and 32K bytes ROM Two 38 4 baud serial ports A parallel printer port Peripheral expansion bus Three bi directional parallel ports Industry standard 765A compatible disk controller N
10. Includes shipping to your door in the con tinental U S As specialists in overseas systems we can supply 220 volt units Call or write for details SOFTWARE SPECIAL MINDREADER 65 Mindreader s artificial intelligence ap proach to word processing is the sort of breakthrough we don t normally expect in this business Editor s Choice PC Magazine January 1986 MICRO SOLUTIONS gives you a no risk 30 day trial period call for details EMIOGITECH Get into desktop publishing for under 180 00 LOGITECH MOUSE and PFS FIRST PUBLISHER will make your existing PC XT AT compatible and dot matrix or laser printer a flexible page layout system Limited quantities at an introductory price Call today P O Box 166 Riner VA 24149 call 24 hours 7 days a week 1 800 323 4829 Visa MasterCard 703 382 6624 C O D We Ship Worldwide Dealers Supported continued from page 44 and small Unless I ve missed something in my planning the module in Figure 3 should be the only one specific to the adapter in use The constants defined in module Con fig are imported into the module in Figure 4 This module defines some higher level constants and types as well as the headers for a few low level sub routines The types exported from this module are transparent probably not absolutely necessary but since we ll be diddling bits and bytes it ll be easier Ive compiled these modules with
11. Logi symbols Part A Discreet Gates INVERTER A BUFFER _ WHICH CHANGES TO 1 AND 1 TO a A BUFFER ISOLATES CIRCUIT ON LEFT FROM CIRCUIT ON RIGHT BITS FLOW THROUGH UNCHANGED oe rami i OUTPUT ENABLED ENABLED HEN HIGH WHEN LOW BUFFERS AND INVERTERS WITH OUTPUT ENABLE WHEN OUTPUT IN du SIGNAL FLOWS THROUGH AS NORMAL WHEN NOT ENABLED IT S AS IF gue OUTPUT IS DISCONNECTED FROM CIRCUIT is s CALLED IRI STATE D rani B Multiple Gates ee Con FALLING RISING EDE o TRIGGERED ae IF PRESENT uis IS THE CONTROL SECTION FOR THE BLOCK INCLUDES BLOCK ENABLE OUTPUT ENABLE CLOCK DIRECTION ETC SINGLE ELEMENT DUPLICATE CIRCUIT ELEMENTS GROUPED TOGETHER AND CONTROLLED TOGETHER THIS MEANS THIS MEANS INPUT INVERTED By Bruce Eckel EISYS Consulting 1009 N 36th Street Seattle WA 98103 memory This is a simple application but it should give you enough foundation to build more complex projects In this one we push a button or switch some logic to bring pin 10 on the DB 25 of the printer _ port to a logic zero and a window pops up in whatever application is running The window shows you the status of four of the other printer port lines But think of the possibilities any data logging monitoring control alarm etc system can be run in the back ground on your PC while you run your regular application
12. 2 W2 t R2 SINCE ALL THE PINS ON THE MICRO HER SOME EXPENSIVE CARDS IT IS POSSIBLE DO m CAREFULLY IRQ7 IS USED B J SETING THIS LINE HIGH ALLOWS THE SIGNAL ON PIN 18 TO PASS gt THROUGH To ROT noms 1 T CLEAR E CLOCK however requires an external power supply or some way to get power out of the PC which is entirely possible The four read write lines already have pull ups on them So if you can get away with reading only four switches your circuit is very simple The other lines of course may be driven with TTL or CMOS outputs without worrying about pull up resistors You must however make sure the grounds from both systems are connected together Otherwise a 1 to the first system might look like a 0 to the second Everything is relative so you must give them both the same starting point from which to compare Os and 1s Using 4000 series CMOS to drive the pins with pull ups on them is out of spec for that type of CMOS so I wouldn t recommend it Generating Printer Interrupt Pin 10 ACK Signals with a bar over them are sometimes typographically rep OPEN INTERRUPT SL Q2 B4 O3 B2 Q5 B2 34 MICRO CORNUCOPIA 38 Nov Dec 1987 bu o COLLECTOR outu THE EDGE CONNECTOR UNLIKE NUSED INTERRUPTS ARE 4 resented with leading signs serves double duty it can simply be read or if you initialize the proper circuitry it will generate IRQ7 whe
13. 32 FUNCTION Exec Command stringi128 INTEGER CONST SSSave INTEGER 0 SPSave INTEGER 0 RetAX INTEGER 0 RetFlags INTEGER 0 TYPE ExecPacketRec RECORD EnvironmentSeg INTEGER CommandPtr FCB1 FCB2 CHAR end ExecPacketRec VAR ComFile String20 ExecPack ExecPacketRec begin ComFile GetEnvironment COMSPEC chr 0 execute command com IF length command 0 THEN sending it this line Insert c Command 1 c switch means do this command length command 1 M A ExecPack EnvironmentSeg 0000 use parent s environment ExecPack CommandPtr Ptr seg Command ofs Command ExecPack FCBl Ptr 0 0 ExecPack FCB2 Ptr 0 0 START OF MODIFIED AREA inline 06 1E 55 9C push es ds bp flags 8C DO 8E D8 mov ax ss mov ds ax seg ComFile BA ComFile mov dx offset ComFile 0 01 SEA 42 add dx bp inc dx 8E C0 mov es ax seg ExecPack BB ExecPack mov bx offset ExecPack 01 EB add bx bp B8 00 545B mov ax 4B00h 2E 8C 16 SSSave mov cs SSSave ss 2E 89 26 SPSave mov cs SPSave sp CD 21 int 21h 2E 8E 16 SSSave mov ss cs SSSave 2E 8B 26 SPSave mov sp cs SPSave lt lt 2E A3 RetAX mov cs RetAX ax 9c 58 pushf pop ax 2E A3 RetFlags mov cs RetFlags ax 9D 5D 1F 07 pop flags bp ds es ly IF RetFl
14. 38 Nov Dec 1987 57 continued from page 57 code I reminded myself that MS DOS 4Bh calls can be made from residence DOS just doles memory out from the un allocated memory at the top It works in other Cs why not in Turbo So I started from scratch with an assembly language module that used the MS DOS function directly Turbo s inline coding made it a snap It worked right from the first And my own version added 454 rather than 5344 bytes to the EXE file So what is going on In almost 5000 extra bytes a lot is possible Some sort of error checking maybe All I know is that I immediately added my own exec function to my private linking library My function may not search the path automatically and may not remember my birthday and may not concatenate long lists of argument strings but it is smaller and the error codes make sense I also discovered that stream I O ap parently doesn t work from residence though I ma skilled enough programmer to know how to reset the hardware and the psp s It s not pleasant to be told that a file is not there at least that was the DOS error message when I could see the darned thing with my very own eyes in the directory Again such routines work with other Cs Another foray into low level DOS calls got me back into business at the cost of another couple of hours of self doubt The point is not that there could never be good reason for making stream I O and system call
15. Because ZRDOS is written to take full advantage of the Z80 it executes faster than ordinary CP M and can improve your system s performance by up to 10 Installing ZCPR3 Z System Echelon offers ZCPR3 Z System in many different forms For 49 you get the complete source code to ZCPR3 and the installation files However this takes some experience with assembly language programming to get running as you must perform the installation yourself For users who are not qualified in assembly language programming Echelon offers our auto install products Z Com is our 100 complete Z System which even a monkey can install because it installs itself We offer a money back guarantee if it doesn t install properly on your system Z Com includes many interesting utility programs like UNERASE MENU VFILER and much more zi ORDER FORM Echelon Inc Payment to be made by 885 N San Antonio Road Los Altos CA 94022 USA B ELA 415 948 3820 order line and tech support O Money Order Telex 4931646 O UPSCOD NAME E Mastercard Visa ADDRESS Exp Date California residents add 7 sales tax TELEPHONE DISK FORMAT 1 REQUESTING CATALOG Echelon also offers bootable disks for some CP M computers which require absolutely no installation and are capable of reconfiguration to change ZCPR3 s memory requirements Bootable disks are available for Kaypro Z80 and Morrow MD3 computers Z80 Turbo Modula 2 We are proud to offer the finest h
16. Call for information and pricing CP M 8080 280 ROM C compiler 8080 Z80 assembler linker librarian UNIX libraries and specialized utilities Aztec C Il c CP M amp ROM 349 Aztec C Il d CP M How To Become A User To become an Aztec C user call 800 221 0440 From NJ or intemational locations call 201 542 2121 Telex 4995812 or FAX 201 542 8386 C O D VISA Master Card American Express wire domestic and international and terms are available One and two da bee delivery available for all domestic most international destinations Aztec Systems baught directly from Manx have a 30 satisfaction uarantee Most systems are upgradable by paying the difference in pnce plus 10 Site licenses OEM educational and multiple cop discounts are available To e TUS ay 89 continued from page 89 your messages include address and phone number s 800 Number For six years I ve refused to get an 800 number Sure everyone else has one After all Phone orders are processed faster Phone orders are a lot easier to place No hassle finding an envelope stamp pencil checkbook mailbox e 800 numbers make phone orders easier and cheaper for ou Aowera 800 calls are really collect calls they cost us about 25 cents a minute and because they are so expensive we have to limit them to orders Otherwise we would talk ourselves into poverty in a matter of weeks So we ve limited the 800 nu
17. Samsung SM 13SFA 12 Ambr 96 MULTI FUNCTION CARD Parallel amp Serial Port Game Port Floppy Controller Clock amp Cal 96 EGA PACKAGE DEAL Package consists of Intergraph 4 EGA Card and the Autoseek 2000 EGA Mon itor by Int Graphics No software dido bici ad did dnd POWER SUPPLIES Elgar 400W Unint Power Sup 126 00 SV 1A 5V 2A 12V 1A 12V 2A 24V 05A SWITCHERS 9V 9 5A 12V 3 8A 12V 8A 39 00 9V 3A 12V 2A 12V 4A 9V 6A 12V 2A 12V 1A 9V 6A 24V 1 4A 12V 6A 9V 75A 12V 8A 24V 5A MISCELLANEOUS Headset Boom Microphone 280 Controller Card w 8 bit Ato D Converter Nicad Pack 12V 5AH 6 50 Knob 5 50 8280 Clairemont Mesa Blvd Suite 117 San Diego California 92111 61 9 569 1864 call for our Test Equipment Mailer 795 SYSTEM EXAMPLE 1 For the Hacker Cheap Mainboard Case Power Supply 225 256K Memory 150 NS 19 Floppy Controller 2 Drives Floppy Drive Y2 Ht DSDD Keyboard Cherry no case Video Board with Parallel and Lightpen Port Roland MB 122G 12 Green Monitor no case SYSTEM EXAMPLE 2 FCC Approved Not Cheap Mainboard Case Power Supply ee 640K Memory 150NS Multi 1 0 Parallel Serial Floppy Clock Cal 2 DSDD Floppy Drives minimum EGA Package nio EY CS AT Style Keyboard Oh y
18. Teleconnect Magazine May 86 DataDesk Intl bas designed a sturdy and bandsome key sponse is tbe bardware bargain of tbe year says Charles Humble Oregonian Jan 86 The best part of the key board is tbe way it feels It s ideal And fast I ve never worked on a keyboard witb a nicer toucb Business Computer Digest Aug 86 ue oo um 3 EP By David Thompson J CRO O CORNUCOPIA Az a s Editor amp Publisher Direc or of Advertising x Laura Togan a Distribution Manager eo Last year I was vaguely curious about parallel gt TRA COE processing This year it s a lot more interesting So inter 7 esting in fact that I tried it at home Accounting E nas s sa oo Erin was to clear the table and put leftovers in the Sandra Thompson ale fridge DE a Sandy was to wash Order Department Jennifer s task was drying and putting away the T Tammy Westfall vs dishes Iwas the supervisor task scheduler It seemed like the perfect time since it was my night to do dishes What happened however was not pretty By the ike CORNUCOPIA SSN 0747 587 ne time I d finished proposing the experiment Erin had published bi monthly for 18 per year bv disappeared into her room to feed Popcorn her pet rat ae Micro Cornucopia Inc 155 NW Haw thome Sandy had tossed me the sponge and headed Bend OR 977 d c t d ise 25 d Bends d Oe
19. because it only knows how to deal with the kind of communication re 10 MICRO CORNUCOPIA 38 Nov Dec 1987 quired by the Mandelbrot demo When the calculation process has finished calculating a block of pixels it passes the address of its result the data block to the messagepasser Once the calculating process sends this pointer the messagepasser requests the next pixel coordinates from the host The messagepasser takes care of buf fering and passing results back to the host while at the same time receiving new coordinates from the host control ler The calculating process is therefore almost immediately able to start calculat ing the next block of pixels To balance the work load among a number of transputers the controller the PC in this case sends new pixel coor dinates into the network only after it has received back a block of data When the controller sends out the V e decided to write a generic program in which the number of computers was set in a variable new pixel coordinates they go to the first messagepasser in the line The first mes sagepasser checks its own processor If the processor isn t busy then the mes sagepasser puts the coordinates into a special buffer for its own processor otherwise it passes the coordinates to the next transputer in the line The messagepasser connects its own transputer with the next and previous transputers in the farm network It ar b
20. display circuitry each memory location makes up a portion of the displayed image CGA is the most common since it can feed either a composite monitor either color or monochrome or an RGB monitor Sixteen K bytes at B000 0000 segment offset are assigned to the CGA In its maximum resolution 640 pixels X 200 lines it supports only monochrome The pixels in each scan line are con tained in 80 sequential memory loca full memory test etc Companion Memory 249 95 oard CJ 512 K bytes expandable to 8 megabytes O O wait state O Interfaces to Single Board Computer Marion Systems Corporation 1317 5th St Suite 301 Santa Monica CA 90401 213 451 8910 WINDOWS SPRITES FOR THE 83 KAYPRO I OR 4 XEROX 820 1 AND BIG BOARD 1I THE OMNIVID DEVICE DRIVERS Blazing fast assembly language device drivers make impressive screens quick and easy No complicated code to write Just send simple escape sequences to your Console Output routine Multiple screens each with its own windows and sprites may be held in memory for instant use OMNIVID makes it simple And with FLEXUTIL COM provided it s quick and easy to create an executable COM file which loads your selection of the OMNIVID device drivers in protected upper TPA above the BIOS or at any absolute address Information on how to write and include your own device drivers is also provided Easy to use with most High Level Languages Toolboxes provided for
21. l title window 0 Process Monitor Interrupt RED CHAR GREEN BACK MICRO CORNUCOPIA 38 Nov Dec 1987 A high performance d 2 80 compatible 22 single board gt computer If you want to add sound here see the Turbo C user s guide page 275 wait for the ACK line to rise before returning Meanwhile read all the input lines for example with pullup resistors on them x while ACK see how much neater the macro makes things window gotoXY 0 LEFT X43 TOP Y 2 window puts 0 pin 1 BLACK CHAR BROWN BACK window put binary 0 READ BIT BASE 2 BITO BLUE CHAR BROWN BACK window gotoXY 0 LEFT X435 TOP Y 2 window puts 0 pin 14 BLACK CHAR BROWN BACK window put binary 0 READ_BIT BASE 2 BIT1 BLUE CHAR BROWN BACK window gotoXY 0 LEFT X43 TOP Y 47 window puts 0 pin 16 BLACK CHAR BROWN BACK window put binary 0 READ BIT BASE 2 BIT2 BLUE CHAR BROWN BACK window gotoXY 0 LEFT X 35 TOP Y 7 window puts 0 pin 17 BLACK CHAR BROWN BACK window put binary 0 READ BIT BASE 2 BIT3 BLUE CHAR BROWN BACK Ihe GT180 and SB180FX as featured in Byte Nov amp Dec 1986 xestore the user s previous screen restore screen The SB180 FX a Small fast memory packed single board computer n add the Micromint GT180 for high resolution graphics tell the 8259A Interrupt Controller we are finished executing IRQ7 outportb 0x20 0x67
22. newsletter You can subscribe for one year six months or purchase individual SUS disks There s More We couldn t fit all Echelon has to offer on a single page you can see how small this typeface is already We haven t begun to talk about the many additional software packages and publications we offer Send in the coupon below and just check the Requesting Catalog box for more information Item Name Price 1 ZCPR3 Core Installation Package 49 00 3 disks 2 ZCPR3 Utilities Package 89 00 10 disks 5 Z Com Auto Install Complete 119 00 5 disks Z System 6 Z Com Bare Minimum 69 95 1 disks 10 BGii Backgrounder 2 75 00 2 disks 12 PUBLIC ZRDOS Plus by itself 59 50 1 disk 13 Kaypro Z System Bootable Disk 69 95 3 disks 14 Morrow MD3 Z System 69 95 2 disks Bootable Disk 16 QUICK TASK Realtime 249 00 3 disks Executive 17 DateStamper file time date 49 95 1 disk stamping 18 Software Update Service 20 ZAS ZLINK Macro Assembler and Linker 85 00 1 yr sub 69 00 1 disk 21 ZDM Debugger for 8080 280 50 00 1 disk HD64180 CPU s 22 Translators for Assembler 51 00 1 disk Source code 23 REVAS3 4 Disassembler 90 00 1 disk 24 Special Items 20 through 23 169 00 4 disks 25 DSD 80 Full Screen Debugger 129 95 1 disk 27 The Libraries SYSLIB Z3LIB 99 00 8 disks and VLIB 28 Graphics and Windows Libraries 49 00 1 disk 29 Special Items 27 28 and 82 149 00 9 disks 30 Z80 T
23. non relocatable CSEG and DSEG both make a seg ment relocatable They cause different record type codes to be placed in the record headings of the OBJ file Use of PUBLIC EXTRN CSEG or DSEG causes output of an OBJ file rather than a HEX file OBJ files are arranged in records similar to the Intel hex format but in binary form rather than ASCII NAME places a name of up to six characters into the OBJ file An expression in parentheses can be used as an operand This expression may include conditional statements which give 0 for a false condition and 1 for true Conditional statements treat any non zero value as true Z80MR has some problems with LD HL N1 N2 N3 Rewrite this line as LD HL N1 N2 N3 In this context the leading is not a unary operator Instead it assumes a default first operand of 0 So LD A 5 gt LD A 0 5 A single external label can be used in 74 MICRO CORNUCOPIA 38 Nov Dec 1987 an expression as long as it adds its value to the expression LD HL EXTRNI N2 ok LD HL N2 EXTRNI no good An expression containing an external label may be used as an argument for either LOW or HIGH Options for LIST and NLIST B List all relocatable symbols in OBJ file All PUBLIC symbols are included whether or not B is set e Z Fix this option by changing the byte at 2398h from 2Dh to 2Ch X Does not exist G Does not exist O Output code to OBJ or HEX file Not related to pr
24. try before you buy Crippled software doesn t do that 3 Keep the registration instructions simple Complicated fee schedules and innumerable registration options just make it easier for users to put it off 4 Provide genuine documentation That doesn t mean you can t abridge it to fit on the distribution diskette but omit ting too much of the user s manual will prevent users from getting an accurate feel for your program Certainly all basic program functions should be fully docu mented 5 Use standard ASCII text files for your documentation That means no WordStar documents with high bit characters no embedded printer codes and no naked line feeds Why should you limit your market to people who 68 MICRO CORNUCOPIA 38 Nov Dec 1987 sure that the happen to have one particular word processing program or one specific model of printer 6 Include a permission to copy statement in your documentation This encourages individuals and users groups to distribute your programs A con scientious software librarian looks for permission to copy statements to en program really is shareware 7 Acknowledge registration fees When a user mails in a check you should at least drop a postcard in response If you offer program updates in return for registration send the up date promptly Remember that shareware is a commercial product prepared by professionals right The Association Of Shareware Professional
25. 2 00 ICL7107 LCD Driver 7 00 10L7140 14 14 BitA D 7 50 VC3524 Switching Regulators 5 00 1458 Dual Op AMP 10 LM2877P 4W Stereo Amp Dual 2 50 MB81464 15 2 75 CUNO ENTE PEE re ari dn 3 00 DU dd tense og vos 3 25 ri PCT 3 50 CIOTES T i chai ete Iso nce v X DU FANG Ocoee nia er tPioe sER TAO 1293 si eos of ice sint 748373 So s edu Wem bogdg vea AES TI 2 bcc ar aceatirenss DM xn Checks Money rder andi MasterCar a E RAI AEN To SRR ere 00091 tv 207 TOME ARTES Joystick 4 Switches 1 Mainboard 8 Slot Case Power Supply 2 To make this a complete system add A Memory B Floppy Controller C Drive D Keyboard E Video Card F Video Monitor G Multifunction Card A MEMORY 256K 150NS cutaneous ere 512K 180 NS esi 640K 150 NS core has B FLOPPY DISK CONTROLLER Card for 2 Floppy Drives Card for 4 Floppy Drives C 514 FLOPPY DISK DRIVES Mitsubishi M4853 DSDD 80 Tr 119 Fujitsu M2551A DSDD 40 Tr Shugart 475 DS Quad 1 2Mb 159 KEYBOARDS Cherry Keyboard no a prie XT Style Keyboard AT Style Keyboard VIDEO CARDS Tomcat with Parallel and Lighten Portu ox trs Hercules compatible Video Board 75 Color Graphics Adapter 69 Enhanced Graphics Adptr EGA 275 VIDEO MONITORS Roland MB 122G 12 no case 39 New flat screen Samsungs Samsung SM 12SFG 12 Grn 96
26. 89 00 Samsung Green 12 TTL 89 00 MOTHERBOARDS XT Turbo 4 77 10mhz AT 6 10 mhz 5 layer XT Turbo 4 77 8 mhz 2 layer XT Turbo 4 77 8 mhz For XT AT 120ns chips 640K memory For AT IMB memory KEYBOARDS 5339 Professional XT AT w 12 function key 5060 Keyboard AT Style FLOPPY DISK DRIVES Fujitsu 360K Toshiba 360K Toshiba 1 2 MB 3 Drive Kit GAMES GAMES GAMES X Where in the USA is Carmen Sandiego by Broderbund 44 95 Flight Simulator by MicroSoft x Hitchhikers Guide to the Galaxy Wishbringer x Moonmist Night Mission Pinball by SubLogic Some Infocom games still available in CP M Kaypro format HARD DRIVES amp CONTROLLERS AT 40 MB Seagate 251 575 00 AT Hard Drive amp floppy controller WD 199 00 20 MB Miniscribe HD with controller 30 MB Miniscribe HD with controller AT 30 MB Seagate HD 4038 New prices SPECIAL KITS All kits include 640K RAM serial parallel and game ports clock calendar AT style key board cabinet power supply mono graphics card and amber or green monitor Keyboard switch able turbo XT Systems with 2 360K Floppy Drives 8 mhz with standard slide cabinet 10mhz with lock LED Reset amp Turboswitch 699 00 XT Systems w 20 MB Miniscribe Hard Drive amp 1 360K Floppy Drive 8 mhz with standard slide cabinet 10mhz with lock LED Reset amp Turboswitch For 30MB Miniscribe add 50 00 AT System with 1 1 2 MB Floppy Drive O wait s
27. ED78 c9 B 03F8H A BC Figure 2 Kaypro To PC Null Modem Cable TO IBM PC RS 232 CONNECTOR Tx Rx RTS CTS DSR GND DCD amp GO G9 9 0 9 Q 3 3 OIIO O 00 G2 G3 69 G9 O0009000G03G0G Tx Rx RTS CTS 5 GND DCD VOODOO 8 OOO Oo 409 9 TO KAYPRO II RS 232 SERIAL DATA CONNECTOR 76 MICRO CORNUCOPIA 38 Nov Dec 1987 ZRP M creates 22809 CP M9 2 2 compatible IBM PC ZRP M is an operating system combined with a Z280 emula tor Either standalone or with DOS present ZRP M provides the solid base of a genuine operating system reliably distinct from the facade created by an MSDOS interface All 2 2 system and CBIOS calls are supported 56 5k TPA file date and time stamping fast virtual disk iobyte redirection ter minal emulation color console display auto relog COM path SAVE anywhere single key phrase recall built in ac cess to DOS drives SETDISK redefines a drive to any of over 80 CP M formats System disk with manual 129 Shipping 5 10 nonUS E Wd A 118 SW First St Box G POOR MAN S NETWORK Now includes FREE 2 user Database Poor Man s Network is a true Local Area Network for CP M and Z system computers Uses RS 232C or bidirectional parallel ports no extra hardware to buy Share floppy disks hard disks RAM disks and printers Remote drives are accessed just by specifying a network drive letter Send screen messages with a single key stroke Not just a termi
28. Entsminger 1912 Haussler Dr Davis CA 95616 SOG VI The MicroC Computing Conference Before Dave or Larry beats me to it they re always trying to get someone in the office to corroborate their versions let me give you my slightly unbiased report A SOG VI Big Eight 1 Thursday July 30th night s semi official get together at the Micro C office after the raft trips and the barbecue along the river with DJT leading a behind the scenes tour and discussion of computing and publishing has to rank at the top of any serious SOGy s top ten And behind this scene one could have found Larry Fogg cool as a cucumber polishing his fractals in the very wee hours before Friday sunrise 2 PC Tech graphics Mandelbrots amp Julias from Prairie Home Companion and were figures to feast your eyes on leading more than a few SOGies to wag this opinion Wish Micro C had their lines 3 Parallel processing via The Netherlands California connection is heating up see paral lel features this issue 4 Bruce Eckel s simple alternative to flow charting or a Seattle writer s argument from design led someone to ask Who was that marked man 5 Dave Rand s eleventh hour surprise ap pearance and the Everything you wanted to ask Dave about UNIX Show was a blast 6 So was the Jefferson Street semi official Bachelor amp Couples party which was clearly or even not so clearly an exercise in genuine slum bering a
29. Lm e NN n E E RN RN LZ ERI ERA ea E REALEN zum z TSS i Prix gt lt A OF NN nk c px A a 2 OE assuming that the size and face are mine which spots on the paper become black and which white It s that easy available With ROM based fonts costing up to 100 each 400 for a ROM pack containing 4 fonts The processor deals with a few addresses rather than a whole bunch of dots p D transition There s another variation on this theme The computer can download one you ll think twice about ordering from centralized low tech point Helvetica when you al ready have 10 point Helvetica At 8 or more of these pixel dot fonts into the 100 per font a reasonable font library can cost many times the price of the printer A short definition here A font is the al phabet plus numbers and common symbols s memory and then the printer s printer NNO UB 20015 Mee EE e Se ig 8 59 X SL cA S285 oH SE o Y a no CU cg E Ru ode G Mo T 3688 2453 UPS a A on g RS Beye Gu 2 c Ee nN pal o S ie Shas 9 woo aS ters is marki the end of the dark ages typesetting to laser prin ing all the same size and style The old time typesetters had font drawers Each drawer held one size of one face So there it d be a font Pixel Font Limitations drawer full of 9 point Helvetica and the next one down might be 12 This addressing system is easy
30. PC XT or AT including 8 96 TPI high density and 3 1 2 formats with optional hardware Once installed UniForm stays memory resident so you can use your standard DOS commands and other programs directly on your original diskettes i Uniform for Kaypro and other machines 64 95 UniDOS by MicroSolutions UniDOS program uses the NEC V20 CPU chips to actually RUN your favorite 8080 CP M programs on your PC Use UniDOS with Uni Form PC and you can run them directly from your CP M format diskettes All standard CP M BDOS calls are supported UniDOS w UniForm and V20 chip 135 00 NEW xxx UniDOS Z80 Coprocessor Board This 8Mhz Z80H half card runs your Z80 and 8080 code programs at LIGHTNING speed on your PC or AT Functions just like the UniDOS program except NO V20 or emulation mode is required to run your programs The CompatiCard by MicroSolutions 169 95 This half card floppy controller allows you to run up to four 8 5 A standard 96 TPI or high density or 31 2 disk drives on your PC XT With the Compaticard and the UniForm PC program you can format read and write almost all CP M and MSDOS di sk formats Compaticard with UniFORM PC xxx SPECIAL xxx 225 00 MatchPoint PC by MicroSolutions 169 95 This half card allows you to read and write to NorthStar hard sector Apple DOS PRODOS and Apple CP M diskettes on your PC IN CLUDES a copy of the UniForm PC program as well as utilities to format di
31. SCSI 2049 Battery backup for above 150 Call or write for more information or to place an order SemiDisk 11080 SW Allen Blvd Beaverton OR 97005 503 626 3104 MICRO CORNUCOPIA 38 Nov Dec 1987 91 68000 NOW TinyGiant 68000 Single Board Computer The HT68K TinyGiant is a great little It uses only 5 and 12 features Two 1 Parallel Port Expansion Bus 128K RAM Expandable on Board to 512K Floppy MS DOS Disk Format single board computer volts and has all of these Serial Ports Disk Controller 5 75 x 8 0 Operating System and Software uses K OS ONE 68000 Operating System Package Get the 68000 hardware Included in the Operating System Source lt HT68K TinyGiant with K OS ONE K OS ONE Operating System FARSRPE HT Forth Language Edit Toolkit HTPL Source amp Manual Line Editor Screen Editor and Text Formatter Lizard Land An HTPL Adventure Program with Source Code Write or call today for and a free 68 KNEWS letter Oo Order Now VISA MC COD 503 254 2005 LETTERS continued from page 4 The SOG Was Great This year was even more enjoyable than the last for a number of reasons 1 My wife came and enjoyed your hospitality 2 We went on the long raft trip Becky got to inspect the bottom of our raft for a few minutes 3 Some of the lectures were exceptional 4 The B B Q was perfect although I didn t play as much
32. The Explanation Figure 1 is a correction of the Exec procedure I gave in my column in issue 31 It is functionally identical to the original Internally the only difference from the original is that I save SS and SP before calling DOS and restore them im mediately after returning In the original version I saved myself the agony of writ ing inline assembly by using Turbo s built in MS DOS procedure But because that procedure messes around with the stack before AND after doing INT 21h I had to change my strategy and do the INT 21h myself which means yeucchh inline code Those who attempted to follow Mr Florman s directions for fixing the bug will notice a bit of difference between my code and the code you arrived at That is because I like to conserve code space The MS DOS procedure loads ALL the 64 MICRO CORNUCOPIA 38 Nov Dec 1987 CPU registers from a record in memory before doing INT 21h and puts the con tents of all the registers back in the record after return from DOS This is flexible and thorough It works for any DOS call But it would be a waste of time for me to duplicate it all The only registers that must be loaded for an exec system call are AX DS DX and ES BX and the only registers that must be saved are DS BP and SS SP I save ES too just to be safe By saving and modifying only those registers I need to use or save I saved a lot of code space And you get a smaller program you lucky lit
33. a lot of memory while retaining the ease of array indexing If these variables A B and C repre sent three partial rows of five characters and attributes per row then we ve used only the 30 bytes we need instead of the 480 that would be reserved using the NEW command Details We can still access characters by refer ring to their relative position in the continued next page MICRO CORNUCOPIA 38 Nov Dec 1987 51 Position I ROWINC FirstCol FOR J 0 TO NumCols 1 DO First the cursor must be positioned SETREG AX CURSOR SETREG BX PAGE SETREG DX Position SWI INT10 Now write a character chr CHAR A Row I 3J 0 CH WRITECH ORD chr chr CHAR A Row I J 1 PC CARDINAL PAGE ORD chr SETREG AX CH SETREG BX PC SETREG CX 1 Number of char to repeat SWI INT10 INC Position END FOR J END FOR I CODE POPBP done TRUE END IF checked END IF found END PasteBlock END ScreenBlocks Figure 4 MODULE Which Swaps Screen Blocks MODULE SwapBlocks Swaps two blocks of the screen IMPORT Break FROM InOut IMPORT WriteString WriteCard WriteLn FROM ScreenBlocks IMPORT CutBlock PasteBlock VAR done NewPosition BOOLEAN I J K CARDINAL BEGIN WriteLn FOR K 0 TO 11 DO FOR I 0 TO 79 DO WriteCard 1 1 END END FOR K 12 TO 24 DO FOR I 0 TO 79 DO WriteCard 2 1 E
34. add 20 P amp H Orders over 50 add 85 for Insurance CALL FOR FREE CATALOG 95 cv 9 MEE 39 95 KETS NO PERSONALITY MODULES five months ago After I got it I called the company and mentioned that I would be reviewing it Since that conver sation they ve sent me two new ROMs The first was to substantially speed up compression and decompression They didn t say why they sent the second I used the latest ROM for these tests Conclusion I m glad I bought the Konan card Be cause of the effective compression and the error correction it should be a great way to archive lots of data I had no problems with data stored using either of the compression modes Unless you have RAM to burn however I wouldn t let the Konan software buffer anything memory use is pretty thoroughly covered in their documentation And I d avoid the fast mode at least until I d checked it out on my system I used my PC Tech X 16 for these tests The board wouldn t work at all with our Challenger 186 boards I haven t had enough experience with the card to know whether there will be long term problems or if it is system or drive sensitive aa MICRO CORNUCOPIA 38 Nov Dec 1987 55 Ron Miller 1157 Ellison Dr Pensacola FL 32503 56 Turbo C Everything you wanted to know about Borland s Turbo C the compiler editor library debugging en vironment isn t here It
35. addressing so dear to the heart of assembly hackers The compiler takes care of that if we simply use sym bol names structure members and auto variables even The compiler does it for us making adjustments for the memory model as it produces the ASM file that is passed directly to the assembler Never was writing assembly language easier all the segmenting and assuming and of fsetting is automatic so all you have to do is dive into the actual operations The one fly in the ointment perhaps it s an entire buzzard in the ointment is the requirement of MASM 3 0 or 4 0 for the assembly language system to work automatically MASM you may note coss almost TWICE what Borland s en tire package does The breathless you too can write inline assembler ads don t quite tell you that I own MASM 1 27 and can do it by hand But it is a little frustrating to buy the car for 2000 and pay 5000 for the windshield wipers Then there are the functions of type interrupt Declare a function with the reserved word interrupt and the generated machine code pushes and pops the registers and saves and restores the DS register so that the 32 bit function address can be placed directly in the in terrupt table Define the function argu ments of such a routine properly and you can write complete TSR programs without resorting to assembly language at all In other words practically anybody can now toss off a resident p
36. and installa tion of the interrupt routine int hand ler Main calls Turbo C s setvect function to place the address of the inter rupt handler into the interrupt vector table It then configures the printer board the interrupt controller and calls keep to create a TSR The keep function is a call to the MS DOS TSR facility with most of the dirty work taken care of All we do is supply the size of the program we want to keep To determine the size use Turbo C s op tions linker mapfile set to segments Then look at the last address in TSR MAP which is generated during compilation and that s the program size This is my first time writing a TSR so everything may not be kosher For in stance I didn t re enable interrupts in side the handler so if for instance you re accessing the disk when the inter rupt occurs the disk transfer is held up I haven t found any problems because of this but who knows my clock may be slowed down or something The interrupt handler creates a Sidekick like window on the screen To do this without crashing into DOS I created a windows package in WIN DOWS C to directly access screen memory There are functions to define windows paint them on the screen and write to them as wel as a save screen and restore screen which preserve whatever was inter rupted The file WINDOWS H the header file for WINDOWS C uses a new ANSI ex tension to C called function p
37. and others can be added by the user BOYAN also notices when you ask to download a file from a bulletin board and automatically captures the filename as the default name to which the transmitted data should be saved instead of making you enter the name twice While other programs permit prompted ASCII upload for transmission of messages prepared beforehand BOYAN automatically determines the prompt character and handles word wrap problems during the upload Boyan says that this is a BOYAN ex clusive and Boyan should know The log feature of most com munications programs merely opens a capture buffer for all screen displays BOYAN offers a usage log that records the lengths of all calls and appends such information as the efficiency of any file transfers Instead of requiring a separate direc tory maintenance utility BOYAN can it self sort its dialing directories by name or number The backspace editor in BOYAN lets you correct errors in a line of text before it s sent to a BBS Once you get used to the Backspace Editor says Boyan you will find that you never post messages with typos again Anyone who frequents the BBS world can appreciate the need for this feature BOYAN is presently shipping version D3 Send your 35 registration fee to Justin Boyan 9458 Two Hills Court Columbia MD 21045 For an additional 10 or a stamped disk mailer and diskette Boyan will send you the latest version of
38. as a timebase for the multitasking engine Sequential Transputing Although the transputer was primari ly developed to support parallel process ing we can also view it as a conventional microprocessor with added parallel fea tures The transputer is largely a RISC Reduced Instruction Set Computer machine It has limited addressing modes and a relatively small number of instructions especially when contrasted with some other 32 bit microprocessors But in part because of this it features a very fast microcoded processing unit that runs at 15 20 or 30 MHz The transputer s working registers are organized as a register stack three words deep These registers are from top to bottom A Band C We access the register stack through the A register When we pop its value its contents come off the stack and those of the B and C registers move up Conver sely when we push a value onto the stack it s placed in the A register the old contents of the A register move into the B register and the C register will contain the value that was contained in the B register The contents of the C register are lost Programmers used to conventional addressable registers may have difficulty adjusting to the transputer s register stack In addition to the register stack the transputer has three other major registers the instruction pointer the operand register and the workspace pointer register Instructions Transputer
39. aside in the shareware market With so many good programs to choose from who needs any others Justin Boyan can be forgiven for not having noticed that the market for com munications software was glutted After all he s only 17 If only someone had been kind enough to clue him in Justin could have been spared the embarrass ment of trying to squeeze in among the big boys right Think again The BOYAN com munications program is not only highly competitive it has the slick gloss of professional level programming From its subdued aural cues to its context sen sitive help BOYAN is a program that belies its origins This is not kid ware folks BOYAN is an open program that welcomes customization and additions BOYAN s macro command language permits unattended automatic opera tion Its script facility is sophisticated enough to allow a PC to operate in host mode Boyan is reportedly at work on a host mode script for imminent release Justin Boyan offers two reasons for his shareware debut I wanted many fea tures that weren t available in the other programs and second because I really need money for college Boyan graduated from high school this year and is enrolled at the University of Chicago It will take plenty of 35 registration fees to pay his tuition Features BOYAN supports communications rates from 300 to 9600 bps The standard file transfer protocols are built in ASCII Xmodem Xmodem CRC
40. bad blocks on both floppies and hard disks WHEREIS finds files anywhere within a directory structure DIAGS Special serial parallel and video diagnostics for the PC Use this excellent program to explore your system ASYNC Loadable asynchronous device driver for MS DOS LPTX intercepts BIOS interrupt 17 the line printer interrupt It redirects the output of LPT1 LPT2 or LPT3 to a disk file All three may be active at the same time DOS1 ROLLDOS1 amp 2 DRIVER amp DRIVER1 Stop wondering how device drivers really work and explore these tutorials Good examples of character device drivers and de bugging techniques STUFIT stuffs your least used files into the inner tracks of the disk This frees the outer tracks for work space and speeds access times considerably Order today from MICRO CORNUCOPIA VISA P O Box 223 Bend Ore Phone orders 503 382 5060 BRE AO cr Mte MS36 General Utilities BATMAKER helps create BAT files Perfect when using FIND on all TXT files for instance Very handy BWVID lets you see what is happening on the screen when you have a color graphics card CGA and a monochrome monitor CED is called a Command line EDitor but it s far far more than that Includes macro definitions control of DEBUG repeating and editing of previous commands etc DEBUG DOC is a simple but very handy quick reference guide to DEBUG EXPAND and SHRINK are detab and entab utilities PC
41. can declare a variable of the channel Figure 1 Two Independent Processes channel PtoQ P Figure 2 Par Construct par statementl statement2 statementn 14 MICRO CORNUCOPIA 38 Nov Dec 1987 type channel chan1 chan2 chan3 Declared this way each channel variable will occupy one word in memory Send ing a message with the aid of a channel variable is most simply performed with an assignment operator For example the fragment int a a chan1 will read an integer value from the chan nel chan1 and store it in the variable a The use of a channel is not restricted to simple expressions Channels can also be used in expressions like chan2 chan1 a char chan3 This statement inputs a character value 1 byte from the channel chan3 subprocess 1 subprocess 2 subprocess n and multiplies it by the integer a Then it takes this result adds the integer value from chanl and outputs the final result to chan2 In this example you can see that channel variables behave much like con ventional variables When we read chan nel variables their values are taken from another process instead of from a loca tion in memory Writing to a channel variable sends the value to another process The number of bytes transferred via a channel depends on the context Expres sions and sub expressions in a C state ment are typically governed by a certain data t
42. decided to create a Z280 emulator and surround it with a new version of PC RP M2 The result is a sys tem we call ZRP M2 which will boot on any PC XT AT clone a clone with lots of memory Decmation designed the emulator There s no instruction decoder so the emulator simply uses the operation code as the high byte of the 16 bit offset of the instruction processor We invented a multi segment version of this scheme for the Z280 This architecture achieves speed at the expense of memory space Unlike the Z80 which has an 8 bit I O space the Z280 has a 24 bit I O space that maps easily down to the 16 bit I O space of the 8088 We simply set the high order eight bits of the 24 bit port value to zero On the Z280 the high order eight bits are provided by the I O Page register The Z280 clears the I O Page register at reset On chip peripheral devices a UART and a DMA controller for example oc cupy nonzero I O Page locations Our present emulator supports only I O Page zero That is we map Z280 I O page zero directly onto the 16 bit 8088 I O space On the IBM PC the COMI serial data register for example is located at I O location 03F8H so the code in Figure 1 is sufficient to read a character from the COM serial port IO Using this new I O capability we ve written a ZRP M2 driver for Doug Figure 1 Fetching A Character From A Port GSI Get COM1 serial character A Exit A char 01F803 GSI
43. do all the design assembly and testing Later if I couldn t keep up with sales I would subcontract out more of the machine rather than hire employees I d seen the mass of paperwork required of employers and wished to avoid it I would have preferred to use the name Gasograph because of its good reputation but it wasn t clear who owned it So regretfully I chose the name Risograph suggesting the rising of dough Demaray s salesman John Collins had started his own business after the company s downfall and was already representing several manufacturers of dough testing equipment After discussing the Riso with several of his clients he agreed to represent me After some discussion we agreed on a com mission of one third of the selling price John would absorb all costs of selling out of his share Those costs included my expenses while demonstrating the Riso attending bakers and brewers meetings etc He thought he could sell 20 to 50 machines a year for 8 000 each The Gasograph had sold for about 10 000 Even estimating high I figured my cost to build the Riso would be 2 500 apiece This left around 2 800 per machine for me I didn t have much overhead since I could do the programming assembly and initial testing in my apartment and I had all the tools Eight or ten sales a year would comfortably pay my food rent and disks Even if John s sales es timate was two or three times too high I d be okay My exp
44. good look ing and surprisingly low priced There seems to be no reasonably priced interface available for the model 100 so I planned to design my own The information needed to do this was surprisingly hard to find Radio Shack publishes a service manual which con tains useful information but they were very slow delivering one I found a recommendation for The TRS 80 User s Encyclopedia Model 100 published by The Book Company and ordered a copy Eventually a book on the Radio Shack color computer arrived The Book Company s phone was discon nected and they did not answer my let ters Apparently they re out of business Finally I got a copy of Carl Oppedahls Inside the Model 100 published by Weber Systems It is very helpful though not error free With information available at last I designed and tested an interface which would allow the model 100 to control the outside world 13 solenoid valves in this case and to measure the output of a pressure transducer using an A D con verter I hope to market the interface in addition to using it on the Riso The preceding is a paid commercial an nouncement Unfortunately I d badly underes timated the work involved and I d un derestimated how much of my time would be absorbed by earning a little in come and the day to day routines of living In August I made the first crude gas production measurements using a tangle of boards wire solenoid valves plastic
45. hex determines which pixels will be on and off as the beam scans the A s position at least the A s fifth row See Figure 1 As long as you always want the same size and shape A or B or C you can just grab it out of the ROM No muss no fuss However if you want a narrower higher or fancier A or if you want to draw pretty pictures every thing changes With graphics the screen becomes Figure 1 Scanning an A SCAN ROW just a set of dots The processor has to block out a chunk of memory and set a 1 or 0 in every bit so the corresponding pixel will be on or off I m taking the simple case of 1 data bit per screen pixel If I had to display color or shades of grey I d be using something be tween 2 and 32 data bits per pixel Laser Printers The very same thing happens in a laser printer or typesetter Most laser printers come with built in ROM based fonts These fonts like the screen fonts are fixed in height width shape weight everything Some printers come with lots some with just a few If your printer comes with what you want great These fonts are very easy for the laser printer s processor to use The processor specifies the character and scan line again a unique location in the ROM The contents at that ROM location deter TnS DN RSE SA A CRS S AN Y La A ARRA e gn POLO AVES SSS POOLE ee MP SS Dd SS SSS SESS A Fe MT SEN
46. his program Anyone wishing to download the BOYAN program can call Bruce Felstein s BOYAN Support Board at 301 495 7323 the board runs 24 hours and supports speeds up to 9600 bps Shareware Grows Up 2 User supported software has been staking out new territory in its bid to be taken more seriously The recently or ganized Association of Shareware Professionals ASP has announced its intention of assisting program authors who want to go the shareware route What s In A Name Since even the large circulation PC magazines frequently get it wrong one of ASP s highest priorities is to nail down a good definition of shareware First of all public domain is not synonymous Shareware programs bear their authors copyrights and are dis tributed freely only by permission continued next page MICRO CORNUCOPIA 438 Nov Dec 1987 67 continued from page 67 Public domain programs are not as protected Shareware programs are com mercial programs with an unorthodox distribution system namely users group software libraries electronic bul Jetin boards and friend to friend shar ing In fact that is the nub of ASP s formal definition Shareware is a distribution method not a type of software A Rose By Any Other Name Shareware has had its rough spots since Fluegelman invented the concept for his PC Talk communications program Furthermore such software es capes the Darwinian struggle for dealers shelf
47. instructions are one byte long Since the transputer fetches one word at a time 32 bit transputers are ef fectively equipped with a four byte in struction cache Instructions consist of two separate fields a four bit operation code and a four bit operand As a RISC machine the transputer is designed to allow many instructions to resolve to a single byte it s obviously im possible however to code all operations continued next page MICRO CORNUCOPIA 38 Nov Dec 1987 7 continued from page 7 in a single byte Therefore some opera tions require more than one instruction Of the 16 basic operation codes 13 are frequently used like load store jump and call These instructions all require an operand which is partially supplied by the four bit operand field Since four bits per operand often aren t enough the transputer has two special instructions pfix and nfix that load its operand register These in structions shift the operand register four bits to the left and place their operand in the four bits cleared by the shift the lowest four bits or least significant nib ble With these instructions it s possible to load the operand register with any value up to the maximum word length of the transputer This unconventional instruction set al lows us to code many frequently used operations in only one byte Decoding is simple and quick Expressing a large constant however requires ei
48. it would have been re entrant and relocatable and we wouldn t have this problem or be limited to 640K on an AT WINDOWS listing continued next page MICRO CORNUCOPIA 38 Nov Dec 1987 To order call 1 800 635 3355 TELEX 643331 For technical information call 1 203 871 6170 MICROMINT INC 4 Park St Vernon CT 06066 38 FORTHkit 9 Mips computer kit 400 Includes Novix NC4000 micro 160x100mm Fk3 board Press fit sockets 2 4K PROMs Instructions Easy assembly CMFORTH listing shadows Application Notes Brodie on NC4000 You provide 6 Static RAMs 4 or 5 MHz oscillator Misc parts 250mA 5V Serial line to host Supports 8 Pin socket slots Eurocard connector Floppy printer video I O 272K on board memory Maxim RS 232 chip Inquire Chuck Moore s Computer Cowboys 410 Star Hill Road Woodside CA 94062 415 851 4362 MICRO CORNUCOPIA 38 Nov Dec 1987 WINDOWS listing continued Note I haven t put anything in to change the screen modes you are assumed to already be in CGA I also haven t turned the cursor off and on 7 flundef TEST define this to make a stand alone test program include colors h CGA color defines global place to save the screen so we can restore it when we re done unsigned char save buf SCREEN CHARS Now a place for all the global attributes for each window struct window def coordinate
49. magazine to go and where they didn t want it to go Declaration Of Independence Micro C readers are independent If you re anything like this group then you ll go clone if there s a reason to go clone But you won t do it just to follow the crowd You re also quite willing to warm up a soldering iron and try something yourself Micro C readers really appreciate independence and honesty in their publications I ve been hearing this from you for a long time but I didn t understand what you were saying Nearly all of you at one time or another have told me not to go slick To me that meant you didn t want me to change the appearance No coated paper no color no graphics on the cover So for a long time I resisted changing Micro C s appearance It was the Infinite Improbability Drive that finally drove me to do it Remember Anyway you were telling me to avoid slick and that s what this group was saying too But the group went on to explain why The group was afraid that if Micro C started looking like other magazines it would start acting like other magazines As a fancy magazine we would attract fancy ads Fancy ads would make us more careful what we wrote about our fancy adver tisers We d lose our candor and our credibility And even if we didn t pull our punches the fancy feel would put readers on their guard Their expectations would change As a fancy magazine we d become more distant less acces sible le
50. manufacturer helped me design a manifold with valves built into it This is a little more expen sive than individual valves and fittings but greatly reduces assembly work and the chance of leaks Accra Fab built the cabinet and made suggestions which im proved its design By March I had most of the parts for the production machines The program ming was well along and with the help of the U S Department of Agriculture s Western Wheat Quality Lab I d used the prototype to run a series of tests on dough The results along with sugges tions from potential customers led to changes and additions to the software By the beginning of June the last parts had arrived like everything else ironing out the last details of design took longer than expected and I d assembled the first production Risos I sent the program to Portable Computer Support Group to be put on ROM They shipped me a prototype ROM it worked correct ly so I ordered ten production ROMS Why didn t I burn my own The model 100 expects to find an assembly language program in the ROM and I have no desire to write the entire Riso program in assembler PCSG has developed software which allows BASIC programs to run from ROM Since BASIC is the model 100 s native tongue the Riso program is written mainly in BASIC with a few assembly routines where time is critical Yes l m slum ming But it works I delivered the first Riso late in June 1987 Now a mont
51. month of October unless you send a note to Switzerland General Delivery but starting November 1 1987 I will be in Istanbul for awhile Even then I don t know what my ad dress will be but I can give you one that will eventually get things to me Redhouse Press Merkez P K 142 34432 Sirkeci Istanbul TURKEY tel 011 90 1 527 8100 I have no idea how long I will be at this ad dress I am writing this in mid August and don t even want to think about where I ll be or what I ll be doing in six months As those of you who were at SOG this year know I am writing this just after returning to Turkey from the U S I came back to the land of the Ottomans with a few new toys and promises of a few other new toys so I guess that s what I ll spend most of my time talking about Oh yeah and I have a bug fix in here somewhere too now where did I put that damn flashlight So which course do you want first The hardware Or the software How about the vaporware I guess that sounds good to me 62 MICRO CORNUCOPIA 38 Nov Dec 1987 Modula Remember my review last issue of EXE2LNK the program that allows linking of assembly language modules with Logitech Modula 2 Well I really jumped the gun on that one Logitech has a new version of their Modula compiler which can compile to and link with standard MS LINK modules OBJ files Now you don t need EXE2LNK Silly me If I had just waited a few m
52. new mouse based multiple window user interface these powerful debugging tools are a pleasure to ue NEW INTELLIGENT LINKER Links only those routines from a particular module that you need s you eliminate unreferenced routines and progice smaller more compact executable files ara UR b Turbo Pascal is a registered trademark of Borland International VAN and VMS are registered trademarks of Digifil Equipment Corp LOGITECH Modula 2 09 V 3 0 Compiler Pack Compiler in overlay and fully linked form Linkable Library Post Mortem Debugger Point Editor 0 LOGITECH Modula 2 V 3 0 Toolkit 169 Library sources Linker Run Time Debug ger MAKE Decoder Version XRef Formatter L LOGITECH Modula 2 V 3 0 Development System 249 Compiler Pack plus Toolkit O Turbo Pascal to Modula 2 Translator FREE With Compiler Pack or Development System C Window Package 49 Build true windowing into your Modula 2 code C Upgrade Package Call LOGITECH for information or to receive an order form Add 6 50 for shipping and handling California residents add applicable sales tax Prices valid in U S only Total Enclosed C VISA O MasterCard 1 Check Enclosed Card Number Signature Name Address City Zip Expiration Date deve lopment and put the power of LOGITECH Modula to ork for you right now Fully supports Wirth s latest language m definitio
53. of compilers seem to get overly indul gent Incidentally Borland allows multi ple structures with identical field names something I ve always loved about Turbo Pascal and hated K amp R C for not permitting Gripes So what could I possibly complain about Well the package seems a bit thrown together rushed in a way that Turbo Pascal never was even from the very beginning The documentation slick though it seems to somebody accus tomed to C compilers shipped in Zip Lock bags is full of little errors and omis sions that confuse and erode confidence in the package The keyboard interrupt is 16 hex not 14 as the bioskey documentation as sures us The functions _creat and creat are confused in the function descriptions The interrupt function documentation is darned near incom prehensible The discussions of open and _open are so jumbled together that it took me six or eight rereadings to real ize that the raw MS DOS low level _open is NOT a direct translation of DOS function 3Dh because it insists upon the Unix based O_RDON LY O WRONLY O RDWR symbolic constants squirreled away in some ar bitrary header file Any assembly language practitioner who out of habit uses a 2 for read and write updating will get no warning just a mess that s perverse enough to work MOST of the time A good sign of the slapdash quality of the whole is the fact that the documenta tion preaches on and on justifi
54. on certain ATs but not on XTs running the same ver sion of DOS I ll never know The fact is that it does I would like to know however if they destroyed the stack how did they ever get back to the calling program anyway Something smells here No wonder DOS isn t reentrant I would have just let the subject drop after seeing Mr Florman s note but he only explained how he fixed the problem leaving youse guys to go thrashing through DEBUG and MASM all on your little lonesomes Because I happen to be a fan of plug and go code because I think the ability to ex ecute external programs is an essential feature in any serious program written these days and because I m sure you re just as lazy as me I like to call it ef ficiency conscious I decided I d better fix the bug myself and publish the cor rected routine By the way Mr Florman thanks for pointing out my mistake I had heard of the problem but hadn t been motivated enough to figure it out for myself In order to fully understand what I m talking about by the way you should equip yourself with copies of Micro C is sues 31 32 and 37 as well as Turbo Pascal and your favorite MS DOS machine If you don t have these issues already you should get them they ll do wonders for your Pascal programs espe cially 31 and 32 If you don t have an MS DOS machine turn the page you re not supposed to be reading my column anyway The Fix And
55. on reads and 2 on writes so it may be able to recover those bad sectors SDIR Version 5 0 of the super directory program SST Just what every busy hard disk needs SST reorganizes files into contiguous sectors on the disk This really speeds up disk accesses TIMEPARK parks the heads on a running hard disk after a user specified amount of time without accesses WD Everything you always wanted to know about Western Digital s WD10025 WX2 hard disk controller Also information on optimizing its performance with the Seagate ST225 drive WHEREII searches for one or more files through all the directories on a specified drive Supports wild cards For Technical Help 503 382 8048 9 a m noon PST M F gon 97709 MasterCard TIDBITS Gary reports on his favorite subject AI Then By Gary Entsminger when you add statistics the results can be highly in Puer pr teresting if not highly calculating Davis CA 95616 8 if not highly g n April 1985 AT amp T Bell Laboratories spon sored a workshop on artificial intelligence and statistics which attracted the leaders of this new interdisciplinary field Artificial Intelligence amp Statistics is the 400 plus page collection of 17 papers presented at the workshop on subjects editor William Gale of AT amp T Bell Laboratories neatly divides into six categories uncertainty propagation clustering and learning expertsystems e
56. on the workbench but not with everything stuffed back in the cabinet An engineer friend found the solu tion Eyeing the tight fit of my two half height Mitsubishis he said the select jumpers were shorting out A against the drive enclosure and B against A He gave me some stiff cardboard like material called fish paper to insert be tween the drives as an insulator He as sured me that this paper really does find use in some electrical systems I don t know about that but at least the disk drives ren t acting fishy anymore Timothy R Gaffney 433 S Fifth St Miamisburg OH 45342 Editor s note Thanks for the tip on fish paper We tried it on one of our systems The only problem we re having is clearing out the cats when we want to use the system Z80MR Additions Here are some additions and correc tions to the documentation for the Z80MR macro assembler Micro C User Disk 4K25 l When naming labels and macros the CP M Notes characters _ and count as let ters Numerals are allowed also except as the first character Z80MR converts all characters outside of quoted strings to upper case COND is a synonym for IF ENDC is a synonym for ENDIF PUBLIC declares a list of symbols to be exported EXTRN declares a list of symbols to be imported External symbols can be used in simple expressions Misuse of ex ternal symbols results in an E error code ASEG makes a segment absolute
57. one exter nal channel alt guard amp intchannel 0 intchannel 0 linkO in break guard amp intchannel 1 intchannel 1 linkO in break In this case the process sleeps until one of the guards is ready Timer is the third kind of guard Like the channel guard it may be used with or without a boolean expression For ex ample we can use a timer guard to time out a channel by using the timer guard in an alt with some channel guards The code in Figure 7 times out a channel for 1 000 internal cycles There s also a replicated alt construct whose syntax mirrors the syntax of the replicated par construct alt expression looping condition ex pression guard guardexpr1 code guard guardexpr2 code The guards within the braces are evaluated for each iteration of the loop until one of the guards is ready Like the par construct the replicated alt construct may contain complex looping condi tions This construct is useful if a dynamic list of channels has to be watched for ac tivity This situation can occur in a mes sagepasser or an operating system See the code in Figure 8 Using Parallellism To use these parallel extensions beneficially you should divide a program into parallel subprocesses There are several ways to speed up a program by rendering it in parallel The next example illustrates how parallelism can enhance a program on a single transputer Multiple transp
58. powerful with the new Toolbox addition The Critics Choice 6 really wouldn t want to choose the most important MS DOS product devel oped last year but if I had to I think it would be Borland s Prolog which gives users a whole new way to think about how to use their computers Jerry Pournelle A User s View InfoWorld Turbo Prolog offers the fastest and most approachable implementation of Prolog Darryl Rubin AI Expert 99 4585 SCOTTS VALLEY DRIVE SCOTTS VALLEY CA 95066 408 438 8400 TELEX 172373 Turbo Prolog Features M A complete development environment M A fast incremental compiler M A full screen interactive editor M Graphic and text window support M Tools to build your own expert systems M Full DOS access and support M A free Tutorial M The free GeoBase natural query language database M An easy to understand 200 page manual All this and more for only 99 95 The new Turbo Prolog Toolbox includes 80 tools 8000 lines of source code that can easily be incorporated into your own programs 40 sample programs Business graphics File transfers from Reflex dBASE III 1 2 3 and Symphony M Sophisticated user interface design M Screen layout and handling including virtual screens M Complete communications package including XMODEM protocol Parser generation Opportunity to design AI applications quickly 5th generation language and supercomputer power to your I
59. running on a transputer can have one of the following statuses running waiting in a queue to be executed waiting for input waiting for output waiting for a certain timer value In the first two cases the process is ac tive in the latter three cases it s inactive h unconventional instruction set allows us to code many frequently used operations in only one byte Process Switching Processes run either in low or high priority A high priority process can in terrupt a low priority process at any time and continues until it s finished or until it must wait for communication or for the timer Low priority processes are descheduled after they ve been running for a preset time A low priority process is allowed to finish its current instruction and its infor mation saved in reserved memory before it must give way to one with high priority Depending on the instruction being performed at interruption the task switch time from high to low priority can take from 19 to 58 processor cycles 1 to 3 microseconds on a 20 MHz T414 As soon as a high priority process has to wait an interrupted low priority process is rescheduled if there are no other active high priority processes Low Priority Switches The manner of scheduling differs for process switches between two or more low priority processes 8 MICRO CORNUCOPIA 38 Nov Dec 1987 linked Descheduling only o
60. s not all in the C manual either Between here and the manual however you should get pretty close Another great C piece from Ron ike over 100 000 other hobbyists profes sionals and dreamers I finally received my copy of Borland s new Turbo C That s 100 000 one times ten to the fifth The very thought of 100 000 clones out there somewhere chock full of uninitialized pointers unterminating loops and unchecked type conversions makes one wonder whether it really was a good thing for Philippe Kahn to bluff his ads into those computer journals a few years ago Will C become the BASIC of the late 80 s Golly I hope so I think You spouses of com puter junkies may find this to be the last blow to what remains of the American marriage Now you ll never get him her to turn off the com puter and come to bed The real question is whether Borland deser ves to take over the C market the way it deser vedly took over and redefined the Pascal market After about a month and a half of working with Turbo C some six hours a day I d give it a qualified yes Version 2 or 3 ought to remove my qualifications The Delights First of all as a VALUE Turbo C is even more of a breathtaking bargain than Turbo Pas cal It s the Borland Revolution at the very edge of sanity For 64 from the Programmer s Connection they even paid UPS I received four diskettes stuffed with extraordinarily sophisticated software a full fled
61. so many other deserving products out there that are getting ignored just so that all the computer columnists can have an I can give more slobbery praise than you can contest Editor s note I thank you for pointing that out Laine Larry thanks you Gary thanks you Philippe thanks you Anyway Earls Mandelbrots will most likely be mentioned somewhere else in the magazine so I won t repeat any of that here But talk of the Brots brings up the subject of the machine they were displayed on which means Hardware The hottest hardware at the SOG was PC Tech s hi res color graphics board This beast is based on the TI 34010 pronounced threefortyten according to Earl graphics processor running at approximately 5 MIPs give or take a milli MIP and capable of displaying 256 colors from a palette of 256K at a resolu tion of up to 1024 x 800 800 x 512 on a standard MultiSync monitor If you re sick of your EGA or have too much money for your own good this is definitely the stocking stuffer of the year At SOG time the board was emulat ing CGA and EGA for use with standard software packages if you wanted to take full advantage of its power you had to write your own software Maybe by the time you read this there will be a PGA emulator and a Windows driver written for it so that any program running under Windows can take full advantage of all those freaked out colors and all five of those crazy little MIPs For t
62. space that quickly banishes unsuc cessful examples of standard software That is a weak shareware program can bounce about the bulletin board systems and molder in software libraries long after a similar program has entirely vanished from the normal marketplace Thus the shareware landscape is littered with decaying corpses Shareware critics seize upon these as examples that user supported software is inferior to the CALCULATED BREAKTHROUGH IN COMPUTING If you use a SCIENTIFIC OR FINANCIAL CALCULATOR anda PERSONAL COMPUTER you need the PC HYPERCALCULATOR YOU NEED A pop up scientific financial calculator for the IBM PC integrated with every program you use YOU NEED A programmable calculator with 100 registers 1000 program steps and alphanumeric prompts Hh YOU NEED A faithful emulation of the Hewlett Packard HP 11C and HP 12C that runs 20 40 times faster YOU NEED Only 49 95 plus 3 for shipping includes free 8087 version and utility programs Stop copying from calculator to computer now Call toll free 800 628 2828 ext 502 Sunderland Software Associates Post Office Box 7000 64 Redondo Beach CA 90277 HP 11C HP 12C and IBM PC are trademarks of Hewlett Packard Co and International Business Machines Corp respectively standard stuff It is also easy to find shareware that was issued by authors who haven t quite gotten the idea The anarchic oppor tunities afforded
63. systems The Future Our existing systems are based on either the 8085 or the Z80 If the Z280 ac tually becomes available it should find a good market in the controls industry The Beaverton Zilog rep says parts will be available by July We were quoted 28 in small quantity Hope it s real MICRO CORNUCOPIA 438 Nov Dec 1987 77 Fixing Automatic Capitalization I was so impressed with Mark Boyd s Automatic Capitalization article in issue 34 that I bought FTL Modula 2 and the Editor Toolbox I made Mark s changes right away and dove in A subtle bug in his modification trans forms ReadWord into ReadWORD Mark s code assumes that a symbol will consist entirely of lower case letters What s wrong with that assumption It causes upper case letters and digits all valid symbol components to be seen as delimiters of symbols This means that ReadWord becomes two symbols ead and ord The reserved word ord is then capitalized To fix the problem just expand the case in the scan procedure to include upper case letters and digits CASE ch OF tal D Z Q 9 Make the same change to the in itialization of symset in SCAN NER MOD and you ve solved the problem Bill Spees 710 W Main St 819 Arlington TX 76013 More Noise With regard to the recent Technical Tips item on high frequency noise from a _ monitor Last year Inter Noise 86 the annual conference of the Institute of Noi
64. titlet x WINDW top_y attribute S9 2e Re e He ke he h h He A e e e he e e de Fe Ae He e de e e He de Ke e e e He e de e Ae He Ae KIER WERK ke k e i kk ke Move the window cursor within the window repecting the boundaries void window_gotoXY int window_number int X int Y If X isn t outside of the window bounds set cursor to X else set it to just inside the window bounds if X WINDW left x amp amp X WINDW right x WINDW cursor x X else if X lt WINDW left x WINDW cursor x WINDW left x 1 else WINDW cursor x WINDW right x 1 same for y if Y gt WINDW top y amp amp Y WINDW bottom y WINDW cursor y Y else if Y lt WINDW top y WINDW cursor y WINDW top y 1 else WINDW cursor y WINDW bottom y 1 ifdef TEST main Here s where you put calls to window routines when performing stand alone tests Of course just because they work here doesn t mean they will work in a TSR You also need a define TEST at the beginning of this file endif Figure 6c COLORS H COLORS H definitions for CGA screen characteristics and colors define SCREEN BASE 0xb800 base address of color graphics card and EGA in color graphics mode define SCREEN_HEIGHT 25 define SCREEN_WIDTH 80 define SCREEN_CHARS SCREEN_WIDTH SCREEN_HEIGHT 2 number of chars and attributes in a screen define BITO 0x01 defi
65. tubing and canning jars Every thing worked pretty much By October I had a prototype quick and dirty on the inside but reasonably good looking on the outside I showed my contraption at the annual meeting of the American Association of Cereal Chemists My demonstrator plus my forecast of Pues a few weeks in shock saw a way to support my addiction to food what the Riso should be able to do earned a pleasing amount of favorable comment Meanwhile John talked up the Riso to his contacts I had written a rudimentary data col lection program but I had nothing to analyze or display However the prototype was a good sales tool and it showed me what I needed to improve Working with my suppliers I designed the first batch of six production Risos The prototype s water bath did not have precise enough temperature con trol 1 had had good experience with Sheldon Manufacturing and asked them whether they had a bath with better con trol They didn t but had been planning to develop one I suggested some special features for their new product I asked them to install two electrical outlets on the back of the baths I planned to use two plug mounted power supplies to run the Riso That way nothing beyond the plug would be above 24 volts This would reduce the chance that someone would be shocked by a Riso The cost of product liability insurance is so high that I ve chosen to go without it EEMCO a valve
66. type font then you re stuck with whatever size it is Vector Fonts Now we come to the processor and memory intensive portion of laser print ing It s possible to define a character s outline using vectors Go X degrees for Y units circle left alamand right curtsy to your partner The computer sends the printer the vector definition of the face Palatino Helvetica Bookman then it sends the size usually something between 5 points and 30 points and finally one or more text characters The printer s processor then takes a character grabs its vector definition scales it to size and then puts the charac ter into image memory Once all the characters have been calculated and writ ten into image memory the image is printed onto paper Many laser printers are rated at 8 pages per minute but that s a bit mis leading It can take up to 45 minutes to complete all the vector calculations and print the first copy of the page Addition al copies of that page come off at 8 pages per minute More Than Characters Unfortunately pixel and vector character tables character sizes and characters aren t enough The printer also needs to know where to put each character including vertical and horizontal space between characters how to underline or overline how to draw a line or box how to fill a space with grey or black how to print a graphics image size it scale it squeeze it stretch it and rotate
67. with IBM PC XT AT and all compatibles IBM s new Enhanced Keyboard runs only on their new XT s AT s and ignores their installed base which probably in cludes you ms es Oe er alle k pane aai Switch allows you to swap position of Ctrl and Caps lock IBM moved Ctrl to bottom row you have no choice TUE Positive tactile Extrawide e easy io Dedicated Caps Num and Separate 12 Function find Return key Function Con Scroll Lock dedicated keys for IBM changed sizes trol keys indicator lights Numeric Pad increased again by shrinking their IBM has no lights with enlarged automatic Return key on their XT Enter key four operation ae Arithmetic indi Function keys Separate Cursor and Screen Control keys ICED KEYBOARD for the 10 million PC users IBM just ignored IBM just announced their new redesigned standard keyboard for per sonal computers There s only one problem it won t work on your IBM computer if it was purchased prior to June 1986 or on any PC compatible purchased at any time Notto worry Our new Turbo 101 Enhanced Keyboard gives you the layout and en hancements of the IBM with some logical improvements see above photo And it works on your existing PC XT AT PCjr AT amp T Epson and virtually all compatibles Get Borland s Turbo Lightning For FREE To really turbocharge your productivity we are including free of cha Borland s red h
68. with other hardware The printer card is I O mapped you talk to it by using the port commands in your programming language the port array in Turbo Pascal e the inportb and outportb func tions in Turbo C The card uses a contiguous block of Figure 3 Printer Data Port We WRITE ADDRESS BASE RISING EDGE LATCHES NEW DATA IN ON BOARD DATA BUS L R READ ADDRESS BASE LOW ENABLES PRINTER DATA ONTO ON BOARD DATA BUS ON BOARD DATA BUS lt ON BOARD DATA BUS eight I O addresses The lowest address which I refer to as BASE is set with jumpers on the card all the other addres ses are offsets from BASE I have to admire the designers they know how to save money You don t change BASE by setting dip switches or pushing jumpers onto pins or by any other friendly activity You actually have to cut traces and solder jumper wires on the printed circuit board Well it IS only 21 As you can see in Figure 2 we select the address by taking either the inverted or non inverted address lines from the PC bus and NANDing them together through an LS30 To select the inverted or non inverted address bit place jumpers either before or after an LS04 in verter Note the silkscreen is incorrect on the board it shows an inversion bar over almost every symbol I show the corrected version in Figure 2 To move BASE to an unused area you first need to locate one The IBM technical refere
69. you had to make sure the outputs of a device went to 1 when it was finished with the bus or else that line would be permanently pulled to 0 and you d have problems Tri state logic which releases the bus whenever the outputs aren t enabled regardless of their value is much more idiot proof more common and doesn t require pull up resistors The three states are pull the line high pull the line low and don t do anything with the line The pull up resistors come in handy though To read pins 1 14 16 and 17 the outputs of the LS05s must be at 1 To do this we write to BASE 2 with data bits 0 1 and 3 at 0 because of the inverters and bit 2 at 1 because of the extra inverter which makes sense if you stare at Figure 4 long enough This causes the LS05s to disconnect so the pull up resistors take over You now have four read pins with internal pull up resistors Why is this nice Normal TTL inputs tend to float high but you can t just put a switch between that input and ground and read the line to see if the switch is open or closed It would work okay most of the time but it s susceptible to noise and I wouldn t recommend it The best practice is to pull the input up to 5V with a pull up resistor and then use a switch to pull it to ground This p Figure 5 Parallel Port Interrupt Circuit READ ADDRESS Do BASE PC BUS PIN B21 one IRQ 7 PC BUS PINB2 RESET a WRITE ADDRESS BASE
70. 5636 SOFTWARE SK DOS a powerful DOS for the 6809 75 or the 68000 140 incl an editor assembler Basic utilities code for a boot ROM etc HUMBUG a monitor boot ROM 50 75 OTHER SYSTEM SOFT WARE including assem blers text formatters editors spell checkers languages etc all very reasonable HARDWARE A wide selection of single board computers and sys tems from 275 COMBINATIONS Package deals of fast and powerful computer plus DOS and more from 350 SOFTWARE SYSTEMS CORP BOX 209 MT KISCO NY 10549 914 241 0287 36 Figure 6 TSR Windows amp Color Routines In C Figure 6a TSR C TSR C Terminate and Stay Resident TSR program written entirely in Turbo C look ma no assembly language Bruce Eckel Eisys Consulting 1009 N 36th St Seattle WA 98103 7 87 The interrupt line on the parallel printer card ACK pin 10 on the DB 25 connector is allowed through to IRQ7 and the 8259A is configured to service the interrupt when ACK is pulled to ground using a simple switch TTL or CMOS logic This was tested with an EGA monitor in color mode so it probably works with a color monitor or a monochrome monitor for mono change SCREEN_BASE to 0xB000 Note I have gotten around using any DOS or BIOS calls by writing direct screen driver routines this prevents any possible collision with the program being interrupted I tried
71. 6 Visalia CA 93279 Undocumented Z80 Instructions I d heard rumors about undocumented Z80 op codes before I got my first Z80 Maybe that s why I got my first Z80 It had secrets Herein Walter dis covers some of these secret instructions hidden inside an otherwise innocent looking piece of code This is sleuthing at its most I m thinking t was a dark and stormy night A Friday night as I recall The day had been rough and I truly felt I d spent it in the trenches the bottom of the trenches J sat down at the computer in the mood to disassemble some thing or someone And so it was while disassembling one of my favorite programs that I came across strange code Code that made no sense DB ODDH DB OFDH or LD H 1 DEC H Not Satanic Messages After many days puzzling over this I Figure 1 Z80 Instructions Reg XH or YH Reg XL or YL T ADC ADD AND CP t LD LD LD OR SBC SUB XOR IHS EH 3 m t A H H H H H H H r H A H H HERP PR RP PP eee a Byte Value O OFFH reg A B C D E H or L in this case refer to the low byte of IX or IY reg 70 MICRO CORNUCOPIA 38 Nov Dec 1987 decided these were not secret Satanic messages the output of a demented disassembler or ran dom noise After all the program did work And since ODDH and OFDH prefix the instruc tions of the index registers IX and IY it ap peared likely that the codes were related to t
72. 76010 817 467 4103 MICRO CORNUCOPIA 438 Nov Dec 1987 Li A E TE r SERVING NORTHE B OO e l Ram He SINCE 1963 SPECIALTIES HARD DRIVES CONTROLLERS CORVUS Mirror Server VCR Hard Disk Backup for Corvus Omninet NEW 25 00 CORVUS Utility Server Printer Inter face For Omninet Includes Manual 1 Software NEW 35 00 SHUGART SA801R 8 FLOPPY DRIVE 600K SSDD Still Sealed in 4 PIN MODULAR WALL JACK with Factory Boxes Strain Relief 10 for 4 Case of 325 for 99 00 XEBEC ACCESS 10 MB EXTERNAL HARD DISK IEEE 488 GPIB HPIB Interface Attractive Enclosure 12 x 6 H x 10 W 10 Meg Tandon Drive 298 00 XEBEC IEEE 488 HARD DISK CONTROL LERCARD 99 00 TANDON 10 MEG HARD DRIVE 99 00 With Controller 169 00 SWITCHING POWER SUPPLY IDEAL FOR DISK DRIVES 50 Watt 5V 4 AMP 12V 3 AMP 4 x 6 x 1 3 4 CORVUS HARD DRI VES SOFTWARE i AVAILABLE NOW PLEASE CALLI Li IF YOU DON T SEE WHAT YOU WANT CALL US XEBEC 1410 SAS HARD DISK NTROLLER 99 00 HALF HEIGHT EXTERNAL DRIVE ENCLOSURE Attractive Low Profile E Chassis 19x15x2 3 4 Fits snug under PC B PEE e amp 3 1 2 Dr hs wi E an amp Cables Complete 89 00 QBUS SASI HOST ADAPTER Made by Xebe
73. 8000 O 256 K bytes RAM 0 wait state expandable to 512 K bytes O up to 128 K bytes ROM O 2 Serial Ports O Parallel Port O Floppy Controller C SCSI Controller optional O Buffered full speed expansion bus O 5 volts only O 534 x 8 O ROM Monitor includes Assembler Disassembler tween 15 and 0 Remember that as each brightness level is reached the lower level bits remain on so the values you will see are 0 1 3 7 and 15 Tweak R1 R5 if you have any gain on the op amp and R7 so that you get full range Now put it all away until we get the software under control Of Rasters and Pixels We know where we re coming from a picture on paper we want on the graphics screen This is done with a process called rasterization which con verts a continuous image into a series of lines rasters of dots pixels By repeatedly scanning horizontally and stepping vertically we will build an array of pixels which represent the original image We then want to display the image on a standard graphics display Unfor tunately there are currently three stand ards and depending on how well PS 2 sells there may be a fourth The three cur rent standards are Color Graphics Adap ter CGA Hercules Graphics Adapter HGA and Enhanced Graphics Adapter EGA Let s look at how these actually display an image on the screen All three are memory mapped A por tion of the computer s address space is shared between the processor and the
74. 88 260 00 Bunnig out of spreadsheet room Need something faster than a Four Megger hard disk for those long compiles The Four Megger is the answer NOW 750 00 The Four Megger meets the Lotus Intel Microsoft expanded memory specifications and works in all PC and XT computers The Four Megger also works in AT computers as expanded memory 2GIP ewido ee es 99 00 Only Memories 95 00 16 MEGGER Expanded or Extended Memory for PC XT AT Up to 16 Systems Megabytes total Expanded memory works as on FOUR The Box 799 00 MEGGER Mono System 1 099 00 TMS 34010 HI RES COLOR BOARD EGA System 184900 Bring workstation graphics to your PC This board has no i its own 32 bit graphics CPU running at 5 MIPS with up f Et to 4 M Bytes of memory plus 1 M byte display memory ERI TOT System configuration details PC Tech also sells hard Emulates CGA Up to 1024 by 800 pixels 256 colors from a palatte of 256k drives and controllers video boards and monitors etc P O Box 128 904 North 6th Street Lake City MN 55041 61 23 345 4505 Watch for more innovative products designed and built by PC Tech COD VISA MASTER CARD CERTIFIED FUNDS T4 AT AIL llame LE ECAacdoLariznec ee ee Two Ctrl and Alt keys for ambidextrous access firm feel keys Enlarged Shift keys Isolated Escape key Switch selectable compatibility
75. 988 928 These were dBASE data files EIE M aaa 4 954 904 3 219 456 4 954 904 2 121 728 total bytes 6 825 060 fu11 Space used 6 864 896 mixed data and program files f 8 298 437 6 144 000 8 298 437 4 587 520 first time 7 33 subsequent 7 33 couldn t load couldn t load time to load 130K program using 128K buffer space Note Konan card was run in PC Tech 80186 board 54 MICRO CORNUCOPIA 38 Nov Dec 1987 SCIENTIFIC SOFTWARE SCI GRAF 99 95 mono cards SCI GRAF MODULES 250 00 FONTEDIT 49 95 SCI DATA 59 95 SCI GRAF SCI EVAL 49 95 Free shipping on prepaid orders No credit cards Systems MSC P O Box 747 Santa Barbara CA 93102 805 963 3412 no compression Drive E got normal compression Drive F got archival super duper compression I set them each up with the same number of tracks so I could easily compare how much space was saved by the compression Bugs I couldn t run programs from drive D the fast unsqueezed portion of the hard drive if they approached about 40K Also I couldn t copy any files of that size or larger from drive D to any other drive If I tried either I d get the mes sage General Drive Error Smaller programs and files worked without a whimper A file by file test using Norton s DIS KTEST reported that the files were
76. ANGE EPROM TYPE THE BUFFER MONITOR MODE HAS 17 SUB COMMANDS FOR DETAILED OPERATIONS THESE INCLUDE FILL DUMP TRANSFER PROGRAM READ VERIFY EXAMINE MODIFY CHECKSUM BIAS INSPECT SINGLE BYTE BURN LOGICAL OPERATIONS AND OR XOR SET BUFFER BIAS HEX ARI ARITHMETIC ETC ASSEMBLED AND TESTED UNIT WITH COMPLETE DOCUMENTATON AND SOFTWARE ON DISKETTE PARISKITWITHSOFTWAREANDDOC 179 BAREBOARD SOFTWARE amp DOO 69 SOFTWARE AVAILABLE ON 5 1 4 OR 8 DISK FOR IBM KAYPRO amp OTHER FORMATS TO ORDER SEND CHECK MONEY ORDER WRITE OR CALL P O BOX 22 MILFORD OHIO 451 50 CALL OR WRITE FOR MORE INFORMATION ADD 4 00 FOR SHIPPING 3 00 COD 2764 2764A 27128 27128A 27256 27512 27CXXX 2864A 8751 T ADAPTER OUR BIAGAMS INCLUDED e USES NO SYSTEM POWER OR CHASSIS SLOT HIGH SPEED PARALLEL OPERATION FIVE LED STATUS ACTIVITY INDICATORS REQUIRES 24 OR 25 VOLT XFMR FOR POWER SAVE EPROM S BUFFER TO DISK e PROGRAM EPROM S FROM BUFFER COMPARE EPROM S WITH BUFFER COPY EPROM S e BUFFER MONITOR MODE SEE BELOW 199 pa 513 752 7218 lives Support your local SOG Thank you for the great time I really appreciate all of the hard work and time you all put in to make it run so smooth ly My wife could not believe how well organized the whole thing was she must know how organized us computer types really are eh I really do hope that we don t miss a year of SOG and BR
77. BM PC and compatibles Only 99 95 S S S S S E E ya e amt UL UM a AUS ioi st Ta s ve aee iae 3 BD ua te det T bc 4 is Bi
78. CL has become a defacto stand ard for 300 dpi laser printers Anything that talks to laser printers should at least talk PCL PCL is kind of a very limited PDL The original LaserJet wasn t par ticularly fancy 128K and 8 built in fonts so emulation isn t particularly difficult You can purchase additional fonts in plug in cartridges at about 400 each Be careful you can easily spend 4 000 to 10 000 on extra fonts Also don t plan on printing graphics larger than a postage stamp The printers on the next level 2500 4 500 emulate the HP LaserJet Plus These printers will let you load fonts into their RAM plus you can also print larger graphics The LaserJet Plus comes with 512K but you should try to get at least 1 meg of RAM and have an upgrade path to20r3meg The highest level printers 4 000 8 000 should support PostScript as well as emulating the HP LaserJet Plus continued on page 24 New Lower Prices for CP M e VEDIT Version 1 40 49 Single file no windows e VEDIT PLUS Version 2 32 79 Multiple file no windows e VEDIT PLUS Version 2 33 95 Current version with windows TEXT LINE 15 COL 16 FILE PHOTO INSERT Et INDOW INDOU 1 i Hain loop displays the ma VEDIT PLUS is an advanced editor that makes your program development and word processing as efficient and easy as possible VEDIT PLUS is simple enough to learn and use for the novice yet has the clr
79. COMPLETE W CONTROLLER 195 00 820 COMPUTER MONITOR NO MAIN BOARD HIGH PROFILE KEYBOARD COMPLETE 45 00 820 1 MAIN COMPUTER BOARD 50 00 FULLY POPULATED BOARDS AS IS NEED REPAIR S 20 00 820 2 MAIN COMPUTER BOARD 70 00 FULLY POPULATED BOARDS AS IS NEED REPAIR 30 00 820 2 FLOPPY CONTROLLER BOARD 95 00 DUAL 8 SSDD DISK DRIVES ENCLOSURE COMPLETE 175 00 DUAL 8 DISK DRIVE CABINET NO DRIVES 5 1 4 DUAL DISK DRIVE CABLE 8 DUAL DISK DRIVE CABLE RS 232 CABLES E21 COMPUTER PRODUCTS 2273 AMERICAN AVE 48 HAYWARD CA 94545 415 786 9203 280 B 6MHz 280 H 8MHz 5 1 4 DSDD DISKETTES ea 8 SSSD DISKETTES DC300A DATA CART USED 2 55 TERMS Pre payment COD Visa Mastercard California residents add sales tax Orders are FOB Hayward CA Shipments by UPS Ground unless otherwise requested Prices and availability are subject to change without notice All products are assembled and tested and have a 30 day warranty unless otherwise stated Call or write for current product and price listing Xerox is a trademark of Xerox Corporation CP M is a trademark of Digital Research IC PROMPT DELIVERY SAME DAY SHIPPING USUALLY QUANTITY ONE PRICES SHOWN for AUG 23 1987 OUTSIDE OKLAHOMA NO SALES TAX DYNAMIC RAM 1Mbit 1000Kx1 100ns 26 50 1Mbit 256Kx4 120 ns 32 00 51258 256kx1 100 ns 6 95 4464 64Kx4 150 ns 3 50 41256 256Kx1 80 ns 4 95 41256 256Kx1 100 ns 4 40 41256 256Kx1 120 ns 3 40 41256 256
80. CR 53C80 SCSI bus controller for hard dish or network communications o GT180 FX features Measures only 5 75 X 8 Designed to piggy r back on top of the SB180 or SB180 FX High resolution of 640x480x16 colors from a palette 4096 Advanced HD63484 CRT controller 38 commands including 23 graphic R A za Takes the bottom bit of an integer and prints it as an ascii String x drawing commands either 0 or l For some reason I had trouble passing string Fully software supported pointers inside the TSR it would modify the save buf array so by Borland s GT180 it seems I can only use literals Be aware of this quirk I spent Graphix Toolbox and awhile chasing it and couldn t find out what i Mogae awhile chasing it and cou ind out what it was 9 million pixels per second void a window_put_binary int window_number int value unsigned char attribute if value amp 1 SB180 FX as low as 409 00 GT180 aslow as 395 00 window puts window number 1 attribute Turbo Modula 2 69 00 else PPP A window puts window _number 0 attribute CHI GT180 89 00 DOS calls Figure 6b WINDOWS C WINDOWS C custom screen functions to prevent DOS collisions inside the TSR Bruce Eckel Eisys Consulting 1009 N 36th St Seattle WA 98103 7 87 We don t need no steenkin DOS calls You can bet if Borland had made DOS
81. Controller Operation Control Word 1 see issue 36 page 36 macro to read value of ACK line define ACK inportb BASE 1 amp BIT6 foede dede dece de dece ee defe ee He He e e e e He He He KKK IIH k e He H He He He He e e KKK KEKE KK kke dek keke k kekek kkk kk Macro with parameters to read values at any pin location Returns 1 if a logical one comes back from the masked pin and 0 if a logical zero comes back Note inversions due to hardware logic are not considered so some pins may be seeing a TTL 1 and return a zero see circuit define READ BIT port address bit inportb port address amp bit 1 0 Jf fede KERRI KEE KEE IK He de He de de de e e He He Ae He Ae He e e e Ae He He KEKE He He He He IK EEK ERIK KEI KKK AK IK The interrupt handler Notice the interrupt compiler directive which tells the compiler to save and restore all the registers and use interrupt code instead of normal subroutine code void interrupt int handler UC define LEFT X 5 define RIGHT X 75 define TOP Y 5 define BOTTOM Y 20 Function prototype to allow compiler to flag improper function calls void window put binary int window number int value unsigned char attribute Window boundaries save the user s screen and put ours up instead save screen def ine window 0 LEFT X TOP Y RIGHT X BOTTOM Y YELLOW CHAR BROWN_BACK draw window 0
82. DIV Interleave of rasters interleaved array ArrayLen Xsize DIV 8 Ysize DIV Interleave 1 Unused Full size 1 of interleaved array TYPE Raster ARRAY 0 Xsize DIV 8 1 OF BYTE Screen ARRAY 0 Interleave 1 0 ArrayLen OF BYTE BitPos 0 7 Ordinal value of a bit position in a byte Xpos 0 Xsize 1 Allowed range of X pixel position values Ypos 0 Ysize 1 Allowed range of Y pixel position values PROCEDURE ClrScr VAR S Screen Clear the Graphics mode screen usually just requires filling the memory on the adapter with zeroes PROCEDURE GrabClock IntNum BYTE TickLen CARDINAL The data rate needed to capture pixels is faster than the standard real time clock and an untimed software loop will be somewhat unpredictable This routine re programs the DOS real time clock interrupt device to generate interrupts at about 1 mS intervals When enabled the interrupt service routine will capture a pixel at each clock tick PROCEDURE FastClock Enable pixel capture at fast clock interrupt rate PROCEDURE SlowClock Disable pixel capture at fast interrupt rate PROCEDURE Scan VAR R Raster Capture one scan line of pixel data no processing done PROCEDURE GraphMode Put the video adapter in graphics mode For CGA and EGA we can use BIOS services For the HGA since it was never an official IBM product we will have to re program the hardware directl
83. EW DRIVE ASHLAND KY 41101 D be aes E PAAIE ANT SO RR OE AGE ORNL iE Ea OIE lk EE continued on next page MICRO CORNUCOPIA 38 Nov Dec 1987 43 continued from page 43 Memory to screen mapping is inter leaved even scan lines in the lower 8 K odd lines in the upper This means that although bytes within a scan line are con tiguous the scan lines are not For ex ample in screen coordinates the upper left corner is X 0 Y 0 This pixel is lo cated at B000 0000 bit 7 The pixel im mediately below it at X 0 Y 1 is at address B000 2000 bit 7 It s critical to keep track of where we are HGA Hercules is the only non IBM graphics mode to become popular It provides monochrome only at 720 X 348 The adapter has 64 K bytes of memory organized as two display pages Memory to screen mapping is interleaved by four Each page is ac cessed by the display circuit as four 8 K banks one each for scans whose number MOD 4 are 0 1 2 and 3 Again within each line displayed bytes are sequential Pixel Mapped to page 0 0 0 B000 0000 bit 7 0 1 B000 2000 bit 7 0 2 B000 4000 bit 7 0 3 B000 6000 bit 7 This is a little more complex than CGA but not too bad The EGA has all of the CGA s modes and adds several of its own For the first run software we ll use the 640 X 350 monochrome mode This is the simplest of the three since there is no interleave The screen is represented by a linear array at
84. EXTERNAL AMPS DEMONSTRATION SOFTWARE AND ALIBRARY BUILDING PROGRAM ARE INCLUDED ON A 5 4 INCH PC XT DISKETTE FULL DOCUMENTA TION AND SCHEMATICS ARE ALSO INCLUDED NEW CANON 80 COLUMN PRINTER ORIGINALLY MANUFACTURED FOR THE PC JR BUT WITH OPTIONAL CONNECTOR WILL WORK WITH PC XT OR AT REQUIRES SERIAL I O THIS THERMAL PRINTER IS QUIET AND USES EASY TO GET 8 2 IN ROLLS OF PAPER 50 C P S UPPER AND LOWER CASE PLUS GRAPHICS ORIGINAL LIST PRICE 199 00 ADD 3 00 FOR PC XT CONNECTOR ADD 5 00 UPS PC XT EPROM PROGRAMMER LATEST DESIGN x PROGRAMS UP TO 4 DEVICES AT ONE TIME x FEATURES EASY TO USE MENU DRIVEN SOFTWARE THAT RUNS UNDER PC OR MS DOS x USES AN INTELLIGENT PROGRAMMING ALGORITHM FOR SUPER FAST m EPROM BURNING THIS PLUG IN BOARD ATTACHES TO AN EXTERNAL MINI CHASSIS CONTAINING 4 TEXTOOL ZI F SOC REQUIRED AUTOMATIC VPP SELECTION 12 5V 21V OR 25V x EPROM DATA CAN ALSO BE LOADED FROM OR SAVED TO ADISKETTE x PROGRAMMING SOFTWARE SUPPORTS 2716 2732 2732A 2764 2764A 27128 27128A 27256 27256A 27512 AND 27512A x ASSEMBLED AND TESTED BURNED IN WITH MANUAL 169 WITH JUST RECEIVED SAME AS ABOVE PROGRAMMER BUT PROGRAMS 10 UNITS AT Digital Research Computers P O BOX 381450 DUNCANVILLE TX 75138 214 225 2309 TERMS Add 3 00 postage We pay balance Orders under 15 add 75 handling No C O D We accept Visa and MasterCard Texas Res add 6 1 4 Tax Foreign orders except Canada
85. H Mouse with LOGIPAINT PC Paintbrush Choice of Serial or Bus Mouse or Microsphere Inc P O Box 1221 Bend OR 97709 503 388 1194 Hours Mon Fri 9 00 5 30 Pacific Time VIDEO TAPES Understanding C 49 95 Power Programming in C 69 95 4 hours of instruction diskette with source companion manual Add your sales tax plus 3 shipping Applied Logic 2309 Royce Dr Arlington Texas 76016 EFFECTIVE LOW COST DISPLAY ADVERTISING MICRO CORNUCOPIA 38 Nov Dec 1987 ADVERTISERS INDEX Issue 38 Ampro Computers Analogic Company Anderson Techno Products Andratech Austin Code Works Blaise Computing Borland International CC Software Cascade Electronics Computer Cowboys Computer Helper Ind Inc Compu View Datadesk International Digital Research Computers E2I Computer Echelon Inc 1 cee cee cee e cece een 73 Ecosoft Inc Halted Specialties Hawthorne Technology Integrand Logic Connection LOGITECH INC cece cece ee ween 9 Manx Software Systems Marion Systems Micro Cornucopia Micro Methods Microcomputer Systems Consultants Micromint Microprocessors Unlimited MicroSphere microSOLUTIONS McTEK Systems PC Tech Peacock Systems SemiDisk Systems Slicer Computers Star K Software Systems Softside Systems Storey Systems Sunderland Software Assoc 68 ULTRATEK WindowDOS Assoc XenoSoft Q5 By Gary
86. ING ON THE VOLLEYBALL YEAH AlJ Szymanski 8991 Edcliff Ct SE Aumsville OR 97325 9549 Editor s note Thanks a lot for the letter Al Actually I think Gary was mistaken about the plant on the T shirt It wasn t that kind of plant at all Honest About SOG VII the college is planning to have the dorm closed for the summer while they refurbish it Since the dorm is such a great center for all the after hours activity we re already trying to get them to commit to a time when we can still use the facility Whether we get it or not we ll have a great SOG VII Gan SARS SP SMCS RASS Kee e nae A SRS esse see a Sess sess see TEAR HERE zuuanuananuanrununauE REEEE EREERRNEEREREEMEERAMAaEZECan TEAR HERE seme ORDERFORM POSTAGE PAID SELF MAILER Tear out fold and staple both ends if check is enclosed YES I WANT TO SUBSCRIBE MERO CORNUCORIA 1 TT OTHER PRODUCTS l m Back Issues T shirts specify size NEW J RENEWAL ee ee re E 1 yr s 2 yrs C MS DOS 37 O MS DOS 5 O Other Specify Disk and size TOTAL DISKS newstand price CH ECK EN CLOSED To Place Your Order Immediately L U S funds drawn on a U S bank please l CALL 1 800 888 8087 C VISA L MASTERCARD 9 5 M F Pacific Time CLLD LLLE LLED HIED Are you a current Micro C subscriber LC Yes L No Expires Designing A Graphics Workstation Around The TMS 34010 Deep In T
87. Kx1 150 ns 3 20 41264 2 PORT 120ns 5 25 EPROM 27512 64Kx8 200 ns 11 25 27C256 32Kx8 250 ns 6 65 27256 32Kx8 250 ns 5 50 27128 16Kx8 250 ns 4 95 STATIC RAM 43256L 12 32Kx8 120ns 11 95 5565PL 15 a8Kxs 150 ns 3 25 OPEN 61 2 DAYS 7 30 AM 10 pm SHIP VIA FED EX ON SAT SUNDAYS amp HOLIDAYS SHIPMENT OR DELIVERY VIA U S EXPRESS MAIL SAT DELIVERY MasterCard VISA or UPS CASH COD 640K MOTHERBD UPGRADE Zenith 150 80287 8 80387 16 IBM PC XT Compaq Portable amp Plus hp Vectra 160 00 250 00 540 00 087 2 8 INCLUDEDON Factory New Prime Parts uPoo P EECEWED EN Mao RSR gg UNLIMITED INC Th Std Ai 4 1 Ib FP 10 50 2 s BEGGS OK 74421 9 8 267 4961 No minimum order Please note that prices are subject to change Shipping amp insurance extra amp up to 1 for packing materials Orders received by 9 PM CST can usually be delivered the next morning via Federal Express Standard Air 4 00 or guaranteed next day Priority One 10 50 All parts guaranteed 40 MICRO CORNUCOPIA 38 Nov Dec 1987 WINDOWS listing continued for title_ptr title title_count 1 title ptr title count tt count number of chars in string stops when title ptr N0 starting x value to center the title x WINDW right x WINDW left x title count 2 WINDW left x 1 while title stops when title 0 putc_at_location
88. ND END NewPosition TRUE CutBlock 5 10 22 42 First done IF NOT done THEN WriteString First block not cut END CutBlock 15 20 10 30 Second done IF NOT done THEN WriteString Second block not cut END f PasteBlock Second 5 7 NewPosition done IF NOT done THEN i WriteString Second block not pasted END PasteBlock First 15 10 NewPosition done IF NOT done THEN WriteString First block not pasted END END SwapBlocks 52 MICRO CORNUCOPIA 38 Nov Dec 1987 continued from page 51 array but we need to be careful A 6 for example contains the same information as B 1 and A 12 contains the same in formation as C 2 even though we only allocated enough memory for A 0 4 So we ll need some way to check array boundaries Also if we use the assignment state ment with an allocated data structure we might have problems For example if we say C A as signing the de referenced values pointed to by A to the locations pointed to by C even though only room for five of the index values has been reserved all 80 locations will be assigned This can lead to disastrous results since we can t be sure what s being written over We can now access the resulting data structure by A Row I J where A points to the ScreenBlock and Rowl I IJ refers to the Ith RowPointer s Jth ele ment In order to efficiently manipulate the blocks of screen im
89. No 38 Nov Dec 1987 FHE MiG RKU Parallel Processing This issue we have three articles on the transputer a processor specially designed for parallel processing The articles cover the transputer communications between transputers and creating a parallel C compiler Series begins on page 6 Laser Printers Typesetters And Page Definition Languages page 20 The problems designers and purchasers face getting information onto paper Magic In The Real World page 28 What can you do with a 20 PC parallel card A lot Bruce tells you how Build A Graphics Scanner For 6 00 Part 2 page 42 This time John covers the hardware construction and begins the software In Depth Turbo C page 56 Writing a resident program extractor entirely in C 7447019588 TECH WN CAL JOURNAL 3 95 one megabyte of DRAM E ASI time clock floppy disk controller and optional one or two serial ports SCSI port and 8087 The PC Tech SmartBIOS provides PC compatability with ease of use We wrote it and we support it PRICES X16B 1 Meg RTC 600 00 8 MHz version 540 00 SCSI option 25 00 Full SCSI port using the 5380 Software built into ROM BIOS for x Sella POMS tou P OMT 3100 hard disk controller achieves a to 1 sector interleave 8087 1 82188 340 00 8087 2 821
90. P M Digital Research Inc ConIX Computer Helper Industries Inc UNIX AT amp T Bell Labs By Jim amp Jack Dennon microMethods Inc P O Box G Warrenton OR 97146 ZRP M2 Anticipating The Z280 A New Z80 Emulator For PC XT AT Clones The new Z280 has definitely put some spark back into the CP M world but Zilog has withdrawn the chip What to do Read on as the Dennons describe their attempts to emulate the Z80 and the Z280 on a clone Where else compatible with PC RP M2 it emu lates CP M on a clone you can run most CP M programs The ones that won t run usually contain Z80 instruc tions and the V20 supports only the 8080 subset you boot your V20 based PC XT Hardware amp Software Solutions Our first solution for this problem was a hardware oriented one based on Decmation s Blue Thunder card With this board plugged into the PC bus boot ing the Blue Thunder version of PC RP M2 brings up a Z80 CP M 22 com patible system Since a Z80 is executing the code the system is fast and for computationally intensive applications it remains the best solution The disadvantages are it s somewhat expensive and it occupies an expansion slot We were thinking about releasing a software Z80 emulator equipped version of PC RP M2 when Zilog announced the Z280 The Z280 executes all the Z80 in structions and more And some of its more interesting 16 bit instructions map closely into 8088 instructions So we
91. RALLEL PORT EIGHT DATA CHANNELS MEMORY RESIDENT CONTROL DISPLAY PROGRAM DATA CAPTURE RAM HOLDS 4096 SAMPLES 3 BIT MASKABLE TRIGGER OR EXTERNAL TRIGGER 5 INTERNAL CLOCK RATES UP TO 20 MHZ PLUS EXTERNAL CLOCK COMPLETE WITH REFERENCE MANUAL TEST LEADS AND 90 DAY WARRANTY PROBE ONE 16 MHZ 345 PROBE ONE 20 MH2 395 FOR MORE INFORMATION OR TO ORDER PLEASE P O BOX 23852 PORTLAND OR 97223 503 626 8468 marizes the results As expected the undocumented in structions are indeed slower than using standard register codes However the speed reduction is due solely to the extra instruction byte fetch Depending on your point of view the undocumented codes are either 28 slower than the standard codes or the standard codes are 22 faster Compared to the alterna tive methods however the undocu mented codes are speed demons They ran 22 faster than switching to the al ternate register set and an incredible 238 faster than the brute force method Simple to use and fast these undocu mented Z80 instruction codes can provide an elegant solution to finding room for one more byte of data when you push registers to the max References Alan R Miller 8080 Z80 Assembly Language John Wiley amp Sons Inc New York 1981 C C Software 1907 Alvarado Ave Walnut Creek CA 94596 y D gt Who we are Echelon is a unique company oriented exclusively toward your CP M compati
92. STAT Reports system information memory available drive status etc PC TEST is similar to Norton s speed test but its test takes longer and it doesn t report such wildly optimistic speed figures POPALARM is really neat It s a memory resident alarm clock that reminds you to do what you d otherwise prefer to forget RECALL remembers the last 50 DOS commands Commands may be edited and or reexecuted REMIND This is a daily black book that stores its data on disk SCR Utilities for creating batch files which incorporate screen images This is a great extension to MS DOS batch capabilities FILTERS The remaining files are classics from the Software Tools book One of the real attractions of these filters is that they come with assembly language source MS37 Disk Utilities COVER prints out directories in compressed format to be pasted on floppies CRC67 Finally an MS DOS cyclic redundancy checker CRC that works Fast Checks CRC values for files against a previously recorded list of CRC s DISKORAY checks floppy rotation speed and allows stepping of the head DISKPARK parks the heads of all hard disks in your system using the innermost track DISKWIPE Be careful This completely erases a disk including the formatting FDATE allows editing of the time and date stamp on DOS files FILES A very complete directory program MOVE2 Intelligent COPY routine REFRESH rerecords data on a disk It does 12 retries
93. Sbasic and Turbo Pascal TURTLE BOX also included for use with Turbo Pascal brings TURTLE GRAPHICS ability Available now for the 83 Kaypro II 4 Xerox 820 1 Big Board 1 Soon for the 84 series Kaypros and PC compatables ONLY 49 95 includes shipping KY residents add 52 Sales Tax VISA MC or COD accepted ALSO INCLUDED A device driver which supports a MICROSOFT compatable serial RS 232 mouse Can be configured to support the popular LOGITECH C7 serial mouse Now you can write mouse driven programs with pop ups and pull downs for your Z80 computer A device driver for dumping the screen to your printer SLOTS COM A realistic slot machine game demonstrates ROW TABLE DRIVEN SCREENS JAMS A game to demonstrate the ability to animate using the OMNIVID device drivers Call or write for info Or order documentation on disk for only 8 00 includes shipping ALSO AVAILABLE A GRAPHICS CHARACTER ROM for your 83 Kaypro II or 4 Xerox 820 1 or Big Board 1 Supplements the OMNIVID device driver package with a thin line and pixel graphic 160 x 48 character set As well as providing better looking window borders and an improved alphanumeric character set the pixel graphic character set is highly desirable for use with TURTLE BOX above ROM PRICE 19 95 includes shipping ROW TABLE SCREENS tions each bit of which controls one pixel TEL 606 325 3738 SAM 6PM EST H FLEXISOFT 3987 vaLLEv VI
94. TIT RSHIFT LSHIFT ALT define TICKINT 8 l define NEWTICK 0x80 define FINI 0x5a char intable 0x400 shiftptr z char 0x417L typedef struct MSDOS allocation header format char flag Either 5Ah for end or 4Dh for not end unsigned nextpsp paragraphs l HEAD HEAD header extern unsigned psp unsigned meminstall how much memory is installed in PC f kseiekeeioeeoekeedekekekek void interrupt tickhandler check shift state for three shifts depressed if shiftptr amp TESTIT TESTIT deallocate geninterrupt NEWTICK chain the interrupt RERKEKEKKKKKKKKE deallocate HEAD nextheader _AX is a pseudovariable which can be used to get or change the value stored in AX The possibilities are mind boggling _AX 0xe00 7 just a beep to show something happened geninterrupt 0x10 memcpy NULL intable 0x400 restore old int table nextheader MK FP psp header gt paragraphs 0 nextheader gt flag FINI tell MSDOS that everything s free above nextheader gt nextpsp 0 nextheader gt paragraphs meminstall 1 psp header gt paragraphs REKKKEKEEEKEEKKKKKKKKKE main char newtick oldtick just so it s 32 bits char is a convenience header MK FP psp 1 0 point to TSR s allocation header newtick MK FP 0 4 NEWTICK swap interrupt vectors oldtick MK FP 0 4 TICKINT disable st
95. TO R BlockType ARRAY 0 rows 1 OF RowPointer ScreenBlock RECORD Handle ARRAY 0 NAMELENGTH OF CHAR FirstRow LastRow FirstCol LastCol CARDINAL Row BlockType END BlockPointer POINTER TO ScreenBlock BlockArray ARRAY 0 NumBlocks 1 OF BlockPointer VAR BlockSpace BlockArray PROCEDURE CutBlock FirstRow LastRow FirstCol LastCol CARDINAL Handle ARRAY OF CHAR VAR done BOOLEAN VAR I J K NumCols Position CARDINAL A BlockPointer MODE PAGE TEMP WORD BEGIN done FALSE Test for legitimate input IF FirstRow lt LastRow AND FirstCol lt LastCol AND LastRow rows AND LastCol cols THEN f continued from page 49 i gt Then we can define a row R of charac ters as an array of CA s characters and attributes TYPE R ARRAY 0 79 OF CA We could make this into a two dimen sional array rows and columns but it would be wasteful since memory is automatically allocated for the entire structure when the variables are declared Let s use only as much memory as we need _ An entire screen requires 25 80 2 4000 bytes so let s define a pointer to type R and an array of pointers to repre sent the number of rows TYPE RowPointer POINTER TOR BlockType ARRAY O 24 OF RowPointer BlockType will hold up to a full screen of information but will consume only 50 bytes as 25 pointers Next we define a record of Screen Bloc
96. Thus we can define rectangular blocks Figure 1 ScreenBlocks Definition Module DEFINITION MODULE ScreenBlocks This module is system specific This version is written for the IBM PC and clones using MS DOS EXPORT QUALIFIED CutBlock PasteBlock PROCEDURE CutBlock Handle VAR done FirstRow LastRow FirstCol LastCol ARRAY OF CHAR BOOLEAN CARDINAL Cuts a block of screen characters and their attributes and saves them for later retrieval PROCEDURE PasteBlock Handle VAR done ARRAY OF CHAR UpperLeftX UpperLeftY NewPosition CARDINAL BOOLEAN BOOLEAN Retrieves amp pastes a block in a new position if new position is true or replaces it in its old position if new position is false END ScreenBlocks Figure 2 ScreenBlock RECORD Definition TYPE NameArray ScreenBlock RECORD Handle ARRAY 0 24 OF CHAR NameArray FirstRow LastRow FirstCol LastCol CARDINAL Row BlockType END 48 MICRO CORNUCOPIA 38 Nov Dec 1987 By Thomas L Ochs Structured Scientific Software 1509 Queen Ave SW Albany OR 97321 ata abstraction and dynamic memory allocation are two areas where Modula 2 and Ada shine easily and move them about the screen No use wasting memory after we ve thrown away a block so we ll allocate and deallocate memory dynamically Since we want our program to be port able we won t be able to move blocks from displ
97. UPON REQUEST drives D and E both fast no compres sion but data correction buffering etc Maybe the software didn t like to shift from compression to non compression Unfortunately still no go However the speedy version wasn t any faster than the logical C drive or any faster than a standard controller so there might not be much need for it Normal and archival compression did well I left the system running a BAT file for half a day just copying back and forth between logical drives E normal com pression and F archival There wasn t an error Normal compression increased file access time just slightly Archival storage increased file access time by about 50 But copying large quantities of data overwhelming the RAM buffer was slow Copying 6 8 meg from F to D took 11 minutes 14 seconds Copying 6 8 meg from one directory to another on the same system using a standard controller and very full hard drive took 6 minutes 10 seconds ROM Versions I purchased the Konan Board about TEXT TO SPEECH BOARD PC XT COMPATIBLE MAKE YOUR COMPUTER TALK A VERY POWERFUL AND AMAZING SPEECH CARD USES THE NEW GENERAL INSTRUMENTS SPO256 AL2 SPEECH CHIP AND THE CTS256A AL2 TEXT TO SPEECH THIS BOARD USES ONE SLOT ON THE MOTHERBOARD AND REQUIRES A COM SERIAL PORT BOARD MAY ALSO BE USED INA STAND ALONE ENVIRONMENT WITH ALMOST ANY COMPUTER THAT HAS A RS232 SERIAL PORT FEATURES ON BOARD AUDIO AMP OR MAY BE USED WITH
98. a HSC Electronic Supply Store Hours 6819 S Santa Rosa Ave 5549 Hemlock St iam MA l L OR D E R S m Fri 8 00 7 n Cotati CA scm Saturday 9 00 5 0 i NEL 792 2357 oie asdsa tamm s Call N O W 408 7 32 15 r4 3 MS Minimum order 10 Calitornia residen ts add 7 sales tax Prepaid orders sen dtrag COD o cab for charges Chipping wi will be added to credit card and COD orders Prepaid orders over 100 ust certified check Please do not send cash Some items limited to stock on hand Prices sul yee k to ae MICRO CORNUCOPIA 38 Nov Dec 1987 19 By David Thompson Laser Printers Typesetters And Page Definition Languages Getting It Off The Screen And Onto The Paper We re right on the edge of a new era An era where quality type and graphics will be as cheap and available as dot matrix output used to be That may not seem very impor tant but it is for even today a very very few have a lock on the best of this technology companies Compugraphic Linotype VariTyper and Mergen thaler had the publishing industry by the serifs They produced huge electro mechanical marvels designed by Rube Goldberg for which they were the sole sources of parts service accessories up dates fonts you name it These monstrosities had motors strobe lights mirrors lenses light tight paper holders okay somewhat light tight paper holders transparent fonts Their weight was determined by the structural limit
99. ably I think about the advantages of using typedef in declaring variables while the headers given by the program itself all use struct XXX declarations and not typedefs Mr Kent Dolan writes to tell me that the search key functions are poorly documented and nonstandard Though I haven t played with those func tions I m not surprised Although the memory management descriptions look very nice diagrams and all I still haven t found a precise description of how programs handle memory accounting with MS DOS What functions and in which models merely dole out memory already owned by the program and which actually make fresh calls to DOS to get new memory And what about the various fetch a character from the console functions Which MS DOS calls are used Writers of resident programs and folks who hate ANSI SYS need to know iy Yeah I know I could spend almost 300 to get a copy of their source code But that sort of nuts and bolts informa tion should come with the package Nor have I discovered yet how much stack space the various models give me to play with it seems to be 0x1000 bytes for the large model and whether programmers can change that Many less elegant com pilers are much more explicit about the actual ways their programs work Although Borland will let you set a switch to detect stack overflow it ap parently won t let you decide how much auto stack you wish to set aside It s as if Bor
100. address A000 0000 It gets more difficult to use the attribute plane for this mode so we may get into that later The Software Plan Figure 2 is the overall outline for the software portion of the project As you can see certain areas are preliminary and will need to be expanded as we get far ther along There will not be a direct relationship between the organization of the outline and the program I use the outline more to define what needs to be done not how to do it For now I ll discuss two low level definition modules and in the process show how you can isolate portions of a project while at the same time generalize the program Since we want the program to run on all three display adapters with as little customization as possible we want to keep the hardware specific code isolated continued next page 44 MICRO CORNUCOPIA 38 Nov Dec 1987 2 Figure 2 Pseudo Code For Scanner Program A Initialization 1 Clear data areas a Global variables 1 gt Image pixel array 2 gt Scan line temporaries 3 gt Option flags 2 Image border a Query white or black b Set border pixels 3 Calibrate sensor separate program 4 Initialize printer a Query printer ready b Reset string to printer c one line of null graphic data 5 Take over clock interrupt B Capture Display 1 Scan line of image a Output line of null graphic data b CR to begin printhead movement c Delay empirically determined
101. ages the system uses the row pointer index to indicate the rows that are populated The element index is started from zero the relative column index in the block In order to remain machine inde pendent the primitive TSIZE is imported from SYSTEM to determine the storage size for our data types If the size of the stored types changes the system will automatically increase or decrease memory allocation Wrap Up Now that we ve described a method for dynamic allocation we need to read the screen characters and their attributes and write them back to the screen Hello BIOS software interrupt 10H and Goodbye Mary Lou We can use the commands CODE SETREG and GETREG in KModule SYSTEM to in clude machine instructions and the com mand SWI to generate software inter rupts See the implementation of both CutBlock and PasteBlock See Figure 3 The resulting module SwapBlocks copies two areas of the screen and moves them to new positions See Figure 4 The Ultimate Lap Iop Lo tr aPS ON 8 99 rog Thy fii AG rtr porte ias Jike S Su arranjos py emen DORT te 4 u Wha PC op Emu an Bl arted ting P l Hi mn Bi H Hin HE 1 7 at s The McTek286B Lap Top com bines the fastest most reliable i AT motherboard available re with the most visible full size LCD lap top screen on the market Running at a switchable 8 or 4 10 MEZ it includes color monitor or a digital or co
102. ags and CARRY 0 THEN Exec 0 ELSE Exec RetAX END OF MODIFIED AREA end Exec MICRO CORNUCOPIA 38 Nov Dec 1987 65 Anthony Barcellos P O Box 2249 Davis CA 95617 2249 916 756 4866 The feature this issue is Eric Isaacson s shareware assembler It s fast powerful and should be real com petition for Microsoft ou have to admire these fellows Im agine having the nerve to take on for example a giant corporation like Microsoft ever heard of it Imagine doing it alone Call your lawyer first and name your next of kin A86 Eric Isaacson is the fearless shareware author who is playing David to Microsoft s Goliath His A86 macro assembler is now up to version 3 02 and has all the speed of a slingshot A86 is blazingly fast says Isaacson Don t believe the advertisements of that other big company This is the fastest MS DOS macro as sembler bar none Isaacson claims that on an 8 MHz AT with a RAM disk a large program will assemble at better than a thousand lines per second What can you do with A86 Naturally you can assemble COM files for stand alone execu tion And it s not surprising that you can generate OBJ files to use with a linker But you can also produce code that is suitable for burn ing into ROM That s what ROMable code is With several laptop computers now running software in ROM this A86 feature should be at tractive to professional programmers in
103. amount d Activate capture on clock interrupt e Capture n data points f De activate capture on clock interrupt g Fractional lt LF gt 2 If enough data preliminary processing a Straight monochrome two color mode 1 gt Dithering of captured pixels based on analog value a gt 0 pixel quad all 0 b gt 1 weight corners based on adjoining 3 pixels a if gt 1 weight 3 random placement b if none gt 3 AND gt 1 2 random placement c if none gt 2 random among 1 s d if all 0 random placement c gt 2 weight pixel pairs based on 6 adjoining pixels ds 3 weight corners based on adjoining 3 pixels logic as for 1 with reverse weights e 4 pixel quad all 1 b Gray scale mode 1 No processing pixel value input value 3 Display processed pixels C Store to Disk 1 Query filename 2 Save image to file 3 Query exit repeat SPECIAL X 4 COLOR PLOTTER 11 x17 Max Apple Ili or IBM Brand new with manuals pens paper driver RS232C ONLY 225 KAYPRO EQUIPMENT 9 Green Monitor Keyboard 0 cee ees Hard Disk Cable Set 4 PRO 8 Mod to your board Host Interface Board KAYPRO ICS 81 189 Video Pal 81 194 RAM Pal 81 Series Character Gen ROMs 81 Series Monitor ROMs Z80A CPU Lise Se sev ess 1 50 ZB CT curre Saige Shen ahd 1 50 ZBDICPIU s cori Sorte eo onde
104. and s Turbo Lightning for an astounding 149 95 No you didn t read it wrong During this amazing Introductory Offer you get both keyboard and software for less than most software programs xi by themselves Now if you re still feeling ignored you can always do what you know who wants you to do and buy anew computer to get their keyboard _ credit card orders call in CA call 800 592 9602 Price does not include adaptor cables required by certain compat ibles A Limited offer price subject to change without notification board that bas tactile re Up to now DataDesk International may be one of the best kept secrets but here s what s being said about our first end user Keyboard Borland software bundle Who Can Pass Up a Deal Department Talk about an It s a good keyboard Good feel tbe keys bave tactile aggressive product feedback No musb at all Jobn C Dvorak Tbis is about as good a key InfoWorld Mar 86 board deal as you re likely to find Ibaveabsolutely no It solves all of tbe problems besitatian din recommend exbibited by tbeir regular PC XT keyboard it s a ing tbe Model PC8700 great bargain Jerry Pournelle PC Productivity Digest Byte Magazine Sept 86 May 86 This keyboard is neat to type on and feels solid It bas tactile feedback keys 1 can type mucb faster on it Test Drive Scorecard DataDesk 10 Key Tronics 9
105. ard Money Marketing amp Management For Small Businesses e L Nelson Spohnheimer LAN Im plementation amp Application Laine Stump Trials amp Tribulations In Turkey Akbar Tahayeri Computing For The Handicapped e Mike Vore Packet Radio Today Greg Wolfson StarLan Ethernet amp Cheapernet Editor s note Those talks marked with asterisks are available on tape for 6 each post paid from Micro Cornucopia Specify speaker s name on a Micro C order form or call 1 800 888 8087 And thanks to the 300 of you who attended See you next ye r and in the back pages of Micro Cornucopia BE ASSEMBLE YOUR OWN VIDEO CARDS Color Graphics Color Graphics Parallel EGA Graphics Mono Graphics Mono Graphics Parallel ATI Graphics Solution Mono Herc Color Emulation on Mono CGA List 299 150 00 ATI Wonder Mono Herc CGA List 499 299 00 Any monitor Any software Auto conversion EXPANSION CARDS Clock Card Floppy Disk Controller 2 drives Game Port Multi Function ser par clk game Parallel printer Serial Port RS232 1 port l optional 640K RAM 0K installed XT AT RS232 4 port 2 installed CASES amp POWER SUPPLIES 150 Watt Power Supply 35 00 59 00 200 Watt Power Supply AT XT Slide Case XT AT with Lock amp LED AT with Lock amp LED MONITORS EGA CGA Auto Switch 495 00 CGA Color Samsung Amber 12 TTL
106. are which The Code The Turbo C program see Figures 6A 6D beginning next page is a ter minate and stay ready TSR interrupt handler which installs itself as interrupt 15 which is where IRQ7 goes I was very disappointed when I tried installing the handler for interrupt 7 and nothing happened It enables the printer board to pass pin 10 through to IRQ7 and reconfigures the 8259A to accept the hardware interrupt This I believe is ex actly the way background print routines work the routine is reawakened when the printer is finished with what it is doing and lowers the ACK line What makes building an interrupt handler simple is Turbo C s interrupt compiler directive and the keep func tion When you declare a function as in terrupt the compiler creates code which saves the stack at the beginning and restores it at the end and uses the return from interrupt assembly in struction to leave instead of the usual return from subroutine Because of this you don t need to write any assemb ly language to create an interrupt hand ler Personally my eyes glaze over when ever I see long or short even assembly listings in magazines it s just too much work to extract information and I m too mistake prone to type the thing in and test it I love anything which like Turbo C allows you to do more with less effort Tools like this let us be artists instead of just technicians TSR C is the definition
107. ark ages No longer will quality type be held hostage by a few large corporations How Laser Printers Work Laser printers and laser typesetters scan dots across a piece of paper a line at a time Laser printers 300 600 dpi deposit bits of carbon onto standard typewriter paper Laser typesetters 600 2500 dpi deposit bits of light onto photographic paper In each case the characters on the paper are made up of dots just like the characters on your screen Your hi resolution monochrome screen has a resolution of about 100 dots per inch so each one inch by one inch square on the screen contains 10 000 dots called pixels Your common house variety laser printer has a resolution of 300 dots per inch That means that each square inch that it prints contains 90 000 dots Now let s see The screen has 30 to 40 one inch square blocks the laser printer has nearly 100 If the screen s controller or the laser printer s processor has to cal culate whether each pixel is supposed to be on or off things can get pretty slow For years video designers have used a shortcut Your video card has a charac ter ROM The controller says it wants an A and that it s scanning the fifth row of a line of characters The character A is a 41 hex So 41 hex is combined with 20 MICRO CORNUCOPIA 38 Nov Dec 1987 the scan row 5 in this case and sent to the ROM as an address 415 hex The 8 bit value at 415
108. ate concurrently with the transputer s CPU using Direct Memory Access to get data to and from memory Thus communication over head is very small even when all four links are running at the same time The links currently operate at a maxi mum speed of 20 MBits sec yielding an effective unidirectional data rate of 800 kilobytes sec for the T212 and T414 and 1 8 megabytes sec for the T800 The links utilize a handshake in which each byte sent must be acknow ledged before the next byte is sent The T800 has an improved handshake mechanism thus its faster transfer rate Links are assigned locations in the transputer s internal memory Each input and output channel has its own memory address A program communicates across a link by issuing an input or output in struction These instructions include the memory start address of the data and the length of the data block The input or output instruction in vokes the link engine Once it s started _ the CPU is free to do something else The link engines don t do any buffer ing so communication only takes place when a sending process and a receiving process are ready to communicate i e one side has issued an output instruction and the other side has issued an input in struction The transputer features an on chip timer that can be set or read from a program It also allows a process to be descheduled up to a certain time The timer is also used
109. ations like expert systems natural language interfaces customized knowledge bases and smart information management systems Turbo Prolog is a 5th generation language that almost instantly puts you and your programs into a fascinating new dimension Whatever level you work at you ll find Turbo Prolog both challenging and exhilarating Turbo Prolog is to Prolog what Turbo Pascal is to Pascal Borland s Turbo Pascal and Turbo C are already famous and our Turbo Prolog is now just as famous Turbo Pascal is so fast and power ful that it s become a worldwide standard in universities research centers schools and with pro grammers and hobbyists Turbo Prolog the natural language of Arti ficial Intelligence is having the same dramatic impact Alt Borland products are trademarks or registered trademarks of Bor land International Inc or Borland Analytica Inc Other brand and pro duct names and trademarks or registered trademarks of their respec tive holders Copyright 1987 Borland International r BI J120 Borland s new Turbo Prolog Toolbox adds 80 powerful tools Turbo Prolog Toolbox includes 80 new tools and 8000 lines of source code that can easily be incorporated into your own pro grams We ve included 40 sample programs that show you how to put these Artificial Intelligence tools to work Already one of the most powerful computer programming languages ever conceived Turbo Prolog is now even more
110. ations of a concrete slab Three years ago a local printer pur chased one of these impressive machines He got the model with all the latest high technology Two weeks after it arrived it died He called to see if I d take a look before he F years the standard typesetting called in the 150 per hour technician from Portland When I popped the lid I found a 6800 not a 68000 talking to real TTL ICs not low power Shotky a bus cage that would embarrass an S 100 owner and a power supply straight out of Welders Week Magazine After I d found the problem he men tioned that the monster didn t have an RS 232 port Together we called around the country to find one I ve forgotten what he finally paid for that single used RS 232 port I think it was 500 Less than half price For years the small typesetting houses have grumbled about the high costs of equipment and maintenance But the prices protected them too Now as their customers purchase computers and laser _ printers their business is declining Oh a few are busy with their Linotronic typesetters and PostScript RIPs but it s temporary and expensive I ve heard 80 000 for the typesetter and 10 000 a year for service When 600 dpi and 1000 dpi lasers show up on desktops more and more customers will disappear Forever This transition from centralized low tech typesetting to laser printers is mark ing the end of the d
111. ay memory since the locations may be hardware dependent We have a DEFINITION MODULE of procedures so we can start building the low level tools we need to implement this set of procedures The first of these tools is a data struc ture for storing a screen block This structure must know where the block came from its size where its characters lie and their attributes In The Low Levels The most primitive unit in this data structure is the character and its attribute a pair of bytes i The Modula 2 module called SYSTEM has a data type BYTE with which we ll set up a two byte character and at tribute data structure TYPE CA ARRAY 0 1 OF BYTE continued next page Figure 3 ScreenBlocks Implementation Module IMPLEMENTATION MODULE ScreenBlocks This module is system specific This version is written for the IBM PC and clones using MS DOS FROM Storage IMPORT ALLOCATE DEALLOCATE Available FROM Strings IMPORT Assign CompareStr FROM SYSTEM IMPORT AX BX CX DX SETREG GETREG CODE SWI TSIZE BYTE WORD CONST rows 25 cols 80 NumBlocks 10 PUSHBP 0055H POPBP OOSDH INT10 0010H READCH 0800H WRITECH 0900H GETMODE OFOOH CURSOR 0200H ROWINC 0100H NAMELENGTH 24 TYPE CA ARRAY 0 1 OF BYTE Contains char value and attribute CA 0 is the character and CA 1 is the attribute R ARRAY 0 cols 1 OF CA Each line of the 80 col display RowPointer POINTER
112. bad However when I asked DISKTEST to do a track by track search for errors it would find none Also CRC cyclic redundancy check would read every byte of these files and generate the cor rect CRC without complaining Wow So I reformatted the MiniScribe this time as three logical drives Drive C was still the normal MS DOS boot I made Create huge hi res plots with log or linear scaling Screen and printer output Automatic legends and labels Flexi ble ASCII input Works with CGA EGA Hercules and Create custom hi res graphs from within your own pro grams by linking to our object code Supports all SCI GRAF features plus plotter output and more Microsoft C Turbo C and Aztec C versions No royalties Create custom Greek math or other symbols for use with SCI GRAF or SCI GRAF MODULES Requires IBM compatibility and CGA or EGA Perform least squares fits linear parabolic and exponen tial and normal curve approximations Convert between polar and rectangular coordinates Also supports a variety of scaling transformations Great complement to Pop up scientific expression evaluator more powerful than other pop up calculators Complete expression edit ing facility Full range of functions scientific statistical logic Requires IBM compatibility Microcomputer Consultants CONVERTER SOFTWARE ONE TIME 299 ALL SALES SUBJECT TO THE TERMS OF OUR 90 DAY LIMITED WARRANTY FREE COPY
113. ble computer Echelon offers top quality software at extremely low prices customers are overwhelmed at the amount of software they recieve when buying our products For example the Z Com product comes with approximately 92 utility programs and our TERM IIl communications package runs to a full megabyte of files This is real value for your software dollar ZCPR 3 3 Echelon is famous for our operating systems products ZCPR3 our CP M enhancement was written by a software professional who wanted to add features normally found in minicomputer and mainframe operating systems to his home computer He succeeded wonderfully and ZCPR3 has become the environment of choice for power CP M compatible users Add the fine tuning and enhancements of the now available ZCPR 3 3 to the original ZCPR 3 0 and the result is truly flexible modern software technology surpassing any disk operating system on the market today Get our catalog for more information there s four pages of discussion regarding ZCPR3 explaining the benefits available to you by using it Z System Z System is Echelon s complete disk operating system which includes ZCPR3 and ZRDOS It is a complete 100 compatible replacement for CP M 2 2 ZRDOS adds even more utility programs and has the nice feature of no need to warm boot C after changing a disk Hard disk users can take advantage of ZRDOS archive status file handling to make incremental backup fast and easy
114. ble must be allocated at compile time and there s no recursion Although some folks claim that any problem can be solved without dynamic allocation of variables or recursion it s often much easier to use recursion Also it has a smaller set of statements and operators than other more popular languages C on the other hand is well known and well suited for systems program ming Plus there are vast C libraries Unlike Occam C supports recursion and dynamic allocation of variables C has a powerful expression syntax and range of statements For our purposes the only thing C lacks is a special set of statements and operators for the transputer Te transputer has made it possible To obtain both the advantages of C and the advantages of the transputer the C language had to be extended And these extensions had to fit into the C en vironment This article describes these extensions The Channel Datatype The channel datatype is new provid ing synchronized communication be tween processes programmer uses channel variables to transmit data be tween processes The processes may be running on the same transputer or on separate transputers From the programmer s point of view communication is the same regardless of whether or not the two communicating processes are on the same chip The transputer s specialized hardware hand les both types of message sending with equal facility Using the keyword channel one
115. both FTL Modula and Logitech s Modula 2 86 Both SHOULD handle the project we ll see how well as we get deeper into the code The procedures GrabClock FastClock and SlowClock need a bit more explana tion The printer I m using is rated at 160 CPS but in reality prints at 120 130 CPS For an 80 character line this means we have only 615 670 m6 to capture a line of up to 720 pixels less than 1 mS per pixel Modula 2 is fast but lets be reasonable GrabClock will take over the real time clock interrupt and re program the timer chip for a faster rate When pixel capture is activated by FastClock we ll get a pixel at each clock tick and store it for later processing during the print head s return trip At the ap propriate multiple of this faster clock tick we ll long call the normal real time clock routine SlowClock will disable the pixel capture portion of the fast routine to let us get the other processing done You might want to think about how you would continue the development of the project and compare it with what I ll have finished by next time Editor s note the code found in this ar ticle is also available on the Micro C RBBS 503 382 7643 and with the rest of the code in this issue on the issue 38 disk To order the disk send 6 if you re a U S sub scriber or 8 non subscriber or foreign to Micro Cornucopia PO Box 223 Bend OR 97709 Specify MS DOS or Kaypro 5 1 4 format Also Digi Key st
116. but the humor We d like to do more such critical pieces but we need your help If you know something s good or bad tell us Or if you want to know if something s good or bad ask us We may not know but it ll tell us what you re interested in It s easiest for us if you ll write a letter to the editor or leave a message on the Micro C RBBS But calls are fine too Be sure continued next page Genus Begins Wi With Nen dea ROW Dake M Aztec C86 4 1 as New PC MS DOS CP M 86 ROM Superior performance a powerful new array of features and utilities and pricing that is unmatched make the new Aztec C86 the first choice of serious software developers Aztec C86 p 5199 optimized C with near far huge small and large memory Inline assembler Inline 8087 80287 ANSI support Fast Float 32 bit optimization options e Manx Aztec 8086 80x86 macro assembler Aztec overlay linker tanna model source level debugger object librarian 3 x file sharing amp locking comprehensive libraries of UNIX DOS Screen Graphics and special run time routines Aztec C86 d 10900580090006 6299 includes all of Aztec C86 p Unix utilities make diff grep vi editor 64 memory i models Profiler Aztec C86 c e includes all of Aztec C86 d Source for library routines ROM Support CP M 86 support One year of updates Third Party Software A large array of support soft
117. by the shareware con cept spawned programs that earned such insulting nicknames as crippleware demoware and beggarware The first two monikers refer to programs that have been deliberately in capacitated In extreme cases the result was no more than a canned demo The sales pitch could be phrased as Take my word for it I m really wonderful Send money and I l prove it But not before Other shareware contenders distin guished themselves by incessant pitches for payment These could take the form of anything from flashing screen mes sages to a word from our sponsor that freezes all activity until the sales pitch is burned into your retinas Clearly user supported is not neces sarily the same as user friendly Shareware Standards ASP hopes to establish guidelines for shareware authors that will professional ize the field improve user satisfaction and increase voluntary registration As a software librarian I have a few sugges tions for shareware authors 1 Always include a list and descrip tion of the files that belong to your program Don t forget that shareware programs can get jumbled together A file list makes it easier for users to preserve the integrity of a shareware package when making copies for friends 2 Distribute a fully functioning ver sion of the program It s all right to offer additional utilities or special features to those who register but shareware should permit users to
118. c Brand New i 295 00 35 00 B COMPLETE ELECTRONIC SUPPLY STORE 3 1 2 FLOPPY DRIVE Toshiba FDD4408K13 720 or 360K Bytes In cludes 5 1 2 Brackets XT Black AT Biege Front Panels deal for usage with DOS 3 2 or our XT High Density Controller 139 95 HALTED SPECIALTIES offers its customers Unique SUPERMARKET STYLE shopping for ANY and ALL ELECTRONIC NEEDS We Stock literally THOUSANDS of parts from the newest IC s to some of the first transistors ALSO for the electronic enthusiast we carry a full line of computer accessories test equipment tools R D supplies and much more PLEASE CALL OR VISIT ONE OF OUR THREE RETAIL STORES TODAY CORVUS CONCEPT WORKSTATION 68000 Based System 512K Memory Connects to Omninet 132 Column Monochrome Monitor Operates in either Vertical or Horizontal Format Used Working Condition Am em NEW TI 787 Terminal e 120 CPS Thermal Printer 110 to 9600 BAUD MODEM Bell 212 103 Racal 3400 Compatible Acoustic Direct Connect RS 232 Interface Includes Manu als Cables amp Paper 249 00 ANDERSON JACOBSEN Stand Alone MODEM 1200 Baud Racal 3400 Compatible Acoustic direct Con nect Originate Only INCLUDES MANUAL CABLES ates 29 95 3 CONVENIENT LOCATIONS i CA Wi HSC Electronic Supply of Santa Ros
119. catch errors if you call the functions improperly to make properly you also need to mention windows c in your project file X EN extern void define window int window number int left x int top y int right x int bottom y unsigned char attribute extern void putc at location char ch int x int y nsigned char attribute extern void clear window int window number window puts int window number char string unsigned char attribute extern void save screen extern void restore screen extern void make box int window number extern void draw window int window number extern void title window int window number char title unsigned char attribute extern void window gotoXY int window number int X int Y End of Figure 6 MICRO CORNUCOPIA 438 Nov Dec 1987 41 m E PASCAL By John Paul Jones 6245 Columbia Ave St Louis MO 63139 NM I m as excited about this project as you are A 6 scanner is just the ticket for those of us with desktop or other graphic packages Herein John covers scan ner construction and calibration as well as some details about XT graphics displays his time I ll spend the entire column on my 6 scanner You ll need to have the schematic in issue 37 handy so you can check component values and identifiers Construction I ve constructed my scanner on two small pieces of perf board using point to point wiring One board the one mounted on the print h
120. cations you must have one inputting process and one outputting process and both have to communicate an equal number of bytes If these conditions are not met the be havior is undefined The Link Interfaces The transputer has four high speed UNICOM Irisstraat 10 Oldambt 69 7641 VT Wierden Holland bidirectional serial links each link has an input and an output channel It s inter esting to note how the link interfaces are integrated into the transputer instruction set A link behaves like any other chan nel with only a few differences A link communicates between processes on different transputers The links are DMA based and thus consume no processor time The links are placed at fixed ad dresses It s not difficult to access the links from within a C program using pointers On conventional machines we common ly access a memory mapped I O register by creating a pointer to the type of that register and initializing this pointer with the address of that I O register The same technique can be used to access the links on the transputer channel Link0 Out LINKOOUT This declaration defines a pointer to the channel Link0 Out and initializes this link with the value LINKOOUT This value stands for the address of this link 0x80000000 on a T414 transputer To send information across this link the fol lowing expression suffices Link0 Out value This expression sends the value value over
121. cations GMBH 43 1 45 45 01 0 e Brazil Computadores Compuleader 41 262 4866 e Canada Tri M 604 438 0028 e Denmark Danbit 03 66 20 20 e Italy Microcom 6 811 9406 e Finland Symmetric OY 358 0 585 322 France Egal Plus 1 4502 1800 e Germany West IST Elektronik Vertribes GmbH 089 611 6151 e Israel Alpha Terminals Ltd 03 49 16 95 e Spaln Hardware amp Software 204 2099 e Sweden AB Akta 08 54 20 20 e Switzerland Thau Computer AG 41 1 740 41 05 UK Ambar Systems Ltd 0296 435511 e USA Contact Ampro Computers Inc COMPUTERS INCORPORATED 67 East Evelyn Avenue Post Office Box 390427 Mountain View CA 94039 41 5 962 0230 eTLX 4940302 By Dave Coahran SE 605D Mckenzie Pullman WA 99163 509 332 2789 Pushed Into Business This column is a happy accident I happened to be talking to Dave at SOG VI about another subject when his controller project came up The more he talked about the way things had fallen into place for his new product the more it was obvious that he had a story you should all hear didn t wind up on my own voluntarily I was pushed My friend Dave Demaray s lab instrument manufacturing business had out grown its moonlighting electronic designer and assembler me and needed a full time per son After 25 years as staff and faculty at Washington State University I was ready for a change I went to work for Demaray full time but within six months Murphy Gramm Rud man a
122. ccurs when cer tain instructions are executed and the programmer or compiler must take care that the register stack doesn t contain in formation that shouldn t be lost This places an additional burden on the programmer or compiler writer but the transputer stores much less process information during a low priority to low priority switch If descheduling occurs due to times licing the workspace pointer is put ina list of active but not running processes If descheduling occurs be cause a process becomes inactive the workspace pointer is saved in a memory location associated with the event for which the process has to wait As soon as the event has occurred the process be comes active and is put in the linked list of active processes waiting to be ex ecuted All this is done automatically in microcode The linked lists are managed with two registers that contain pointers to the first and last processes in the list The workspace of every descheduled process also contains a pointer to the next process in the list Internal Channels When a transputer is running several processes these processes will typically want to communicate For this reason the transputer offers internal channels Internal channels are used in exactly the same way as links The only difference is that any memory location will work in place of the reserved locations used for the links When an output instruction is per formed on a specific chan
123. center of the sensor should be at the same level as the center pin of the print head If necessary use washers to raise the board While the sensor is mounted manually move the carriage back and forth Be absolutely sure that the board and cable will not touch snag rub or otherwise fondle any part of the printer You can DESTROY your printer with a mechanical jam For neatness mount the second board in a small project box but leave the lid off for now Try to use less than six feet of cable between this board and the joystick input connector Preliminary Calibration Adjust R1 to maximum minimum LED cur rent Set up a calibration target with both black and white areas Black permanent marker on white paper is okay for this Power up the cir cuit and with a voltmeter check the voltage at pin 1 of the LM324 when the sensor is aimed at each area For mine I got 0 38 V for black and 1 3 V for white Uh oh too much gain on the op amp The minimum gain can be reduced by reducing R4 if R4 0 there is no gain Don t replace R4 use a parallel R to reduce its value We may need the gain later on if we have to reduce the aperture of the sensor Adjust R7 so that the voltage at LM339 pin 5 is a little below the white voltage at LM324 pin 7 Now with the program in Figure 1 you should be able to manually scan between light and dark areas and see the values change be 68000 Single Board Computer 8249 95 O 8 Mhz 6
124. cked TRUE END IF checked THEN CODE PUSHBP Save the Base Pointer First find the currently displayed page and mode SETREG AX GETMODE SWI INT1O GETREG AX MODE GETREG BX PAGE Now clear out the low byte in page TEMP BITSET PAGE MASK PAGE WORD TEMP Now write each location FOR I FirstRow TO LastRow DO We can minimize storage consump tion by using the BlockPointer type and the ALLOCATE command to reserve memory on the heap instead of the NEW command NEW A reserves memory for the pointer A according to the type it points to A RowPointer has 160 bytes reserved ALLOCATE lets us decide how much memory to reserve for a variable regard less of type So ALLOCATE A N reser ves or allocates N bytes and returns the address of this allocated memory in the ADDRESS variable A The ADDRESS type is defined as a pointer to WORD and is assignment compatible with other pointers So we can use it to dynamically allocate part of the declared memory for a variable If we declare VAR A B C RowPointer ALLOCATE A 10 hope it s clear that ALLOCATE saves a lot of memory while retaining the ease of array indexing only 10 bytes are reserved for the R type pointed to by A ALLOCATE B 10 then allocates the next ten free bytes for the R type pointed to by B and ALLOCATE C 10 reserves the next ten bytes for C I hope its clear that ALLOCATE saves
125. compatible controller locking case AT style keyboard 1 2MB drive 20MB XT Turbo Superturbo Seagate Assembled amp fully tested with a full one year warranty 477 8MHz 4 77 10MHz Get in on the most advanced AT compatible on the market at the lowest price ever offered 1459 comp lete comp lete McTek Systems Inc e 2316 47H Street e Berkeley CA 94710 41 535 843 0714 ifo ob DISK DRIVES PRINTERS MONITORS PC XT PC AT FCC approved slide case eight slots Hercules compatible graphics card amber monitor w base fully assembled and tested one year parts and labor warranty Fujitsu 360k Citizen CD120 179 Samsung amber 640k TurboMothrbrd McTek286 6 10 1 wait 334 Kingtech Portable Computer Fujitsu 1 2MB 109 Citizen MSP10 265 TVM EGA color 399 10MHz TurboMothrbrd 99 Baby McTek 286B AT Kits XT AT power supply Teac 360k 85 Citizen MSP20 359 TVM RGB color 295 Multi I O w disk contrir 62 8 10 O wait 369 case keyboard monitor Teac 1 2MB 119 Citizen CTZ 224 OH 699 NEC Multisync 559 640K RAM card 39 McTek 286A wait 3MB J 380 410 Toshiba 31 2 720k 135 Toshiba 321XL 559 Sony Multiscan 650 2MB Expansion card 115 4 ports on board 459 Eprom burner 4 socket 139 Floppy controller 25 Call for prices of other brands HGC compat mono card 55 RS232 2 port card 35 3MB Multifunction card 145 Multicent
126. d crannies of each issue They don t have to be computer related puzzles and they don t have to be com pletely original As long they re fun and we can get permision to print them heck we ll even pay And that s all from greater Bend David Thompson Editor amp Uh The thoughtful pa from SemiDisk Designed around the 64180 microprocessor the DT 42 is loaded with more of all the features you need More speed more memory more ports and more TPA How did we fit all these features on one 5 75 by 8 single board computer 9 216MHz 64180 Microprocessor runs Z80 programs 512K DRAM Zero wait states fully populated Three RS232C serial ports Standard baud rates to 38 400 One Centronics parallel printer port WD2793 disk controller up to 8 drives SD DD or High Density 3 2 51 and 8 drives SASI channel for hard disk controller software provided Many popular disk formats supported Requires only 5V 2 1 amp e ZRDOS ZCPR3 with exclusive Hyperspace operating system offering 57 5K TPA NOT 48K like some others No 8 bit is bigger Richard Conn s ZCPR3 The Manual included free Provisions for real time clock and on board terminal options Socket for 28 pin EPROM Compare You won t settle for less Or slower Or smaller DT 42 Computer 499 TMP on board terminal 100 SmartWatch 50 Z system software 50 ZAS amp Debuggers 25 8MB disk emulator w
127. d ver sion of the Crowe Z80 assembler at a modest price This is the same one he in cludes with his Turbo Pascal disassembly program For rock bottom cost though you can t beat Micro Cornucopia s offer continued next page Figure 2 Undocumented Z80 Codes fp RAKKKKAKREKEKKERKEKKKKKEKEKEKKKRKKKKKEKKEKKKKK 7 T3 ASM TEST OF UNDOC Z80 CODES SPEED AHI IKI ke he ke He ke IRI IRE IIR EAI ARIA IKE ele eie ORG 100H LD LD CALL JP WAIT FOR KEYPRESS CALL DB SET UP OUTER LOOP LD H OFFH DB OFDH SET UP MIDDLE LOOP LD H OF FH DB OFDH SET UP INNER LOOP LD L OFFH DB OFDH L JP NZ INLP DB OFDH H JP NZ MIDLP DB ODDH H JP NZ OUTLP CALL SHOWX RET LD E 7 CALL CONOUT LD E X CONOUT LD C 6 CALL 5 RET pkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkk END OF T3 ASM FO He dede de de deke He He Fe de H de de He He de He de Ae de He He He e de de Fe de de He dehe de Ke keke ke K MICRO CORNUCOPIA 38 Nov Dec 1987 71 iip Vou ou QN Er PLD PROGRAMMING SYSTEM 995 e LOWEST COST SUPPORTS MMI NATIONAL T COMPLETE PLD DEVELOPMENT SYSTEM BUILT IN COMPILER CALL 1 800 852 2022 _ m Tre SIRNA VET lc CORPORATION E North ques 67 Suite E Mesquite Texas 751500 214 270 41 35 continued from page 71 ing I d get the later disk K25 as it not only has the source of Jim Owen s fine modification of the Crowe Z80 as sembler but a Z80 Macroassembler a
128. damage Handy MS22 Dynamite Utilities We ve included some genuine gems on this disk V20 80 CP M emulator software which enables IBM PC compatibles i e personal clones equipped with the NEC V20 CPU See Micro C Issue No 29 for details to run 8080 coded CP M programs LIST A dynamite TYPE lookalike the best we ve used with line up line down page up and page down in 16 variable colors SPEEDUP speeds up and quiets your drive by changing the step rate from 8 milliseconds to 4 milliseconds TURBO HELP A memory resident help facility to help you learn and use TURBO Pascal It s ready at a keystroke in an attractive window INLINER Translates your assembler mnemonics into TURBO Pascal inline code Written in Turbo Pascal includes source LASTCOM TURBO Resident program to save your last 10 MS DOS commands Includes source The SECRET Group MD CD and RD lets you make remove and find secret files MS25 Ultra Utilities The three Ultra Utilities programs will allow you to map disks unerase files format non standard disk interrogate sectors and much much more This is a very useful set of utilities a poor man s NORTON Many hours of work and frustration can be avoided by learning them so have at it MS27 System Primer We think this disk will satisfy at least some of your curiosity about MS DOS systems programming We ve included lots of assembler sourcecode sodigin SCAV finds and marks
129. delightful languages but the genuinely open community of people who understand that by giving freely to one another we are all made richer I at least know of no other human associa tion whose architecture is half so open Micro Cornucopia and its readers embody that ideal Again thanks Editor s note Thanks for the memories Ron Yes the editing wasn t always as precise and careful as we would have liked but it s been great having you We ll all miss your carefully written prose and well done code After we received your note Ron we got our heads together trying to come up with another C er who could fill your shoes We couldn t We re open to C article ideas call write or leave a message on the Micro C RBBS 503 382 7643 After all C is really hitting the big time H Figure 2 Getting Rid of Resident neo LARGE MODEL USED SO POINTERS ARE 32 BITS This compiles to 5 6K which supports Borland s claim to relatively tight code Incidentally I can do the same in 2 3K in DeSmet C and about 1K in assembler Neither coding is half so simple however This sort of direct manipulation of MSDOS allocation headers is an example of ill behaved programming at its most incorrigible But don t long C pointers make crime EASY include dos h include lt stdio h gt T MEE i ip i define RSHIFT 1 corresponding bits on shift state byte 00 417H define LSHIFT 2 E define ALT 8 gaudyti define TES
130. doubt Evil mail carriers Yes I confess I am one of those who tosses the rest of the world aside while greedily reading each newly arrived issue from cover to cover in one sitting Then having gorged and reveled in ex quisite ecstasy I wait impatiently for the rising of the second moon Oh good people hear the plea of this your humble reader PLEASE send my issue with no further delay I ll do almost anything I ll learn Forth I ll enjoy Pascal I ll even give up C for 20 minutes shudder David W Stojan 10310 Lybert Rd Houston TX 77041 Editor s note Yes we were a bit behind with issue 37 but rest assured that by the time you receive this issue 38 you will probably have 37 as well We were having an awful lot of fun at SOG And all you can think about is the magazine Aren t you ashamed Unconceived Program Destroyed Elle M Enno s program sounded so good that some deviant created a Trojan Horse with the same name and number of bytes The Fido Net people felt that the only way to protect large numbers of people from losing their FATs was to kill it on every BBS I believe they were suc cessful and all real and phony copies have been destroyed Grant Raddon 2806 NE 11th Portland OR 97212 continued on page 92 Magic is easy with Turbo C TOOLS in your bag of tricks New Turbo C TOOLS from Blaise Computing is a library of compiled C functions that allows you full control over t
131. e day three speakers called to cancel including Andy Bakkers who had just checked into the local hospital suffering from ex haustion an American virus and who knows what else His Dutch friends told him not to drink the water Two of the dropouts kept their words but Andy showed up on Friday to speak about the transputer though he bowed out after a shaky 40 minutes On Saturday he was back again his fever broken and some of his color back His wife and son had come with him from Holland and I understand he s thinking about moving the whole family to Bend Hooray He hasn t missed a single SOG All Nighters Anyway it was great fun We kept the dorm s rec room alive and well until the wee actually all hours Someone would shout out a topic and a cluster would form It was dynamically allocated parallel processing at its best And when the chips were down spares were dispatched to the local market for re placements with dip Topics ranged from transputers to food SIGs Speaking of food On Thursday and Saturday evenings our feeding frenzies are prearranged Friday night has traditionally been fend for yourself This year on a lark over 50 of us de scended upon a new Chinese restaurant run by three genera tions of Chans Soon to become three generations of exhausted Chans In 20 minutes we d taken over half the place They had never had such a group much less such an unannounced group We were willing to eat any
132. e yours 18 much better Anonymous 0G VI The following are general purpose disassemblers Masterful Disassembler 2 80 45 00 7 UNREL relocatable files 8080 45 00 VISA MC check Shipping Handling 1 50 cardi Tax expires Total CP M and TURBO Pascal are trademarks of Digital Research amp Borland Int C C SOFTWARE 1907 ALVARADO AVE WALHUT CREEK CA 94596 415 939 8153 Lz IHNEN SEE BETSY CEE 2 SO A SE A Ay Figure 2 Statistics in C include lt stdio h gt void stat double list main double list 7000 double i for i 0 i lt 7000 i Create a list to process list iJ i 1 stat list Pass the list to stat function void stat double list int i c double x z dev square squares var sd double sqrt double sd x Squares 0 puts Start Start timing Read array elements for i 0 i lt 7000 itt x list i x z x i Mean sum of list count printf Sf n 2 f Calculate variance for i 0 i lt 7000 i dev z list i square dev dev squares squares square var squares i 1 printf f n var sd sqrt var Find sd printf f n sd 86 MICRO CORNUCOPIA 38 Nov Dec 1987 l l i l i i A a continued from page 85 points For those of you a little hazy about statistics the mean or central tendency is an impressivel
133. e April May Micro C 35 proved to be fertile ground for me Since you mention the board sold by Challenger Computer the villain in my story This board in 10 MHz dress shows many software incompatibilities It also proved to be useless with various hardware additions In my opinion it would be best to avoid doing business with Challenger Computer They may have solved their compatibility problems but their busi ness philosophy remains unchanged If your readers would like additional opinions on clones and compatibility they can write my company We are of fering free photocopies of a pamphlet we publish on this issue Please enclose a couple of stamps to help cover postage Robert L Sabaitis Lee Consulting 14040 Salem Redford MI 48239 Editor s note You could probably clean up many of the hardware incompatibilities by slowing down the system from 10 MHz to 8 MHz The software problem is a BIOS problem I don t have a cure for that Where s The Mag Alas sadness and despair prevail The bimonthly rendezvous with joy and true happiness has not occurred despite being 4 MICRO CORNUCOPIA 38 N ov Dec 1987 six whole days into the dreary month of expectation Not that anyone s existence should rest in its entirety on receipt of a single periodical Prose aside may I simply report that I have not received the August September issue as of yet and I miss it sorely Lost in the mails no
134. e I O port To make it an input we write a 1 to data bit 5 of BASE 2 which disables the outputs of the LS374 so they can read the outside world This modification is about as simple as changing the BASE address But you don t need to make this mod to get input lines The board comes with nine pins you can already read so you can connect the A D converter from is sues 34 and 35 These are shown in Figure 4 Five of the pins DB 25 pins 10 11 12 13 and 15 are read only pins while four of them 1 14 16 and 17 can be read from or written to The read and write addresses and data bits are shown in Figure 4 continued next page XT CLONE SYSTEMS One YEAR guarantee on system Turbo Mother Board 4 77 and 10 MHz 640 K Ram installed on board Serial Parallel Game Ports Clock Calendar 150 Watt Power Supply Monoch AT Style Keyboard Color Video Board CGA rome Opt Flip Top Case WITH 1 FLOPPY AND 20 MEG WITH 2 FLOPPY AND 20 MEG AT TURBO SYSTEM Assembled and Tested for 24 Hours ABOVE WITH 2 FLOPPY DISK DRIVES 699 00 950 00 1000 00 AT COMPATIBLE MOTHER BOARD WITH BIOS 6 MEG AND 10 MEG SWITCHABLE SPEED 512K RAM INSTALLED UP TO 1024 ON BOARD WA2 HARD DISK FLOPPY DISK CONTROLLER MONOCHROME GRAPHICS VIDEO WITH PRINTER 1 2 MEG OR 360 K FLOPPY 220 WATT POWER SUPPLY AT KEYBOARD AT CASE SET UP DISK ONE YEAR WARRANTEE ON SYSTEM EGA UPGRADE FOR ABOVE 512K UPGRADE 1024 INSTALLED
135. e and change file attributes e Send control codes to printer Switch default printer Password lock your system Set AT Real Time Clock 5 minute screen blanking function Input response macros Enhances These Functions Format disks faster than DOS Make and erase subdirectories Copy rename and erase files Copy files to printer or COM ports Display disk free space and other media information Check and set the time and date Benefits Saves Time No waiting to exit or reload programs Instant access to DOS functions whatever your current task Easily saves 10 or more minutes a day e Comprehensive Broad range of commands including many not supplied by DOS Satisfies the needs of both new and advanced users e Simplifies DOS No need to remember exact DOS commands Intuitive interface and point and shoot design saves keystrokes and prevents mistakes Group file tagging avoids the drudgery of repetitive commands Security Capability to hide un hide subdirectories password lock a computer and check forun wanted programs in RAM helps secure data and prevent e ized access Other Information Not copy protected e Uses only 51K of memory e Supports EGA amp Hercules e Runs memory resident or as a stand alone program e Uninstall command e PC XT AT 10095 Compatibles Order Today Only 49 95 WindowDOS Associates Box 300488 C Arlington Tx
136. e and more printers PostScript printers are the most ex pensive They need a PostScript inter preter a decent processor usually the 68000 and lots of memory about 1 5 meg minimum Also Adobe originator of PostScript gets a royalty out of every PostScript printer sold l ve heard that the PostScript license adds about 2 000 to the price of each unit Printer Engines A printer s engine is the combination of laser drum toner cartridge paper transport etc 1 Standard Cannon Engine This is the original engine and appears to be based on Cannon s inexpensive under 1 000 copier Print quality is quite good at the boundaries between black and white areas but blacks aren t very black and large areas of black are mottled The drum is part of the toner cartridge assembly so replacing the toner every 3 000 copies is relatively ex pensive 120 to 200 Users report that print quality is worst at the beginning and at the end of a cartridge s life so many people use new and old units for proofing and save their mid life cartridges for the final output Engine is rated for about 100 000 copies Hewlett Packard laser printers Apple laser printers and many others especial ly the least expensive use the Cannon engine 2 Ricoh Engine This engine is a newer offering but it s already available in a number of the latest fanciest printers Its drum is separate from the toner so toner replacement is cheaper
137. e e de De e Ae de de ke ke ke ke k k kk kk k k k kkk k Four Device Printer Data Switch Quality with economy These four port boxes can be used with either HS232 or IBM parallel DB25 printer cables IBM style Parallel Printer Cable 300 1200 Baud Internal Modem Half card Hayes compatible auto answer auto dial CT 6260 MULTI I O FLOPPY DISK CONTROLLER Half card parallel COM1 optional COM2 game port floppy disk controller real time clock with manual and cables TWO DRIVE FLOPPY DISK CONTROLLER Half card floppy controller with cable Double Density for the Xerox 820 1 by Emerald Microware and MICROCode Consulting Run up to four 51 2 48 or 96 TPI and 8 drives at once Get support for all standard printers mini monitor functions autoboot capability 19 built in disk formats and banked ROM BIOS for more TPA Software compatible with Kaypro and Xerox 820 Plus2 ROM Set and X120 Board A amp T Plus2 ROM Set and X120 Bare Board Plus2 ROM Set only X120 Bare Board only xxx CLOSE OUT SPECIAL 15 00 or two for 25 00 five for 50 00 EMERRLD MICROWARE 135 00 Cs od VISA P O Box 1726 Beaverton OR 97075 503 641 0347 Prices subject to change without notice Include 4 00 shipping and handling 7 00 for COD call for Blue Label charges VISA and Mastercard accepted 30 day money back guarantee on all products _ D KAYPRO E j i K Walter Rottenkolber Box 93
138. ead carrier should have only R1 R2 R3 and the sensor Before you start however remove the print head from the printer power OFF please and see what you ve got to work with Plan ahead the board should not come near any other part of the printer through the entire platen length After cutting the board to size drill for the print head mounting screws the sensor mounting hole and anything else Figure 1 Routine to Calibrate Scanner Program calibrate const game 201 Joystick Port var was is begin clrscr was repeat is port game shr 4 data in upper 4 bits if is lt gt was then been a change begin if yes show the new value was is write M was 3 end until keypressed end byte graceful exit 42 MICRO CORNUCOPIA 38 Nov Dec 1987 Image Scanner Part II Construction Tips needed I had to allow for a pair of locating pins on the head carrier Now you can figure where the parts go and begin construction _ Do NOT solder the sensor to the board con nect with wires and leave some slack to allow for later sensor to platen gap adjustment Be prepared for some gotchas On my assembly the head mounting screws have oversize heads and the sensor needed to be trimmed to allow for them A FLEXIBLE three wire cable goes from this board to the remaining circuit I used a piece of ribbon cable Test mount the sensor assembly on the head carrier For best results the
139. eed to earn you a new pair of glasses in 30 days or your money back For a year and a half my 1100 went everywhere with me from HK back to Turkey on a bus across Europe to the U S and back and all across Turkey north to south I had never made a more intelligent purchase Until now The problem with the Toshiba was that it had only one drive Fine for word processing Turbo Pascal and MASM but I wanted to do Modula while sitting on a bus too That meant I needed a new machine And while I was home this year I bought it A shiny new Zenith 181 Zenith 181 My latest love has two drives 640 K and a full height backlit LCD that even your grandmother would enjoy even if she s legally blind Not only that but it runs at 8 Mhz Tosh runs at 4 77 keeps time with a battery backed clock and has a connector on the back panel mysteriously labelled Ext Bus The bat teries are rated for a shorter operation time 4 5 hours compared to 8 but it s not healthy to sit in front of a screen for longer than that anyway The real clincher I paid 250 less for the Zenith than I did for the Toshiba That s progress I used to think that my Toshiba was the greatest little machine in the world Now I can t stand to even look at it That s progress To paraphrase Oliver Wendell Jones of Bloom County As a rule we hackers take obsolescence quite hard Diconix 150 I didn t just get a computer either I also bought myself a lit
140. elete Directories Automatically Even allows File Names up to 36 characters long Everything is built into ROM here QDOS Networking Windowing amp 32 Bit Turbo SuperBasic all in a totally concurrent non destructive environment Unlimited quantities amp lengths allowed with Variables Program Lines CONsoles amp Buffers Dynamic non destructive virtual RAM Disking amp Networking buffers too Even a System Variables Brain Page Screen Built in DCE amp DTE Serial Ports 68020 and Transputer parallel processing upgrades are now available too Language Environments Metacomco s C LISP BCPL 68000 Assembler APL Development Kits Prospero s Pro Pascal amp Pro Fortran 77 Digital Precision s Forth 83 QJUMP s 65C02 or 8048 Cross Assembly ROMs Everything generates native 68000 Binary Code ROM Firmware amp Software Package is now available which will even bring it up in CPM Imagine working with a 32 bit Turbo SuperBasic that out structures Turbo Pascal in an interpretor always present with QDOS all concurrently running in a built in UNIX like multitasking job controlled environment with access to 360 fully channeled windows devices amp files by EACH job 3 Major Compilers exist for the SuperBasic source alone TURBO SUPERCHARGE QLIBERATOR The compiled SuperBasic code or ANY other language will multitask and control with QDOS and SuperBasic The list of ALL the Superior Features would fill this entire publication i
141. ence and explained I had a very new and very dead 725 The voice on the other end of the line asked Where d you get it From you No I mean where d you purchase i I didn t purchase it you sent it to me Why would we send you a drive Because I m n editor and you wanted me to see show good it was There was a pause then a muffled word that alee quite plainly he d had better days Finally S Would you mind sending it back I returned the defective 725 and they sent me an 825 20 meg 65ms The model 825 has replaced the 725 It fired right up in fact it even had No Errors written on its error chart Larry and I figured the most dastardly way to abuse any drive was to stick it into the Micro C RBBS running 24 hours filled with all those heavy messages So we pulled out the Seagate 225 which has lately been a little slow of seek and loud of spindle and stuck in the 825 It came up very quietly and very quickly Now when you log onto the board you won t hear that awful whine Meanwhile I ve gotten a letter about a Seaga 238 fix Adap tec has upgraded its ACB 2070A RLL controller to work with the Seagate 238 The controller s new microcode makes it pos sible to recover from seek errors Adaptec also ch nged the characters written in the gaps between the ID and data fields to enhance data recovery Board revision number was rolled from 401400G to 401400H I ve had no independent wo
142. er 45 20MB Hard Disk Kit 299 Color graphic card 49 4 serial port card 95 2MB Expansion card 125 AC power center 25 30MB Hard Disk Kit 339 MODEMS EGA color card o 159 Game WO card 15 Multi VO card 65 AC power strips 10 STS l5 vex 249 384k Multifunction card 69 Locking slide case 65 Diskette file box 9 ST238 i 4 9 279 Easydata int 300 1200 95 MOUSE FCC app slide XT case 28 200W power supply 85 Printer or serial cable 8 ST4038 539 Taiheho external 3 12 105 150W power supply 59 AT style keyboard 59 Ext case amp powr supply 120 Sr4096 899 Everex 2400 external 195 Logimouse C7 75 XT keyboard 52 WD HD floppy controller 159 wiFujitsu 5 4 drive 199 Review By David Thompson The Konan Hard Drive Card 40 Megabytes Of Data On A 20 Meg Drive This review comes to you by popular demand I mentioned the Konan drive con troller two issues ago and since then I ve heard from a number of you who are con sidering purchasing the card hen I originally heard about the WW ran drive controller it seemed at first too good to be true Then I wondered why no one else was doing it Finally I remembered that this sounded like one of the projects that George Morrow was thinking about before his latest company went bust Ah well with this auspicious beginning let s get on with it Essentially t
143. erience with Demaray really helped I knew which suppliers could furnish quality material in a reasonable time I could get delivery on all parts within a couple months I had capital enough to buy the components for a prototype and a few production machines and to live for several months without an income I thought it would take three or four months to work out the details and build the first commer cial unit That was May 1986 I picked the Radio Shack model 100 portable computer since replaced by the Tandy 102 as the Riso s controller This may seem to be an odd choice but it has several advantages the primary being simplicity Most of the customers have had little if any computer experience I didn t want to intimidate them with disks operating systems and A gt Custom System Mods I put the program written mostly in BASIC safely into ROM and I brought out the system bus to an external connec tor for easy interfacing I use the model 100 s RS 232 port to upload data from the Riso into a standard XT That way cus tomers can analyze the data with their spreadsheets or databases a terrific sell ing point Of course the main attraction of the 100 is the price 500 list or 400 each in volume purchases Not bad for a com bined controller and terminal My printer was another bargain After looking at several others I chose the Citizen 120 D printer It s far more ver satile than necessary durable
144. essors are often designed to solve specific problems And in the best cases the number of processors can t be increased despite the need for greater processing power Computing systems distributed over several processing units so called MIMD Multiple Instruction Multiple Data sys tems are more flexible MIMD systems frequently employ a number of general purpose microprocessors e g a Z80 or 68020 so that the system can solve a variety of problems But designers of MIMD parallel processing systems must decide how the processors will communicate intercon nect Most interconnection schemes fall into one of four categories shared memory systems common bus systems switched bus systems network systems Shared memory common and switched bus systems all transfer huge amounts of data quickly But physical layout memory bandwidths and or bus bandwidths restrict their expandability Using direct processor to processor communications overcomes the expan dability problem Typically the com munications are high speed serial links With such a system it s possible to add more processing units without violence to the existing network to gain power The precise scheme of interconnection between processors in these multiple processor networks is commonly referred to as the system s topology Many topologies exist they can be struc tured as a mesh a cube hypercubes or a tree Proponents of parallel pr
145. ft x 1 if WINDW cursor_y gt WINDW bottom y 1 WINDW cursor y H while trstring stops at the string s null terminator f Rhode RIE RIE KIRK RII IIIA IK III IKI IIH IKI KIS NIAKHAR ISHIHARA RR IKKE KAR EAI Saves the screen we just interrupted into a global array void save screen int scr_offset for scr offset 0 scr offset lt SCREEN CHARS scr offsettt save buf scr offset peekb SCREEN BASE scr offset f Roe dekeeseeejeiokodokeokedejeiojeoeokdejedoeeleiodee deje ojeoeekeojeeedejeeieieieooiejeiokeeieoiejekieeie Restores the interrupted screen from the global array void restore screen int scr_offset for scr offset 0 scr offset lt SCREEN CHARS scr offsettt 1 pokeb SCREEN BASE scr offset save buf scr offset f NC eee gode dede ke doo ke iok doeet dojeejeokededeiekeoieedejeioieioeiek Puts a box of double bars like Sidekick around the window using the window s pre defined character and background colors void make box int window number int x y for x WINDW left x y WINDW top y xtt lt WINDW right x pute at location 0xCD x y WINDW attributes for x WINDW left x y WINDW bottom y x lt WINDW right x bottom bar putc at location 0xCD x y WINDW attributes for x WINDW left x y WINDW top y ytt lt WINDW bottom y left bar putc at location OxBA x y WINDW attributes for x WINDW r
146. g CP M ERASE Keyboard Encoder 20 pages ISSUE 5 4 82 Word Processin Two Great Spells Two Text Editors Double Density Review Scribble A Formatter 20 pages ISSUE 6 6 82 BBI EPROM Programmer Customize Your Chars Double Density Update Terminal In FOR 24 pages ISSUE 7 8 82 6 Reviews Of C Adding 6K of RAM Viewing 50 Hz On Your Own Begins 24 pages Issue 8 10 82 SOLD OUT ISSUE 9 12 82 BBII EPROM Program Relocating Your CP M Serial Print Driver Big Board I Fixes Bringing Up WordStar Cheap RAM Disk 32 pages Issue 10 2 83 SOLD OUT Issue 11 4 83 SOLD OUT ISSUE 12 6 83 256K for Pel aii Bringin dBase i j Look at Wordstar Double Sided Drives for BBI Packet Radio 5MHz for Kaypro 40 pages ISSUE 13 8 83 CP M Disk Directory More 256K for BBI Mini Front Panel Cheap Fast Modem Nevada COBOL Review BBI Printer Interface Kaypro Reverse Video Mod 44 pages ISSUE 14 10 83 BBII Installation The Perfect Terminal Interface to Electronic Typewriter BBI Video Size Video Jitter Fix Slicer Column Begins Kaypro Color Graphics Review 48 pages ISSUE 15 12 83 Screen Dump Listing Fixing Serial Ports Playing Adventure SB SIC Column Be m Upgrading Kaypro II to Upgrading Kayoro 4 to8 48 pages ISSUE 16 2 84 Xerox 820 Column Restarts BBI Double Density BBII 5 8 Interface Fix Kaypro ZCPR Patch Adding Joystick To Color Graphics Recover
147. ged stand alone compiler and an integrated package The package came equipped with a beautiful programming editor blessed with almost all the goodies I dreamed of when using the Pascal editor MICRO CORNUCOPIA 38 Nov Dec 1987 Turbo C came with support for six memory models all the latest ANSI extras plus delight ful extensions which I ll discuss shortly Huge libraries A zippy linker A stand alone make utility with a wonderfully elegant syntax Two books that by themselves would sell for 49 90 at B Dalton one of them containing as useful a short introduction to C as can be had anywhere Enough include files to clog the White House paper shredder I felt like a software pirate just copying my very own disks onto my very own Seagate In conception the integrated package is a programmer s dream Since Cis inherently mes sier than Pascal things aren t as idiot proof as in Pascal which does a miraculous job of hiding the mechanics of compiling from the user Though the integrated package does every thing in a single sweep of linked stages even the beginner must deal with libraries linkages memory models and the like Borland puts all your options into SideKick style pop up win dows What is gained from the extra machinery of course is the ability to build and control multi file projects but beginners are going to be a bit intimidated The quick and dirty piece of code will perhaps never be quite as q
148. ght bytes with this INMOS approach whereas other 32 bit processors require less But we encounter this so seldom in program code it doesn t pose a problem Workspaces Each task or process running on a transputer has its own workspace The transputer s workspace pointer register points to the base address of the workspace for the currently executing process The workspace lies above the base address Memory locations within a small off set from this workspace are local and can be accessed with extreme speed using load local 1dl and store local stl instructions If a memory location is within 16 words of the workspace pointer it can be accessed with a one byte instruction When a process s workspace resides in the transputer s internal memory workspace data can be accessed in one processor cycle 50 nanoseconds on a 20 MHz T414 In this case the workspace acts much like a large set of registers on a conventional microprocessor Later we ll see how workspaces enhance multitask ing on a transputer Parallel Transputing As we ve seen the transputer can be used as a building block for parallel sys tems with its links forming the com munication channels between process ing In itself however a transputer also has parallel features like a task scheduler in hardware which can schedule processes on its own Task switching takes less than one microsecond Processes that are
149. h later I have delivered four and prospects look bright The initial cost estimates were about right and the sales estimates also seem good I grossly underestimated the time and effort it would take to get into production Luckily I had the resources to survive Payment for the first Riso arrived in early August In reality net 30 bills are seldom paid within 30 days 60 to 90 is more typical and the seller has no effec tive recourse Most of the payment will go into parts for the next batch of Risos but receiving a check for my year s work gave me a big lift What s ahead An extended version of the Riso program to add extra features and polish awkward spots Current machines can be upgraded by installing the new ROM of course Will I go broke or make a living I m optimistic but time is the only test Ask me at SOG VII MICRO CORNUCOPIA 38 Nov Dec 1987 27 Magic In The Real World Tools For Quick System Construction This is three articles in one Bruce com bines a close look at parallel interface cards monitoring the real world and doing it with TSRs If you don t find something priceless here it s time to turn in your boots Mythical Man Month said First make it work then make it fast Put it another way first make it work then optimize it I m as guilty as the next guy of build ing it the hard way in hardware when I could build it in software or in assembly language when a high
150. h there s nothing to match Microsoft s CodeView in Borland s pack age surely Microsoft is going to be 60 MICRO CORNUCOPIA 38 Nov Dec 1987 pressed hard to keep up its 450 list price Microsoft must come forth with a QuickC and an integrated environment derived from QuickBasic When this sort of competition occurs everybody s the winner God bless free enterprise A Bow A little over two years ago I wrote my first article for Micro C which com pared Turbo Pascal to C It seems ap propriate and nicely symmetrical that my last should compare Turbo C to Pas cal Though techno journalism has been fun and a refreshing change of pace it takes time away from other kinds of writing My thanks to the staff of Micro C for giving me a soapbox to preach from Their tolerance has been exemplary They ve never interfered with whatever obsession I happened to be chasing at the moment no matter how arcane It has become more and more alarming however to open up the magazine to discover what alien words and incom prehensible thoughts have been thrust into my mouth but I guess that s just the culture shock of a stranger in a strange land l Most of all I d like to thank those of you who have corresponded with me You are proof positive that the so called Hacker Ethic of sharing and candor survives in the Cynical Eighties The greatest appeal of computerdom is not those delightful machines or those even more
151. has some limitations but it point Helvetica If he were setting 9 point Helvetica he d pull out You must have in ROM or RAM a pixel map of every character This means that larger characters like headlines really eat up memory that drawer and start picking out characters one at a time It s easier now Size by the way is the height of the characters and is measured in points A point is 1 72 of an inch The 9 point charac re reading now are about 1 8 ters like you of an inch high of lots of dots Thus a printer which might have room in RAM for two or three 9 point fonts because each character is made up might choke on a single 32 pointer Now this paragraph is set in a font called This font is just one point Palatino Italic size of a face called Palatino Italic 9 This is true despite the fact that pixel mapped type designers often reduce the resolution of larger And Palatino Italic is just one of a family of faces The family is made up of Palatino Palatino Italic Palatino Bold and Palatino Bold Italic faces to as little as 75 dots per inch giving their headlines that ragged appearance You must have a copy of the font continued next page S for each size of each face That 21 MICRO CORNUCOPIA 38 Nov Dec 1987 continued from page 21 If you purchase a type face then you can make it any size you wish If you purchase a
152. he Heart Of Video The Turbo Prolog Turbo C Connection The Mandelbrot Set e Graphics Packages For Desktop Publishing e LISP Programming From The Bottom Up 3H3H HV3l e More Parallel Processing FOLD HERE 4 NO POSTAGE NECESSARY BUSINESS REPLY MAIL POSTAGE WILL BE PAID BY ADDRESSEE IN THE UNITED STATES THE MICRO DES i OS E MERO CORNUCOPIA P O Box 223 Bend OR 97709 0223 FOLD HERE s Cassette tapes are available of most of the 50 minute SOG sessions 3843H YVAL 6 00 each ppd U S Canada Mexico 8 00 each ppd Foreign air mail See The Last Page Page 96 for the list of talks The ones marked with asterisks are available ontape When ordering specify speaker s name STAPLE TO CLOSE MICRO ADS A Micro Ad is the inexpensive way to reach over 22 000 technica folks like yourself To place a micro ad just print out your message make it short and sweet and mail it to Micro C We ll typeset your ad no charge and runitin the next available issue You can also send camera ready copy Rates 99 for 1 time 267 for 3 times 474 for 6 times a best buy at only 79 per insertion Full payment must accompany ad Each ad space is 21 4 by 134 16 Megabytes EMs and or E
153. he Konan card is a fancy multi function hard drive controller and resident driver which e Does disk caching in RAM e Packs data to optimize disk I O no fragmentation e Squeezes data going to the disk There are three levels of compres sion high speed no squeezing normal speed data file compres sion only and archive squeezing on all files with heavier compres sion on data files If you have lots of data this card will let you store the better part of 40 megs on your 20 meg drive Generates an error correction code which can reconstruct a totally bad sector Moves data off bad sectors and locks them out The process is not supposed to be visible to the user Well with all these features and a price that s not too much more than the standard controller it replaces 169 for the super deluxe model it would be hard to resist However there are some tradeoffs Buffering FATs and directories in RAM plus a 64K file buffer for instance left me with only 387K usable on a 640K sys tem I had to remove all the optional buf fers to get the program space back to 541K I was using MS DOS 3 10 The Konan card lets you initialize the disk four ways 1 As a standard drive The first logi cal part of the drive had to be set up this way so the system could boot MS DOS 2 As a high speed drive This gives you the error correction and data or ganization so there aren t empty clusters scattered about
154. he com puter the video environment and the file system and gives you the jump on building programs with Borland s new C compiler Now you can concentrate on the creative parts of your programs The library comes with well docu study emulate or adapt it to your speci fic needs Blaise Computings attention to detail like the use of function proto typing cleanly organized header files k and a comprehensive fully indexed ip manual makes Turbo C m TOOLS the choice for Ng experienced ios software piler requires later and is just SD3 00 More M from Blige mented source code so that you can DOS 200 or a developers as well as newcomers toC Turbo C TOOLS provides the sophisti cated bullet proof capabilities needed in today s programming environmen including removable windows side kickable applications and general interrupt service routines written in C e The functions contained in Turbo C ji TOOLS are carefully crafted to supple ment Turbo C exploiting its strengths As a result you ll get functions written predominantly in C that isolate hard ware independence and are small and easy to use Turbo C TOOLS embodies the full spectrum of general purpose utility functions that are critical to today s applications Some of the features in Turbo C TOOLS are 9 WINDOWS that are stackable and remov able that have optional borders and a c
155. helf and it had to be their cheap 20 meg model the one I d reported was having problems They sent a 725 20 meg 85 ms and I m certain they Copyright 1987 by Micro Cornucopia Inc followed my instructions to the letter When we applied All rights reserved l power the drive spun up then shut itself down Per ISSN 0747 587X manently continued on page 88 MICRO CORNUCOPIA 38 Nov Dec 1987 THE MICRO TECHN ICAL JOURNAL VCRO CORNUCOPIA 6 10 14 20 28 48 54 Bernt Roelfs The Transputer The designers of the RISC processor started out with a clean sheet and a need to do parallel processing 26 Hans Bieleman Between Transputers 42 Now that we have the parallel processors how do they communicate 56 62 Rob Kurver amp Klaas Wijbrans Developing A Parallel C Compiler 66 Once we have the processors and the communication we need software to direct everything 78 80 David Thompson Laser Printers Typesetters And Page Definition Languages How to get all that information out of the computer and onto paper 70 74 Bruce Eckel Magic In The Real World 76 Buying your parrallel ports prepackaged and then making them useful Thomas Ochs 84 Data Abstraction And Dynamic Allocation 96 Writing Modula 2 code that dynamically allocates data space NOV DEC 1987 ISSUE NO 38 David Thompson The Konan Hard Drive Card Data compression built into a hard drive control
156. hem So I followed Sherlock Holmes dictum namely that after eliminating the impossible whatever remains however improbable must be the answer In this case I concluded that the code was undocumented Z80 instructions I guessed that these codes somehow split index registers into low and high bytes much the same as you can with the HL register When I wrote a routine to test my guess it worked Believing these codes to be in the little known rather than the dark secret category I checked through my references But only one book Alan R Miller s 8080 Z80 Assembly Lan guage confirmed their existence Ten years ago they were apparently well known though only one assembler incorporated them Allen Ashley s PDS assembler In that assembler Allen assigned the names XH and XL YH and YL for the high and low bytes of the IX and IY registers Figure 1 contains a list of working instruc tions Notice that they are limited to the basic Intel 8080 code level for the H and L registers Not functioning are the Zilog superset instruc tions input and output bit rotations and shifts and bit testing setting and resetting Also not functioning are such full register HL instruc tions as EX DE HL or SBC HL DE Secret Advantages A major advantage of these undocumented codes over the standard index registers is that arithmetic and logical operations effect all the appropriate flags In contrast the increment and decrement func
157. hin six months The fancier 300 dpi LaserJet Plus and PostScript printers should also come down to the 2 000 range by summer I expected to see 400 and 600 dpi printers this last summer Well I saw one of each both distributed by typeset ting companies Compugraphic makes the 400 dpi printer It has 6 meg of RAM comes with 73 fonts their representative didn t have detail on faces an Agfa engine Post Script support and a 20 meg hard drive It sells for 29 995 After which you have the privilege of paying at least 325 per month for support The Compugraphic was designed to work with the Macin tosh network Varityper makes the 600 dpi unit It has 6 meg of RAM and a 20 meg hard drive a 68020 processor and a Panasonic engine For your 18 750 you get four faces their versions of Hel vetica Times Courier and symbol and a chance to pay 3 800 a year for sup ms m Ay lag 4 NOX a A ro Ly port If you pass on the support then they charge you 180 for the first hour and 120 for each additional hour for service The Varityper works with the PC I m waiting for 600 dpi with Post Script for under 10 000 So is every small newspaper magazine newsletter corporation type house and mom amp pop grocery Some might even settle for 400 dpi especially if it s cheap How Soon 600 No one is saying anything hinting anything It s worse than ferreting out what Borland s working on I
158. ho s Making Great Hard Drives Learning Assembly Language 96 pages ISSUE 36 6 87 Build A Midi Interface For Your PC Designing A Database Part 2 Interrupts On The PC Hacker s View Of MS DOS Vs 3 X Digital To Analog Conversion A esigner s View 96 pages ISSUE 37 9 87 Desktop Publishing On A PC Build Your Own Hi Res Graphics Scanner For 6 00 Part 1 Designing A Database Part 3 Controlling AC Power From Your PC Expanded Memory On The PC XT AT Uninterruptible Power Supply For RAMdisks 96 pages MS DOS UTILITIES Welcome to public domain software for MS DOS This is software that the Micro C staff and readers have found we can t do without We ve written some of the software ourselves the rest has been carefully selected from the thousands of public domain and shareware programs in the Micro C library We think you ll enjoy these special programs as much as we have Available in 2 formats 360K MS DOS 54 eeeeeeeeeen nnns 98 00 each ppd 720K MS DOS 3i4 00 cece cece cence ce cecececeeeecesececes 8 00 each ppd Micro Cornucopia Subscriber U S only Special Rate 6 00 each ppd MS1 Essential Utilities This is it the essential utilities disk for copying transferring viewing squeez ing unsqueezing finding and organizing files SWEEP allows wildcard tagging and mass file copying jumps relogs drives and lot
159. hose more into desktop publish ing and less into cash depletion schemes PC Tech also has a monochrome board with basically the same features except it s not color of course just shades of grey They had one of these boards hooked up to a vertically oriented full page type monitor and it was quite nice to work with Presently the mono board works under Windows and Gem etc by emulating a Genius monochrome graphics adaptor Later they will write a native Windows driver to take full ad vantage of the 34010 and increase dis play speed by several orders of mag nitude l No danger in purchasing now either Historically software updates have been available from PC Tech at minimal char ges e g Just send us some blank ROMs and a few stamps Contact PC Tech for details on either of these products Mainstream Hardware A bit further away from the jagged edge of technology Along with my new seven man river raft christened Con traband for obvious reasons a PC Tech monochrome board and two bot tles of French wine I came back from the U S with two new playthings that will make me a more portable kind of guy But first some background About a year and a half ago while in Hong Kong I purchased a little unit that has changed my life irreversibly I bought one of the original Toshiba T1100s The 1100 was an IBM compatible portable with 512K of RAM one disk drive and a two thirds height LCD guarant
160. ic and special characters e Convert to from WordStar and mainframe files e Print any portion of file selectable printer margins MACRO PROGRAMMING LANGUAGE e If then else looping testing branching user prompts keyboard input 17 bit algebraic expressions variables e Flexible windowing forms entry select size color etc e Simplifies complex text processing formatting conversions and translations e Complete TECO capability e Free macros e Full screen file compare merge e Sort mailing lists e Print Formatter e Menu driven tutorial CompuView 1955 Pauline Blvd Ann Arbor MI 48103 313 996 1299 TELEX 701821 continued from page 22 There are other page description lan guages such as DDL but they have fal len out of favor in the past few months as the major players have moved into the PostScript camp You probably won t need PostScript support if you re just doing a simple in house newsletter But if you re planning to take output from other folks or if you re proofing copy that will eventually go to a typesetter then PostScript is probably worth the additional bucks you can wait until the higher resolution laser printers hit the market then wait Buy A Printer Now If you can wait until the higher resolution laser printers hit the market then wait even if you re only buying a 300 dpi unit I wouldn t be surprised to see the simplest 300 dpi printers hit 1 000 wit
161. igh level language programming environment available for CP M compatible machines Our Turbo Modula 2 package was created by a famous language developer and allows you to create your own programs using the latest technology in computer languages Modula 2 This package includes full screen editor compiler linker menu shell library manager installation program module library the 552 page user s guide and more Everything needed to produce useful programs is included Turbo Modula 2 is fast Sieve benchmark runs almost three times as fast as the same program compiled by Turbo Pascal Turbo Modula 2 is well documented Turbo s librarian is excellent Micro Cornucopia 35 BGii Backgrounder 2 BGii adds a new dimension to your Z System or CP M 2 2 computer system by creating a non concurrent multitasking extension to your operating system This means that you can actually have two programs active in your machine one or both suspended and one currently executing You may then swap back and forth between tasks as you see fit For example you can suspend your telecommuni cations session with a remote computer to compose a message with your full screen editor Or suspend your spreadsheet to look up information in your database This is very handy in an office environment where constant interruption of your work is to be expected It s a significant enhancement to Z System and an enormous enhancement to CP M BG
162. ight x y WINDW top y yt lt WINDW bottom y right bar putc at location 0xBA x y WINDW attributes bottom left corner putc_at_location 0xC8 WINDW left_x WINDW bottom_y WINDW attributes top left corner putc_at_location 0xC9 WINDW left x WINDW top y WINDW attributes top right corner i putc_at_location 0xBB WINDW right x WINDW top y WINDW attributes bottom right corner putc at location OxBC WINDW right x WINDW bottom y WINDW attributes Akkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkikkkkkkkkkiikkik Puts window up if it isn t already clears it if it is void draw window int window number clear_window window_number make_box window_number Akkkkkkkikkkkkkkkkkkkkkkikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkikkkkkkik Centers a title in the foreground and background colors of your choce Title is placed in the top bar of the window void title window int window number char title unsigned char attribute char title ptr int title_count x make_box window_number redraw box if new title is smaller than old one WINDOWS listing continued on next page top bar Now it s easier than ever to order from Micro Cornucopia Use your Visa or Mastercard and call 39 XEROX 820 1 AND 820 2 ITEMS Reconditioned Assembled and Tested 820 1 COMPUTER MONITOR COMPLETE 820 2 COMPUTER MONITOR
163. ii adds much more than this swap capability There s a background print spooler keyboard macro key generator built in calculator screen dump the capability of cutting and pasting text between programs and a host of other features For best results we recommend BGii be used only on systems with hard disk or RAMdisk JetFind A string search utility is indispensible for people who have built up a large collection of documents Think of how difficult it could be to find the document to Mr Smith in your collection of 500 files Unless you have a string search utility the only option is to examine them manually one by one JetFind is a powerful string search utility which works under any CP M compatible operating system It can search for strings in Z sets you free text files of all sorts straight ASCII WordStar library LBR file members squeezed files and crunched files JetFind is very smart and very fast faster than any other string searcher on the market or in the public domain we know we tested them Software Update Service We were suprised when sales of our Software Update Service SUS subscriptions far exceeded expectations SUS is intended for our customers who don t have easy access to our Z Node network of remote access systems At least nine times per year we mail a disk of software collected from Z Node Central to you This covers non proprietary programs and files discussed in our Z NEWS
164. in color amp hardcopy 275 Vitamin Mac Windows ecu owe qox amp ae X XO es ROS Rk Se ew LAU es 200 Essential C Utility Library 400 useful C functions llle 160 Essential Communications Library C functions for RS 232 based communication systems 160 Panache C Program Generator screen based database management programs 150 PC IP CMU MIT TCP IP implementation for PCs ee ee 100 B Tree Library amp ISAM Driver file system utilities by Softfocus k aU a PhS ence ie BETS a wit 29 100 The Profiler program execution profile tool rub ue Meteor an Wei sos us Es S100 Entelekon C Function Library screen graphics keyboard string printer etc 100 Entelekon Power Windows menus overlays messages alarms file handling etc 100 QC88 C compiler ASM output small model no longs floats or bit fields 80 function library 90 CBTree B tree ISAM driver multiple variable length keys 80 ME programmer s editor with C like macro language by Magma Software 75 Wendin PCNX Operating System Shell 2 2 2 2 2 2 2 75 Wendin PCVMS Operating System Shell 2 e 75 Wendin Operating System Construction Kit s 75 EZ_ASM assembly language macros bridging C and MASM eee 60 Multi User BBS chat mail
165. ing Contact us for a Cutting Edge TEK PAK of Bit by Bit Details ULTRATEK Quantum Computing Box 1280 Dover NJ 07801 Call 201 328 8 846 Technical Info amp Assistance Telex 9102500026 QLine BBS 328 2919 Compuserve ID 76625 2214 EVER PROGRAM ON A SILVER PLATTER How much would you expect to pay for a 32 bit MC 68000 computer that s a mainframe condensed down into a keyboard Thousands right No just several hundred But that s actually our price The most powerful com puter money can ever buy is now the most inexpensive computer money can buy So don t buy the name Buy the power The power is NOT in the name If you had the opportunity to work in a research laboratory amongst Machine Code ROM Designers VAX amp UNIX wizards designing an MC 68000 architecture computer that s 2nd to none Just what would you come up with And what would you finally call it Well It s Already Been Done They Called It The QL For The Quantum Leap That It Is Absolutely a Quantum Leap beyond what you know amp use and it s truly like Programming on a Silver Platter The QL Desktop Minicomputer Designed by SRL Labs manufactured by Samsung An absolute Quantum Leap beyond all the rest The phenomenal open architecture QDOS is a dimension beyond It works from the protected mode has Virtual Memory RAM Multitasking Job Control Multiuser Networking It ll Cache Files into unused Memory and create d
166. ing Text From Memory 52 pages ISSUE 17 4 84 Voice Synthesizer 820 RAM Disk PARE Morse Code Interface 68000 Based System Review Inside CP M 86 56 pages ISSUE 18 6 84 Toke EPROM Programmer IO Byte A Primer Kaypro Joystick Serial To Parallel Interface Business COBOL 60 pages ISSUE 19 8 84 Adding Winchester To BBII 6 MHz On The BBI Bulletin Boards Track Buffering On Slicer 4 MHz For The 820 1 64 pages ISSUE 20 10 84 HSC 68000 Co Processor DynaDisk For The BBII Serial Printer On BBI Sans S10 Cheap amp id Talker For Kaypro Extended 8 Single Density 72 pages ISSUE 21 12 84 Analog To Digital Interface Installing Turbo Pascal Low Intensity BBI Video Turbo Pascal The Early Days 80 pages ISSUE 22 2 85 Xerox 820 II To A Kaypro 8 Sound Generator For The STD Bus Reviews Of 256K RAM Expansion In The Public Domain Begins 88 pages ISSUE 23 4 85 Automatic Disk Relogging Interrupt Driven Serial Printer Low Cost EPROM Eraser Smart Video Controller Review MicroSphere RAM Disk Future Tense Begins 86 pages ISSUE 24 6 85 C ing Into Turbo Pascal 8 Drives On the Kaypro 48 Lines On a BBI 68000 Versus 80x86 Soldering The First Steps 88 pages ISSUE 25 8 85 Why I Wrote A Debugger The 32 Bit Super Chips Programming The 32032 Modula II RS 232C The Interface 104 pages ISSUE 26 10 85 Inside ZCPR3 Two Megabytes On DSI 32 SOG IV The Future Of C
167. ing a few more buffers to the 20 declared in my con fig sys file Just why I tried that trick is too long a story to tell Suffice it that memory placement was crucial although the memory chips were fine The whole package feels buggy ina way Turbo Pascal s environment never was Interestingly enough the stand alone compiler tcc has been solid as a rock Of course it s a more standard piece of software Conclusions Therefrom All in all these irritations are the sort of start up difficulties that one might ex pect from version 1 of any highly com plex program The old rule about not buying an automobile engine from Detroit the first year it comes out remains a wise one If you can wait for version 2 wait For those of you for whom program ming productivity is money in the bank go ahead and plunk down your 65 Just expect a little flakiness until you get the upgrade The real problem is that many of the folks who have bought this pack age in such numbers are the very people least able to deal with phantom reboots and incomplete documentation And Yet The Enhancements To end on that note however is to leave the wrong impression There are dozens of surprises that simply make you grin The other side of that system tale above is that the in line assembler needed to roll my own exec function was ridiculously easy to write I offer it in Figure 1 Notice that there is no need for the usual bp N
168. int y unsigned char attribute pokeb SCREEN BASE y SCREEN WIDTH x 2 ch pokeb SCREEN BASE y SCREEN WIDTH x 2 1 attribute Akkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkikkkkkkkkkkkkkkkikkikkk Clears a window including the border retaining it s attributes void clear_window int window_number unsigned int x y for y WINDW top y y lt WINDW bottom y y for x WINDW left_x x lt WINDW right_x x putc at location x y WINDW attributes Ahkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkikkkkkk Puts a string in a window wrapping if it hits a border and refusing to go past the lower right corner For some reason the string must be a literal i e a string rather than a pointer you pass embedded in the function call or bad things happen when the x interrupted screen is restored window puts int window number char string unsigned char attribute int cursor offset do if string 10 check for newline WINDW cursor x WINDW left x 1 WINDW cursor y 1 if WINDW cursor y gt WINDW cursor WINDW bottom y 1 1 just bump against the bottom if you run out else putc at location string WINDW cursor x WINDW cursor y attribute Move cursor ahead but keep it inside window if WINDW cursor x gt WINDW right x 1 WINDW cursor x WINDW le
169. inting code in the PRN file Specifying a non existing function does not cause an error message or an ef fect of any kind Single character error codes B Out of range in destination for JR or DJNZ si C IF ENDIF imbalance K Pre defined operand register name or flag condition mnemonic used in an expression M Macro formatting error N Does not exist Nesting over flow results in an explicit message e S Syntax error in expression T Does not exist Full symbol table causes Not enough memory message Z Z80 opcode encountered while LIST Z option active See option Z above for bug fix Declaring an EXTRN symbol to be PUBLIC is an error but goes unreported Neil Knozer Kellogg Star Route Box 125 Oakland OR 97462 CP M Some people love it others love to hate it but most still use it Its users complain that most software companies have abandoned it Very true yet we haven t We ve been selling the ConIX software line for many years we developed it we market it and we support it completely What You haven t tried it Saving the best for last eh Don t wait Support your CP M software company try ConIX for as low as 10 What s more you could even get lucky and receive your entire order FREE See details below An extensive upgrade for 48K CP M 2 2 3 0 and equivalent systems ConIXT Provides professional capabilities with blinding speed as often found on Operating high e
170. isk files for deletion unerase disk a With stats full screen TYPE and more Source code included Anew Shareware version of the ConIX O S includes our regular ConIx distribution software less the Archiver On Line Manual Menu source Shareware code and some satellite utilities ConlX Shareware is available through Version CHI for just the cost of the diskette and shipping or on line via many popular bulletin board systems Register by purchasing regular ConIX To reduce the cost for those who want to purchase only the ConIX O S ConlX we are offering the complete software package with documentation Disk Manual provided on disk The disk manual has each chapter stored in individual Version files excluding the Chapter Summary Chapter Reference and Index Sections that come standard in our regular typeset manuals e Vea tant hese NER i as freie e Nee UME rre That s right Every 100th order processed by our computer will be shipped with a Credit Certificate for the total purchase price or 100 whichever is lower This credit may be used toward a future purchase from CHI or may be redeemed for cash within ninety 90 days of receipt Your odds are an incredible 7 in 100 Offer applies only to private individuals and non profit institutions ordering directly from CHI Orders placed by PO or purchased for commercial use are not eligible To enter certify eligibility by signing order form Product Trademarks C
171. it Some of the early interface designers simplified communications between the computer and the printer by sending only pixels to the printer Each 8 inch line requires 2400 pixels bits and there are about 3000 lines ina page At 9600 baud after taking out start and stop bits you d get about three lines per second So it takes about 1 000 seconds 16 minutes just to transfer the image And that s after the computer has created it Of course the computer also has to do lots of calculations and it needs a pretty good understanding of the printer Change the printer and you change the calculations Page Description Languages But what if you gave the printer a very smart and very fast processor and a very powerful standard page descrip tion language PDL A PDL is like any other high level lan guage A high level language is a shor thand way of writing lots of assembly language A PDL is a shorthand way of _ telling a printer where you want charac ters lines images and anything else that a printer can construct out of dots And if it s talking PDL the computer shouldn t care what kind of printer is on the other end of the pipe its resolution paper type whether it s laser photo cell ink jet or pinhead It s up to the printer to reproduce as best it can what the computer specified The standard PDL is PostScript Hewlett Packard has adopted it so has IBM and it s becoming available on mor
172. itrates the flow of messages so that a message can pass through even while its own process is also receiving and send ing messages Messagepasser Processes In order to make optimal use of the transputer the messagepasser is divided into several parallel processes A closer look at the transputer s features makes this division of labor obvious First the hardware channels Reading and writing by the hardware channels also known as links into the memory of the transputer is performed via Direct Memory Access DMA Thus there s lit tle CPU overhead once communication begins A process which wants to communi cate through a hardware link will always Figure 1 A Farm Network Topology c c ed ed Figure 2 Process Structure NEXT_INP_CHAN ee e N_P_CHAN w be descheduled The transputer will res chedule the process only after the mes sage has been sent or received Thus transputer processes sleep as long as they re waiting for communications When a process is descheduled the transputer puts its ID at the end of a ready queue It can take some time before the process has worked its way back to the start of the queue and is able to run again Therefore to use the hardware links efficiently it s best to use the largest possible message In this way a process will be descheduled a mini mum number of times Thus in this case it makes sen
173. k including its handle and location rows and columns See Figure 2 When empty ScreenBlock will require 83 bytes In order to keep track of all the ScreenBlocks we define a pointer to the ScreenBlock type TYPE BlockPointer POINTER TO ScreenBlock Then we create an array of these pointers for storing the various screen blocks that may be cut out TYPE BlockArray ARRAY 0 NumbBlocks 1 OF BlockPointer This is a fast data structure since we re using array indices instead of searching through long lists of pointers to locate elements The savings in memory however might not be immediately apparent so let s cut out a block of screen text from row 11 to row 15 and column 21 to column 50 This block will contain 150 characters out of the screen s 2000 Dynamic Allocation In Modula 2 there are two ways to reserve memory for dynamic structures e The NEW command which is similar to Pascal s The ALLOCATE command 50 MICRO CORNUCOPIA 38 Nov Dec 1987 Calculate the number of rows and the number of columns NumCols LastCol FirstCol 1 Now allocate the minimum space for the screen block IF Available TSIZE ScreenBlock THEN NEW A Initialize the screen block A FirstRow FirstRow A LastRow LastRow A FirstCol FirstCol A LastCol LastCol Assign Handle A Handle FOR I 0 TO rows 1 DO A Row I NIL END Calculate the needed s
174. land was still thinking about relative ly passive Pascal and BASIC program mers rather than the C hacker who jolly well wants to know and control what s going on As a matter of fact that s what I find hardest to take about the Borland pack age I m used to compiler documentation that treats me like an equal that lets me know the choices and where to patch if necessary Borland sees itself as Big Brother who thinks that the masses ought to treat compilers as black boxes The chapter on Advanced Programming begins We knew you d get around to this chapter sooner or later Notice the condescension in that turn of phrase It s notunrepresentative And then there are twists that can only be termed undocumented mysteries Take for example the matter of the system call K amp R prescribes and so Turbo naturally delivers a function that will execute a string blanks and all just as if it had been typed on the com mand line In simple situations Turbo s system works fine though it adds over 5300 bytes to a file large memory model Ap parently it s that massive because that one call is entangled with a long series of exec and spawn functions carried over from UNIX That was okay until I tried to call system from within a resi dent program Mysterious refusals to ex ecute Naturally I suspected myself first but after hours of fruitless staring at the continued next page MICRO CORNUCOPIA
175. ler the transputer is capable of multitasking with virtually no software support The INMOS transputer family cur rently consists of three processors a 16 bit T212 and two 32 bit chips the T414 and the T800 The T800 has an on board floating point co processor The T414 is currently available in 15 and 20 MHz versions The T800 will be available in 20 and 30 MHz versions INMOS also has a number of transputer support products including a disk processor and a graphics controller Transputers have fast on chip memory This memory 2K on the T212 and T414 4K on the T800 is mapped into the low end of a transputer s ad dress space The transputer accesses its internal memory without waitstates while it adds at least two processor cycles for external memory Addresses are one word wide yield ing a contiguous address space of four gigabytes for the 32 bit T414 and the T800 The address bus is multiplexed with the data bus Timing for external memory is con figurable After reset the transputer reads externally supplied configuration data from a PAL or a PROM This data informs the transputer of the external memory type static or dynamic the speed of the memory and the number of refresh cycles required Links amp On Chip Timer The transputer s link engines are key to its success Each transputer has four serial links each providing two high speed serial channels one input one output These links oper
176. ler How fast is it How well does it work CLOLGININESS On Your Own When his employer went under Dave Coahran computerized the original product and went out on his own Pascal Procedures The 6 00 scanner continues This time John talks about construction and begins the software C ing Clearly Ron bows out with a strong column on Turbo C 86 World Laine launches a new career river rafting in Turkey In the Public Domain An 8086 assembler that s faster than Microsoft s Yep Technical Tips Culture Corner Chil CORNER Kaypro Column The Z80 s secret instructions CP M Notes Adding fish paper to a Kaypro ZRP M2 Anticipating The Z280 Designing a Z280 emulator for clones By Gary Entsminger Tidbits Prolog beats Pascal in a statistical race Last Page The Micro C Technical Conference SOG VI MICRO CORNUCOPIA 38 Nov Dec 1987 3 Polyboost for the Kaypro 2000 Having had such good experience with Kaypro s CP M machines it was only natural that I should consider their K2000 when I branched out into MS DOS I ve had a lot of success with the 2000 in spite of its underwhelming screen and disk I O speed I had been hoping that some speedup scheme would eventually crop up After a year of waiting for a hardware solution I came across a neat product called Polyboost from Polytron As I had been pleasantly impressed by Polytron s PolyWindows Plus I decided to order Polyboost on
177. level language would work fine We tend not to think of the power and productivity of new tools but rather to hold on to what s comfort able My subject this issue isn t a project Instead I m going to talk about tools one hardware and one software The hardware tool is a cheap parallel printer board from Taiwan which Micro Sphere sells for 21 The manual and circuit diagram which come with the board are rather abysmal but the price is so good and parallel I O is so necessary to real world control it s been key to all my articles that I feel it useful to create a complete set of diagrams for the board This will enable us to both use and modify the board and will let me introduce you to PC adapter card design It turns out all printer cards have the same I O addres ses for the same functions so even if the design of your card is different you can write software based on these diagrams The software tool is a cheap 99 C compiler Turbo C from Borland We ll use it exclusively without assembly lan guage to create and install a memory resident interrupt driver activated by the printer board To make it do something fun I wrote a package to create Sidekick like windows by writing directly to video ss Brooks author of The 28 MICRO CORNUCOPIA 38 Nov Dec 1987 INPUT OUTPUT m v SAME AS Nun 2 oe USUALLY SIGNALS FLOW FROM LEFT TO RIGHT UNLESS BI DIRECTONAL oR ARROWS INDICA Bure
178. lligence my company and I needed to write some real ly fast statistical functions Although the mean is undoubtedly the most commonly used statistic it doesn t even begin to tell the complete story about a sample Radically different distributions of data points might have identical means I wrote micro einstein in PROLOG so I felt it logical to try to write my statis tical functions in PROLOG as well I real ized the suspicious logic that accom panied my choice PROLOG has been described by one of its designers as a non numerical programming language but I was feeling smart little did I know and wanted to see how long it would take for logic and human fallacy to become totally entangled I wrote the little piece of code in Figure 1 to find the mean variance and standard deviation of a file of data continued next page Figure 1 Statistics in PROLOG DOMAINS real list real DATABASE answer real answer2 real data integer real list PREDICATES main process real list process2 real list mean real list real integer sd real_list real real integer CLAUSES main write Enter file that contains data readin Filename consult Filename data 1 List process List process2 List Pass the list to a function for processing This function sets up for the mean Start timing process List write Start N20 s 0 mean List S N answe
179. match to a key GETPAR GETALL and GETKEYS a lexical relation to a key GETLT GETLE GETGT and GETGE You may also add delete and update any record without the need to reorganize the index INSERT ISRTKY DELETE DELTKY and NEWLOC Blockretrieval calls speed up sequential processing Increase your implementation productivity CBTREE is over 6 000 lines of tightly written commented C source code The driver module is only 20K and links into your programs Port your applications to other machine environments The C source code that you receive can be compiled on all popular C compilers for the IBM PC and also under Unix Xenix and AmigaDos No Make type define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define define and is proven in applications since 1984 CBTREE IS TROUBLE FREE BUT IF YOU NEED HELP WE PROVIDE FREE PHONE SUPPORT ONE CALL GETS YOU THE ANSWER TO ANY QUESTION CBTREE compares favorably with other software selling at 2 3 and 4 times our price Sold on unconditional money back guarantee YOU PAY ONLY 99 00 A MONEY SAVING PRICE TO ORDER OR FOR ADDITIONAL INFORMATION CALL 703 356 7029 or 703 847 1743 PEACOCK SYSTEMS INC Peacock Systems Inc 2108 C Gallows R a complete a
180. mber to the order department If you need technical information about something you ve pur chased from us or a mod you re doing or whatever call 503 382 8048 between 9 a m and noon Pacific Time Just like you ve been doing The same goes if you have something to share Please write it down use the bulletin board or call 503 382 8048 We re getting the 800 number to encourage more people to place orders I ve spoken with other magazines and they report that 70 of their new subscriptions come in on their 800 lines I d like to have 70 of their subscriptions Now if I could just finagle the same 800 number as Byte SOG It was incredible Never has so large a group spent so much time just enjoying itself Thursday s rafting and cookout ended 95 Sales Tax ig CA 95 00 syy UPS Cop READ WRITE FORMAT DUPLICATE Disks from over 300 other micros lable from previous V ausa pn eie e for Authorization ersions To Order Contact ENGSUFT 1454 Sixth Street Berkeley CA 94710 415 525 3113 awn reward o ort 5 o good Software is i5 29 ws A 90 MICRO CORNUCOPIA 438 Nov Dec 1987 with cutthroat volleyball semi official sandlot rules which was broken up at dusk with a quick search up the wooded canyon for a couple of misplaced youths I was a misplaced youth too but in my case there were no search parties No parties at all Of course not everything was fun and games That sam
181. ment2 statementn subprocess n Figure 5 Square Root char malloc double array array double malloc K sizeof double par i 0 i lt K i array i sqrt array i Figure 6 Dynamic List struct P struct P next p par p p p next evaluate_element p Figure 7 Timing Out A Channel alt guard amp intchannel channel to wait for outchannel intchannel break guard timer timer 1000 this guard if no message in 1000 clock cycles printf Error no response from channel n exit 0 break Figure 8 Checking For Active Channels struct P struct P next channel in p alt p p p next guard amp p in out p in MICRO CORNUCOPIA 38 Nov Dec 1987 17 lf You Don t Have WindowDOS 2 0 You re Wasting Time When Baba Ram Dass said Be here now remember designers of hard disk utilities should have paid heed A powerful manager like XTREE can track files and subdirectories and execute DOS commands but it isn t mem ory resident Handy pop up DOS commanders like PopDOS may be here now but they lack the power of a full fledged disk manager After much meditation the developers of WindowDOS 2 0 have come up with the best answer yet to the guru s paradox Until now the closest thing to a real RAM resident disk manager was version 1 0 of WindowDOS If offered a full screen pop up men
182. menus sysop displays uses Galacticomm modem card 50 Make macros all languages built in rules c r ntn 50 Vector to Raster Conversion stroke letters amp Tektronix 4010 codes to bitmaps 50 Coder s Prolog inference engine for use with C programs csl 45 PC MPX light weight process manager includes preemption and cooroutine packages 45 Biggerstaff s System Tools multi tasking window manager kit 40 TELE Kernel Ken Berry s multi tasking kernel 30 TELE Windows Ken Berry s window package rt 30 Clisp Lisp interpreter with extensive internals documentation 30 Translate Rules to C YACC like function generator for rule based systems 30 6 Pack of Editors six public domain editors for use study amp hacking 30 ICON string and list processing language Version 6 and update 25 LEX lexical analyzer generator 2 ll leere 25 Bison amp PREP YACC workalike parser generator amp attribute grammar preprocessor 25 C Compiler Torture Test checks a C compiler against K amp R 20 PKG task to task protocol package elle 20 A68 68000 cross assembler leere er 20 Small C C subset compiler for 8080 and 8088 llle 20
183. mpiler for a mere 59 95 And that price is complete including a library of 120 functions all operators except bit fields structures unions long floats doubles plus user s manual We ve even included a special version of the SLR Systems assembler and linker Benchmarks Seconds Benchmark Times courtesy of Dr David Clark CNC Could Not Compile N A Does not support floating point Eco C requires 56K of free memory 240K disk space one or two disk drives or hard disk Z80 CPU and CP M 2 2 or later We also have an MSDOS version at the same low price Call today 1 800 952 0472 orders only 1 317 255 6476 information EG 317 255 6476 6413 N College Ave e Indianapolis Indiana 46220 Upgrade your XT to a real AT for about the price of an accelerator card OR build a space saving AT from scratch Features Phoenix BIOS 1MB memory OK installed VLSI technology 8 expansion slots Clock Calendar Add 95 for 1MB memory installed and tested Other selected components available include e o o Toshiba 1 2MB floppy drive Floppy Hard drive controller _XT size case w LEDS lock reset Everex Magic I O Par Ser card Everex EGA card Mono Graph Printer card Famous Datadesk Keyboard High density floppies 10 118 194 55 69 195 69 119 10 Call SoftSide Systems at 503 591 0870 MICRO CORNUCOPIA 38 Nov Dec 1987 ic Figure 2 Parallel s
184. mposite monochrome monitor Included also is an external 5 floppy port for reading and converting to 31 disks 5 external drive w case power supply 179 when purchased with a 20MB hard disk jLap Top The McIek 286B 32 floppy drive ditties neers Lap Iop comes fully assem parallel amp serial ports Award electroluminescently backlit 80 colin i bled with our one year parts amp 3 01 bios 640k turbo indicator 25 line LCD with adjustable intensity and labor guarantee and sells for LCD amp mouse interface The screen angle Its as readable as a CRT an amazing com 19 9 9 Eey a anga enga T P i teen n TRIP EE EET A Ro i ii screen is a fantastically readable You can also plug in a digital or analog plete price of only 5 MB On Board AT XT Turbos amp Supers Our McIek 286A is the most integrated AT compatible to date 640k 477 8MHz and 477 10 switchable XT turboboards t utilizes the highly regarded Chips amp Technology chip set and two 360k floppy disk drives with controller one parallel includes memory upgradable on board to 3 megabytes No more one serial and one game port AT style keyboard clock worries about speed compatibility with expanded memory cards The 8 10MHz wait state McTek 286A runs at 11 5 Norton SI and an effective 13 2MHz on the Landmark test Serial parallel amp game ports are all standard on board With Award 3 01 bios 640k 200W power supply Samsung amber monitor with Hercules
185. n including LONGINT and LONGSET which provides large set support including SET of CHAR Provides optimization for tighter more efficient code generation 6 NEW EDITOR Our new mouse based editor is fully integrMed easy to learn fast and easy to use and very customizable Its multiple overlapping windows and color support make it easy to manage parts of one file or several files on the screen at one time You ll love using it with or without a mouse Call for information about our VAX VMS version Site License University Discounts Dealer amp Distributor pricing To place an order call toll free 800 231 7717 In California 800 552 8885 s l9 llzGu LOGITECH Inc l 6505 Kaiser Drive Fremont CA 94555 Tel 415 795 8500 In Europe LOGITECH Switzerland Tel 41 21 87 9656 Telex 458 217 Tech Ch In the United Kingdom LOGITECH U K Tel 44908 368071 Fax 44908 71751 Between Transputers The Communication Manager Your assignment should you choose to accept it is to study this carefully Commit it to memory understanding that you may be one of only a handful who understands its ramifications This is total immersion into parallel processing Ithough my subtitle The Com fosse Manager sounds like the start of an intriguing novel about some fellow in the communica tions game what follows is really much more interesting This is about control li
186. n and dynamic memory allocation are two areas where these high level low level languages shine I ll show you how they work by developing a module in Modula 2 for storing and manipulating sections of a text screen arge programs which use interrupt Defining A Module Here s the specification We ll store a rectangular part of a screen in as small an area of memory as possible and then call it back to any other location on the screen The screen blocks will retain text attributes such as blinking or reverse video We ll address them by name All of the details involved in the operations will be hidden abstracted so the user can refer to the operations in a very high level way Our first abstraction will be the defini tion module called Screenblocks See Figure 1 The first definition in the module is a block of screen data which we ll address by name The details of the block will be hidden or abstracted I ll call it handle because it will manipulate or handle the screen block We want to cut blocks of screen out defining them by their row and column positions and save them for future pasting We ll retrieve them for past ing by referring to their handles So let s define two screen operations e CutBlock e PasteBlock Our screen will consist of 25 rows numbered from 0 to 24 with 0 beginning at the top of the screen The columns are numbered 0 to 79 beginning at the left
187. n and synchronization can be done with an internal channel What this means is that a high priority process will be almost immediately executed after it s been put on the ready queue The n link process is a very simple piece of code It merely reads in a block of data from the previous transputer and sticks it directly into memory Then a pointer to the block is passed on to the p link process rather than the contents of the block This pointer is passed on an internal channel processes on the same transputer is thus very fast n link can put received data in one of two blocks Once it s sent a pointer to the first block to p link n link starts filling the second block p_link will start reading the N_P_CHAN only after it has passed the contents of the first block to the previous transputer Because p link hasn t yet read the N P CHAN n link can t send a pointer to the second block So n link is descheduled n link will only be rescheduled after p link has read the pointer to the second block At this time the first block is empty Thus the internal link helps synchronize the two processes Because we have a receiving process on NEXT INP CHAN and a transmit ting process on PREV OUT CHAN reception and transmission can take place at the same time thanks to DMA The p link process not only passes data blocks from N P CHAN to PREV OUT CHAN but also transmits the calculated blocks on the current transputer to
188. n pulled to ground You can test the circuit with a push but ton switch connecting pin 10 to ground but the production circuit should have a pull up resistor a few k ohms to 5V on the input Figure 5 shows the interrupt circuit If you write a 1 to data bit 4 of BASE 2 the inverted signal from pin 10 will pass through LS125 a to pin B21 on the PC bus which is IRQ7 Reading BASE 2 shows the status of this interrupt control line on data bit 4 All the gold fingers are on the card so with careful soldering you can move to a different interrupt see Figure 5 Simply passing the interrupt through to the PC bus isn t enough You also have to configure the PC s 8259A inter rupt controller to accept the interrupt see Larry Fogg s article Hardware In terrupts On The PC in issue 36 create an interrupt handler and put the address of the handler in the interrupt vector table I ll do this in the code Cabling To get the wires where you want them you can either cut the Centronics end off a printer cable they re cheap enough to make this feasible and figure out which wires are which with a con tinuity tester multimeter or light bulb battery and piece of wire or buy a male DB 25S to ribbon cable connector at your local electronics store The advantage of the latter method is the ribbon cable keeps track of the pins for you The DB 25 on the printer board has tiny numbers to help you discover which pins
189. nal program Poor Man s Network is a loadable BIOS extension takes 7K that provides networking capabilities at minimum cost Works with virtually all CP M 2 2 with or without ZCPRx and Z system computers including Kaypro Televideo Columbia North Star Apple Il Xerox Big Board amp II Pied Piper 100 Ampro Nabu Bondwell Micro Mint and others Works with IBM PC when used with Micro Methods RP M or Z RP M Special BDOS calls let you implement electronic messaging between computers Free sample database complete with Modula 2 source illustrates how to write your own network programs and implement record locking Write your own multi user game or database in any language that can make BDOS calls Best of all is the price still only 69 Many disk formats available including 8 SSSD Kaypro IBM Televideo Apple North Star etc Each disk contains Assembler source and hex drivers for all supported com puters 50 page manual included How to Order We accept Visa Mastercard or money orders No purchase orders or CODs No personal cheques from outside Canada please as they take up to six weeks to clear Phone orders accepted 10AM 5PM Tues Sat Canadian residents please pay in Canadian dollars others in US dollars Price includes disk manual and first class postage Ontario residents add provincial sales tax If you can t download to your other computer we can provide extra disks for 10 each For overnight ship
190. nce manual gives a map of used and free I O addresses Other books also give this map two good ones are The IBM PC From The Inside Out by Sargent and Shoemaker and Interfacing To The IBM Personal Computer by Eg gebrecht although the latter tends to have mistakes Figure 2 shows that address line A2 continued on page 33 SINCE OUTPUTS ARE ALWAYS ENABLED YOU CAN ONLY READ BACK WHAT YOU VE WRITTEN IF THIS TRACE IS CUT FROM GROUND AND CONNECTED TO PIN 7 OF THE is LS174 A GENERAL PURPOSE 8 BIT 1 0 PORT IS CREATED OCTAL BUFFERS ALL PRINTER DATA LINES HAVE CAPACITORS TO GROUND MICRO CORNUCOPIA 38 Nov Dec 1987 31 Figure 4 Printer Status and Control Line READ D ADDRESS LACK ed ce ASM Coe a To INTERRUPT CIRCUIT ups PC BUS SLOT PIN B2 RESET So WRITE ADDRESS S CLEAR BASE 4 2 075 9 7 gt cLoc DATA CLOCKED IN L ON RISING EDGE D2 DB 25 PIN SIGNAL 16 INTIAUZE D DI 14 AO FEED D8 STROBE D3 SELVES ALLOWING JLL UI oe ARE _ NECESSARY To PULL THE OUTPL 32 MICRO CORNUCOPIA 38 Nov Dec 1987 continued from page 31 isn t decoded which means you need to reserve a block of eight addresses instead of four the upper four are images of the lower four Once you ve located the new BASE address change it to binary and deter mine the bit values of A3 thro
191. nd UNIX machines Installs easily in just minutes to add over 100 System new built in commands and features while maintaining 100 compatibility with all your existing software Includes V O redirection aliases improved user area access auto searching PF Keys Screen Paging Print Spooler Archiver New SysCalls Eliminates many points of user frustration with CP M Uses only 1 2K TPA 0 27K disk minimum Included FREE with commented source is the Pull Down Menu System a user friendly interface to ConIX Loads with a single keystroke ConlX is the greatest most powerful 8 bit upgrade with speed and capabilities that are so incredible it s bringing users back to CP M Astructured programming language for Con X extends CP M SUBMIT ConiX capability Adds conditionals loops subroutines labels nesting Programming interrupt processing error traps and debugging facilities Design System intricate menu systems and command automation shells Also includes 4 Special source code compiler that provides string and numeric variables An absolute must for CP M power users and developers Over 25 utilities for ConIX written in the shell language including ConiX hierarchical directories with overlay adds pathname capability to Library Vol existing software interactive debugger move copy link multiple files XCC Utilities print files with pagination review d
192. nd surely the poor computerist s reply to a Scotts Valley Toga Dance 7 Laine Stump s description of the comput ing biz and rafting in Turkey and Akbar Tahayeri s Computing for the Handicapped were to say the least very interesting 8 And the clear cool high desert days and Cascade volcano views set the stage for a stimulating group of speakers Thanks again to Roger Armstrong Programming With Microsoft Windows Andy Bakkers Computing In Europe 96 MICRO CORNUCOPIA 38 Nov Dec 1987 Joe Bartel Inside K OS One Marla Bartel Single Board Computer Setup Earl Brabandt Design e Chris Cale The State Of Modula 2 Jack Dennon New Developments In RP M Bruce Eckel Structured Development For Real Time Systems e Allyn Franklin Drive Workshop Mike Freiling Knowledge Engineering A Software Technology e RoeFulleton Data Base Design Peter Henry Real Time Motion Control The Cornea Lathe Earl Hinrichs Expanded Memory On The PC Chris Jones Parallel Processing amp Com puter Architectures e Dean Klein Narrowing The Gap Bet ween PCs And Work Stations Trevor Marshall The Promise Of RISC Intro To ASIC Chip e Tom Ochs Open Architecture Software e John Popplett Parallel Processing amp The Transputer Dave Rand Inside UNIX Mike Sequeira Computers 101 e Reese Shep
193. nd the space shuttle explosion struck and I was an ex employee of a bankrupt business After a few weeks in shock I saw a way to support my addiction to food One of Demaray s products had been the Gasograph an instrument which measures gas production It s used by breweries yeast manufacturers and bakers to measure the activity of yeast It s mechanically complex and difficult to manufac ture but its users love it l The demand for the Gasograph was still there unfilled Replacing it with a much simpler computer controlled now you see why this is in Micro C machine would make it more versatile easier to use and perhaps most important cheaper and easier to manufacture My design has 12 jars each containing a dough sample immersed in a water bath for temperature control Each jar is connected by a solenoid driven valve to a measuring jar equipped with a pressure transducer For instance one of the sample jars is con nected to the measuring jar then the connecting valve is closed the pressure in the chamber measured and recorded in the computer and then measured gas is vented to the atmosphere The volume of gas released is calculated from the pressure reported by the transducer and the known size of the measuring jar The cycle is 26 MICRO CORNUCOPIA 38 Nov Dec 1987 repeated for each jar I decided to subcontract all the machined parts After all supporting a machine shop had been a severe drain for Demaray I d
194. nd wu bees bai E downstairs to finish the illustrations for this issue and POSTMASTER Send address changes to Jennifer well Jennifer is a teenager MICRO CORNUCOPIA PO Box 223 Bend DORMAS 0 1 0 This experiment left no doubt in my mind that the supervisor has the most difficult task And there s no guarantee that a task will be handled any faster on a S SUBSCRIPTION RATES eS x parallel system than on a workable one Especially if 1 yr 6 issues Ae 202 yr 2 issues s there are teenagers in the house lt 3 yr 18 issues Sdn E However mine was not the definitive study in paral lyr Canada amp Mexico fs begs 926 00 lel processing I had no dedicated hardware and no 51 yr Other foreign Sees i 2 _ Make all orders Payable i in US f dion special language tools Using You fed your rat an hour US bank a ago doesn t seem to work Anyway for a more definitive look at parallel processing check out the three transputer articles in this issue They are from Bernt Roelofs Hans Bieleman Klaas Wijbrans and Rob Kurver students of Andy Bak kers at Twente University in Holland Better yet find a friend and read the articles in parallel Hard Drives Again After the article in issue 36 I ve gotten some up dates First Microscience called and asked if they could send me a drive I said sure But I specified that it had to be off the s
195. ne BIT1 0x02 define BIT2 0x04 define BIT3 0x08 define BIT4 0x10 define BIT5 0x20 define BIT6 0x40 define BIT7 0x80 bit masks Save programming time and effort You can develop exciting file access programs quickly and easily because CBTREE provides a simple but powerful program interface to all B tree operations Every aspect of CBTREE is covered thoroughly in the 70 page Pone Manual with complete examples Sample programs are provided on isk Gain flexibility in deslgning your applications CBTREE lets you use multiple keys variable key lengths concatenated keys and any data record size and record length You can customize the B tree parameters using utilities provided Your programs will be using the most efficient searching techniques B trees use efficient search techniques that require fewer disk seeks than other methods CBTREE guarantees an optimized maximum search path and always remains balanced CBTREE is optimized for speed You will be using a commercial quality reliable and powerful tool CBTREE is a full function implementation of the industry standard B tree access method ADD TO THE POWER OF YOUR PROGRAMS WHILE YOU SAVE TIME AND MONEY CBTREE does it all Your best value in a B tree source Access any record or group of records by its absolute position in the index GETFRST and GETLAST its relative location in the index GETPRV GETNXT and GETSEQ an exact match to a key GETREC a partial
196. nel the memory location used will contain the workspace of the sending process Another process that wants input from that channel performs an input instruc tion and will find the workspace pointer of the sending process The workspace of that process now also contains informa tion about the data to be sent and the communication takes place The big and obvious advantage of this internal channel approach is that programs can use internal channels in the same way as external channels Programs can easily be adjusted to run on several transputers as well as on one 7 tools have come together in one the ant sane and the right superior product Whether you re working on a small program or a complex project with LOGITECH B Versio3 0 you can write more reliable maintainable better docu mented code in a fraction of the time at a fraction of the cost FREE TURBO PASCAL TO LOGITECH MODULA 2 TRANSLATOR NEW IMPROVED DEBUGGERS Time gained with a fast compiler can be lost at debug time without the right debugging tools With the powerful Logitech Modula 2 Debuggers you can debug your code fast and dramgtically i PLONE your overall project throughput The Post Mortem Debugger analyzes the status of a program after it has terminated while the dynamic Run Time Debugger monitors the execu tion of a program with user defined break points With their
197. ng communications between networked transputers The purpose of a communication manager is to relieve a program or programs from dealing with dataflow A communication manager can also emu late more than one hardware link be tween two transputers To give you a feeling for the mechanisms involved e g the proper use of priority levels and other hardware features of the transputer I ll first describe a simple dedicated mes sagepasser Then I l discuss a more generic messagepasser and communica tion manager The Mandelbrot Demo Calculating and displaying a Man delbrot set is one way to demonstrate the meaning of real parallel computing The calculation is processor intensive re quiring solving a complex equation many many times For every pixel on a screen we calcu late the Mandelbrot equation with slight ly different parameters so that every point on the screen is represented by a unique value The number generated for each pixel on the screen is mapped to a color Thus we can represent a Man delbrot set on a color monitor What concerns us here is not the Man delbrot equation itself but the fact that it requires a separate calculation for each pixel on the screen and the fact that it makes sensational pictures In principle if you have as many com puters as there are pixels on your screen the maximum time it takes to calculate the complete screen will be roughly equal to the time it
198. normal i e non parametric If you re interested in knowing more about the state of statistical research check out this collection of papers published by Addison Wes ley If you want to know more about applying ex pert system technology to this and other problems write or call me in Davis Benchmarking The Turbos For years now six to be exact Micro C ers have enthusiastically expressed their interest in benchmarking by consistently sending us the most mail after we ve tested the speed of a group of computers or compilers And over the years while it s been cus tomary for the reviewers of most mainstream magazines and journals to use a standard test like the sieve which has in turn led to the now old joke that some compilers are optimized for the sieve it S been just as customary for Micro C reviewers to use nonstandard tests Actually we don t select nonstandard tests to be ornery but to be practical and to have fun So don t get me wrong I definitely support and feel that standard tests are important perhaps the most important tests But as usual I ve been having some fun solving a practical problem and have come up with some well in teresting results from some of my recent benchmarking Here s the story I ve been writing a statistical expert system along with Mollie Messimer at the University of Virginia with micro einstein an expert development system from Acquired Inte
199. nsigned envseg char command fcbl fcb2 paxramblock pbptr paramblock envseg 0 comline 0 strlen argument strcpy comlinetl1 argument strcat comline r paramblock command comline keep the old environment first char length of line terminate with Oxd paramblock fcbl paramblock fcb2 char Oxffffffff Ignore fcb s pbptr amp paramblock asm push ds asm push bp The next two routines work because this is the LARGE model and DS amp BP must be saved Turbo saves SI amp DI pointers are 32 bit entities and work with lds amp les Cute no DS DX pointed to program path ES BX pointed to parameter structure asm mov word ptr cs fill 0 ss save SS amp SP asm mov word ptr cs fill 2 sp asm lds dx program asm les bx pbptr asm jmp next asm fill dw 0 0 next asm mov al 0 asm mov ah 4bh asm int 21h asm cli asm mov ss cs fill 0 asm mov Sp cs fill 2 asm sti asm pop bp asm pop ds store SS amp SP in code segment do exec call restore SS amp SP 58 MICRO CORNUCOPIA 38 Nov Dec 1987 C CODE FOR THE PC source code of course C Source Code FSP screen manager oa wide oo E qux peu CX ine RS Der de us de Be dere dd Bw ee 400 Barcode Generator specify Code 39 alphanumeric Interleaved 2 of 5 numeric or UPC 300 GraphiC 4 0 high resolution DISSPLA style scientific plots
200. nt team for Intel s ASM86 as sembler His book on the architecture of the 80386 80387 was set for release by John Wiley amp Sons during the summer of 1987 Since A86 is shareware it is readily available from software libraries and electronic bulletin board systems To register your copy send 40 to Eric Isaacson 416 E University Street Bloomington IN 47401 If you send 50 Isaacson will send you an update disk that contains the A86LIB tool that is provided only to registered users For 80 Isaac son provides a registered copy of the D86 sym bolic debugger in addition to the update disk Registered users are entitled to future updates of A86 for only 10 in 1987 dollars says Isaac son hedging a bit for inflation Visa and MasterCard holders can call 812 339 1811 User supported software has given stiff com petition to regular commercial packages in several areas With the advent of A86 and D86 even the high end low level language field has a credible shareware alternative You d better duck Microsoft BOYAN Shareware got its start because the IBM PC didn t have any decent com munications software Andrew Fluegel man wrote PC Talk and the rest is his tory ric Isaacson is the fearless shareware author who is playing David to Microsoft s Goliath Eventually powerful programs like SmartComm and CrossTalk appeared in the regular commercial channels and ProComm and Qmodem shoved PC Talk
201. nvironments for supporting statistical strategy knowledge acquisition strategy In his introduction to the book Gale focuses on one of the central problems in statistics We need to make statistical strategy avail able to more people to prevent misuse of statisti cal packages Current packages provide excel lent numerical processing but the user is responsible for determining whether the processing is appropriate and what the results mean Statistical strategy is simply missing from current statistical packages Although few programmers have attempted to develop this kind of statistical strategy on a commercial level I believe this is an ideal op portunity for AI programmers to show their stuff We can describe statistical strategies in flow charts in trees and with rules and conditions If you re hazy about these concepts glance back to Expert System in Micro C issue 35 and the PC Diagnosis problem Using a simple inference engine like the one in issue 35 we can program an expert statisti cal system by simply changing the knowledge 84 MICRO CORNUCOPIA 38 Nov Dec 1987 Al Statistics amp Benchmarking The Turbos domain or rules to cover statistical strategy in stead of PC problems So a statistical rule might take the form Statistical test Kruskal Wallis We re looking for differences The differences are between means We have more than 2 samples Our distribution isn t
202. nywhere I like the sheer fun of watching people s faces when they realize I wasn t joking when I said my printer was in my bookbag these all make it worthwhile I m glad I bought it The Combo Now that I have a Zenith 181 and a Diconix 150 I can truly say that I am a Portable person I can go anywhere in the world take my entire computer sys tem with me and run any program I could possibly need or want to use Ex cept PageMaker I Screwed Up Some people say it takes a big man to admit he was wrong Personally I think it just takes someone who has made a mistake to admit he was wrong Anyway lm admitting that I was wrong What s the danger in it After all somebody already wrote in and said I was wrong and it was published in the last issue of Micro C What have I got to lose Anyway the mistake I m talking about was the crashing Exec procedure uncovered by George L Florman on page 68 in issue 37 the original Exec was published way back in issue 31 but its utility is timeless My mistake was that I didn t save the stack pointer before calling the MS DOS exec function It isn t that I didn t read that part in the DOS manual saying that all registers were fair game including SS and SP it s just that I never dreamed that anyone would be so stupid as to actually destroy the basic unit of context storage i e the stack Also I was lazy Why the stack pointer gets clobbered only when running Exec
203. o A Motherboard and 4 Expansion Cards in the Space of a Half Height 5 1 4 Disk Drive 3 WATTS 5 VOLT ONLY OPERATION 19 V GENERATED ON BOARD SCSI BUS OPTION HARD DISK ETC 956 K RAM 519 K 768 K OPTIONS POWERFUL V40 CPU FLOPPY DISK CONTROLLER 3 5 5 25 360 K 720 K 1 2 MB UP TO 128 K EPROM RAM NOVRAM BATTERY BACKED RT CLOCK C2 Development Chassis PC Known Good PC bus project development environment for Little Board PC not included Qty 100 336 PC COMPATIBLE from 395 Qty 100 336 Little Board PC MOUNTS ON A 5 95 DRIVE 5 75 x8 x1 CMOS Video Controller 4 mode CMOS video controller for Little Board PC Microsoft Corp Expansion 186 Little Board 186 High performance single board MS DOS system Multi function expansion for Little Board 186 I O Serial RAM and Math Options Project Board 186 Prototype adapter for 80186 based projec and products i 2 RS232C SERIAL PORTS SPEAKER PORT KEYBOARD PORT PARALLEL PRINTER PORT PC BUS 4 MODE VIDEO CONTROLLER OPTION FITS ENTIRELY WITHIN BOARD DIMENSIONS Qty 100 166 INCLUDES CP MI9 Little Board World s least expensive single board system Project Board 80 Prototype adapter for Z80 based projects and products Distributors e Argentina Factorial S A 41 0018 Australla Current Solutions 613 720 3298 e Austria International Computer Appli
204. o EXE _ All three compilers were tested on an 8MHz 80186 CPU PC Tech X16B using an Seagate ST225 hard disk MICRO CORNUCOPIA 38 Nov Dec 1987 Create a list to process 87 We Dare You To Abuse This Board Announcing The SLY40 XT T Turbo A Reliable PC XT Compatible For The Corner Stone of Your Products e Small Board Size 4 4 4 By 9 1 4 Four Layer High Integration Composed of just 15 Low Power CMOS ICS e NEC s 8 MHZ V40 e One Megabyte of Zero Wait State RAM Up to 64K of ROM e 8087 Co Processor Socket e Customized Serial Port e Standard Keyboard Connector e Board Simply Plugs Into PC Bus or SSlicer s Eight Slot Bus Board e Slicer s Own Bios Source Code Included Ideal For Tough Industrial OEM and Portable Applications e American Made and Fully Supported by Slicer SLY40 XT OK 300 00 256K 350 00 1MEG 480 00 Eight Slot Bus Board Call Ask About Our Complete Line of Computer Products and Accessories MasterCard Visa Check Money Order or C O D Allow four weeks for delivery Prices subject to change without notice NOTE NEW ADDRESS amp PHONE NO Slicer Computers Inc 3450 Snelling Ave So SLICER Minneapolis MN 55406 612 724 2710 Telex 501357 SLICER UD PC and XT Are Trademarks of International Business Machines MICRO CORNUCOPIA 38 Nov Dec 1987 AROUND THE BEND continued from page 2 I called Microsci
205. ocessing sys tems based on network architectures also believe that many computing problems can be mapped into subproblems and that groups of different algorithms can be hidden in black boxes The programmer houses the black boxes on different processors in the net work These boxes constitute a kind of process or task hiding similar to the programming concept of data hiding Only the interconnections between the boxes need to be well defined and under stood Such a structural approach to problem solving when applied consistently can eventually yield a program that s easily implemented on a parallel system with point to point communications 6 MICRO CORNUCOPIA 38 Nov Dec 1987 By Bernt Roelofs Ingenieursbureau Bieware Witbreuksweg 381 401 7522 ZA Enschede The Netherlands The Transputer Chip INMOS hopes the transputer chip will be used in much the same way as the dis crete transistor was used a few years ago as the basic building block of larger sys tems Indeed the word transputer derives from a combination of the words transistor and computer Each transputer is equipped with hardware links capable of high speed bidirectional serial communication There are four such links on each transputer These links allow any single transputer to be part of a multiprocessor network The transputer has other on chip facilities including a hardware timer and a task scheduler With the task schedu
206. ocks the parts for this project 1 800 344 4539 Mention the 6 00 scanner EID Figure 3 Display Adaptor Def Module DEFINITION MODULE Config This module provides the basic constants which define the graphics screen Xsize is in pixels Ysize is in rows Unused is in Bytes the interleaved formats have a few bytes left over in each interleaved array and ScrSegment is the segment address of the screen memory Use the values for the type of your display adapter This definition module is the only one which needs to be different for the different adapters Depending on the compiler you may need this EXPORT EXPORT QUALIFIED Xsize Ysize CONST Xsize 720 640 640 Ysize 348 200 350 Interleave 4 21 Unused 362 1920 ScrSegment 0b000h END Config 46 MICRO CORNUCOPIA 38 Nov Dec 1987 HGA CGA EGA Interleave Unused ScrSegment 05800h 0a000h Figure 4 Definition of High Level Constants and Types DEFINITION MODULE ScrnStuff This module has the basic screen data definitions and provides the header for some of the lower level subroutines FROM SYSTEM IMPORT BYTE ADDRESS FROM Config IMPORT Xsize Ysize Interleave Unused Depending on the compiler you may need this EXPORT EXPORT QUALIFIED Raster Screen ArrayLen Lines ClrScr GrabClock FastClock SlowClock Scan GraphMode PixAddress SetBit ClrBit InvertBit CONST Lines Ysize
207. oenix Technologies Ltd Norton trademark of UnderWare Inc Editor is a trademark of Peter Norton Computing Inc Demo Disk is fully functional but does not readily write large files e Split the screen into variable sized windows e Virtual disk buffering simplifies editing of large files e Memory management supports up to 640K e Execute DOS commands or other programs e MS DOS pathname support e Horizontal scrolling edit long lines e Flexible cut and paste with 36 scratch pad buffers e Customization determine your own keyboard layout create your own editing functions support any screen size Optimized for IBM PC XT AT Color windows 43 line EGA EASY TO USE e Interactive on line help is user changeable and expandable e On line integer calculator also algebraic expressions e Single key search and global or selective replace e Pop up menus for easy access to many editing functions e Keystroke macros speed editing hot keys for menu functions FOR PROGRAMMERS e Automatic Indent Undent for C PL I PASCAL etc e Match check nested parentheses i e and for C e Automatic conversion to upper case for assembly language labels opcodes operands with comments unchanged e Optional 8080 to 8086 source code translator FOR WRITERS e Word Wrap and paragraph formatting at adjustable margins e Right margin justification e Support foreign graph
208. omputing MS DOS In The Public Domain Graphics In Turbo Pascal 104 pages Fill in your back issues Issue 27 12 85 SOLD OUT ISSUE 28 2 86 Pascal Runoff Winners Rescuing Lost Text From Memory Introduction To Modula 2 First Look At Amiga Inside The PC 104 pages ISSUE 29 4 86 Speeding Up Your XT Importing Systems From Taiwan Prototyping In C C Interpreters Reviewed Benchmarking The PCs 104 pages ISSUE 30 6 86 PROLOG On The PC Expert Systems Logic Programming Building Your Own Logic Analyzer 256 K RAM For Your 83 Kaypro PC DOS For Non Clones 104 pages ISSUE 31 8 86 RAM Resident PC Speedup Practical Programming In Modula 2 Unblinking The PC s Blinkin Cursor Game Theory In PROLOG and C 104 pages ISSUE 32 10 86 Public Domain 32000 Hardware and Software Writing A Printer Driver For MS DOS Recover A Directory B Reading amp Writing isk Sectors 96 pages ISSUE 33 12 86 Controlling Stepper Motors From Your P Introduction To Fractals The Secrets Of MS DOS From Boots To Device Drivers Poking About In The System With Turbo Pascal 96 pages ISSUE 34 2 87 Designing With The 80386 Build A im le Oscilloscope A Cheap 68000 Operating System A Concurrent Operating gt stem Recovering Directories And FATs 96 pages ISSUE 35 4 87 Building An 8 channel Temperature scanner Designing an Expert System Teaching Your PC To Bee W
209. onths Other features of the updated Modula in clude new runtime debugger interface new text editor more code optimization register tracing mostly inteligent DOS compatible linker which only links in those parts of a module ac tually referenced by a program the old version just included the whole module even if you only used one constant and many other goodies that slipped through my mind during theconversation Since I am writing in August and the new compiler won t be out until September I am tell ing you all this on faith but I think hope I can irust my sources All I know for sure is that I m real anxious to get my hands on a copy Now that I no longer have to worry about dodging pools of chicken blood computing egg counts and assembling clones I will have more time to devote to my true addiction programming If I get my software care package in time I may be able to tell you a few things about it next issue Then again maybe I ll have to write about slug control or desalination plants Enough of vaporware Let s get on to Software Unfortunately the only software I saw while I was in the U S that really impressed me was Earl s Hinrichs of PC Tech graphic Mandelbrot set calculation and display program I picked up a copy of Turbo C too but it s already receiving so much undeserved press that I refuse to even mention it Not that I m not impressed with Turbo C It s just that there are
210. op hardware newtick oldtick oldtick char tickhandler put interrupt address into table enable memcpy intable NULL 0x400 save old interrupt table geninterrupt 0x12 how much memory installed meminstall AX 0x40 store amount in paragraphs Note that TurboC concatenates strings for you puts nDEINSTALLATION PROGRAM INSTALLED n Press Alt Leftshift Rightshift n to deinstall subsequent resident programs n keep 0 SS psp 1 lop off stack terminate amp stay keep 0 n uses DOS function 31h to set aside n paragraphs of memory MICRO CORNUCOPIA 38 Nov Dec 1987 61 96 By Laine Stump Redhouse Press Merkez PK 142 34432 Sirkeci Istanbul Turkey WORLD Toys Modula And The Zenith 181 Our boy is back in Turkey after participating in the Micro C technical forum in Bend SOG VI This issue he s hot on the trail of the new Modula and the greatest new laptop Well almost the greatest y the time this issue has been printed and mailed I will have a new address No no that s not it Let s try that again By the time this issue has been printed and mailed I will not have an address There That s what I should have said My two year contract with the DFT is now officially finished and I m officially moving on to something else Or nothing else Or none of the above I will be completely unreachable during the
211. ot Ti Lightning software each sheer os when using Si soft Word 1 2 3 or most popular programs our Tuf board will check your sp pe gives you instant access to Randpm House s 80 000 word Concise Dj ary and 60 000 word ind much much more Biber software companies weep says Seymour of PC Week Sold separately rbo Lightning retails for 99 95 we ubican INTERNATIONAL 7650 Haskell Avenue Van Nuys California 91406 818 780 1673 Turbo 101 is a trademark of DataDesk International Turbo Lightning is a trademark of Borland International IBM and IBM AT are registered trade marks of International Business Machines Inc Kick WordPerfect Micro 800 826 5398 The Turbo 101 is the best data entry tool since the pencil For users of spreadsheets like 1 2 3 the Turbo 101 s separate cursor controls and numeric keypad makes entering numeric data into cells and moving from cell to cell as natural as moving your fingers And for word processing the Selectric typewriter layout makes the Turbo 101 as easy to use as a pencil and with the extra large Enter Shift amp Control Keys you ll make so few mistakes you won t even need an eraser geminis yen merge SPECIAL OFFER ONLY 149 S5 FOR BOTH KEYBOARD amp SOFTWARE includes 30 day money back guarantee and 2 year full warranty To prove that we don t ignore you or your pocketbook you get our Turbo 101 Enhanced Keyboard and Borl
212. ot sor SIGNAL 3 Aza ys A11 DMA ADDRESS ENABLE PREVENTS DMA S FACTORY JUMPER SETTINGS SHOWN ABOVE AEN A9 AB A7 AG AS er Card Bus Interface SLOT PIN tow 0 WRITE WHEN BOARD IS SELECTED OR GATES 2 UNUSED GATES AVAILABLE ELECTION SLOT PIN B14 IOR 1 0 READ SILKSCREEN Ol BOARD SHOWS TUUS OVER ALMOST ALL LINES CES IT SHOULD LOOK LIKE THIS 30 AQ Al BASE 2 TO LS374 PRINTER DATA 2 BASE 1 BASE 2 BASE 3 N C Oe TOLSI74 625 N C BASE PO TO LS244 PRINTER DATA BASE 1 m TO LS240 1G AND LS125 BASE 2 to LS249 2G AND LS125 3 BASE S N C LS139 56551 X SELECTED Y LINE GOES Low OUTPUTS G CHIP SELECT WHEN D SLOT SLOT PIN SIGNAL TO MODIFY THE ADDRESS CUT AND REMOVE EXISTING BOARD TRACE SOLDER NOTE SINCE A2 ISN T o EIGHT oS NO THE Ug SPACE MICRO CORNUCOPIA 38 Nov Dec 1987 ie Do ON BOARD _ DATA BUS 18245 EU OCTAL BUS TRANSCEIVER GATES DATA ON OR OFF THE BOARD DEPENDING ON THE IOR FNA eid continued from page 29 Address amp Data Figure 2 shows the address and data interfaces to the PC bus This card isn t limited to the usual LPTO LPT1 or LPT2 addresses of most printer cards you can place it anywhere in the I O address space a very nice feature since we can move it to an unused area to prevent interference
213. ou are using File TSR PRJ looks like this TSR WIN DOWS H COLORS H WINDOWS COLORS H This means there are two C files in volved in creating this file TSR C and WINDOWS C If you change a C file that file should be recompiled and the whole system re linked TSR C depends on two header files WINDOWS H and COLORS H If you change either of those files recompile and re link TSR C WIN DOWS C depends on COLORS H The Future Next time I plan to use the printer port and Turbo C to create simple remote data acquisition and control modules which use a four wire synchronous serial interface Have any ideas for projects you d like to see or problems you need solved Please send them to me and Abby MICRO CORNUCOPIA 38 Nov Dec 1987 35 CIRCUIT BOARDS PCB Edit creates multi layered PCB s with ease Included are solder mask and legend ink support plotter printer drivers MUCH MORE 99 95 PCB Shop will build double sided plated thru holes circuit boards from your artwork or PCB Editfiles for only 1 00 per square inch single quantities with no set up charges ANALOGIC the 32 channel logic analyzer forthe IBM PC Has 16 bittrigger word 80 nano second sample time for only FULL UNIT BARE BRD 399 95 99 95 MOVER the two axis stepper motor driver controlled by your printer port only FULL UNIT BARE BRD 179 95 49 95 ANALOGI GC PHONE 602 458 4065 BOX 3228 Sierra Vista AZ 8
214. ou wanted a turbo board and a 20M Hard Drive amp Controller 410 Now how much would you pay JUST 1887 HARD DISK DRIVES 10M Seagate 212 10M Rodin RO 252 R0352 20M Miniscribe 20M ST 225 no 2n VES s 20M Tandon TM252 20M Tulin Oki 20M Half Height with Controller 410 32M Half Height with Controller 667 40M Quantum Q540 Factory Rebuilt 665 60M with Controller 70M Vertex V170 00002 HARD DISK CONTROLLERS WD 1002 WX2 with Cable 125 mnis59 10 rax oss 105 Adaptec 2070A Get 15M on 10M Drive 129 Konan KXP230 Get 15M on 10M Drive 145 Konan KXP230Z Get double the density 164 TEST EQUIPMENT OSCILLOSCOPES Phillips 3260E 120 MHz Dual 975 TEK 7403N 7A18 7B50A 60 MHz 750 ANALYZERS Nicolet 500A 1 Hz 100 KHz 1800 DBASE BOOK OF BUSINESS APPLICATIONS by Michael J Clifford Reg 19 95 NOW ONLY 3 95 MICRO CORNUCOPIA 38 Nov Dec 1987 Kags GAs TL QS ORAE UNINTERRUPTABLE POWER SOURCE MICRO SOLUTIONS protects your equipment and your data from power outages and brownouts Our power systems provide the fastest switching speed in the in dustry 2 ms 1 EMI RFI filtering and surge spike protec tion all in one affordable unit 1 year war ranty on all units Available in a size to suit your needs 200 watts 290 00 350 watts 360 00 550 watts 410 00 800 watts 610 00 1000 watts 710 00
215. pace J TSIZE CA NumCols Now allocate the needed space WITH A DO FOR I FirstRow TO LastRow DO IF Available J THEN ALLOCATE Row I J ELSE FOR K I TO FirstRow BY 1 DO DEALLOCATE Row K J END DISPOSE A RETURN END FOR K END For I END With Now read the screen blocks CODE PUSHBP Save the Base Pointer First find the currently displayed page and mode SETREG AX GETMODE SWI INT10 GETREG AX MODE GETREG BX PAGE Now read each location FOR I FirstRow TO LastRow DO Position I ROWINC FirstCol FOR J 0 TO NumCols 1 DO First the cursor must be positioned SETREG AX CURSOR SETREG BX PAGE SETREG DX Position SWI INT10 Now the character must be read SETREG AX READCH SETREG BX PAGE SWI INT10 GETREG AX TEMP Warning the next statement is word size sensitive A Row I J CA TEMP INC Position END END CODE POPBP Now try to store the block I 0 Find an open storage space WHILE I lt NumBlocks AND BlockSpace I NIL DO INC I END If one was open then store the block IF I lt NumBlocks THEN BlockSpace I A TRUE END END IF ELSE done FALSE END END CutBlock PROCEDURE FindBlock Handle ARRAY OF CHAR VAR INDEX CARDINAL VAR A BlockPointer VAR found BOOLEAN BEGIN found
216. per case As Figure 2 illustrates the mes sagepasser consists of five different processes which are all started by a parent boot process not shown in the illustration The parent process kills it self after booting the child processes Obviously not a traditional American process Three processes run in high priority nlink p link and pn link They re high priority processes because com munication between the next and the previous transputer won t depend too much on the processes on the current transputer Only high priority processes on the current transputer can slow down communications The Mandelbrot cal culation has no other high priority processes continued next page MICRO CORNUCOPIA 438 Nov Dec 1987 11 continued from page 11 High Priority Processes Running at high priority has a few major effects on the execution of the process First a high priority process will not be descheduled unless it has to wait for a channel to become ready or for the timer to match a certain count Once a channel becomes ready the process is scheduled again As long as there are processes on the high priority ready queue no low priority processes will be executed To give low priority processes a chance to execute it s wise to keep the high priority processes as short as pos sible Therefore it s sometimes necessary to divide a single process into a high priority and a low priority process Com municatio
217. phics card would be it The colors the speed of the animation the resolution every thing You ll have to see it And even then you wouldn t believe it They can come back next year if they ll bring their graphics More Curiosities Mc Tek and MicroSphere were peddling hardware hot and heavy Both had dropped their prices from a year ago and both said sales were up significantly three to six times Integrand was showing its very latest cabinet It s a solid PC XT AT cabinet with an industrial duty linear power supply and room for at least six fans The cabinet and supply com bination remind me of an early S 100 system I m sure you could drop this cabinet 10 feet onto concrete without damage assuming you could lift it 10 feet without damage Joe and Marla Bartel Hawthorne Technology showed their KAOS operating system running on their 68000 based Little Giant I knew the little giant was small but it was still a shock to see it Their table was the center of a constant crowd The Hawthorne Technology card reminded me of Ampro s Z80 based Little Board The 68000 is very easy to use for con troller applications because it feels like a grown up Z80 No funny addressing schemes just lots of performance and lots of address space Speaking of things to slap up along side a 5 1 4 drive Ampro also has a new CMOS based PC compatible complete with PC bus multi emulation video controller and SCSI So now you have la Z80 and 8088 o
218. ping by Federal Express to most major cities in North America add 20 ANDERSON TECHNO PRODUCTS INC 947 Richmond Road Dept C ICro Warrenton OR 97146 MetRods Inc Anderson s latest version of Poor Man s Network Our network operates at 9600 bps and connects a Kaypro II to an XT clone Figure 2 is a diagram of the serial cable we use Our earlier Poor Man s Network driver for the V20 version of PC RP M2 was limited to 4800 bps The problem was that there s no 16 bit I O directly available to the V20 s 8080 emulator To make the 16 bit I O space accessible to 8080 programs we created an input and output redirection scheme based on the CP M I O byte at location 0003H Evidently the redirection overhead limits performance Under the Z280 emulator there s no operating system overhead associated with doing input or output to a port so in this unusual in stance the software based emulator out runs the hardware based emulator Even though most IN and OUT in structions will execute correctly under the Z280 emulator it s necessary in near ly all cases to modify and reassemble CP M programs that do their own I O For example with the I O Page register set to 00 and the A register set to 42H the 8080 instruction DB 66 or IN 66H 503 861 1765 Ottawa Ontario K2B 6R1 Telephone 613 722 0690 for more information or to order Registered trademarks CP M Digital Research ZCPR R Conn Z system Echelon
219. plus RAM buffering if it s used This mode appeared to be a bit slower than 1 3 Normal data compression You get all the features of 2 plus a compression scheme that s supposed to reduce the size of data files by about one third This mode appeared to be about as fast as 2 Figure 1 Timing The Konan Card drive c drive d 16 41 sec 18 72 sec CRC 184K of com files 4 Archival data compression You get all the features of 3 plus more sub stantial compression on data files and a bit of compression on object files This mode was noticeably slower than any other Test Configuration First I went over to MicroSphere and borrowed a drive I divided up the Mini Scribe 20 meg 65 ms unit into four logical drives Logical drive C had to be normal so it was bootable Konan recommended that the boot drive be 1 meg so I gave it the requisite 30 tracks _I divided up the remainder of the disk into three equal parts Drives D E and F each got 194 tracks See Figure 1 I set up drive D as a high speed drive drive e drive f 19 04 sec 23 77 sec standard card Lapine 65ms drive nothing in memory took 16 75 sec MMmMeMIMeee e 2 space consumed 356 352 303 116 311 296 229 376 copied 309 248 bytes of object code from a floppy to the hard drives CRC time on 309 248 byte floppy The floppy took 133 29 seconds total bytes 4 954 904 space used 4
220. ptions for your next little project Tapes Of The Talks See Gary s Last Page for a list of the speakers and their topics You ll notice that some have asterisks by them These are the talks for which we have good quality intelligible audio tapes We also listened to the tapes to be sure we could follow the presentation without seeing the blackboard etc The tapes are 6 each postpaid You can order one or more by specify ing the speaker s name on a letter the phone or our regular order form Joe Bartel spoke twice so indicate which talk Two Copies Of Micro C Last issue we sent 20 000 copies of Micro C to Dr Dobbs readers Of course a number of you subscribe to Micro C and the good doctor so you received two copies If so please pass along one of your copies to some terminal ridden person Or better yet share it with a whole group of the terminally ill People like your local SPCH Society for the Prevention of Cruelty to Hackers Or best of all take it to work and leave it in the reception area Especially if you work for Dr Dobbs Byte Computer Language Programmer s Journal Short Listing For those of you who would like the rest of the Figure 2 list ing by Russ Eberhart Teaching Your PC To Listen pg 51 issue 37 can call the Micro C RBBS 503 382 7643 or send us a self addressed stamped envelope Puzzles Wanted I d like to include some brain twisters human atid other wise in the nooks an
221. puters is just like any other computer network It cannot claim divine right or other forms of exemption Figure 5 Message Types general resource call direct resource call resource call acknowledge general path call direct path call path call acknowledge message request normal message confirmed message express message retransmit packet check link check node claim divine right or other forms of ex emption As with other computer net works it s best to keep the sending receiving routing error detection and correction etc out of user sight One of the goals of a generic mes sagepasser is to support multitasking Multitasking for a system of transputers is a minor extension but it s of great use to the user because he can run a second task For instance in a control system it might be handy to start a statistical task or a distributed database In later stages dynamic load balancing of the processes on the transputers should be possible So let me give you an overview of a generic messagepasser The ISO OSI 7 Layer Model The ISO OSI network model provides a good starting point for a general pur pose messagepasser If we look briefly at the ISO OSI model for a network we can see that it s divided into several layers see Figure 3 Not all layers of the ISO OSI model need to be implemented for a transputer messagepasser since the model is general and flexible in nature The physical laye
222. r Mean write Mean nl Pass the list amp variables to mean Get the answer from storage process2 List Set up to calculate variance amp answer Mean sd sd List Mean 0 0 Pass list and mean which we answer2 Var use to calculate the vari amp sd write Var nl Get variance from storage Sdev sqrt Var Find sd sqrt of variance write Sdev mean H T S N Y H S N2 N 1 mean T Y N2 mean S N Z S N assert answer 2 Store the result in a db Find the mean recursively sd H T Mean Squares N Dev Mean H Square Dev Dev NewSquares Squares Square N2 N 1 sd T Mean NewSquares N2 sd Mean Squares N2 Var Squares N2 1 assert answer2 Var Find vari sd recursively IS NOTHING SACRED a Now the FULL source code for TURBO Pascal is available for the IBM PCI WHAT you are still trying to debug without source code But why Source Code Generators SCG s provide completely commented and labeled ASCII source files which can be edited dnd ceccabies and UNDERSTOOD l SCG s are available for the following products The darndest thing I ever did see TURBO Pascal IBM PC o 67 50 Pournelle BYTE LL TURBO Pascal 2 80 45 00 CP M 2 2 eoecocoeoocececcceccoeos 45 00 I have seen the J 7 CP M J eoeeoooeooecsocscccocces 75 00 original Source and i 1 A fast assembler is included fre
223. r is already implemented by the transputer hardware The wires of the external channels form the Physical layer The messagepasser on a single transputer will roughly look like Figure 4 The Data link layer consists of several parallel processes two each for the eight hardware channels or four links of the transputer The function of the Data link layer is to receive message packets put them in a message block check them for parity and pass a block pointer to the Network layer The Network layer takes care of the routing of the messages This layer has the following tasks It interprets the mes sage blocks coming from the Data link layer The Network layer looks at the type of message and the destination of the message If the block is meant for another node the network layer will look into a routing table to find the best link to output the block on In case of obstruction of the best link an alterna tive link may be chosen from the table Other things may also influence the Network layer s choice of a link If the block is meant for this node the pointer to the message block is passed on to the Transport layer Message blocks coming from the Transport layer are interpreted on their destination address The source address is completed with the node ID NID The Network layer then routes the block to an appropriate link In case of receive or transmit errors from the Data link layer the Network layer is
224. r than 10 point is usually illegible Interestingly it s easier to read the 9 point when you display it smaller than normal Also the text cursor often gets Strange Put the cursor on a 9 point character and hit the delete key and surprise another character in the line will disappear Insert a character and it ll show up somewhere else in the line In 1 1 they are scaling their screen fonts but they aren t properly calculating the character widths so you think you re somewhere Ventura thinks you re some where else When the problems occur it s nearly impossible to edit text while in Ven tura something I do a lot Using larger type would be a solution purchasing custom screen fonts from Bitstream might be another but it s 290 per set If you can live without the new fea tures of Ventura 1 1 you ll probably be happier with 1 0 Otherwise wait for 1 2 Ventura Support l The nonprofit Ventura Users Group has taken on the task of researching the hardware and software that can be used They re looking at printers monitors printer fonts and screen fonts They say they re also help ing members with Ventura problems Ive just received a copy of their monthly magazine and it looks really good If you use Ventura you should subscribe 24 per year Ventura Users Group 16160 Caputo Dr Morgan Hill CA 95037 nun Reliable Cost Effective Solutions for Computerization World s smallest PC and CMOS to
225. r trying different approaches to han dling the data I decided that arrays were fastest And to keep things simple I had the program generate a list of the first 7000 integers and store them in the array for processing I started timing the cal culation after the array had been passed to the stat function notice start The results were surprising It took Turbo C 4 4 seconds on the same com puter same time of day to find the mean of 7000 reals and 18 2 seconds to find the mean variance and standard deviation Turbo PROLOG calculates the mean variance and standard deviation of 7000 reals in 9 1 seconds Very interesting I thought Very surprising said Mike Floyd PROLOG whiz at Borland International Highly irrational said a number of C program mers at SOG VI So I went back to the drawing board tried different code and different memory models and optimization tech niques but I could write nothing that was faster So before I complete my story there s one more surprise let me urge you to send in your fastest C code If you re computing on a fast 10 MHz 80286 based AT your time to beat is about 2 6 seconds for the mean the time my C code took on Mike s computer The PROLOG code gets well under 2 seconds on that machine But back to the story I m easily con vinced that I m not an expert C program mer so I could be overlooking something But I am at least a fair Pascal program mer
226. racters across by making each character a bit smaller which brings us to the second problem Each character is slightly smaller on the Diconix than on a standard Epson As a matter of fact each dot occupies 1 96 inch vertically instead of 1 72 inch Everything still prints fine it just comes out looking smaller especially in graphics mode On the other hand it s higher resolution There also is no paper turning knob on the printer This was done to save space and I appreciate that but it is real continued next page MICRO CORNUCOPIA 38 Nov Dec 1987 63 continued from page 63 ly inconvenient to be forced to grab the tractor rings and twist to feed in new paper Loading paper is far from automatic or convenient really I guess it s okay now that I ve got the method down but I still can t get over the idea that it s a kludge Another possible problem for some programs is the lack of a few Epson fea tures Downloaded character sets are not supported not surprising since the Diconix uses a 12 jet printhead instead of the standard 9 Similarly quad density graphics mode ESC Z is not sup ported Neither is Elite pitch lt ESC gt D or reverse line feed lt ESC gt j or half speed printing lt ESC gt s These are small points though The idea of a battery powered printer to ac company my battery powered computer the ability to print out letters and lists and samples and drafts a
227. ransputerland A good discussion of a general mes sagepasser would fill a book I hope my brief discussion has given you at least a little insight into the purpose and utility of a messagepasser I wish to thank Prof Andy Bakkers of the University of Twente The Nether lands for guiding me into parallel transputerland MICRO CORNUCOPIA 38 Nov Dec 1987 13 Developing A Parallel C Compiler Powerful New Extensions For A Familiar Language Parallel processing isn t much good if you have to rewrite everything you have from scratch Here Klaas and Rob show us how an old favorite can be taught new tricks and how we can learn them too to build large parallel processing systems which increase linearly in speed with the addition of processors However to use these systems we need a good programming language This programming language needs to be powerful and should support special transputer features like channels links and the ability to initiate processes INMOS British marketers of the transputer provides a high level lan guage called Occam for parallel programming Occam is quite powerful with its parallel constructs par and alt And Occam knows the channel data type which gives us some control over the placement of processes on different transputers But it has several disadvantages It s a new language with a small base of source code and programming know how It s a static language every varia
228. rba or almost any Z80 CP M 2 2 system HDS Host Board with Winchester Connection software 89 00 HDS Board with software and WD1002 05 board WD1002 05 Hard Drive Controller Board Rodime LaPine amp Miniscribe hard drives and XT controller cards call for prices The KayPLUS ROM Package by MICROCode Consulting Get the performance of a Kaypro 10 and more even on your Kaypro 2 Lets you install up to four floppies and two hard drives with no software assembly required Adds features such as automatic screen blanking type ahead buffer boot from hard drive and quad density support Includes manual standard utilities AND hard disk utilities KayPLUS ROM Set KayPLUS ROM Set with QP M xx SPECIAL xx QP M by MICROCode Consulting CP M 2 2 compatibility with outstanding performance QP M adds features such as automatic disk relogging drive user selection from colon 31 user areas drive search path and transpa rent time date stamping all in the same space as CP M Installs from a convenient customization menu no software assembly required Bootable disks available with CBIOS for Kaypro Xerox amp BBI QP M Operating System complete ready to boot QP M without CBIOS installs on any Z80 system 115 00 MicroSolutions Software and hardware to link CP M and MS DOS UniForm PC by MicroSolutions This program allows you to read write copy and format diskettes for over a hundred CP M and MSDOS computers on your
229. rd on whether the fix works Also Seagate has brought out a new model It s a 40 meg half height stepper motor style drive that s very quick I under stand it supports 28 ms access time if the drive is partitioned into two 20s 38 ms access if it s a 40 It also has automatic head park at power down If it s solid it s hot They call it the 251 I took an informal survey at SOG VI Six folks already had 251s Five had had no problems One had his die right after delivery The 251 is selling at last year s 225 price under 600 with controller Also at SOG I asked Charles owner of Mc Tek about the Seagate 225s Oh yes they had trouble for six months They re much bet ter now So now you know as much as I know about hard drives maybe more NECS are available if you can find a dealer who s stashed a few away Miniscribes are still solid performers but noisier than the NECs And you can check the latest status on our Microscience 825 by logging onto our RBBS If you get in it s running What You Want For me one of the highlights of SOG was iaces I didn t even attend l d asked Peter Schenck the Saturday dinner speaker and the best marketing mind this side of Tumalo to conduct a focus group I selected randomly of course eight at tendees and turned him loose on them I was excluded m the fray In under an hour those fine folks had unequivocally laid out what they liked about Micro C where they wanted the
230. rive FSPOOL This neat little program redirects output to a diskfile Very handy for creating a file from DEBUG UNWS A menu driven BIT7 of the DOS world Resets bit 7 which has been set high in some characters in WORDSTAR turning your WORDSTAR doc files into standard ASCII files DEBUG DOC A file of tips on using DEBUG Good for the beginner ASM These source files for SDIR RAMDISK and UNWS will really help you get your feet wet in assembly language programming Or if you already know the ropes you can improve these programs MS5 Util ST PC WINDOW Z Z EXE Move about hard disk directories PROTECT Make sure that your exe and com files cannot be erased by the erase command UTIL moves files between subdirectories sorts directories redefines the keyboard lets you type directly to your printer pipes output and lots more PCWINDOW A semi sidekick PCWINDOW combines notepads multiple timers ASCII reference code and other features DOSEDIT A simple editor for DOS commands MS15 Utilities Here are utilities to make your life more efficient DESKMATE is a Sidekick lookalike with notepad calculator calendar and access to DOS commands EASY ZAP a disk inspector will allow you to examine and modify sectors It works on hard disks as well as floppies UNERASE is the essential utility to save you from your own recklessness If you ve unintentionally erased a file UNERASE will undo the
231. rogram Considering the oversupply of those darn things nowadays that may turn out to be the greatest social cost of those 100 000 compilers out there Think of it thousands of routines in the public domain all fighting for Alt F1 To demonstrate such operations I offer in Figure 2 a TSR that deallocates TSRs above it if the alternate key and both shift keys are pressed down at once It s hardly fun anymore it s almost too easy The Bigger Picture The appearance and overwhelming success of Turbo C mark a genuine revolution in the world of C program ming No longer will C be the possession of the select few who love to snort and say that C is obviously not something for the average hobbyist It looks as if the average hobbyist is going to own a copy of a superb C compiler Whether he will use it is still to be seen It is a fine sign of the growing sophistication of the microcomputer world that something so esoteric as C can become a genuine fad I wish I could be as enthusiastic about the details of Borland s implementation as about its overall conception It s just not as smooth a product as Turbo Pascal Yet Perhaps the greatest benefit to those of us who already use C is that Borland just upped the ante for every maker of C compilers in the area of cost first of all in the area of documentation in the area of ease of use The day of the Zip Lock bag and mimeo documentation is officially over Thoug
232. rototyping This makes function declarations much more familiar to Pascal types and it al lows the compiler to check for errors when you make a function call I like this feature a lot To control screen colors I created a header file called COLORS H which defines all the possible colors on the CGA These tell the window which character and background colors to use EGA cards are appearing which emu late Hercules along with CGA but I jumped into the clone fray too early for those so I m just assuming you have CGA A Gotcha One problem I encountered and haven t yet figured out is passing pointers to functions inside of the inter rupt routine You ll notice a strange function called window put binaryO which puts a literal string 1 or 0 into a window depending on the bottom bit of an integer When I tried passing a pointer to either of these strings it worked but cor rupted the array where the interrupted screen was saved This seems odd and I haven t figured out whether it s a com piler bug or my fault but things seem to work okay if I put everything in as literals Ugly but operational Some Details When you compile this code make sure you set the BASE define at the beginning to your card s address You should also create a project file This is like the UNIX makefile but much simpler Use the Project option on Turbo C s main menu to tell the com piler what project file y
233. runoff took place at the SOG This year s T shirts were pretty but if it weren t for Gary Entsminger around I d have never known what the plant on the shirt was or its significance Lastly maybe with the rumors run ning about the vaporous SOG VII let me say this I will gladly book a room at any hotel motel in Bend just to go to the SOG If a large enough group of us feel this way most motels have a group dis count rate Sure it wouldn t be the dorm and it would be more costly but it would be well worth the cost if the only hang up to the next SOG is the un availability of the dorms If on the other hand the auditoriums and such are also going to be unavailable book the armory or a motel convention center or whatever Long live the SOGs SOG VII 92 MICRO CORNUCOPIA 38 Nov Dec 1987 MS DOS CP M E EEPROM PROGRAMMING SYSTEM A FULL FEATURED HARDWARE SOFTWARE PACKAGE FAST PROGRAMMING ALGORITHM NO PERSONALITY MODULES REQUIRED STAND ALONE BOARD INSTALL PROGRAM FOR SOFTWARE ALL SUPPLIES ON BOARD PROGRAMS 26 25 21 amp 12 5V E EEPROMS HIGH QUALITY TEXTOOL ZIF SOCKET LARGE COMPREHENSIVE MANUAL PARALLEL PRINTER INTERFACE CONNECTS TO ANY PARALLEL PRINTER INTERFACE USES 8 OUTPUT DATA BITS AND THE PRINTER BUSY LINE FOR DATA INPUT CONTROL PROGRAM COMMANDS e PROGRAM EPROM S FROM DISK FILE READ DISK FILE INTO BUFFER READ EPROM S INTO BUFFER i VERIFY EPROM IS ERASED e CH
234. s Current and potential shareware authors should contact the Association of Shareware Professionals by writing to ASP Membership 11058 Main Street Suite 225 Bellevue WA 98006 Interested parties can also track down ASP on CompuServe s IBMNET The user community will be watching as ASP takes a stab at raising shareware out of its awkward youth preparing it for maturity What Users Can Do 1 Pay for your programs Unsup ported shareware dies of starvation If you use a shareware program regularly then you must have found some value in it Send in your fee and keep it alive 2 Remember the share in shareware You can be part of the dis tribution system Pass along programs you like to friends and associates Make sure that your local users group gets a copy for its software library Be careful to keep all pertinent files together The more people who use your favorite shareware program the more likely it is to thrive and survive 3 Make it better You re the user How do you use it What works What doesn t What s missing No software gets updated more rapidly than shareware Authors care what you think EMERALD MICROWARE Your CP M and MS DOS Connection Hard Disks for your Z80 CP M computer from Emerald Microware and MICROCode Consulting No other upgrade improves your computer s productivity like a hard disk We have all the hardware and software to install a hard drive on your Xerox 820 Kaypro Zo
235. s If you need to know something the background task tells you instantly The Printer Board I compared the design of four dif ferent printer boards an AST and three cheap ones and I m convinced that from a programmer s viewpoint all printer cards look the same The documentation however doesn t The MicroSphere board comes from Taiwan famous for manuals which say things like Do not agitate the il legible or you may have a very great oc currence There were errors and the circuit diagram was awful So I redrew it Figure 1 shows the logic symbols I used I ve shown discreet gates with the usual symbols see Figure 1A Chips which collect a group of gates under a single control are very common now since so many circuits are bus oriented for those I use the IEC stand ard shown in Figure 1B The notched block at the top of the chip represents the control unit for the group and the rec tangles stacked beneath it are the in dividual gates drivers flip flops etc I haven t shown power and ground pins or bypass capacitors on the diagrams continued on page 31 Full Featured AT Motherboard fits XT or AT case 399 6 8MHz 489 for 6 10 Eco C C Compiler This is the only package we reviewed that we would be willing to call a professional tool Computer Language Feb 1985 When the review mentioned above was written the Eco C C Compiler was priced at 250 00 Now you can have the same co
236. s well No listing of it however Sigh How well do these instructions work References to the index registers abound with words like slow sluggish or even ponderous Well there s no use getting excited over turkey code so to check it out I wrote a loop program see Figure 2 which decrements 16 777 216 to 0 and modified it into five test programs 1 Test A uses the undocumented CONTACT LOGI codes 2 Test B replaces the DBs with NOPs and the XH with the B register The NOPs simulate the extra fetch needed for the DBs 3 Test C removes the NOPs and is the Gold Standard for speed 4 Test D uses the alternate register set via the EXX instruction 5 Test E uses the brute force method You know Push AF on the stack fetch a variable from memory etc Tests D and E try schemes which don t use the undocumented codes Timing was done with a watch and this proved accurate enough Figure 3 sum Figure 3 Z80 Instructions Timing Results Test Description Code Size in bytes Undoc code 50 Reg amp NOP s 50 Std Reg 44 Use EXX 56 Use Mem Var 76 Tests were run on a 5 MHz Accuracy 1 est Time sec Time DEC microsec Clock cycles 72 MICRO CORNUCOPIA 38 Nov Dec 1987 INTRODUCING PROBE ONE LOGIC ANALYZER CONNECTION Locic _ INTERNATIONAL MASTERCARD VISA COMPACT 20 MHZ ANALYZER IN A POD INTERFACES DIRECTLY TO PC PA
237. s job sequential ly and only runs after an input on the in coming channels Because pn link will wait for input most of the time an out put to the pn link on the next transputer is serviced immediately The pc link process acts only as a buffer to hold the next coordinates for the calculating process cp link buffers the calculated block So the calculating process can start calculating the next set of pixels and doesn t have to wait for the p link to service it The calculation process can read them in from the pc link The calculation process is always fully loaded so every transputer is never idle The use of links also has the ad vantage that the pc_link and cp_link processes are descheduled they don t consume processor time to check now and then if a service is requested from them If the calculating process wants a service the processes are rescheduled Because we use internal links and be cause both pc link and cp link will wait on the calculating process the calculat ing process will not be descheduled to wait for a channel to become ready and it s able to keep on running The Mandelbrot messagepasser demonstrates how we can combine transputer features e g internal chan nels process priority levels and charac teristics of the hardware scheduler into an efficient whole A Generic Messagepasser A network of transputers is just like any other computer network It cannot network of trans
238. s more LU LDIR A complete Novosielski library utility LU creates a library file of files WHEREIS This is one of the niftiest 2K programs in the public domain Lets you find files in subdirectories Very handy for keeping track of those files that try to get lost SQUEEZE UNSQUEEZE Complete file squeezing and unsqueezing utlities let you conserve disk space WASH Forerunner of SWEEP WASH is a menu driven file utility that views files very quickly It isn t as flexible as SWEEP but it s faster LS Written in C includes source LS is a UNIX style directory program writ ten by R Edward Nather BACKSCRL A bi directional scrolling utility BACKSCRL buffers screen scrolling so you can recall with a few simple keystrokes data that s been saved from the screen Read BACKSCRL DOC for a thorough explanation of setup MS2 Cheap Assembler Disassembler RAMdisk CHASM Written by David Whitman CHASM is a subset of MASM and fits in to 64K It s good for writing short subroutines to call from BASIC or for just learn ing 8088 assembly language It allows you to define labels but doesn t support macros ASMGEN A disassembler written by J Gerbach and J Damke ASMGEN will generate 8086 87 or 88 code It s MASM compatible and output can be directed to j the console or to a disk file Handles up to 64K files Includes a long doc file MEMBRAIN Creates a file named MEMBRAIN SYS a DOS device driver for a RAM disk d
239. s start at upper left corner as 0 0 int left x left most extent of window int top y upper limit of window int right x right most extent of window lower limit of window attributes default char and background colors for functions which need cursors in the window int bottom y unsigned char int cursor x int cursor y window 3 To add more windows increase the array size define WINDW window window number saves typing and makes things clearer f obe He He e e e e e e He de Fe He he He He e Fe Ae He He He He he He de He He He He He Ae Ae e e e Te He He e He He He He Ae Ae Te e de Ke de de Tee ke Keke ke Te kekke keke kekk kkk f This function simply initializes a window structure so all other functions told to do something to that window can look up all the necessary information about it void define window int window number int left x int top y int right x int bottom y unsigned char attribute WINDW left x left x establish global window values WINDW top y top y WINDW right x right x WINDW bottom y bottom y WINDW attributes attribute WINDW cursor x left x 1 put cursor inside box WINDW cursor y topy 1 RI RII IIR ITI III III IIIT II ISIS IIA IIASA AIA ISIS IIIA IN ASIA SIS IIA IS IIS AIS ASIII IAI ASK Puts a character and its attribute anywhere on the screen void putc at location char ch int x
240. s unavailable under cer tain conditions However I d appreciate being told Lots of expensive and poten tially billable time was wasted because I Figure 1 In Line Assembly Code for exec Function pragma inline f Fee ke e de e e e e exec char program char argument The rules of this game are rather too involved to explain here chapter 10 for a lucid explanation function This is done in the Ray Duncan s Advanced MSDOS of the MSDOS s exec innocently tried something done a half dozen times before in other settings Is Borland trying to protect me from nasty side effects that MS DOS allows Possibly though I d argue that as a con senting adult anyone fool enough to do TSR programming deserves to make messes if he chooses It took me months to discover what I could and couldn t do when DOS is interrupted so let me play my hand And then there are the truly spooky times when in the middle of a compile the integrated environment would go off north north west and lock up or reboot the machine or give the dreaded mes sage irreducible expression tree Sometimes the glitch was reproducible most often it wasn t continued on page 60 new ANSI way of declaring args See large model so pointers will all be 4 bytes long and coding will be straightforward to construct command line structure needed by DOS 0x4b service char comline 30 struct u
241. screen scrlines 28 speed flexibility and pouer to satisfy shoul rain menu the most demanding computer professional ret_val getrange mn_pro VEDIT PLUS is particularly suited for process ret_val new_ved writing all types of programs and lengthy uhile ret val t EXIT_OK documents such as reports or manuscripts scrlines SCRLINES scruidth SCRWIDTH sp 2 This shows how MEDIT PLUS can perforn windowing One window is used for word printf crt_sel processing a s cond for program if yesno setcrt ar developnent and the third for commands else outcr If Up to 48 uindous are supported and you determine each window s size and color VINDOW gt oean if neu_vedit amp amp table_in PROGRAMMABLE EDITOR FREE Fully Functional Demo Disk DIRECTORY C VEDIT NEW COMPARE VDH CU283 p SORT UDM STRIPU l VDM MAIL VD MENU VDH PRINT VDM VDH 288 8686 VDH i Stunning speed Unmatched performance Total flexibil ity Simple and intuitive operation The newest VEDIT PLUS defies comparison Try A Dazzling Demo Yourself The free demo disk is fully functional you can try all features yourself Best the demo includes a dazzling SU ete AAE AE a Call for 286 XENIX Version Fully Network Compatible e Simultaneously edit up to 37 files of unlimited size menu driven tutorial you experiment in one window while another gives instructions
242. se Control Engineering published an article by David S Gaunt of British IBM He found that there are three noise sources the switching power supply the analog CRT card and the CRT yoke The analog card generated the most noise while the CRT yoke generated the least The worst offender on the analog card was the line output transformer along with a power transistor Editor s note Technical Tips He s no doubt referring to the horizontal sweep transformer and its driver transistor The main transformer on the switch ing power supply also generated a lot of noise After covering these components with acoustic chimneys open foam lined boxes isolating them from the card and attaching a plastic cover to the non component side of the card noise was reduced about 20 percent Mike Fern Box 1105 Covina CA 91722 Fix For Turbo C I agree with the comments made in the reviews of Borland s Turbo C in the Not August issue 37 but wish to pass on the details of a problem I had with it in the hope of saving others from falling into the trap The atan2 y x function must be of much more use to engineers than programmers as it seems to be poorly coded and untested in several com pilers Turbo C is one of them I got my Turbo C early in June and found that this function failed for zero values of x Microsoft C Desmet without 8087 and Greenhills C for the DSI 32 handle it while Turbo C Desmet for the 8087 at least
243. se to calculate and pass 100 or even 1 000 pixels worth of data at a time rather than 1 Synchronization The use of internal channels offers a EX EX PREV_OUT_CHAN EESTI mt ETE rcm Toro NP PN CHAN mmo o E NEXT_OUT_CHAN Eee CP_NP_CHAN CALC_MSGP__CHAN messagepasser user program PREV_INP_CHAN PN_PC_CHAN calculation process By Hans Bieleman Ingenieursbureau Bieware Witbreuksweg 381 401 7522 ZA Enschede The Netherlands sophisticated way to synchronize proces ses without semaphores or other fancy software tricks For instance let s say two processes need to share data One might be ready to send data to the other but the other isn t ready to receive The sending process will be descheduled until the receiving process is ready When the receiving process is ready the sending process in our example will be automatically rescheduled Meanwhile the sending process hasn t been pestering its processor to check if the second receiving process is ready As you can see the hardware scheduling features of the transputer channels or links really save time Process Structure Let s have a look at Figure 2 the process structure The boxes represent different proces ses all of which run concurrently on one transputer The arrows represent chan nels A bold arrow represents an external hardware channel I ll refer to proces ses with lower case names and to chan nels with up
244. sks copy delete and view files Call or write for our complete catalog of parts and accessories for the Kaypro Xerox 820 and PC AT s Full repair services available for Kaypro Morrow Xerox disk drives and most clones 179 95 kk kk KKK SUPER SPECIALS kkk kkk Ik PC Mastercard by Magnum Computer Up to 1 5 Megabytes of RAMDISK and PRINT SPOOLER or boost your system to 640k with serial parallel game ports and real time clock This is one of the BEST multi function cards on the market Can use mixed banks of 64K and 256K chips Comes with memory manager ramdisk spooler and diagnostic software PC MASTERCARD Ok installed call for pricing on 384k and 1 5M boards Turbo Editor Toolbox by Borland Ever wanted to add text editing to your Turbo Pascal application or write a word processor that does things the way that YOU want Comes with source for two sample editors modules for windowing multi tasking and many other options Requires PC with Turbo Pas cal 3 0 COPY II PC by Central Point Software Stop worrying about your copy protected disks COPY II PC lets you back them up so you can keep going when your master disk can t WordStar V3 3 Manual Genuine MicroPro manuals in hard binder pack InfoStar Manual Set Genuine DataStar and ReportStar manuals in MicroPro three vol set 8 Generic Diskettes Ten Pack 8 Generic Diskettes Hundred Pack Single sided SD or DD with Tyvec sleeves e e e e he Ae h
245. so I thought I d look for my flaws with another Borland compiler Turbo Pascal My fastest Pascal code is in Figure 3 The results 1 3 seconds for the mean 4 8 seconds for the mean variance and standard deviation What does this mean We re looking into it via a little disassembly I ll get back to you Meanwhile send us your fast code and ideas fast or slow about compilers And that friends is Tidbits Half Step Toodle Loo References Bradley J amp J McClelland Basic Statistical Concepts 1978 Scott Foresman and Co Gale W ed Artificial Intelligence amp Statistics 1986 Addison Wesley AAO Figure 3 Statistics in Pascal program stat type L array 1 7000 of real var I integer List L X Z Dev Square Squares Vari Sd real begin For I 1 to 7000 do List I I X 0 Squares 0 Dev 0 Writeln start Start timing 1 to 7000 do Read array elements X List I Z X I Find mean writeln Z For I 1 to 7000 do Calculate variance begin Dev Z List I Square Dev Dev Squares Squares Square end Vari Squares I 1 writeln Vari Sd sqrt Vari Find sd writeln Sd end Figure 4 Benchmarking The Turbos Compile Link Size Execute Turbo C 4 7 15 0 20K 18 2 sec Turbo Pascal 2 2 12K 4 8 sec Turbo PROLOG 3 8 10 5 41K 9 1 sec Turbo Pascal compiles to COM l Turbo PROLOG amp C compile Link t
246. ss informal and less off the wall Micro C s style made the members comfortable that Micro C was theirs a place where they could contribute ideas and articles or request information For them we re an international user group A Mother Earth News Speaking Of Mother Sandy and I began subscribing to Mother Earth News during their first year of publication and we spent long evenings read ing each new copy cover to cover For many years their dream was our dream and though we didn t move to a farm a longtime dream we rooted from a distance as they bundled up their journal and moved it onto an incredible spread Then yesterday as we discussed the focus group Peter men tioned how members of the group associated us with Mother He also mentioned that the latest issue of Mother Earth News is glossy absolutely slick Totally different from their classic newsprint paper with folksy drawings I was bummed Of course their dream may have survived the change but I m suspicious I know how you feel about slick Where To From Here We received high praise from the focus group for the hard drive article in issue 36 It wasn t an exhaustive look at every conceivable and inconceivable hard drive but I didn t pull any punches when it came to flaky units We also received high praise for the projects personality and humor And I m here to say unequivocally and without malice of forethought that we re keeping everything
247. sues a check on the erroneous link node re The upper layers have identical processes running for every task so we can keep the task administration simple The Transport layer takes data from the Session layer and splits it up into message blocks It also determines the message type The types of messages currently defined are in Figure 5 The resource call types are used to find a resource in the network i e disk systems screen i o etc The path calls find and build a specific or general vir tual channel to another process The message types are used when a virtual channel between two processes is estab lished and communication can take place The last are some miscellaneous types used to check channels etc The Transport layer splits up mes sages to be sent into message blocks with a maximum size of 255 bytes This mes sage size is a compromise between the performance advantage of long mes sages and the ability to send short ex press messages through the network Smaller messages are allowed so there s little overhead in sending characters to a screen on another node a host com puter for example Received message blocks are as sembled into a single message and the pointer to this messages is passed on to the Session layer The higher layers Session layer through Application layer implement the interface to a kernel The type length and destination of messages are determined here Thanks From T
248. takes to calculate a single pixel The duration of the calcula tion varies with the parameters passed to it We decided to write a generic program in which the number of com puters was set in a variable We wrote our Mandelbrot algorithm to calculate a number of pixels at a time This process reads in the coordinates of the first pixel and outputs a block of data containing the number of iterations the number which ultimately renders the color on the screen for the next n pixels All the transputers run this same algo rithm as a single task or process We have a program running on the PC which controls the generation of the Mandelbrot picture It issues pixel coor dinates receives calculated blocks of data and translates the data into colored pixels on the screen The Mandelbrot demo uses a farm network topology Two links are used on every transputer one connects to the previous transputer the one that is nearer to the host and the other one to the next transputer the one that is fur ther from the host See Figure 1 The Mandelbrot Messagepasser To connect in a software sense the calculating processes on all the transputers to the control process on the host every transputer has in addition to a calculation process a dedicated mes sagepasser The messagepasser is the communica tion manager in this application It s a dedicated messagepasser as opposed to a general purpose communications manager
249. tate 1 360K Floppy drive and Seagate St 4038 Hard Drive Suggested additions MS DOS 3 21 with GW Basic 5339 Keyboard Sub Assembly and testing is available XT Systems AT Systems 24 00 ACCESSORIES 1200 Baud Modem Internal Leading Edge Model L Hayes compatible 1200 Baud Modem External Hayes compatible MS DOS 3 21with Memory Chips Borland Turbo C Prices are subject to change without notice Shipping CHARGES will be added Pictured keyboard is 5339 BUILDING YOUR OWN CLONE FREE BOOKLET 90 day warranty 30 day money back Subject to restock fee Free instructions with each system MicroSphere Inc P O Box 1221 Bend Oregon 97709 503 388 1194 Hours Monday Friday 9 00 5 30 Pacific Time Borland s Turbo Prolog the natural introduction to Artificial Intelligence othing says Artificial Intelligence has to be complicated aca demic or obscure Turbo Prolog proves that It s intelligent about Intelli gence and teaches you carefully and concisely so that you soon feel right at home Which is not to say that Artificial Intelligence is an easy concept to grasp but there s no easier way to grasp it than with Turbo Prolog s point by point easy to follow Tutorial Turbo Prolog is for both beginners and professional programmers Because of Turbo Prolog s natural logic both beginners and accom plished programmers can quickly build powerful applic
250. terested in this burgeoning market Isaacson offers a measure of human friendli ness with error messages written in English At the user s option these messages may appear at the appropriate points right in the source code file or be directed to a separate message file If you let A86 embed the error messages in your source file it will also strip them out when you reassemble your program It s For Real Integers are nice and neat but many applica tions insist on floating point numbers Floating 66 MICRO CORNUCOPIA 38 Nov Dec 1987 __ Upstarts And Start Ups point routines are built into languages like BASIC but assembly language programmers are accustomed to doing all of the dirty work themselves Explaining long division to a microchip is especially nasty A86 comes to the rescue with four function arithmetic routines for floating point operations Isaacson has already done a lot of the work for you Since A86 also supports the mathematics co processors 8087 and 80287 the floating point operations can be extremely fast Credentials The roster of A86 features looks pretty good A companion program D86 provides fancy symbolic debugging features Overall the pack age appears to offer great power and functionality So who is this Isaacson character that he thinks he can beat Microsoft at its own game A former Intel employee Isaacson has been work ing on chips since the Intel 8080 He was half of the developme
251. that makes a blank page stand out Imagine a full page ad MICRO CORNUCOPIA 38 Nov Dec 1987 which is entirely blank Think of the impact And imagine that same blank page in full color Wow Also if a subject s very important it makes perfect sense to print nothing about it at all on as many pages as seem appropriate That way there s no chance of misinterpretation Any Problems Our biggest problem has been readers They expect something to read everywhere they look bank buildings billboards hamburger wrap pers blimps computer screens Otherwise they re bored Stick these people out in the woods and within minutes they re carving their names into trees It s no doubt a hangover of the early literacy drives On the other hand curiously enough we ve had no problems at all with business execu tives For excellent coverage of the blank page its past its present and its future get Between The Blank Sheets By Wood E Pulp Director Of Sales LeBlanc Paper Company 300 pps ISSUE 1 8 81 Power Supply RAM Protection Video Wiggle Y PFM PRN 16 pages ISSUE 2 10 81 Parallel Print Driver Drive Motor Control Shugart Jumpers Program Storage Above PFM 1 PFM PRN 16 pages ISSUE 3 12 81 4 z Mods P Configuring Modem 7 Safer Formatter Reverse Video Cursor FORTHwords Begins 16 pages ISSUE 4 2 82 Keyboard Translation More 4 MHz Mods Modems Lync and S10s Undoin
252. the blind Ive been very happy with the im proved keyboard screen and floppy performance provided by this software accelerator Even an already fast package like PC Write runs noticeably quicker Kaypro if you re listening why not package Polyboost with the 2000 Polyboost is available for 79 95 from Polytron Corp 1815 NW 169th PI Suite 2110 Beaverton OR 97006 800 547 4000 Hans Austermuhle Sierra Leona 650 Lomas Chapultapec 11000 Mexico D F Like Wow Ilike your new cover I liked your old cover I even liked the cover before that I like the cover because you write a good magazine and whatever it looks like I enjoy seeing Micro C arrive in the mail It s very much like the way I feel about my wife s hair I like however she wears it because I like her Roger Paige KAC Berry Hill Frankfort KY 40601 Letters Challenger Problems Bob G Roberts letter in Micro C s February March issue 34 was just great Not so much for the letter but for the fact that you allowed him to voice his problem I had similar problems with a mail order firm which not only sold me a mother board plagued by incom patibilities but also refused to repair the board when it proved defective I wrote three letters directly to them and one to the publisher of Computer Shopper in which they frequently adver tise l ve done everything I could short of flying to their door and Vaselining the handle The editorial in th
253. the link The Par Construct The par construct allows the C programmer to instantiate several paral lel processes within the body of a program There are two variants of the par construct replicated and non repli cated A non replicated par construct con sists of the keyword par followed by a complex statement See Figure 2 Statements nested within the complex continued next page MICRO CORNUCOPIA 38 Nov Dec 1987 15 continued from page 15 statement are executed in parallel A compiled par statement will continue to execute until all of these subprocesses have terminated On the transputer the par statement translates into machine instructions quite easily Each subprocess in a par state ment is instantiated with the aid of only two transputer instructions startp and endp The startp instruction not surprising ly starts each of the subprocesses At the end of the par statement each sub process finishes by executing an endp in struction After the last subprocess has ended the calling process resumes ex ecution See Figure 3 The replicated par construct behaves somewhat differently With it one can start any number of processes using a loop expression The replicated par resembles C s for See Figure 4 Statements within the braces are started as independent processes for each iteration of the loop Each subprocess receives its own copies of the variables in the loop expression
254. the previous transputer After the block has been sent p link pas ses the pointer to that block to the The data transfer between Figure 3 Seven Layer Network APPLICATION LAYER SESSION LAYER TRANSPORT LAYER NETWORK LAYER DATA LINK LAYER DATA LINK LAYER PHYSICAL LAYER INTERMEDIATE NODE B NETWORK LAYER APPLICATION LAYER SESSION LAYER TRANSPORT LAYER NETWORK LAYER DATA LINK LAYER DATA LINK LAYER PHYSICAL LAYER Figure 4 Messagepasser On A Single Transputer PHYSICAL LAYER LINK O pnlink process by means of the NP PN CHAN pn link then reads in the first set of coordinates coming from the host and places it at the first location of the block In this way we are always sure that the block is empty before putting in new coordinates When the pn link reads coordinates from the previous transputer it first checks to see if there s a request for new coordinates from the current transputer If so the new coordinates are put in the waiting empty block If not the coor dinates are passed on to the next transputer Once the new coordinates for the current transputer have been received pn link sends the datablock s 12 MICRO CORNUCOPIA 38 Nov Dec 1987 UNK 1 APPLICATION LAYER TRANSPORT LAYER NETWORK LAYER DATA LINK LAYER LINK 2 UNK 3 pointer to pc link The messages are so small that hardly any time is required to send or receive them pn link can do thi
255. the version I have and the C compiler in UNIX version 3 do not I sent a note with the registration card describing how the function would hang up the system and got a prompt acknow ledgment from Borland A few days later I received a complete replacement set of disks still labeled Version 1 0 with the problem fixed Could not ask for better support Figure 1 has been useful for exercising the function in various compilers show ing this and other problems John S Innes 120 Macpherson St Cremorne NSW 2090 Australia Figure 1 Program to Test ATAN2 Function include math h include lt stdio h gt main double atan2 x y int i static double v 8 0 1 0 1 0 1 0 0 1 0 for i 0 i lt 8 i l ie v i 2 5 8 v i 1 0 1 0 prints ed times PI 4 3f n i atan2 y x 78 MICRO CORNUCOPIA 38 Nov Dec 1987 The Computer Dream Come True Breathe Fusion Here s Technology that s at the Tip of the Cutting Edge INMOS TRANSPUTER MODULES Interface Card installs into your PC or QL Low Cost TDS 7 5 MIPS Multiprocessing up to 60 MIPS 1MB Hi Speed Dram per Module Cycle configuration linking fully socketed 95mm x 75mm size Wide range of Development Software OCCAM 1 PC Cross Compiler Assembler MPE Modular Forth From Microway OCCAM 2 Fortran Pascal C TDS Environment amp board units The DOOR is OPEN into the Future of Comput
256. thing After two hours of the finest Chinese potluck 56 stuffed hackers gave the entire Chan family a standing ovation Many of the un SOGy patrons joined our tribute It was that kind of SOG spontaneous relaxed more than a little crazy We had great food friendly help from dorm managers and bus drivers good weather lucid speakers generally fantastic information and super attendees Display Area Highlights PC Tech brought its new color graphics card The TI graphics chip is incredible It s a 32 bit processor that not only does great color animation but also has lots of plain old processing horse power They had the graphics chip generating fractals while their 80186 board was adjusting the color table on the graphics card The TI chip was generating a fractal in an hour that would take a weekend on an AT Larry knows he d had every system in the office tied up nights weekends days Larry can I use my system this week Is the fractal finished don t know I just bumped the reset Accidentally Accidentally Dean and Earl stopped by the Micro C office when they pulled into Bend they hadn t slept for 33 hours It turned out that they had received the first batch of graphics cards at 4 p m the day before and both had stayed up all night populating and testing the first 30 Sound familiar If there was ever a reason to print full color in Micro C nay bind video tapes into Micro C that gra
257. tiny c C subsubset interpreter including the tiny c shell c n 20 Xlisp 1 5a Lisp interpreter including tiny Prologin Lisp 20 List Pac C functions for lists stacks and queues iE ase de MG A 20 XLT Macro Processor general purpose text translator cr 20 C Tools exception macros wc pp roff grep printf hash declare banner Pascakto C 15 Data DNA Sequences GenBank 48 0 of 10 913 sequences with fast similarity search program 150 Protein Sequences roughly 4 000 protein sequences with similarity search program 60 Webster s Second Dictionary 234 932 words eee 60 U S Cities names amp longitude latitude of 32 000 U S cities and 6 000 state boundary points 35 The World Digitized 100 000 longitude latitude of world country boundaries 30 KST Fonts 13 200 characters in 139 mixed fonts specify TEX or bitmap format 30 NBS Hershey Fonts 1 377 stroke characters in 14 fonts ee ee dtes ras 15 U S Map 15 701 points of state boundaries leen 15 The Austin Code Works 11100 Leafwood Lane Austin Teras USA 78750 3409 512 258 0785 Free surface shipping on prepaid orders MasterCard VISA continued from page 58 Once I spent hours staring at code and retesting the memory only to solve my problem by moving the editor up in memory a K or so by add
258. tions don t set the Zero flag in the standard index register Also the EXX in struction does not effect them so they can hold data common to both the standard and alternate register sets Except for the prefix byte ODDH or OFDH these instruction codes are identical to those of the H and L registers Therefore direct interac tions of the XH XL YH and YL registers with the H and L registers are not pos sible For example DB ODDH LD L H will move the high byte of the IX register into the low byte of the IX register not into the low byte of the HL register So transferring data between the two register sets has to be done via other registers or the stack Using these undocumented Z80 in structions is simple The easiest way is to precede the in struction for the H or L register which in this case would stand for high or low byte by a DB ODDH for the IX register instruction or DB OFDH for the IY register instruction see Figure 2 Define byte may be DB or DEFB depending on your assembler Macroassemblers Take Note If you have a Macroassembler you can write a set of macros in the style of LDY MACRO REGI REG2 DEFB ODDH LD REG1 REG2 ENDM The macro call LDY H A will then generate the code for you And finally if you are a Hacker you could modify a Z80 assembler to respond to a set of XH XL YH and YL register opcodes Clark Calkins of C C Software offers a listing of his great much modifie
259. tle Diconix 150 portable inkjet printer About the size of hardback copy of War and Peace this 3 75 lb wonder is conveniently con cealed in carryon baggage for easy transportation across international bor ders shhh You didn t hear it from me Not only that but it does a decent job of printing too And it s cheap The Diconix printer fits handily in my backpack does 150 cps in draft mode uses HP Thinkjet cartridges recognizes the Epson standard command set can print 150 pages on a full battery charge so they say and is quieter than an am bassador with a gas problem at a state dinner party Not only that but it looks convincing ly like an electric inflation pump for my new rubber raft At least to anyone who doesn t know much about electronics Customs agents outside of the Far East and the U S don t know much about electronics So far I m happy with my new inflation pump especially with its NLQ mode y latest love has two drives 640K anda full height backlit LCD that your grandmother would enjoy even if she s legally blind But there are a few problems First although the printer can handle full size single sheet and tractor feed paper it can t print across the full width of the page About 1 2 inch on each side is unprintable In practical terms this usually doesn t matter since you set margins narrower than this most of the time anyway It still prints 80 cha
260. tle dipstick You will probably wonder about the way I arrive at the addresses to give to DOS Why do I put the SS register into ES and DS And why do I add BP to both of the offsets If you had only read your Turbo manual you would under stand dear Both of the structures I want to point to are local dynamic variables Local dynamic variables are located in the stack segment and their offsets are rela tive to BP the frame pointer as it is sometimes called I also increment Com File by one because I want to point at the text of the string not at its length byte The only other notable notation I should note is that I declared several variables as typed constants In Turbo typed constants are actually initialized variables in the code segment I declare the variables this way because CS is the only register I can assume will be un harmed after return from DOS Oh yeah That call to the function GetEnvironment is so that I look for COMMAND COM in an intelligent man ner See my column in issue 32 for an explanation of this tactic as well as a list ing of the GetEnvironment procedure There I think I have sufficiently atoned myself for this month Be sure to tune in next time when I detail my thrill ing adventures piloting Contraband down the mighty Goksu River Figure 1 Corrected Exec for Turbo Pascal execute Command as if it was typed at the A gt prompt requires Getenvironment function from Micro C
261. ttribute by ORing a CHARacter with a BACKground type BLUE CHAR BITO GREEN CHAR BIT1 RED CHAR BIT2 INTENSE BIT3 BLUE BACK BIT4 GREEN BACK BIT5 RED BACK BIT6 BLINKING BIT7 BLACK_CHAR 0 CYAN_CHAR GREEN CHAR BLUE_CHAR MAGENTA CHAR RED CHAR BLUE CHAR BROWN CHAR RED CHAR GREEN CHAR WHITE CHAR RED CHAR GREEN CHAR BLUE CHAR GRAY CHAR INTENSE BLACK CHAR LIGHT BLUE CHAR INTENSE BLUE CHAR LIGHT GREEN CHAR INTENSE GREEN CHAR LIGHT CYAN CHAR INTENSE CYAN CHAR LIGHT RED CHAR INTENSE RED CHAR LIGHT MAGENTA CHAR INTENSE MAGENTA CHAR YELLOW CHAR INTENSE BROWN CHAR BRIGHT WHITE CHAR INTENSE WHITE CHAR BLACK BACK 0 CYAN BACK GREEN BACK BLUE BACK MAGENTA BACK RED BACK BLUE BACK BROWN BACK RED BACK GREEN BACK WHITE BACK RED BACK GREEN BACK BLUE BACK GRAY BACK INTENSE BLACK BACK LIGHT BLUE BACK INTENSE BLUE BACK LIGHT GREEN BACK INTENSE GREEN BACK LIGHT CYAN BACK INTENSE CYAN BACK LIGHT RED BACK INTENSE RED CHAR royalties on your applications that use CBTREE CBTREE supports multi user and network applications OR WRITE oad define LIGHT MAGENTA BACK INTENSE MAGENTA CHAR idefine YELLOW BACK INTENSE BROWN BACK define BRIGHT WHITE BACK INTENSE WHITE BACK Figure 6d WINDOWS H WINDOWS H include these function prototypes at the beginning of any file where you use windows functions Turbo C will then
262. u and could rename copy and delete files But it couldn t move files format disks or rename subdirectories which XTREE can Now version 2 0 is here and its a winner Its RAM resident using less than 50K but offers all the power of a nonresident disk manager Patrick Marshall WindowDOS 2 0 Product Review PC World May 1987 Onceyou ve experienced the convenience of instant access to DOS commands you ll never be satisfied with returning to DOS to list files format disks or copy rename or erase files Nor will you be happy with a DOS shell because shell programs are just as inaccessible as DOS when you are using an application program Only one program combines memory residency with the power of a full featured disk manager WindowDOS Version 2 0 Features Not Found In DOS Sort directories in 8 ways or not at all Copy erase and move groups of files Find any file in seconds eDisplay default directory of any drive with a single keystroke Display graphic tree Global copy amp erase commands Copy function prompts you to insert another disk when necessary Display hidden files and subdirecto ries Display file contents in various for mats and page forward backward Display Wordstar files in readable format Unique RAM Environment function shows name size location and interrupts of every program in memory Rename subdirectories for instant reorganization Hide and unhide subdirectories Se
263. ugh A8 A0 A2 should be 0 A9 is fixed at 1 If a bit value is 1 you must use the positive jumper for that address line If it s 0 use the complement To change a bit cut a section from the trace with an X acto knife then solder a short jumper wire across the desired solder pads The rest of Figure 2 is straightfor ward the LS32 OR gates select reading or writing These signals along with ad dress bits AO and AI are fed into the L5139 to generate read or write signals sent to other chips on the board for BASE BASE 1 BASE 2 or BASE 3 The LS245 gates the eight bit data bus on or off the board the remainder of the diagrams refer to a data bus this is the printer board data bus connected to the LS245 Figure 3 shows the printer data port This simply writes the data bus out to pins 2 9 on the DB 25 connector what you plug your printer cable into and reads it back again The funny thing is you can only read back what you ve written By grounding pin 1 on the LS374 the outputs of that chip are al ways enabled i e always driving so there isn t any way to use those pins to read data from the outside world Figure 4 shows the printer status and control lines Notice the LS174 has an un used flip flop which is nonetheless still connected to the data bus If we cut the trace from pin 1 on the LS374 Figure 3 and connect that pin to pin 7 of the LS174 Figure 4 the printer data port becomes a general purpos
264. uick and dirty in C as in Pascal It will however be smaller thanks to linkers that don t load functions if your programs don t call for them Even if the rest of the package were only so so the error flagging utility of the integrated en vironment would be worth the cost of the pack age I confess I ve written lots of applications software in Pascal cursing ord s and chr s and succ s all the way I do it because the Turbo en vironment suits my style of programming I sit down in front of my Zenith coffee mug in hand shoes across the room reference manuals spread wildly across my desk and the adjacent floor and write code 1500 2000 lines of it sometimes Then I see if it compiles Turbo Pascal lets me walk through the errors one at a time correcting and recompiling and correcting and recompiling until things fall all the way through In Turbo there is no leaving the editor trying a compile scrawling the line numbers on the back of an envelope reentering the editor etc etc etc Just bouncing back and forth between com piling and my subsequent stupidity Well Turbo C does it even better You can set the number of errors you want to stop at The default is 25 but that s silly After 5 good errors an honest compiler is so helplessly confused that the following error messages are worse than useless After the poor compiler reaches the error limit a message window appears containing a list of the errors and
265. urbo Modula 2 Language 89 95 1 disk System 40 Input Output Recorder IOP VOR 39 95 1 disk 41 Background Printer IOP BPrinter 39 95 1 disk 44 NuKey Key Redetiner IOP 39 95 1 disk 45 Special Items 40 through 44 89 95 3 disks 60 DISCAT Disk cataloging system 39 99 1 disk 61 TERM3 Communications System 99 00 6 disks 64 Z Msg Message Handling System 99 00 1 disk 66 JetFind String Search Utility 49 95 1 disk 81 ZCPR3 The Manual bound 350 pages 19 95 82 ZCPR3 The Libraries 310 pages 29 95 83 Z NEWS Newsletter 1 yr subscription 24 00 84 ZCPR3 and IOPs 50 pages 9 95 85 ZRDOS Programmer s Manual 35 pages 8 95 88 Z System User s Guide 80 page tutorial 14 95 Includes ZCPR3 The Manual Subtotal Sales Tax Shipping Handling Add 4 00 shipping handling in North America actual cost elsewhere Total Fish Story I am writing to you on my new Kaypro 8 once a Kaypro II 83 Thanks to your magazine s wonderful instruc tions I ve survived the bewildering but rewarding odyssey through the soul of my machine Among the rewards was the delightful surprise of calling Micro C s technical help line and being greeted by none other than the E amp P himself One of my calls concerned a problem in which two disk drives were selected every time I turned on the system You suggested I may have zapped the drive cable when I added additional drive con nectors A new cable worked with the drives out
266. ursor memory and that can accept user input INTERRUPT SERVICE ROUTINE sup port for truly flexible robust and polite applications We show you how to capture DOS critical errors and keystrokes 9 INTERVENTION CODE lets you devel x op memory resident applications that can take full advantage of DOS capabilities With simple function calls you can schedule a Turbo C function to execute either when a hot key is pressed or at a specified time 9 RESIDENT SOFTWARE SUPPORT lets you create detect and remove resident util ies that you write with Turbo C TOOLS _ FAST DIRECT VIDEO ACCESS for efficiency and support for all monitors including EGA 43 line mode DIRECTORY AND FILE HANDLING support let you take advantage of the DOS file structure including volume labels and directory structure In addition to Turbo C TOOLS Blaise port products for Microsoft Lattice and Datalight C Microsoft Pascal and Turbo Pascal Call enm t today for details and Cs Ive 95 make magic a ed 2 BLAISE COMPUTING INC Berkeley CA 3 20s Mus Mus sai without duplicating i its library functions i Computing Inc has a full line of sup ne TOOLS ns 99 95 ido anagement including it DOS memory control ISRs COMING SOON General screen manage ment paint screens block mode data entry Lor field by field control with instant s Screen woe ea pr access e pU A
267. using the interrupt while running an EGA program Dr Halo The results were interesting Someday maybe I ll figure that one out Sidekick worked but it left garbage on the canvas include lt dos h gt define INT NUMBER 15 interrupt number to install this function into Note IRQ7 on the PC card bus corresponds to interrupt handler 15 in the interrupt vector table define PROG SIZE 0x1E10 Run the Turbo C compiler with the options linker mapfile set to segments Look at the mapfile generated for this program The stop address for the stack is the highest address used set PROG SIZE to this value for use with the keep command I tried using the tiny model instead of the small model since it is supposed to be more size efficient The map showed the size to be LARGER even though it didn t create a stack and the small model did Seems odd include colors h color definitions include windows h prototypes for window function definitions These tell the compiler A not to panic if a function is called for which it hasn t seen the definition and B what the function s calling convention is so the compiler can tell you if you re doing it right helps find errors define BASE 0x378 Parallel port board base address established for LPT1 Change this if you re using LPT2 or you changed the jumpers on the cheap card define PIC OCW1 0x21 8259A Programmable Interrupt
268. uter paral lelism is a subject for another article or a book Parallelism can reduce IO overhead For example in most programs IO is performed sequentially that is the next sequence is used often while ready Read_block_from_fileQ Process_block Write_block_to_file In this case buffering in itself won t speed execution very much However on a transputer where the I O occurs via the links we can decrease execution times considerably by separating the read process and write sequences into processes while ready par Read Next Block from fileO Process current blockO Write Last Block to file In this way the transputer will simul taneously use the input link to fill the read buffer the output link to empty the write buffer and the processor itself to process the current block Toward A C Standard For Parallel The C compiler with the parallel ex tensions we ve described is an effective tool for programming a transputer based parallel system It provides the program mer with a familiar syntax and the power he needs to exploit concurrency It s my hope that these extensions will serve as the basis for a C standard for parallel programming constructs and that other implementors will adopt or expand upon this work umm Figure 4 Replicated Par Resembles For Statement par expression looping condition expression i subprocess 1 subprocess 2 statement1 state
269. ve heard rumors about Kyocera Toshiba Ricoh Texas Instruments HP you name it Actually it s very likely they are working on a 600 or more dpi unit Everyone knows what everyone wants and the payoff for the first in the marketplace will be huge Absolutely huge Anyway in May a TI printer rep called from the factory He was calling all us editors to make sure we knew about a new TI printer So on a lark I responded Is the first shipment on the 400 dpi unit still scheduled for July Uh yes I believe so 24 MICRO CORNUCOPIA 38 Nov Dec 1987 with Ventura TI didn t release a 400 dpi printer in July or August But it was fun Of course not everyone is waiting for higher resolution Recently I heard the owner of a typesetting house swear soft ly as he recalled the day a state agency got a 300 dpi model The agency planned to proof manuals on the laser before sending text in for typesetting however they re now using the 300 dpi output for all their manuals Bits And Pieces We re now using Ventura 1 1 It s quite an upgrade with its new hyphena tion algorithm ability to crop line art fixed width spaces perfect for listings overscores downloading PostScript fonts font sizes from 1 to 254 points printing on up to 18 by 24 inch sheets However l ve found two serious problems with 1 1 which weren t problems with 1 0 It s harder to read normal size text on the screen In fact anything smalle
270. volleyball as I would have liked the food was without fault my compli ments to the college s staff and lastly a reason I ll touch on later The session on the Mandelbrot graphics was excellent a use for the computer that in and of itself serves no profit I enjoy pure math for its own sake and found the premise for the lecture rather exciting Akbar Tahayeri Computing for the Handicapped was a diamond in the rough your choice for a fill in lecture was wonderful Those of us at the con ference all play with machines we all process numbers and words and make pretty pictures pretty much without a second thought Here was a repre Fits on a 5 1 4 Drive K OS ONE operating system for With it you can read and write MS DOS format diskettes on your 68000 package are Code Assembler HTPL Compiler Sample BIOS Code more information Hawthorne Technology 8836 Southeast Stark Portland 2708 68000 K OS ONE your system K O0S ONE Editor 395 00 50 00 100 00 50 00 15 00 OR 97216 sentative of a firm that takes the stuff we develop and uses it to open up the whole world to a group of folks that otherwise would have difficulty I would like to see Zygo at the next SOG showing off some of the real tools that they provide Top Cabin Thanks Akbar Speaking of wishes I d like to see a lecture on simple robotics perhaps a demo or a contest where the
271. ware is available for Aztec C86 Essential Graphics C Essentials C Utility Library Greenleaf Com Greenleaf General Halo Panel PC lint PforCe Pre C Windows for C Windows for Data C terp db Vista Phact Plink86Plus C tree C Prime PC MS DOS Macintosh Apple Il TRS 80 CP M These C development systems are unbeatable for the price They are earlier versions of Aztec C that originally sold for as much as 500 Each peter includes C compiler assembler linker librarian UNIX routines and more Special discounts are available for use as course material C Prime 75 FA FA as v i T Maux Sofware eem One Industrial Way Eatontown NJ 07724 Aztec ROM Systems 6502 65C02 8080 280 8086 80x86 680x0 An IBM or Macintosh is not only a less expensive way to develop ROM code it s better Targets include the 6502 65C02 8080 Z80 8086 80x86 and 680x0 Aztec C has an excellent reputation for producing compact high performance code Our systems for under 1 000 outperform systems priced at over 10 000 Initial Host Plus Target 750 Additional Targets 5 500 ROM Support Package 500 Vax Sun PDP 11 ROM HOSTS Call for information on Vax PDP 11 Sun and other host environments Cross Development Most Aztec C systems are available as cross development systems Hosts include PC MS DOS Macintosh CP M Vax PDP 11 Sun and others
272. warn ings You can go to any one of them by moving your cursor to an error listing S a value Turbo C is even more of a breathtaking bargain than Turbo Pascal It s the Borland Revolution at the very edge of sanity and whacking enter Pop There s the cursor at the offending point in the code If the project involves several files the editor will call up the appropriate file automatically Or else you can use F8 and F7 to move one error forward or backward in the list An utter joy My productivity in C has surely doubled because I can charge forward and trust the compiler to flag the silly er rors misspellings undeclared variables and so forth This process is aided by Borland s adoption of function prototypes to check function arguments Use their include files and put prototypes of your own functions at the head of your files and you will get a level of insurance that approaches the safety of Pascal Or if you don t want to be nagged then revert to what Borland calls classic i e K amp R C and you are free to walk the rope without the net Sometimes I get tired of Turbo s ditherings about my fast and loose games with pointers and wish it would just shut up As far as I m concerned suspicious pointer is a redundancy All pointers are suspicious That s why they re fun On the other hand error catching in Turbo is the best I ve ever seen They are spot on with structure syntax where lots
273. xecuted If none of the guards are active the process execut ing the alt will be descheduled until one of the channel or timer guards becomes active l Altogether there are five types of guards boolean guard channel guard without boolean channel guard with boolean timer guard without boolean timer guard with boolean The boolean guard is the simplest A boolean guard consists of the keyword guard followed by an expression with a boolean result If the result of the boolean expression is true the guard is active otherwise the guard is inactive The boolean guard can be used instead of nested if statements Figure 3 Begin amp End Subprocesses The fragment int a b par az3 b 4 compiles to ldc 6 7 ldlp 6 startp j 5 ldc 3 stl 7 ldlp endp ldc ldlp startp j ldc stl ldlp endp ldc ldpi stl ldc stl ldlp endp The example if a b 1 else if a23 b 2 else if a5 b 3 else b 4 is equivalent to alt guarda b 1 break guard a23 b 2 break guard a5 b 3 break default b 4 break Channel guards are the second type of guard consisting of an expression with a channel address and an optional boolean expression The channel guard is active if the channel it points to is active ready for input or output and the optional boolean expression is true The channel guard is very useful for multiplexing multiple internal channels to
274. xtended Memory Works on 8 or 16 bit bus 16 bit transfer on AT bus Single board design Includes RAM disk and extensive diagnostics eQuantity OEM discounts o EGIN 904 North 6th St Lake City MN 55041 612 345 4555 INSTRUMENT FLIGHT SIMULATOR 19 NO GRAPHICS NEEDED 4 aircraft trainer through fighter air traffic control realistic navigation flight lessons 32 page manual with charts Pilots or beginners MSDOS CP M Kaypro or CP M 8 Bailey Tech 304 WS College Yellow Springs OH 45387 XT and AT Compatible Designed Manufactured Sold and Serviced by Z80 Development System 54995 Includes Macro Assembler Linker Library Manager with routinelibrary and DDT like debugger Also available Screen editor 319 95 Overlay Linker 519 95 Xref 9 95 8080 to Z80 translator 9 95 Z 80 Disassembler 19 95 Over 400 CP M Public Domain disks 100 page catalog 58 50 pp P amp H 2 50 per order SASE ELLIAM ASSOCIATES Visa MC B Anas 818 348 4278 6101 Kentland Ave Suite 130 Woodland Hills California 91367 RAM DISK S 100 2 Meg Port I O New Warranteed 8725 S Lugert 439 Peck Slip or call NY NY 10272 718 622 0654 m LOGITECH MOUSE PUBLISHING Solution 179 14900 LOGITECH Mouse with PFS First Publisher CADD Solution 1 15900 LOGITECH MOUSE with Generic CADD 3 0 plus DotPlot PAINT Solution 1490 12900 LOGITEC
275. y PROCEDURE PixAddress X Xpos Y Ypos VAR B BitPos ADDRESS From X and Y pixel coordinates calculate a physical memory address and bit position within that byte PROCEDURE SetBit SrcByte BYTE BitNum BitPos BYTE Set one bit in a byte PROCEDURE ClrBit SrcByte BYTE BitNum BitPos BYTE Clear one bit in a byte PROCEDURE InvertBit SrcByte BYTE BitNum BitPos BYTE Toggle one bit in a byte END ScrnStuff MICRO CORNUCOPIA 38 Nov Dec 1987 47 Data Abstraction And Dynamic Allocation How To Cut And Paste Text Screens In Modula 2 Pasting bits and pieces of screens together must be great fun Look at all those pull down menus people are creating However they can be very wasteful of memory Unless of course you re a very dynamic program mer handlers manipulate screens or need to be optimized for speed are good candidates for a programming lan guage which allows access to a computer s low levels We can reach these low levels in some languages by calling assembly lan guage subroutines Unfortunately these embedded subroutines are expensive to maintain don t allow data abstraction the organization of information into ob jects we can manipulate without know ing the internal structure of the data and lack portability Fortunately some languages such as Modula 2 and ADA are versatile enough to handle the whole job themselves Data abstractio
276. y useful statistic used in a variety of fields the sciences for statis tical inferences and as the basis for more sophisticated statistical inferences in sports batting averages shooting per centages betting odds etc in govern ment in business etc It s also sometimes considered a descriptive statistic of loca tion i e what s the position of a sample along a given dimension representing a variable Although the mean is undoubtedly the most commonly used statistic it doesn t even begin to tell the complete story about a sample Radically different distributions of data points might have identical means The most common next way to add more to the story is to weight each item by its distance from the center or mean of the distribution The variance and especially the stand ard deviation are statistics to help us add to our description of the shape of a fre quency distribution For more information about these and other more complex statistical tests check out my reference to Bradley So back to the code in Figure 1 writ ten in Turbo PROLOG which uses recur sion and PROLOG s built in linked list to calculate these simple statistics It s very fast calculating the mean of 7000 real numbers data points in 2 5 seconds on a PC Tech X16B 8 MHz 80186 CPU no math co processor I thought this was pretty fast but I wasn t sure how fast so I decided to write a real processor in C see Figure 2 Afte
277. ype A channel variable in an ex pression or sub expression assumes this governing data type channel dogdays struct CATSMEOW int array 40 bigtime dogdays bigtime In this example the governing data type is the structure CATSMEOW The number of bytes sent by the channel is equal to the size of this data type 160 bytes or 40 sizeof int In this example channel tohostpc double result long count tohostpc result count the compiler converts count to a double performs the division and out puts the resulting value as a double to the channel tohostpc Channel variables can also be used in boolean expression if chan When declaring channels there s no restriction on the complexity of the dec laration This means that arrays of chan By Rob Kurver and Klaas Wijbrans Utrecht The Netherlands rom the programmer s point of view communication is the same regardless of whether or not the two communicating processes are on the same chip nels and structures containing channels all are possible So it s legal to say struct P channel a channel b 50 E Channel Behavior Since a channel is a means of com munication between two processes whenever a process o tputs a value via a channel another process must input that value Suppose we have a program like the one in Figure 1 with two independent parallel processes P and Q For channel communi

Download Pdf Manuals

image

Related Search

Related Contents

  DVS 150 - Extron Electronics  Artisan Technology Group is your source for quality new and  Betriebsanleitung Operating Instructions Instructions d'utilisation  Tarjeta de Expansión E/S  Sony VGN-AX570G Replacement Instructions  Hardware system for residential (garage) overhead doors  V4ALLAssisi GUI Designer  ページプリンタ XL-2300G のマニュアルについて  User and maintenance manual for generating sets  

Copyright © All rights reserved.
Failed to retrieve file