Home

a COPIA - Bitsavers.org

image

Contents

1. of choice for modern oa 7 COMPILER software engineering and LOGITECH Modula 2 is x ae YY Fo Faster and more flexible Now the most powerful implemen its DOS linker compatible object tation available for the PC files OBJ can be linked with The right language and the right a E N existing libraries in C PASCAL tools have come together in one FORTRAN and ASSEMBLER superior product Whether ae di a n aba A eto you re working on a small development and put the power program or a complex project of LOGITECH Modula 2 to with LOGITECH Modula 2 work for you right now Fully Versiof3 0 you can write more suppor PUTA J latest language reliable maintainable better docu s _ definition including mented code in a fraction of the h LONGINT and LONGSET time at a fraction of the cost which provides large set i support including SET
2. Unique SUPERMARKET STYLE shopping j for ANY and ALL ELECTRONIC NEEDS We XEBEC 141 0 HALF HEIGHT EXTERNAL Stock literally THOUSANDS of parts from the S ASI H ARD DISK DRIVE ENCLOSURE newest IC s to some of the first transistors Attractive Low Profile ALSO for the electronic enthusiast we carry a CONTROLLER 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 e Fits nicely directly under PC e Standard IBM Colors e Bezel for 5 and 3 2 Drive 60 Watt P S w DC Fan and Drive Cables 8995 S9995 8900 YOUR COMPLETE ELECTRONIC SUPPLY STORE LITTON NE wi 7I 787 Terminal ANDERSON JACOBSEN Stand TRACKBALL 120 CPS Thermal Printer Alone MODEM 1200 Baud Racal 250 CYCLES PER REVOLUTION 110 to 9600 BAUD MODEM Bell 3400 Compatible Acoustic direct Con 5 VDC OPERATION 212 103 Racal 3400 Compatible nect Originate Only INCLUDES e Acoustic Direct Connect RS 232 Interface Includes Manu als Cables amp Paper 24 3060 COPPER RD SANTA CLARA 95051 HS SAE Supply of Santa Rosa HSC Electronic Supply Store Hours 9 S Santa Rosa Ave 5549 Hemlock St w MAIL OR DE R S Mon Fri 8 00 7 00 Cotati CA Sacramento CA Saturday 9 00 5 00 renee Call NOW 408 732 157 3 TERMS Minimum order 10 Califorma reside chargesChipping will be added to c
3. 1 The Code Busters i 5 type C C SOFTWARE 1907 ALVARADO AVE WALNUT CREEK CA 94596 415 939 8153 All products are fully guaranteed Disk format 8 A D ES Se III CP M ard TURBO Pascal are trademarks of Digital Research amp Borland Int MUY MEG AY i Reader Service Number 31 A A Ay ANNOUNCING A CALCULATED BREAKTHROUGH IN COMPUTING If you use a SCIENTIFIC OR FINANCIAL CALCULATOR and a 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 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 Reader Service Number 41 New Desktop Services From Micro C We ll design a style sheet for you then take your ASCII WordStar WordPerfect or other text illustrations and listings from disk paper or our RBBS and put them togeth
4. 119 00 AT 6 10 mhz 4 layer Choice of Phoenix or DTK Bios 350 00 XT Turbo 4 77 8 mhz FAL A eden 109 00 XT Turbo 4 77 8 mhz 4 layer ooooooonccooccooooo A 119 00 80386 8 16 mhz Award Bios amp 1MB RAM made in U S A 1595 00 For XT AT memory 0065 Call FLOPPY DISK DRIVES Fujitsu 360K ic eds 97 00 Toshiba 300K oi 99 00 Toshiba 1 2 MB 145 00 31M Drive Kit 0 0 c0cce eee 145 00 KEYBOARDS 5339 Professional XT AT w 12 function key 79 00 5060 Keyboard AT Style 55 00 FROM THE INSIDE OUT TECH TIP If you are considering an 80386 system find a motherboard built in the USA Due to chip shortage Intel has been shipping seconds overseas USA manufacturers get the better chips If AMD starts making chips soon the prices will drop NEW 80386 KIT Includes 8 16 mhz 1MB RAM 1 360K floppy drive 1 1 2 MB FD 1 40MB HD Award bios switchable keyboard monochrome monitor mono graphics Serial parallel ports case power supply game port clock calendar Main board made in USA 2875 00 80286 AT KIT Includes 640K RAM 1 2 MBFD 1 360K floppy drive and 40 MB Seagate St 251 hard drive 6 10mhz serial parallel and game ports clock calendar AT style keyboard cabinet power supply monographics card amber or green monitor keyboard switchable turbo 1795 00 HARD DRIVES amp CONTROLLER
5. Z2RP M creates 22809 CP M 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 SS UB 118 SW First St Box G Warrenton OR 97146 MES y ethods Inc 503 861 1765 MS DOS CP M E EEPROM PROGRAMMING SYSTEM 2708 2764 2758 2764A 2716 27128 2516 27128A 2532 27256 2564 27512 68764 27CXXX 2816A 2864A 2732 Le PAE ZIIER REO CL UDED A FULL FEATURED HARDWARE SOFTWARE PACKAGE FAST PROGRAMMING ALGORITHM USES NO SYSTEM POWER OR CHASSIS SLOT NO PERSONALITY MODULES REQUIRED STAND ALONE BOARD INSTALL PROGRAM FOR SOFTWARE e HIGH SPEED PARALLEL OPERATION e ALL SUPPLIES ON BOARD e FIVE LED STATUS ACTIVITY INDICATORS PROGRAMS 26 25 21 amp 12 5V EJEEPROMS e HIGH QUALITY TEXTOOL ZIF SOCKET e LARGE COMPREHENSIVE MANUAL e REQUIRES 24 OR 25 VOLT XFMR FOR POWER PARALLEL PRINTER INTERFACE ONNECTS TO ANY PARALLEL PR
6. arta ee POD B Tree Library amp ISAM Driver file system utilities by Softfocus 100 The Profiler program execution profile tool omar SON Entelekon C Function Library screen graphics keyboard string printer Ste a ah Ue ost amp do LOO 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 funictidn library 90 CBTree B tree ISAM driver multiple variable length keys 80 ME programmer s editor with Clike macro language by Magma Software 75 Wendin PCNX Operating System Shell 04 4 Ss idee el he at Adan Se Bhs oe ean TOTO Wendin PCVMS Operating System Shell 1 a 2G a fet a OTO Wendin Operating System Construction Kit a a Oe ote te DTD EZ_ASM assembly language macros bridging Cand MASM ai jb de gt Gat ser ee 60 Multi User BBS chat mail menus sysop displays uses Galacticomm modem cata ye ew 0 Heap Expander dynamic memory manager for expanded memory ee Gea 50 Make macros all languages built in rules GS A Shee BO Vector to Raster Conversion stroke letters amp Tektronix 4010 codes to bitmaps g e e eee ee ae 0 Coder s Prolog inference engine for use with C programs je hee ne a B45 PC MPX light weight process manager includes pree
7. Reader Service Number 14 MICROCORNUCOPIA 40 Mar April 1988 63 64 MICROCORNUCOPIA 40 Mar April 1988 again ZZAAAAPPP OUCHD is this where we want to put in our recogni tion of keystrokes meant to be interna tional characters Well if you wanted to spend the time to write an interrupt handler all the way from scratch con structing all the tables and everything you could It may be the best choice even My final solution for inputting Turkish characters was to modify INT 9 actually 1 completely replaced INT 9 I would love to show you this ver sion of my program Unfortunately the sample code would be too long to put in the magazine it wouldn t show any thing that hasn t been demonstrated by the program in Figure 2 and besides I would be violating copyright laws if I showed it to you or used it on any machine other than an X16 I admit I used precooked code and just hacked it up a bit thanks Earl Really though the only reason I finally settled on INT 9 was that I thought that some incompatibility problems I was having with certain ap plication software were caused by the application bypassing INT 16h It turned out later that the problem was entirely different but by that time I had already finished the new version of the program The original written to modify INT 16h was much shorter and easier to understand And I wrote it all by myself Tune in for the next episode when I ll gi
8. fprintf stderr Usage get directory abbreviation_name exit 0 Open the data file Find the pseudo name We re done reading fpin open _data file DATAFILE flag search _file fpin argv 1 Parsing Thoughts fclose fpin Although the program itself is use ful the idea of replacing program data with a data file is particularly interest if flag FAIL fprintf stderr nCannot find s in data file n argv 1 22 MICRO CORNUCOPIA 40 Mar Apr 1988 exit 0 Turbo C Programmers Developers or Students Advanced Intermediate Novice BAS C Pack Business Applications Source code in C flag do_switch Try the change if flag MATCH fprintf stderr nCannot find directory s n path exit 0 do_switch Function to do the work Argument list void Return value int O if successful 1 on error A REVOLUTIONARY PRODUCT Contains the complete Turbo C source code for 8 MAJOR Business Applications in modular form int do_switch void int flag system drive Function to issue command to command com and places us on the correct drive flag chdir path We should be there now return flag eGeneral Ledger elnventory eAccounts Receivable ePayroll eAmortization eOrder Entry ePurchase Orders eAccounts Payable FIRST TIME EVER ff Quality source code for major bus
9. Microsoft does not implement some of the features found in the proposed ANSI standard For example although it recognizes the keyword volatile the compiler does not change its output to support the term The ANSI standard pre defined macros such as __TIME__ and _ DATE are also not supported For all of its touted optimizations Microsoft still doesn t know that using two one bit shifts is faster than doing one shift using CX to indicate the shift size It seems to have optimized the multi gt ply in the line 1 1 i j to a series of ADDs The compiler recognized that in each loop l increases by i Microsoft Quick C v1 00 You can get Quick C two ways as part of Microsoft s Optimizing C pack age or by itself Quick C is Microsoft s answer to competitors like Borland It s an inex pensive full featured compiler in an in tegrated environment The environment includes the compiler an editor and a subset of the CodeView debugger In the environment it compiles only a medium small data large code program but the command line version supports all five standard Microsoft models Unlike its large sibling Quick C is comfortable on a floppy based PC This compiler does not use a great deal of disk space but the integrated version consumes memory at an alarming rate The command line version uses a subset of the command line switches from its bigger brother and operates very much like a
10. e There is nothing more effective than the combination of a really zingy ad and a really good review e There is nothing less effective than a really zingy ad and a really bad review Should you advertise when you re not sure how the review will come out Probably The upside potential is huge and reviews don t happen all that often un a quarter page black and white ad and they assume your management team works nights at McDonald s and your designers are just finishing high school e Any editorial mention at all will generally make an ad more effec tive But beware if you can buy editorial mention by plac ing an ad Magazines making those offers cheat their readers by selling you editorial space They re probably not above cheat ing you too e There aren t a lot of good inde pendent reader surveys but you can get a pretty good feel for a magazine s audience by its con tent If your product is aimed at a person like yourself then adver tise in whatever you enjoy read ing Within reason of course I m not sure Playboy is the place for a disassembler if you follow my drift Ad placement is very important in magazines which aren t thoroughly read particularly the large ones The major players for instance are very position con scious They re either up front on a right hand page or on the covers In a smaller more intense magazine like Micro C Dr Dobbs Programmers Journa
11. l gt lt gt and lt for both signed and unsigned numbers Old machine languages required long sequences to make the same tests e Rich register set The 8086 has a large set of general purpose registers with complete symmetry for the most common arithmetic logical and data movement operations The skilled 8086 programmer will use the registers as local variables so the manipula tion of those variables is usually as easy to program as it is in high level language A single ac cumulator handled all the arith metic for the older processors so most lines of code shuffled values into and out of the accumulator And the program s function was hard to follow Language Improvements In addition to improvements in the machine architecture there have also been important advances in assembly language itself The 8086 assembler has strong typing of symbols This means that the kind of machine instruction generated by a line of source code can be determined using the types byte variable word register By Eric Isaacson 416 University St Bloomington IN 47401 have written four text editors in my career Two were written in high level language and two in assembly language The assembly language versions took the least time to develop immediate constant etc of the operands Old assembly languages re quired a different mnemonic for each type of operand e g MOVB for a byte mov
12. 139 95 OUTSIDE USA ADD 15 SHIPPING CA RES ADD SALES TAX 99 95 All our products come with a 30 day money back satisfaction guarantee Not copy protected To order or receive additional information just call V COMMUNICATIONS 3031 Tisch Way Suite 200 Dept TD San Jose CA 95128 408 296 4224 PS 2 AT XT and PC are trademarks of IBM Corp Reader Service Number 62 A A ESAS The Dream 88 30 Mb XT Compatible XT Turbo 4 77 8 MHz motherboard 640 K of on board RAM 1 5 25 360K Fujitsu floppy drive 30 Mb Seagate ST 238 Hard drive Floppy controller card controls 2 Hard disk controller card 12 amber Samsung monitor tilt swivel Monographics card with parallel port AT style keyboard XT slide case UL and FCC approved Complete 795 IR OO OL I DI I OO RIAA AOI The Dream 286 40 Mb AT Compatible AT 6 10 MHz 0 wait state motherboard 1 Megabyte of on board RAM 1 5 25 TEAC 1 2M floppy drive 40 Mb Seagate ST 251 Hard drive Hard floppy disk controller card 12 amber Samsung monitor tilt swivel Monographics card with parallel port AT style keyboard AT case UL and FCC approved Complete 1495 All systems can can be cusomized to youre exact Patina Everex 1200 Baud Modem Everex 2400 Baud Modem Magnavox Multimode EGA Monitor Genoa Super EGA High Res 800x600 Micropolis 71 Mb Hard Disk Mountain 40 Mb Tape Backup Unit Toshiba 720
13. 79 640k TurboMothrbrd 85 McTek286 6 8 10 12MHV 289 Kingtech Portable Computer Fujitsu 1 2MB 99 Citizen CD 180 189 TVM EGA color 399 10MHz TurboMothrbrd 89 Baby McTek 286B AT Kits XT AT power supply TOAC cococrorcoroiccocos 79 HPLASAR Serial2 1799 TVM RGB color 289 Multi 1 0 w disk contrir 59 10 13 O wait 409 case keyboard monitor Teac 1 2MB 105 Epson LX 800 219 NEC Multisync 559 640k RAM card 39 McTek 286A O wait3MB cooonccorocaconoca 380 410 Toshiba 3 720k 119 Toshiba 321 XL 559 Sony Multiscan 650 2MB Expansion card 115 4 ports on board 449 Eprom burner 4 socket 139 Floppy controller 22 Call for prices of other brands HGC compat mono card 55 RS232 2 port card 35 3 MB Multifunction card 125 Lap Top Kits 799 20MB Hard Disk Kit 289 Color graphic card 49 4 serial port card 95 2MB Expansion card 125 AC power center 25 30MB Hard Disk Kit 319 EGA Paradise 159 Game I O card 15 Multi 1 O card 59 AC power stripS 15 ST 225 0 cece eee rs 219 384k Multifunction card 69 Locking slide case 65 Diskette file box 9 ST 238 A 249 Easydata int 300 1200 79 mM ous E FCC app slide XT case 29 m 200W power supply 79 Printer or serial
14. Next we use strtok to break the PATH string into its sub parts watch ing for the semicolon delimiter We won t use strtok that often but it s wonderful when we need it It s also part of the proposed ANSI and UNIX System V standard libraries By Jack Purdum Ph D Ecosoft Inc 6413 N College Ave Indianapolis Indiana 46220 317 255 6476 In short strtok searches a string the first argument of the function using a list of one or more characters from the second string Our first call to strtok searches pl using the semicolon as a delimiter If strtok finds a semi colon it forms a string of what was read up to that point and returns a pointer to it If a non null pointer is returned from strtok it will have returned a pointer to a string In our case it would be ptr E This is copied into templ by a call to strepy and a backslash is then ap pended to it The second call to strcat adds the data file name to the string with the result temp E get dat We then try to open a file using the full pathname just built If we re in the wrong directory for the get dat data file a NULL pointer is returned Since we may still have more PATH directories to examine we clear out templ and call strtok again Because the first argument to strtok is cast to a NULL character pointer strtok continues to parse the previous string If you follow through the second pass
15. No 40 March April 1988 3 95 PRE MICRO TECHNICAL JOURNAL CCCCCCCCCCECCCCCCCCCECCCCccceccces CCCCCCCCECECCCCCECCCCECCCCCCCCCCCCc CCCCE CCCCCCCCCCCCG Scott Ladd compares benchmarks features and generated code for 11 C compilers Including Microsoft C Vs 5 0 and Borland s Vs 1 5 Jack Purdum shows you how to use text files as program data Ta GC eae EE ORE CC Xi This fancy new language thinks it s C Smalltalk and more ECLECCA ECO Every C needs a debugger Here s a free one for Turbo written by Gary Mellor In depth looks at A fast new Al language a great new dissasembler PC Keyboards the PC parallel IC and much much more ALOBAL AY VAU DATANT MITI UI 0 2 CECCCCCCCCCCCE CECCECCCCCCCECA VERY HIGH RESOLUTION The PC Tech COLOR and MONOCHROME video processor boards employ the TMS 34010 high performance graphics co processor to insure the best possible video performance at reasonable prices Color 34010 Video Processor e Featured on the cover of Micro Cornucopia e From 800 x 512 through 1024 x 800 resolution depending on monitor and configuration e 8 Bits per pixel for 256 simultaneous colors e Hardware support for CGA MDA emulation e PC XT and AT compatible Available configurations Basic Color 34010 processor board and software cece eee caeccceeeeeas 995 00 Loaded Color 34010 processor board and SOftWare o oooooo
16. not even Con trol Alt Delete The operator s only recourse is something that plugs into the wall Anyone taking over interrupt 9 keyboard to install a hot key for a resi dent program will be dealing directly with the PPI See the PC speedup article in issue 31 August September 1986 for a simple minded example of the process Also as mentioned above you can use PB1 for sound generation System Configuration The PPI is instrumental in determin ing system configuration although we don t have to look at it directly Inter rupt 11h does all the work for us Figure 5 shows a function which per forms this task As an aside on power up the BIOS checks out the switches and performs other tests on the system It then loads the results of these equipment checks into memory locations 0 410h and 0 411h So you could examine these equipment flags directly rather than use interrupt 11h But that s not the approved method and far be it from me to counsel inappropriate behavior Further notes on interrupt 11 It s limited It has been handy for determin ing which video card is installed And it seems reliable in returning the number of floppy drives But it s unclear if you can get good information about the math coprocessor It probably depends on your BIOS The reported number of printers and RS 232 cards is suspect as well Again it seems to be a function of the BIOS Dave recently got a hold of a very inter esti
17. v k of CHAR Provides FREE TURBO PASCAL nization for tich TO LOGITECH MODULA 2 Y Optimization for tighter more TRANSLATOR i efficient code generation l NEW IMPROVED Our P a TP is fully E DEBUGGERS O LOGFTECH Modula 2 99 integrated easy to learn fast and easy Time gained with a fast compiler can V 3 0 Compiler Pack to use and very customizable Its Compiler in overlay and fully linked form be losta at debug time without the right Linkable Library Post Mortem Debugger multiple overlapping windows and ebugging tools With the powerful Point Editor color support make it easy to manage Logitech Modula 2 Debuggers you O nee Modula 2 169 parts of one file or several files on the can debug your code fast and Library ROCES Linker Run Time Debug screen at one time O using drameticasly TORAN your overall ger MAKE Decoder Version XRef it with or without a mouse roject throughput elo ee Post M P C LOGITECH Modula 2 Call for information about our VAX VMS e Post Mortem V 3 0 Development System Saat Sie cemre University Dice l aes Debugger analyzes Compiler Pack plus Toolkit version site License University Discounts Dealer amp Distributor pricing MANGO aaa 1 Turbo Pascal to FREE Modula 2 Translator after it has terminated With Compiler Pack or Development System To place an order call toll free ss While the dynamic O Window Package 49 800 251 7717 z Build true windowing
18. ve seen This package lets you play games type mysteries compete with the program etc Its graphics and sound are as good as the best games And while you re enjoying the lessons it s keeping statistics on your progress If you re a beginner or an intermediate it ll put a keyboard on the screen showing the proper fingers hitting the keys as you type You ll never need to look at the keyboard again It even understands the sounder part of typing Make a mistake and it trills Do something well and you get a musical pat on the back Enter the road race and the faster you type the faster your motor runs And you thought your motor ran for other reasons Mavis will move you quickly to harder tasks if your speed and accuracy are high Or it will ask you if you re getting tired when your error rate rises You may not want to do too well when you start out Be too successful and you ll soon be over your head but that s a small knock on a very smart and entertaining program Anyway if you re hooked on hunt and peck or worried someone you love might fall into this horrid trap you ll wait a long time to find a better teacher Mavis Beacon The Software Toolworks One Toolworks Plaza 13557 Ventura Boulevard Sherman Oaks CA 91423 818 907 6789 And that s all from greater Bend David Thompson Text Editor amp File Copier A A RA TEAR HERE NA TEAR HERE cerro AAA ORDERFORM POSTAGE PAID SELF MAILER Tear out f
19. Again SOG will be held in Bend July 14 16 Sessions will be held at Central Oregon College but we won t have the dorm this year remodeling and all There are plenty of places to stay in Bend trailer parks campgrounds motels resorts etc So sleeping shouldn t be a problem The only reason we ve encouraged early reservations at previous SOGs is because of the limited dorm space Since we don t have the dorm we re moving SOG registrations back to May 1 by request of the SOG registration department Despite waiting until May you ll have plenty of time to sign up for the Thursday BBQ and Saturday evening banquet the all day and half day white water rafting and T shirts don t miss a year in your collection Also this year s technical events will include hardware and software design roundtables They ll feature great designers and as usual audience participation is mandatory Want to carpool Want more information on places to stay Check into the SOG forum on the Micro C RBBS even before May 1 503 382 7643 300 1200 2400 8 bits 1 stop no parity 24 hrs Leave a message if you have traveling room to spare or need to find someone coming out from your area Any ques tions about what s happening Leave a message for the Sysop Or second best we can send out brochures about the area and about lodging Either way registration begins on May 1 and we ll look forward to seeing you in Bend July 14 16 for the latest gr
20. 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 10 Cheap amp Dirty 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 H 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 Drive 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 Computing MS DOS In The Public Domain Graphics In Turbo Pascal 104 pages 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
21. CALL ASM with tabs you can reduce the files from 26K total to 17K You should of course keep original copies of both files You never know when you may need the comments Next Issue Next time Stephen walks us through more Small C utilities Don t miss it 9049 MICROCORNUCOPIA 40 Mar April 1988 73 IC PROMPT DELIVERY SAME DAY SHIPPING USUALLY QUANTITY ONE PRICES SHOWN for DEC 27 1987 OUTSIDE OKLAHOMA NO SALES TAX DYNAMIC RAM 1Mbit 1048kx1 100 ns 32 00 1Mbit 256Kx4 100 ns 28 00 51258 x256Kx1 100 ns 6 75 4464 64Kx4 150 ns 4 15 41256 256Kx1 80 ns 5 65 41256 256Kx1 100 ns 5 15 41256 256Kx1 120 ns 4 25 41256 256Kx1 150 ns 3 95 41264 5 25 27C1000 128kx8 150ns 37 95 27C512 64kxs 200 ns 15 50 27256 32Kx8 250 ns 6 50 27128 16Kx8 250 ns 6 25 STATIC RAM 43256L 12 32Kx8 120ns 11 70 5565PL 15 8kx8 150 ns 3 30 OPEN 612 DAYS 7 30 am 10 pm SHIP VIA FED EX ON SAT SAT DELIVERY MasterCard VISA or UPS CASH COD INCLUDED ON_ Factory New Prime Parts Poo Receven eY MICROPROCESSORS UNLIMITED INC j Peoria Ave y Tr ey si0 so 2 A BEGGS OK 74421 918 267 4961 z g No minimum order Please note that prices are subject to change Shipping amp insurance extra amp up to 1 for packing materials Orders recelved 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 one o o EN a b Y 80287 8 80387
22. Edit Toolkit HTPL Source amp Manual Line Editor Screen Editor and Text Formatter 50 00 Lizard Land An HTPL Adventure Program with Source Code 15 00 Write or call today for more information and a free 68 KNEWS letter e Hawthorne Technology 8836 Southeast Stark Portland OR 97216 Order Now VISA MC COD 503 254 2005 Reader Service Number 34 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 a An extensive upgrade for 48K CP M 2 2 3 0 and equivalent systems Con X Provides professional capabilities with blinding speed as often found on Operating high end UNIX machines Installs easily in just minutes to add over 100 System new built in commands and features while maintaining 100 compatibility A With all your existing software Includes VO redirection aliases improved user area access auto searching PF Keys Screen Paging Print Spooler Archiver New SysCalls Eliminates many points of user frustrati
23. Reader Service Number 52 A Ventilation System designed to prolong the life of IBM PC PC XT Coldbiue fits in the IBM enclosure reducing operating temperatures as much as 27 F by increasing airflow across the card area The one that really works 18 Mandrill Corp S a PO Box 33848 San Antonio TX 78265 800 531 5314 Dealers inquiries welcome 12 Logitech Inc 31 36 Microcomputer Systems 52 37 Microprocessors Unimtd 74 59 National Advancement Co 89 3 PC Tech Inside Front Cover 29 Pecan Software 68 Programmer s Paradise 17 Manx Software Systems 87 60 Scientific Software 18 Semidisk Systems 27 Serengeti Software 19 Slicer Controls Compute 28 Softside Systems 40 Star K Software Systems 24 41 Sunderland Software 62 V Communications 14 WindowDOS Assoc 39 Xenosoft 70 Zortech Inc Inside Back Cover PEN PLOTS WE SUPPORT AUTOCAD ORCAD GENERIC LASER CAD AND MORE electronic design services 1743 SE GAIL CT HILLSBORO OR 97123 503 648 2318 Reader Service Number 69 Turbo Pascal Tools for DOS 3 XX Featuring 80 Pascal procedures and functions Professionally bound manual Example programs No licensing for compiled code Only 95 Azatar MicroSystems Inc 3300 Monroe Ave Rochester NY 14618 716 385 9780 Hrs 9 5 Eastern Reader Service Number 47 TurboCAD The New Generation CAD pace 395 EASILY OUTCLASSE
24. 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 ogie Programming Building Your Own Logic Analyzer 256 K RAM For Your 83 Kaypro PC DOS For Non Clones 104 pages f 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 U S Canada amp Mexico Issues 1 34 ooomooomoom 93 00 each ppd Issues 35 through current issue 3 95 each ppd Foreign air mail Issues 1 through current issue 7 00 each ppd ISSUE 32 10 86 Public Domain 32000 Hardware and Software Writing A Printer Driver For MS DOS Recover A Directory B Reading amp Writing Disk Sectors 96 pages ISSUE 33 12 86 Controlling Stepper Motors From Your P Introduction To Fractals The Secrets Of MS DOS From Boots To Devide Drivers Poking About In The System With Turbo Pascal 96 pages ISSUE 34 2 87 Designing Wi Build A Si scilloscope A Che Operating System Ac ent Operating System Rec Vering Directories And FATs 96 pages e 80386 ISSUE 35 4 87 Building An 8 channel Temperature scanner Designing an Expert System Teaching Your PC To Bee Who s Making Great Hard Drives Learning Assembly Language 96 page ISSUE 36 6 87 Build A Midi Interface For Your PC Desi
25. Turbo Pascal 3 x 12K 4 8 Turbo Prolog 1 1 41K 9 1 80286 V 30 with 8087 n a n a n a a Figure 2 Two Pass Standard Deviation Declares Reg Vars include lt stdio h gt void stat double list main ce register short i j double list 7000 for i 0 i lt 6999 itt list i i 1 5 stat list lt gt void stat double List register i c double x z dev square squares var sd oe double sqrt double a oo ooox squares 0 a puts start for i 7 i lt 6999 1 1 TE Merit x zoi lt 7000 i ow z list i square dev dev squares Squares square ae squares 1 1 a printf s in var sd sqrt var o Peete Bd Prolog s and Turbo BASIC s speed remains a mystery since they use the same 8 byte IEEE standard as the C com pilers we ve tested Editor s note Most people aren t aware that some compilers use spring loaded floats as do some carburetors And finally both Dr Purdum and Geoffrey Chase at Portsmouth Abby School in Rhode Island suggested a faster algorithm for the standard devia tion Their method the lemma makes a single pass instead of two through the list reducing execution time by almost half Figure 4 contains one version of the algorithm Thanks guys ln partial to a new series of Turbo C toolboxes released recently by Zortech Hotkey I like programs that te
26. U option with UPGRADE it will break your source code into UNITs This is not however a completely automatic feature You must first edit the original source code to in sert special comments for UPGRADE These comments are of the form U unitname When Upgrade encounters one of these special comments it will break the source code at that point creating a new UNIT with the name you specified UPGRADE automatically deletes overlay keywords and if you specified U it ll add USES statements al Program After Conversion By UPGR ge hecking off ocolean short circuiting off Stack checking on 1 0 checking on No numeric coprocessor l M 65500 16384 655360 Turbo 3 default stack and heap Program fuer ac c Make the KeyPressed function work 10 1 Directives A B C D F G P U0 W X are obsolete or changed in meaning te delay in milliseconds y y col att Begin oes elrscr ae a Ra O begin col random 16 oe atbores fandom 8 char random 10000 ee if Uy 25 and Ax gt 74 then x 70 Baton Ge Ni textcolor col textbackground att Higa write t char 1 endo until KeyPressed clracr ee ne nd o Conclusion I have been using Turbo 4 0 for about three weeks now At first I was not impressed the very first thing I ran into was the old file size limit in the editor Since then I have had a chance
27. be quite impressed concerned when they see my commented disassembly of their code I asked Frank what people have been doing with the program One outfit mentioned they had lost all their source files for a current product They used sourcer to recreate the source Another outfit bought it after they noticed their programmer s com ments were unintelligible An individual used it to find and remove an obnoxious bell from his favorite game A number of companies have pur chased it to dig into Sidekick They have to be compatible with the program and they can t get specific details or help from Borland so they disassembled it Usually though people don t tell me what they re doing They may have the feeling they re doing something wrong getting in and peeking at some one else s code But it s really OK The BIOS Pre processor and Sourcer are available from V Communications The Sourcer alone is 99 95 with the BIOS Pre processor it s 139 95 Frank is working on an MS DOS preproces sor disassembler It should handle most of the 2 X and 3 X versions and should be available by the time you ve read this Depending on how fast you read of course V Communications 3031 Tisch Way 2nd floor _ San Jose CA 95128 408 296 4224 By David Thompson A Language I know why I haven t picked up Prolog It s hard to understand I m process oriented so as far as I m con cerned a language needs a
28. but you can define a new type as an old type with some features added You don t have to know how the old type works just what it does For example suppose someone has defined a matrix type and you want to create a special type based on that matrix You can say my_type is a matrix with some extra information about location time and operations or methods to set and extract that informa tion This is called inheritance and it s one of the most powerful concepts in C or any true object oriented programming language If someone has gone to the trouble of defining and debugging a class and you need something like it but different you don t have to throw it away and start from scratch You simply say I m creating a new object which is like the old object with these changes You make the changes and debug those This works even if you only have a linkable module for the object rather than the source code Most of the problems with buying someone else s plain C object modules occur because you can t change the modules In C you can still clean up their work even if they don t distribute source Real Objects You often hear that a product is good if it s object oriented Not necessarily and for your own defense you should know that object oriented isn t just the ability to create user defined types It s user defined types combined with the ability to inherit from an older type
29. e Dos This UNIT contains all of the most commonly used DOS calls GetTime SetTime Disk By James H Simpson 7389 So 2345 W West Jordan Utah 84084 801 569 0735 Size as well as the low level routines MsDos and Intr The low level routines handle direct calls to MS DOS or system inter rupts e Crt This UNIT provides PC specific I O routines for screen and keyboard windowing direct cursor addressing and the like e Printer This UNIT declares the LST variable and links the Write and Writeln procedures to the printer driver routines e Graph This UNIT provides a set of fast powerful graphics routines and implements the device inde pendent Borland graphics hand ler You get graphics support of CGA EGA VGA Hercules AT amp T 400 MCGA and 3270 PC graphics hardware The folks at Borland have been kind enough to provide two additional compatibility UNITs for those of us who already have drawers full of Turbo Pascal source They are e Turbo3 This UNIT contains two variables and several procedures not supported by Turbo 4 0 These include the file variable Kbd the boolean variable CBreak and the integer versions of MemAvail and MaxA vail which return the num ber of free paragraphs instead of free bytes e Graph3 This UNIT supports all of the Turbo 3 0 graphics func tions including Turtle Graphics Managing Libraries Borland has included a utility program for creating and manag
30. the code segment So the debugger only uses the offset portion of the symbol and line number data to set breakpoints or display variables If you want to use the debugger with one of the other memory models you ll have to add the segment information to the tables If you have multiple separately com piled modules Tlink the Turbo linker adds the line number information for each compiled object module separately in the order they appear in the project file The debugger will only use the line numbers from the first mddule and its name is listed in the map file as the source file to open It ignores all sub sequent line number lists If you need to debug code in another module list that module first in the make file After initialization the debugger enters the command mode and displays the prompt TBUG The command line parser will accept the least unique spelling of the command the first letter in most cases Typing RETURN on a blank line will execute the previous command as if it had been entered with no arguments Thus you can step through a program after the first step command or list the next group of lines without retyping the command Most of the commands are straightforward and are listed in Figure 1 However the PRINT command has several variations which bear mention ing The PRINT command lets you format and print local and global data Optional type specifiers may be used to override th
31. to explore UNITs work with the new graphics environment and convert a large program from Microsoft Pascal to Turbo 4 0 the difference in compile time alone was enough to win me over Turbo took 22 seconds Microsoft took 12 minutes I can now say without any reserva tions that I think Turbo Pascal 4 0 is a great product It s not perfect but it s pretty close In his last article in Micro C 38 November December 1987 Ron Miller wrote Will C become the BASIC of the late 80 s Golly I hope so To that I must reply Not while Borland con tinues to improve Turbo Pascal This has been a very quick look at Turbo Pascal 4 0 Many of the features were covered in name only Sorry I hope I have at least managed to pique char color a random 80 1 col indx y om random 25 1 lin indx integer your curiosity Maybe we ll have another chance to do some in depth ex ploring in another article Until then happy coding 999 UNINTERRUPTABLE POWER SOURCE SOLUTIONS protects your equipment R and your data from power outages and brownouts Our power systems provide S the fastest switching speed in the in i dustry 2 ms 1 Y EMI RFI filtering and surge spike protec tion all in one affordable unit 1 year war j ranty on all units Available in a size to 9 suit your needs 290 00 360 00 410 00 610 00 710 00 200 watts 350 watts 550 watts 800 watts 1000 w
32. verification of a publications numbers However there s still room for creativity Back when computer magazine circulations were doubling every year they d list next year s audit numbers on this year s rate card When audit time came around sure enough the num bers matched The only person who was hurt was the ad vertiser who paid for 50 000 circulation and got only 25 000 If orders were good he wasn t too concerned If they were bad he figured there was something wrong with his product or his ad Spring Of 84 Of course circulations can t go on doubling forever and by the Spring of 1984 they stopped growing In fact many declined By fall it was clear that the audit numbers were going to be dismal For instance several well known computer magazines which had advertised 75 000 circulation had declined to 25 000 That meant if they had the audit they d be forced to refund two thirds of their ad revenue Over the next six months lots of magazines folded right before audit time Many of the ones which didn t fold were combined with vaguely similar magazines so that one magazine reached guaranteed circulation levels That was a trying time for the body counters and it started a shift away from simple circula tion numbers And magazines quit peddling next year s circulation Lately however I ve been hearing a varia tion on the old refrain We re doing a big promotion our reader ship will be
33. 16 So tg r E Q N ui Q lt q a O a D oO a xa W r gt O x T IBM PC XT Compaq Portable amp Plus hp Vectra 160 00 245 00 80387 20 087 2 8 S Reader Service Number 37 XEROX 820 1 AND 820 2 ITEMS Reconditioned Assembled and Tested 820 1 8 COMPUTER SYSTEM 00 5 1 4 COMPUTER SYSTEM 00 00 00 820 1 COMPUTER MONITOR COMPLETE 820 2 COMPUTER MONITOR COMPLETE W CONTROLLER S495 820 COMPUTER MONITOR NO MAIN BOARD nd BS HIGH PROFILE KEYBOARD COMPLETE 820 1 MAIN COMPUTER BOARD aO FULLY POPULATED BOARDS AS Seattle 820 2 MAIN COMPUTER BOARD i FULLY POPULATED BOARDS Fe is NEED REPAIR 820 2 FLOPPY CONTROLLER BOA D Pap pt DUAL 8 SSDD DISKE DEM VES ENCLOSURE COMPLETE 175 DUAL 8 DISK DEAE CABINET NO DRIVES ED REPAIR 5 1 4 ppap sk DRIVE CABLE 8 DUAR RS 232 GABLES DRIVE CABLE 3 3 E21 COMPUTER PRODUCTS ae 2273 AMERICAN AVE 8 5 1 4 DSDD DISKETTES ea 8 SSSD DISKETTES Sl EY ano ae DC300A DATA CART USED 2 S5 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 Corp
34. 2 In Trilogy you also enter a query all Eq 6 x 8 y 46 to get the same results without any back tracking The constraints make it pos sible to generate a direct solution See Figure 3 Note for instance the unknown x is constrained by its parameter type to be an long L integer such that x gt 0 Long Time Writing It turns out that Paul Voda has been writing compilers for 20 years He and some of his students finishing up their PhDs have been working on Trilogy for three years Even the manual writer is a CS PhD candidate Paul is familiar with the folks who created LISP and Prolog These lan guages were also based on predicate cal culus but the people who finally imple mented the compilers added extra logi cal features These additions made the languages much more difficult to predict mathematically The idea is if you can prove the com piler is correct and prove your own source code is correct then you can prove the final object code This moves the software reliability problem out of the dominion of endless tests and into the laps of mathematicians Since Paul and his students are both theoreticians and programmers Trilogy has avoided the plague of hackers It s a theoretically valid language that at a cursory glance appears very very usable At this point the language is un known outside of Vancouver BC That will change very quickly This is too good a language and t
35. 9 1 CCDOPPPPNOOPO Loops Microsoft Mark Wms Borland Datalight MS QuickC Metaware Lattice Aztec Mark Wms DeSmet Eco NSNNOWNDRF WAI P OU 9 7 7 6 570 44 224 8 0 7 5 560 46 064 31 5 9 5 614 2 581 12 1 8 3 639 2 613 17 2 7 2 i JJ0J3JJwWOODIJIVCA ANUNTON OHO wo Sort Borland Microsoft Mark Wms Datalight MS QuickC Aztec Comp Inn Metaware Lattice DeSmet Eco Figure 2 Compiler Features Borind CompIn C Ware Datalt EcoSft Latice Manx MrkWms Metwre Mcrsft Mcrsft Feature TurboC C86 DeSmet Opt C EcoC88 AztecC Let sC High C C price 100 497 209 139 140 75 495 450 99 11 utilities linker librarian debugger editor assembler make profiler OBJ disasm w w ZBBeKOKKKK ZZHZKZZRK 2 Fe m8 te ZKZKKKKK KZKZKZZK ZZIZKKZZ K lt ZZZwWwWKZ ZKKKKKKK ZZKKKKHKZ ZZZLZZZZZ ZAKOKKKK ANSI support void const volatile enum prototypes 2K 226 2K 224K models 4 Tiny COM Small Medium Compact Large Huge Mixed KKKKHKKK KKKKKKZ ZZKZZHKZ KZKKKKO ZZKHKHKHKZ RKKKKHKZ KKK KK KS 22K 22K 4 Z2AKKK KS KKK KK KS code output OBJ files 80x87 support 8087 sensing 186 support 286 support 2 386 support 2 ROMable Assembler oe o KZOKK KKK KOK KK KKK KZZKKKKK KZZZZZKU KUZZZKKK KZZZ ZZ ZKKK KZZKKKKK KKZKKKKU KZZZKKKK KKZKMKKKKK KZZKZ KKK source code library start up E IU o documentation tutorial lang
36. 94563 To order with Visa or MC phone 800 634 7779 in CA 415 254 9393 CA residents add 6 tax C is ported to the PC by Guidelines under license from AT amp T Call or write for a free C information package Reader Service Number 55 MICRO CORNUCOPIA 40 Mar Apr 1988 25 Comdex A Hacker s Computer Fix And A Manufacturer s Future I won t tell you all about Comdex Sure I could have listed the booths rewritten the releases and thrown in a few sanguine com ments from company presidents but that wouldn t be Comdex Comdex is parties and face to face discus sions and information It s friendships made and renewed backs patted and stabbed And finally it s money Lots and lots of money his year Comdex was the place re more than a few small designer companies were writing contracts selling product doing busi ness For instance Matech Computer Systems of Bedford OH was showing its new 80286 card It s a 10 or 12 MHz AT on an XT sized plug in card On board there are 1 to 6 meg ram floppy controller two serial one parallel keyboard port clock amp battery 80287 socket and provision for a daughter board with hard disk and VGA control ler Retail price is 795 10 MHz 1 meg RAM The card has an Award BIOS and only works with empty mother boards They couldn t take real orders be cause they hadn t received FCC ap proval but tentative orders totalled 160 000 units An
37. A gen X Xu Yu C B gen Y Yu A X BY C gen X N lt N gt 0 N1 gen N N lt N 1 gen X N1 N gt 0 Fig 3 Trilogy Equation pred Eq a lt L 1 x L 0 b atx bty c Dave As we have discussed over the phone I have prepared three very short programs in Pascal Prolog and Trilogy naively solving Diophantine equations I know they are longer than Hello world but they solve a real problem The basic differences among the lan guages e Pascal explicit control backtrack ing by loops e Prolog no explicit loops but values must be guessed by the programmer e Trilogy no loops no guessing Problem Given an equation a x b y c with integer coefficients a b c a and b are positive find all non negative integer solutions x and y Rather than encoding the algorithm for Diophantine equation solving solve the problem by a trial and error generate and backtrack In Pascal you have to read generate and print the results explicitly by a loop See Figure 1 In Prolog the reading printing and looping via backtracking is automatic You simply enter a query for instance lt gt eq 6 X 8 Y 46 to get two sets of results X 1 Y 5 and X 5 Y 2 Note that the generation part lt L 1 a x bty C e x y y end y L 0 c lt L iff must be explicitly programmed by the recursive predicate gen See Figure
38. C O D VISA Master Card American Express wire d omestic and international and terms are available One and two da bs delivery available for all domestic most international destinations Aztec Systems ou directly from Manx have a 30 day satisfaction uarantee Most aam are upgradable paying the dilference in price plus 10 Site licenses OEM educational and SOE copy discounts are ee UA SA To pa for i hate tall today 800 221 1 0440 In NJ r intemational 201 21 i Vee oan ant Spee MICROCORNUCOPIA 40 Mar April 1988 87 TURBO C QUICK C LET S C DESMET C DATALIGHT C ECO C LATTICE C MICROSOFT C AZTEC C COMPUTER INNOVATIONS C NEW Limited time offer Peacock System s CBTREE Object library for only 29 Our FULL COMMERCIAL VERSION of CBTREE in object library format is being offered for the amazingly low price of 29 CBTREE provides you with easy to use functions that maintain key indexes on your data records These indexes provide you with fast keyed access using the industry standard B tree access method Everything you need to fully utilize CBTREE in your applications is included The CBTREE source code can be purchased later at any time for the 70 difference Example source programs and utilities are included FREE CBTREE source library 99 Object library only 29 This limited time offer is simply too good to refuse Peacock s standard ROYALTY FREE UNCONDITIONAL MONEY BACK GURANTEE AND FR
39. Far East his accent was midwest New PC MS DOS CP M 86 ROM Superior performance a powerful new array of features and utilities ang prici ing tat is unmatched make bette the new Aztec C86 the first choice of serious software developers Aztec C86 D scsscsssesnes 199 optimized C with near far huge small and large memory Inline assembler Inline 8087 80287 ANSI support Fast Float 32 bit optimization options Manx Aztec 8086 80x86 macro assembler Aztec overlay linker perl pl model source level debugger object librarian 3 x file sharing locking comprehensive libraries of UNIX DOS Screen Graphics and special run time routines Aztec C86 d eeancenecasstesese 299 e includes all of Aztec C86 p Unix utilities make diff grep vi editor 6 memory models Profiler Aztec CB6 Cu sssscseeesere 9499 e includes all of Aztec C86 d gt Source for library routines e ROM Support CP M 86 support One year of updates Third Party Software A large array of support software 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 e TRS 80 CP M These C development systems are unbeatable for the price They are earlier versions of Az
40. From this definition only Smalltalk Lisp LOOPS and C are truly object oriented Stroustrup didn t mention Ob jective C or Eiffel And of these C is the only object oriented language with the deliberate aim of runtime efficiency Virtual Functions Before I was introduced to virtual functions the concept had never oc curred to me Now they seem indispen sable A lot of features in C are like that It s very difficult to go back to plain C once you ve had a taste A virtual function says in effect there s a function here but I don t know exactly what it is yet The func tion is only defined in a derived class A popular example is the shape class Everything that s basic to shapes is defined in the base shape class When you want to make a specific shape say a square you derive it from the base class by saying a square is a shape with some extra information about squareness But there s something else to know about shapes they can be drawn rotated filled etc You want the base shape class to know that these functions are available so you can for instance go through a list of shapes and rotate them all 45 degrees without knowing or caring what kind of shapes they are So you declare virtual functions in the base class Then when you derive a square the part about how it s drawn filled or rotated is already defined Using C The goal of C is to create libraries of reusa
41. James H Simpson Turbo Pascal 4 0 Scott Ladd You ve enjoyed Turbo Pascal but found it was too limited 11 MS DOS C Compilers Compared for serious projects Not anymore Are Borland and Microsoft i the only real contestants in Scott Ladd gives us a blow by COLUMNS blow comparison of the whole field complete with a look at 54 C ing Clearly the code they generate Turbo C doesn t have a debugger At least not until now Here s a source level pest chaser that s free Really 58 86 World Jack Purdum gt Laine comes back to reality technically speaking with an Programming For Change intimate look at PC keyboards Jack adds a simple parser to his programs so they can take data from ASCII text files 68 On Your Own Got reviews coming out on your zingy new product David Thompson Great Should you place ads to run with the reviews If so Comdex A Hacker s Computer Fix how do you go about it There was more than hype at the Fall Comdex This year I found a great disassembler and an intriguing new language 76 Pascal Column Bruce Eckel A Programmer s Introduction To C An object oriented language that thinks it s still C Yep 84 Shareware 93 Technical Tips Larry Fogg Inside The PC s PPI Larry winds down his special on the PC s smart chips no dips with a close look at the potentially boring 8255 CPM CORNER 72 Kaypro Column SUTURE TENSE Eric Isaacson C Vs Assembly 80 Tidbits Languag
42. Lifeboat I got a real knowledge able person who told me they would send the next release as soon as it s out I do have one question about their newest version why stop at 1 meg EMS 4 0 would use all the memory I could stuff into the machine Then I d never have to worry about the size of my par ser On To The Compiler Microsoft C version 4 0 was also a problem Besides being clunky I m wishing for a C which works with Turbo C it kept truncating long vari able names The cfront translator tends to create long names and while the truncation didn t break anything it made me nerv ous Version 5 0 is supposed to fix this problem Microsoft s C is also tediously slow after using GNU emacs on the Sun If you want to do serious C programming on the PC I think you need to spend the bucks and go for Ad vantage Their support manual and ex amples are worth it It s also the better choice for beginners despite Guidelines lower price Advantage has good ex amples good documentation and it s dependable Macintosh C Apple is developing a C translator for the Mac The problem here is to define all the objects necessary to make Mac programming easy I like all the built in Mac stuff but I have no desire to get on that learning curve C could really make the difference here We will port DAIMS to the Mac using a beta ver sion Object Packages So far there s only one package of pre d
43. Metaware Microsoft Quick C with a supplied batch file The three ring manual is probably the weakest part of this package It has numerous spelling and syntactical er rors terse function descriptions and code printed in a proportional font making it hard to read The package includes an editor linker and object module disassembler and supports third party debuggers You can use a big version of the com piler with very large source files Several environment variables help the compiler locate ngaderes libraries and tools Optimum c compiles very quickly and produces fast programs Optimiza tion is done by an optional compiler pass This slows the compiler immense ly but of course can be turned off 63 87 74 54 81 86 67 84 63 56 67 Grind 2 701 10 870 23 5 69 8 2 846 47 024 21 5 67 9 2 473 57 824 48 1 87 1 2 806 26 616 25 0 58 8 2 740 26 504 34 7 59 2 3 859 26 824 12 9 63 2 3 527 26 740 21 6 63 2 au ao 71 72 65 a wo 67 87 u NNPw00D00w0JA YI OANN WADA amp UW CO 63 Crunch 1 258 11 174 11 4 13 1 1 133 14 864 13 4 12 3 1 288 23 952 39 7 15 4 1 233 23 584 13 9 7 6 894 23 264 14 3 6 9 1 709 23 552 9 9 8 0 1 654 23 612 17 4 8 0 ourhrWrRrRrOOW Final Ratings based on execution speed Place DryStn Grind Borland Microsoft MS QuickC Datalight Lattice DeSmet Mark Wms A
44. Pascal Program That 80 is done swiftly in just 10 of the time it takes to code it your self That 80 contains all of the hooks to add custom features such as table verification security currency con version importing files from other languages Cost of sees a consistent inter Upgrade face all programs func for 99 version tion the same way and your code is 100 error free Turbo Pascal ASCII wants to give you a chance to try Turbo GhostWriter For a lim ited time you can buy a fully functional version for just 99 This version will create flat files such as mailing lists tele phone files inventory files simple payroll files etc The utilities are the same as for the full blown product but are modestly packaged and support is limited It s the perfect way to seeif an application gen erator is for you without risking a cent Reader Service Number 48 MICRO CORNUCOPIA 40 Mar Apr 1988 15 16 MICROCORNUCOPIA 40 Mar Apr 1988 fSudseg SaSuedseg Sheatheed 1Sendsaq a chain b pr MICRO CORNUCOPIA 40 Mar Apr 1988 17 18 MICRO CORNUCOPIA 40 Mar Apr 1988 16 Megabytes EMS and or Extended Memory eWorks on 8 or 16 bit bus e16 bit transfer on AT bus Single board design Lar eIncludes RAM disk and Compatible extensive diagnostics eQuantity OEM discounts Designed me Manufactured 7 Sold a
45. Prolog style problems By having you define inputs outputs and variables and by doing some sophisti cated range checking it produces itera tions of the 8 queens problem so fast that you have to write in a delay in order to see the results Paul has done a lot to make the code more readable than other AI languages For example math is standard algebraic format e g c 5 3 and the structure of the search is much simpler It s also a complete programming environment editor windows quite similar to the Turbo series Everything I saw in this language told me that its author was no lightweight And it was obvious even in the manual that this had been a long term project I can name a lot of good compilers that have bad manuals and a lot of bad compilers that have bad manuals but I know of no bad com pilers that have really good manuals I called Paul and asked him to write a simple 20 lines max program in Pascal Prolog and Trilogy to give you a feeling for the language Here is what he sent me 28 MICRO CORNUCOPIA 40 Mar Apr 1988 Fig 1 Pascal Equation program Equation var a b c integer procedure Eq a integer b integer c integer var x y integer begin if a gt 0 and b gt 0 then for x 0 to c div a do for y 0 to c div b do c then if a x b y writeln x end begin readin a b c Eq a b c Fig 2 Prolog Equation eq A X B Y C lt A gt 0 B gt 0 Xu C
46. SOFTWARE INCLUDED CAN EVEN l SmartWatch DETERMINE PART NUMBERS OF MOST UNMARKED AND HOUSE NUMBERED DEVICES Z s stem software WITH SIMPLE MOD THIS UNIT CAN ALSO TEST 6 4K AND 256K DRAMS WITH MANUAL y AND SOFTWARE 149 PERFECT FOR SCHOOLS ZAS amp Debuggers 8MB disk emulator w SCSI Battery backup for above PC XT EPROM PROGRAMMER 169 LATEST DESIGN PROGRAMS UP TO 4 DEVICES AT ONE TIME FEATURES EASY TO USE MENU DRIVEN SOFTWARE THAT RUNS UNDER PC OR MS DOS USES AN INTELLIGENT PROGRAMMING ALGORITHM FOR SUPER FAST 8X EPROM BURNING THIS PLUG IN BOARD ATTACHES TO AN EXTERNAL MINI CHASSIS CONTAINING 4 TEXTOOL Z I F SOCKETS x NO PERSONALITY MODULES REQUIRED AUTOMATIC VPP SELECTION 12 5V 21V OR 25V EPROM DATA CAN ALSO BE LOADED FROM OR SAVED TO A DISKETTE x PROGRAMMING SOFTWARE SUPPORTS 2716 2732 2732A 2764 2764A 27128 27128A 27256 27256A 27512 AND SOLEN RE SSEMBLED AND TESTED BURNED IN WITH MANUAL 169 WITH ARE TME beh SAME AS ABOVE PROGRAMMER BUT PROGRAMS 8 UNITS AT ONE TIME 299 Digital Research Computers P O BOX 381450 DUNCANVILLE TX 75138 e 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 add 20 P amp H Orders over 50 add 85 for insurance ASK ABOUT OUR NEW PAL PROGRAMMER Call or write for more information or
47. So they hired hundreds of programmers who dutifully wrote in Pascal the darling high level language of the day Years later and years late the com puter came to market Lisa featured state of the art hardware The microprocessor was the fastest its instruction set was the best for high level language Yet the software after taking years to develop and debug was abysmally slow Lisa became the Edsel of the computer industry and IBM aided by a plethora of inde pendently developed programs like Lotus 1 2 3 took over the business market Fairly late in the Lisa project some Apple engineers seeing the impending Lisa disaster started a new project With a small fraction of Lisa s manpower in a fraction of the time they developed the Macintosh What is the major difference between Lisa and Macintosh The Macintosh s operating system was writ ten in assembly language Direct Testimony In 1977 I was assigned to create the first 8086 assembler Intel s ASM86 I was part of a two man team to which a third man was added six months later Ninety eight percent of the assembler s source was PL M The rest was assemb ly language It took us 33 man months to write that assembler Some years later on my own I wrote another 8086 assembler I wrote it in as sembly language and it took me six months Actually I worked on it on and off for about a year I admit there were other factors in this quick development
48. Switch 495 00 VGA EGA CGA Color 650 00 CGA Colop oil 339 00 Amber 12 TTL o ita ds 89 00 Green 12 TEL erneer ii erei 89 00 VIDEO CARDS Color Graphics 06006 55 00 Color Graphics Parallel 60 00 256K EGA Graphics 140 00 Mono Graphics Parallel 60 00 ATI Graphics Solution Mono Herc Color Emulation on Mono CGA List 299 150 00 ATI Wonder Auto Switch Mono Herc Any monitor Any software Auto conversion CGA EGA VGA List 499 299 00 EGA CGA PGA 640x480 185 00 EXPANSION CARDS Clock Cardiaca 25 00 Dual Floppy Disk Controller 25 00 Joystick A ince ice 25 00 Gravis Analog Joystick 49 95 Game Porto iia 19 00 Multi Function 1 ser par clk game a A 79 00 Parallel printer 19 00 Serial Port RS232 1 port 29 00 640K RAM K installed 35 00 XT AT RS232 4 port 2 installed 59 00 Prices are subject to change without notice Shipping CHARGES will be added 2 MICROCORNUCOPIA 40 Mar April 1988 Pictured keyboard is 5339 KIT OPTIONS MS DOS 3 21 w 5339 Keyboard Sub Color Options Includes video card amp monitor CGA Color CGA EGA Color CGA EGA VGA Color ASSEMBLY AND TESTING XT Systems AT 80386 Systems Free Instructions with Each System MOTHERBOARDS XT Turbo 4 77 10mhz
49. Unfortunately the addendum cannot be integrated into the manual So you may find the information you seek in the main manual the addendum or both A linker assembler editor source level debugger and many other tools make this the most complete package of them all They even include utilities to convert Aztec s nonstandard object modules to Intel format Aztec produces the smallest ex ecutable files by far Compile speeds are fast but program execution is among the slowest The code generated by this compiler was very good with effective use of register variables Mark Williams Let s C v4 0 12 The Mark Williams Company has long been involved in the production of C compilers With Let s C they compete head to head with Borland s Turbo C and Microsoft s QuickC Documentation comes in two paper back books one for the compiler and the other for the csd symbolic debugger You ll find most of the information in a lexicon or encyclopedic reference section topics are listed in alphabetical order References to utilities and environ ment variables are mixed with function definitions and glossary information Although I wasn t fond of this format at first I seemed to be able to find what I wanted quickly and easily This is not an ANSI standard com piler It adheres to the K amp R C very closely but does not include new fea tures such as const or function prototypes They ve included only a fe
50. WindowDOS 2 0 have come up with the best WindowDOS Associates Box 300488 C Arlington Tx 76010 817 467 4103 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 i 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 Comprehensive Broad range of commands including many not supplied by DOS Satisfies the needs of both new and advanced users 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 acomputer and check forun wanted programs in RAM helps secure data and prevent unauthor ized access Other Information Not copy protected Uses only 51K of memory Supports EGA amp Hercules Runs memory resident or as a stand alone program Uninstall command PC XT AT 100 Compatibles Order Today Only 49 95
51. accurate For creating beautiful and internally consistent instruction manuals primari ly text but with some drawings Ven tura wins my vote However they need to do a lot of work on graphic input bugs and style sheets or someone will walk away with their market For brochures of one page or less I might tolerate Pagemaker but it s aw fully slow even on a 16 MHz 386 machine Is that due to Windows Pagemaker looks well suited to artsy craftsy creations where you move things around until they look nice Why do I feel insulted by those stupid little icons I thought I would get used to them but after a month I still feel in sulted Here s another contribution to the hard drive discussion I ve used two Seagate ST 225s and a 4038 and none have lasted more than one year My first Miniscribe is six years old and still sees daily use A total of five 42 MByte Miniscribes acquired for home and work have also been flawless Mini scribe makes an excellent product Bill Carver 25961 Ave Romero San Juan Capistrano CA 92675 More Nails In Seagate s Coffin I really like your new cover and for mat Desktop publishing is the way to go You must have a graphic artist lurk ing somewhere In May I bought a Priam Vertex VT 170 This 60 MB formatted drive has an access time of less than 28 msec Set up with a DTC RLL controller it runs all day six days a week I ve had no problems except for what I perceive to
52. address with bits nine eight and seven low and bits six and five high will select the PPI At the same time the Al and AO address in puts to the PPI determine which of the PPI s registers will be on line The contents of A1 and AO decode as follows 00 Port A 01 Port B 10 Port C and 11 control port Rolling these together with the address input required for CS gives port addresses of By Larry Fog Micro C Staff 60h through 62h for Port A through Port C and 63h for the control port The read RD and write WR inputs are active low signals which specify the direction of data and control flow An 8288 bus controller decodes the S1 2 and S3 outputs from the 8088 and generates I O read IOR and I O write MICRO CORNUCOPIA 40 Mar Apr 1988 37 IOW signals An LS243 then drives these signals out to the smart chips The combination of either RD or WR along with an active CS lets the 8088 read from and write to the PPI The RESET pin responds to a high input by clearing the control register and setting all ports to input PPI Tasks On The PC So what does the PPI do to earn its keep Quite a bit it turns out See Figure 2 for a complete list of 8255 port usage Old PCs use input Port A to perform one of two functions depending on the value of PB7 Port B bit seven If PB7 equals zero Port A accepts scan codes from the keyboard A PB7 of one forces the PPI to read the first of two system
53. and 2 year full warranty To prove that we don t ignore you or your pocketbook you get our Turbo 101 Enhanced Keyboard and Borland 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 by themselves Now if you re still feeling ignored you can always do what you know who wants you to do and buy a new computer to get their keyboard credit card orders call 800 826 5398 in CA call 800 592 9602 Price does not include adaptor cables required by certain compat idles A Limited offer price subject to change without notification 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 the 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 I have absolutely no besitation in recommend ing the Model PC8700 Jerry Pournelle Byte Magazine Sept 86 It solves all of the problems exbibited by their regular PC XT keyboard it s a great bargain PC Productivity Digest May 86 l DataDesk Intl bas designed a sturdy and bandsome key board tbat bas tact
54. argv This version of Small C doesn t allow an array of pointers or pointers to pointers so argv is declared as an in teger array like this int argc argvI Although argv is declared as an in teger array you can use each value of argv as though it were a string For ex ample fopen argv 11 r opens for reading the file whose name is the first command line argument just as fopen textfile txt r would open a file named TEXTFILE TXT Note that argc contains a number that s one greater than the number of command line arguments As far as argc is concerned the program name VIEW is 1 Add the text file to i and the argc count goes to 2 argv however counts Boin 0 So the program name VIEW is normally argv 0 and the text file to display is argv 1 CP M doesn t really tell you the name of the current program so Small C returns an arbitrary string in this case PGMNAME for argv 0 argv 1 will of course contain textfile txt I O I O Input and output are simple Once VIEW opens textfile txt using fopen it uses getc to read one character at a time After masking the high bit putchar outputs each character to the screen Each carriage return in the stream incre ments the line count and when the count reaches 22 the program pauses pause uses BDOS function 6 direct console i o rather than getchar to read the keyboard getchar echoes cha
55. be the controller misbehaving slightly Once in a hundred times it will boot up but fail to load AUTOEXEC BAT Rebooting cures the problem Also the controller is extremely finicky about which 360 KB disks it will choose to read The Western digital controllers seem much less discriminating I use SpeedStore partly because of your rave reviews I found it very Continued on page 75 LIST OURS TURBO PASCAL ADD ONS DOS BIOS amp MOUSE TOOLS 75 69 FLASH UP 89 79 METRABYTE DATA ACQ TOOLS 100 89 SCREEN SCULPTOR 125 89 SYSTEM BUILDER 150 129 IMPEX 100 89 REPORT BUILDER 130 115 T DEBUG PLUS 60 49 TURBO ASM 99 69 TURBO ASYNCH PLUS 129 99 TURBO EXTENDER 85 65 TURBO HALO 99 79 TURBO MAGIC 199 179 TURBO OPTIMIZER 75 65 TURBO POWER TOOLS PLUS 129 99 TURBO POWER UTILITIES 95 79 TURBO PROFESSIONAL 4 0 NEW 99 79 TURBO WINDOW PASCAL 95 79 FEATURED PRODUCTS MICROSOFT WINDOWS 386 Software for 386 based machines offering true multi tasking Run several programs within different windows on your screen Cut and paste between them Each program is given 640K of memory List 195 Special Price 119 ESE T A ae Heals a EN SE E ore E o S ee Give ves Sa rE Personal Service and Unbeatable Prices Welcome to Paradise The microcomputer software source that caters to your programming needs Discover the Many Advantages of Paradise o Huge inventory immediate shipment o Special orders o Knowledgeab
56. columns but I do want to say a few words about the Graph unit The graphics support has been greatly expanded over version 3 and now includes many of the facilities which were in the Graphix Toolbox With only a little effort your program can run in graphics mode on any of the popular graphics cards without recom pilation The Procedure InitGraph can automatically detect the type of graphics hardware and load the proper hardware drivers from disk The program s output can be scaled relative to the maximum X and Y resolution from functions GetMaxX and GetMax Y to produce undistorted images First Impressions My first impressions are very good Turbo 4 provides the speed of both development and execution we ve come to expect from Borland the ease of learning and use of Pascal and the ability to develop large applications in a modular fashion I ve just completed a large application which I wrote in Modula 2 several thousand lines of source if ld had Turbo 4 when the project was started I probably would have used it On the other hand the lack of a source level debugger which I ve come to depend on in Logitech s Modula 2 is a significant omission The system has a command line version of the compiler a separate make program which can help in updates even in mixed language en vironments and other utilities Pretty impressive for 100 retail Scanner Project I ll finish up the scanner project using Modu
57. configuration DIP switches SW1 Newer PCs XTs and clones use Port A for keyboard input only These machines have just one configuration switch SW1 This difference in switch configuration between PCs and XTs il lustrates the danger of reading the DIP switches directly Use interrupt 11h in stead It does the job much more easily and reliably We can get into all sorts of mischief with output Port B PBO provides a gate signal for Timer 2 on the 8253 A low on this bit turns off the counter and prevents the 8253 from making any sound PB1 provides another means of fool ing with sound since the output of Timer 2 gets ANDed with PB1 before going to the speaker See A Bleeping PC in Issue 35 April May 1987 for a complete look at sound generation On old PCs PB2 determines which half of the second configuration DIP switch SW2 is seen by the low order nibble of Port C The bottom half of this switch has to do with the amount of RAM installed in the expansion slots The top half of the switch is designated spare Since the newer machines don t even have SW2 you shouldn t use this method to check for RAM Call inter rupt 12h instead XTs and clones use PB2 in a similar manner but they look at SW1 instead of Sw2 Back in the dark ages of computing old PCs again PB3 controlled the cas sette motor These days not too many folks care about using cassette tape storage so this bit is up for grabs I use it to switch cl
58. data structure with marginally meaningful values For example you can use a windows object someone else has written with the header in WINDOWS H see Figure 1 Notice the appearance of getch an or how to write a string L ke how to write a char wf 4 how to write an int ef he moving around sy how to clear yourself xp dinary C function A Class Object Definition The ability to define classes really dis tinguishes C from C A class is a C structure with a twist it contains functions as well as objects A windows class definition might look like Figure 2 Note in the code we see functions as MICRO CORNUCOPIA 40 Mar Apr 1988 33 just another kind of structure member And there are three definitions for write This is called overloading and clarifies your code For example when writing something you don t want to worry about WHAT you re trying to write You just want to write it So for our window we can say winl write 123 winl write a string winl write c Another nice feature is the default values in gotoxy This allows us to say winl gotoxy to automatically mean go tox 0 y 0 Operator Overloading Operators etc can also be overloaded with new meanings These meanings are invoked automatically when the operator is applied adding two complex numbers is different than adding two reals For example the language has
59. file C Video Package Speaking of video what does everybody think about putting together a standard video package to be used in all examples of C code in Micro C It would save a lot of pages of define_window and clearscreen func tion definitions and make it easier to follow new programs Let s think up what routines we want and put it 60 MICROCORNUCOPIA 40 Mar April 1988 A DEBUGGING SWAT Order Eco C88 Rel 4 0 New Modeling Compiler and get C more at no extra charge Seek and Correct You already know that fast compilation does not mean fast program development Backing up for bogus error messages and removing the bugs takes time Eco C88 s Seek and Correct three way error checking finds even the most elusive bugs clearing the path for swift program development Double Barrel Error Checking Eco C88 nails syntax errors cold and tells you about the error in plain English And there s no avalanche of false error messages either Other compilers can generate up to four times the number of error messages actually present they leave it up to you to guess which ones are real You ll be more productive with Eco C88 because there is no guess work Eco C88 provides ten levels of semantic error checking You can select from almost no checking to the fussiest you ve ever seen Eco C885 picky flag finds subtle errors that slip by o
60. for the review You mention the track buffering I tried using the buffering but I turned it off after seeing how much memory it took If you have ex panded or extended memory these features make sense Also I may have given the wrong im 6 MICROCORNUCOPIA 40 Mar April 1988 Letters pression I like the Konan It s not perfect but it has lots of features Oops I just moved to the Northwest and am really enjoying this part of the country and your magazine However a recent issue contained an error per taining to the Midwest my former home The 86 World column in Issue 39 mentioned the national teacher s hiring conference held every year at Iowa State University in Cedar Falls Actually the conference is held at the University of Northern Iowa in Cedar Falls IA 50614 I used to be on the computer staff there This error is equivalent to confusing WSU with Western Washington Terry A Ward 4269 148 NE D 103 Belleview WA 98007 Editor s note Your letter arrived the same day as the linebacker corps from UNI Now that we ve placated you we ll be tackling them Desktop And Seagate OK OK here s some bucks for another year 1 couldn t miss another letter from Turkey I m not kidding Your articles on desktop publishing gave me the confidence to dive in I purchased both Pagemaker and Ventura and although I m hardly accomplished with either one yet your evaluations seem pretty
61. growing rapidly so get in now before the rates go up More Than Just Numbers During all this trial and tribulation magazines realized they d developed unique styles and unique followings If the style and following were in vogue then the magazine prospered A few years ago Byte was in vogue If you were anyone or even thought about becoming someone you had to advertise in Byte And you couldn t stop with just one If you dropped out for a single issue prospective customers and competitors usually assumed you d gone into something else If you had a classy full color full page ad then you were successful solid a giant in the industry If you ran a quarter page black and white they as sumed your management team worked nights at McDonald s and your desig ners were just finishing high school The Class Mags Now Now things are less clear PC Magazine is king if there is one But ad vertisers are a lot more practical about what they re buying They re looking at sales per dollar Where those sales per dollar are best is a pretty well kept secret Ask Byte or PC or whomever and they ll tell you they re the best Ask us and we ll tell you we re the best So you don t ask the magazines you ask other advertisers It s OK really Network with other companies and you ll all benefit But even with networking there ll be times when you ll be flying on hunches The following might help your hunches
62. in this list the editor remembers where you were and what conditions you had established in that file In other words the editor puts you back into the file at the point where you left with block markers and so on in tact Conversion Of 3 0 Source Code The Turbo 4 0 package includes a source code conversion program called UPGRADE This package is remarkably easy to use and does a very good job In many cases the output from the upgrade program will compile without any further changes In other cases minor modification is required Compare the Turbo 3 0 program listed in Figure 2 to the converted ver sion listed in Figure 3 Notice that six lines of compiler directives were in serted at the beginning of the file UPGRADE also inserted Uses Crt Notice the conversion comment immediately following the old compiler option C UPGRADE changed the directive into a comment by inserting a space between the curly bracket and the dollar sign C In this case the conversion comment indicates that the C direc tive is obsolete in Turbo 4 0 The Key Pressed function works all the time now This converted program com piles without further editing You can find the inserted conversion comments by searching for the string in the source Overlays Turbo 4 0 does not support Overlay Procedures but before you panic remember what I told you about UNITs UNITS replace overlays When you use the
63. language environment Define new levels of programming abstraction and reduce software development time effort and tedium Define object oriented language extensions Define complex text search and replacement macros Requires IBM PC XT or AT and 100 compatibles PC DOS MS DOS 3 1 or later 256K Now only 199 95 residents of New Jersey add 6 sales tax 609 448 3876 CACS Software 34 Brook lawn Drive East Windsor New Jersey 08520 ADVERTISERS INDEX Issue 40 RS 7 CompuView 72 Acquired Intelligence 44 Amtech Computers 38 Analogic Company 30 Andratech 48 ASCII 4 Austin Codeworks 49 Autotime Corp 74 BAS C Software 5 Blaise Computing 1 Borland Int 53 C Store 15 Cascade Electronics 31 CC Software 71 Complete Logic Systems 29 6 Computer Helper Ind 71 FastCopy 3 0 Turns your PC into a diskette duplicating machine for ONLY 69 SYSTEMS SOFTWARE SUPPORT PO Box 751022 Houston Tx 77275 1022 713 941 3100 Computer Industry Almanac Fact filled guide about the computer industry Includes people companies products trends natl users groups associations headlines of the year book clubs periodicals forecasts financial facts benchmarks fun trivia 780 pgs 29 95 2 shipping Computer Industry Almanac Inc 8111 LBJ Frwy 13th Floor MC Dallas TX 75251 1313 Telephone 214 231 8735 Reader Service Number 46 OPT TECH SORT MERGE Extremely fast
64. library from nly 49 95 State Turbo C or Quick C version application Yes Then get the Zortech Inc COMMS SuperText toolkit complete with Give your applications the Do you need to incorporate full source code and 150 page professional look with instant serial communications into your 9MWal now zooming and exploding windows applications Yes Then get this Only 49 95 State Turbo Cor Quick C version corporate drop down menus inexpensive but highly and Lotus style menus with our professional COMMS toolkit from PROSCREEN easy to use functions Zortech Inc Generate high quality data Automatically handles Look at the list of features entry screens with the Pro Screen memory saving and buffering of Xmodem Kermit and ASCII file Screen Designer and Code window text Use any number of transfer Hayes modem control Generator overlapping windows in your VT52 VT100 and ANSI terminal You can draw the data entry applications Write to any emulation supports up to 8 serial screen define the input fields window read from any window ports speeds up to 19 2k baud define the input criteria set screen close any window pullany rate and higher colors and attributes draw single Window to the top Two demonstration programs double lines make boxes Over 55 functions together N ore included MINICOM and press a few buttons and hey with a big 85 page manual and ma MAXICOM like Procomm presto Pro Screen generates remember you g
65. mechan ism similar to the EXCEPTION feature of the language Ada The 46 MICRO CORNUCOPIA 40 Mar Apr 1988 mechanism virtually eliminated the messiness of error recovery It could not have been done in any of the high level languages avail able at the time Terse C is an unusually terse language So terse that cryptic incomprehensible code becomes easy to write The Kernighan and Ritchie C bible gives some ex amples with a tone of approval of atrocious C programming technique Many high level languages have an advantage over assembly language in that bad programmers find it harder to write rock bottom bad code But in C I would have to call it a standoff Summary C is a good language for short and medium sized programs Its library functions assist development of such programs When the program gets large however the lack of a debugger the short symbol names and the inefficient code make C a poor choice I have been tempted to write a C compiler with a built in expert system for generating efficient 8086 code It would perform global optimizations in stead of peephole optimizations and it would use registers optimally just as a human expert would But I haven t done it and I haven t seen another compiler come close Meanwhile assembly language has been subject to undeserved abuse Sure it takes more skill to write good programs in assembly language But the best assembly languag
66. now for hardware First is the com bination of Zenith 181 and Logitech C7 Serial Mouse Now don t get angry yet But that s like badmouthing your own mother Actually I m quite happy with the Logitech Mouse and the Zenith 181 It s just that I specifi cally bought the serial version of the mouse so that I could use it on my Zenith After I bought the mouse and brought it all the way back to Turkey 1 discovered that it worked with every machine in the house except the Zenith 181 And phone support is a bit ex pensive from Istanbul This is more a complaint aimed at the Zenith Apparently its serial port isn t quite IBM compatible although it s adver tised as such And another hardware gripe Remember that cute little Diconix printer 1 talked so lovingly about Well as it turns out the printer can only print the IBM extended character set when it s in IBM emulation mode and it can only print italics if it s in Epson mode The mode cannot be switched by software you must turn the machine off and find a screwdriver small enough to reach in and flip the switch Every other Epson compatible printer I ve seen which can print the IBM extended charac ters Epson s own printers included can print the entire 256 character set while in Epson mode This would only take a small change in the firmware chip and it would make the machine much more saleable in Europe It s not the only firmware problem with the pr
67. parity I O and 8087 errors PPI Programming On The PC The PC uses the 8255 in its default mode mode 0 So all 24 pins are set for I O with no handshaking or interrupt capability Let s look at the control register to see how the individual ports get programmed See Figure 3 Bit zero controls the direction of Port C s low order nibble We want Port C to read one of the DIP switches so bit zero gets a One Bit one controls Port B s direction A zero here allows the proces sor to output the control signals described above Bit two sets Port B s mode This port is constrained to either mode 0 or mode 1 We ll reset the bit to 0 for mode 0 Port C s high order nibble gets its direction from bit three Setting bit three to one allows the 8088 to input NMI and Timer 2 information Port A s direc tion comes from bit four A one sets this keyboard configuration port to input Port A requires two bits to specify its mode since it may operate in any of the three available modes We ll send bits six and five a 00b to select mode 0 A 01b sets mode 1 and either 10b or 11b means mode 2 Finally a one in bit seven means that we re programming the PPI ports for mode and direction Resetting bit seven to zero causes the PPI to use the low order nibble of the control byte to tweak individual bits in Port C Again this capability is used for handshaking and interrupts verboten on the PC So sending a con
68. program unattended gt CASYNCH MANAGER Version 2 0 IMPROVED C ASYNCH MANAGER is a library of functions designed to help you incorporate asynchronous communication capabilities into your application programs Version 2 0 has been rewritten especially for Microsoft C Version 5 0 and Borland s Turbo C Simultaneous just 175 00 Blaise computing Inc has a full line of support products for both Pascal and C Call today for your 4 upss s ripp nE Reader Service Number 5 buffered input and output to both COM ports at speeds up to 9600 baud XON XOFF protocol modem con trol and XMODEM file transfer are among the many features supported and is priced at T Tas Sen Y Enclosed is aan Please 10 A residents free information packet Nam 1 Sees Se ee e City BLAISE COMPUTING INC VISA OS a id 2560 Ninth Street Suite 316 Berkeley CA 94710 415 540 5441 Lo nae m A di me ho e prim o asa e more Y gc OF rd alt A a ress stand ya N 08275 00 i atone paint screens block mode data entry or field by field control with 200 instant screen access For Cor MS Pascal 3 Turbo C TOOLS 129 00 Windows ISRs intervention code screen handling and EGA 43 line text mode support l direct screen access DOS file handling and aS more For Turbo C Turbo POWER SCREEN Boe COMING SOON General screen manage ment paint screens block mode data entry
69. stacks and queues gh de dt A hob cin AC a EO XLT Macro Processor general purpose text translator ee ee C Tools exception macros wc pp roff grep printf hash declare banner Pascal to C SS as a OE Data DNA Sequences GenBank 48 0 of 10 913 sequences with fast similarity search program 150 Protein Sequences 5 415 sequences 1 302 966 residuals with similarity search program 60 Webster s Second Dictionary 234 932 words Bea oo aie aces S 60 U S Cities names amp longitude latitude of 32 000 U S cities and 6 000 state boundary points e 35 The World Digitized 100 000 longitude latitude of world country boundaries a OES oa we Ge ar Bek OO KST Fonts 13 200 characters in 139 mixed fonts specify T X or bitmap format 30 USNO Floppy Almanac high precision moon sun planet amp star positions 20 NBS Hershey Fonts 1 377 stroke characters in 14 fonts ie ae ES U S Map 15 701 points of state boundaries BS if cae DEAR Be He a O The Austin Code Works Voice 512 258 0785 11100 Leafwood Lane BBS 512 258 8881 Austin Tezas USA 78750 3409 Email FidoNet 1 382 12 Free surface shipping on prepaid orders MasterCard VISA Reader Service Number 4 MICROCORNUCOPIA 40 Mar April 1988 65 Locate C Bugs before they Bite with PC lint PC lint will analyze your C programs one or many modules and uncover glitches b
70. subject to change without notice NOTE NEW ADDRESS amp PHONE NO Slicer Computers Inc 3450 Snelling Ave So tm Minneapolis MN 55406 SLICE 612 724 2740 a Telex 501357 SLICER UD PC and XT Are Trademarks of International Business Machines Reader Service Number 19 90 MICROCORNUCOPIA 40 Mar April 1988 Features Feed it unformatted disks and it will format them after as king Do you really want me to format this Feed it disks with sector errors and it spits them back hooray It has no trouble with large quantities of data covering many many disks It can recover selected files from floppies create its own subdirectories during recovery and do it all very quickly Once you and the program finally get together the results are great With a new user interface and a better manual this package would be dynamite Even without that the data reliability makes it very worthwhile Back It Vs 3 0 129 95 Gazelle Systems 42 North University Ave Suite 10 Provo Utah 84601 800 233 0383 YAP Yet Another Plug I was cleaning up my office opening a path to the desk today when I came upon the empty remnants of the Mavis Beacon box Let s see Larry had the master last Or was it Laura Since cleaning and I don t get along I thought I d fill you in about Mavis At least until lunch Mavis Beacon is a typing tutorial A fun typing tutorial Seriously it s the best most innovative typing trainer I
71. t know there isn t room The board should sell for 117 in onesies In the U S He mentioned they might send over complete computers based on this board for 230 each No other details on the sys tem but the price is a bit low if you figure drives cabinet power supply monitor and keyboard But then they think they can cram all that stuff into three chips 80386 He added that there are 58 companies in Taiwan building 386 boards They are paying 400 each for parts from Intel s stash of defective 80386 processors Those are the only chips Intel will sell them Intel says they will replace any chip that a user discovers is defective but I understand the problem only shows up when the 386 is doing a multiply instruction in na tive mode Maybe Intel is betting there are no natives in the software business PS 2 He also mentioned that Taiwan will definitely support PS 2 IBM says it will be licensing most of the 30 000 patents for the technology for about 1 of the FOB price of a system or 3 of any value added I wonder if that means dealers who assemble systems based on licensed PS 2 boards will have to pay 3 of their markup Several manufacturers are ready to sign papers with IBM but IBM has been dragging its feet Apparently sales of the PS 2s have not gone as well as expected He says that Taiwan is also looking at licensing TI and AST buses Saving Your Seagate Dusty Johnson at Rotating Memory Systems suggest
72. templ will hold temp C bin get dat and the third pass would be temp C get dat Assuming that one of the PATH strings does hold the get dat data file FILE pointer fpin will be non NULL and we break out of the while loop If we exhaust the PATH possibilities MICRO CORNUCOPIA 40 Mar Apr 1988 21 strtok will return a NULL pointer and the while loop ends The next if test would find a NULL in fpin and the program would end Assuming open_data_file returns a valid FILE pointer the call to search_file passes the FILE pointer and the command line abbreviation for the directory path wanted by the user e g project1 The search_file function reads the get dat data file one line at a time using the newline character An to sense the end of each directory name The program assumes the data is stored in the form abbreviation drive name directory pathname or projectl C eco88 tools source projectl with one blank space between each of the three data items Note that we use strtok again to parse the string read from the data file using a blank space as the delimiter this time After the first call ptr would point to project1 In the if statement stremp checks ptr against where for a match Since where is the command line abbrevia tion for the directory path wanted by the user we re checking to see if the ab breviation exists in the get dat data fi
73. the past to create some well known programs such as dBASE M Installation was automated but very slow Its a disk hog requiring more than three megabytes if you install the complete system Needless to say it can t run on floppies The documentation suffers from a too small binder pages kept popping out Organization of this two inch thick manual however is fairly good A special reviewers section describes how to disable features such as stack checking to improve compiler performance on benchmarks There are also several unique features to this com piler such as its ability to generate code for the NEC V series of microproces sors I didn t use this feature for these benchmarks You get none of the extras such as linkers and debuggers However the compiler does support Microsoft s Codeview and it s the only non Microsoft compiler in the review to do so The somewhat sparse library has very few nonstandard bell and whistle functions It is very ANSI compatible Performance was mediocre on most tests and compilation speeds were very slow Floating point and file test were the slowest in the review suite Accord ing to Metaware the file speeds are af fected by the use of small 512 eye buffers The compiler did do quite well on the DRYSTN and DISPLAY tests but the ALLOCMEM benchmark generated an infinite loop locking up the PC High C ignored register variable dec larations This is yet another
74. the problem I wrote it with the Eco C88 Rel 4 0 C compiler but it should be compatible with almost any MS DOS C compiler I ve used prototyping in the program but you can easily change the prototypes to the standard K amp R format The program begins with header files and definitions Note that get dat is the data file Finding The Data Once in main the program makes sure there are two arguments on the command line Therefore if I want to go to my test project I would enter C gt get projectl If Vd just entered get the program would quit with an error message Note the program assumes that MS DOS s PATH environment variable points to the program get exe and the data file get dat The call to open_data_file does more than simply open the data file As I mentioned above the PATH variable can have multiple paths Therefore it is necessary to read or parse the PATH environment data to find which path holds the data file we need Inside open_data_file the call to getenv returns a pointer to the PATH environment variable If PATH is not set a NULL pointer returns and the program ends Assuming that PATH has been set the pointer will be non NULL On my system ptr would point to E C bin C The problem now is to separate the paths to find which one holds our data file To do this we copy the PATH in formation from ptr into the pl character array by a call to strcpy
75. to place an order AAA A A AAA A A A A A A A ee ee Soe ee a SemiDisk LS A A AA E 11080 SW Allen Blvd Beaverton OR 97005 503 626 3104 Reader Service Number 18 ALL SALES SUBJECT TO THE TERMS OF OUR 90 DAY LIMITED WARRANTY FREE COPY UPON REQUEST Reader Service Number 32 52 MICRO CORNUCOPIA 40 Mar Apr 1988 The Ultimate Lap 10p ae Se E ey E if 9 99 ean 9 8 ane if a i TAs i j r m i y 1 Viton iy Toming like an ipn al i PAY ap t Peron E relati tx T Ma Pc or wr BERS Hn prem leaa gas n ama o ined im RDS prepa res c ext tef a NY Exc The Mclek286B Lap Top com _ j _bines the fastest most reliable color monitor or a digital or composite monochrome monitor Included also is an external 5 4 floppy port for reading and converting to 3 disks 5 external drive w case power supply 179 when purchased with a 20MB hard disk Lap Top The MclIek 286B 342 floppy drive t 3 Lap Top comes fully assem parallel amp serial ports Award electroluminescently backlit 80 column by bled with our one year parts amp with the most visible full size LCD lap top screen E on the market Running at a switchable 8 or z 10 MHz it includes z 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 It s as readable as a CRT an amazi
76. traditional compiler The package contains three manuals all in trade paperback format The Quick C Programmers Guide felt some what disorganized However the C tutorial got me off to a good start lt isn t detailed enough though for those of you who want to really sink yon teeth in Microsoft has made some odd choices with this compiler First of all it does not use the standard LIB library file format rather it uses a Quick Library The Quick Library provided contains most of the standard C func tions Many programs I have would not compile in the integrated environment if I didn t first create a make file In that file I had to include the names of the function libraries Interestingly the command line version uses the same models and libraries as the MS C v5 0 The limited debugger gives you no tracepoints and only a limited number of watch variables The documentation for the debugger was obscure although as a user of CodeView I had no major difficulties Code performance was very good Compile speeds were also very good although not anywhere near the fastest Execution times always came in slightly slower than MS C v5 0 According to Microsoft Quick C uses the MS C v4 0 optimizer This approach makes sense since I m sure Microsoft does not want Quick C to compete with MS C v5 0 Quick C produced code much like most of the other compilers It did use two one bit shifts rather than the C
77. work effectively with the keyboard on your knees and the monitor on the desk or with the two at a 20 60 degree offset A short break every 20 30 minutes will also help do head and shoulder rolls or other stretching Anyone too busy to keep themselves comfortable while working will see their efficiency and accuracy drop If these basic tips don t relieve the problem check with your local chiropractor Jack Pedersen D C PO Box 65 Sweet Home OR 97386 MICROCORNUCOPIA 40 Mar April 1988 93 MICRO ADS A Micro Ad is the inexpensive way to reach over 22 000 technical folks like your self 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 run it in the next available issue You can also send camera ready copy Rates 99 for 1 time 267 for three times 474 for 6 times a best buy at only 79 per insertion Full payment must ac company ad Each ad space is 2 1 4 inches by 1 3 4 inches QUALITY SPEECH I O PRODUCTS Digitized speech synthetic text to speech voice recognition music composing with voice and more are available in hardware software systems from COVOX IBM PC XT AT and compatibles Apple Commodore and Atari machines support ed Easy programming for fun and education Or use to design your own products for this rapidly expanding technology Prices starting at only 39 95 Call or write the manufacturer direc
78. written to a client First my C program contains many calls to the Xenix operating system as well as direct calls to the serial ports Second you are porting to an IBM PC which has a compatible assembly language The only changes you d need to make for assembly language are the same ones needed in C The job may ac tually be easier in assembly since I iso lated the code that was hardware and operating system dependent i Structured Languages C is a block structured language As a descendent of Algol C is optimized for the clear expression of flow control Back in the days when Algol was developed this was a monstrous ad vantage Machine instruction sets were very primitive so assembly language was unbelievably clumsy at flow control and for that matter at almost anything else But CPU architecture has made giant strides The following 8086 features make assembly language competitive with high level language for clarity of program structure e Subroutines The hardware stack together with the CALL and RET instructions make the subroutines and functions as straightforward as in high level languages The wealth of machine registers makes it easy to pass parameters and return results e Conditional branching The 8086 flags register together with an especially rich set of conditional branch instructions make condi tion testing obvious and straightforward Single instruc tions test each of the relations
79. y for C 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 graphic 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 Reader Service Number 7 Demo Disk is fully functional but does not readily write large files MICRO CORNUCOPIA 40 Mar Apr 1988 47 Turbo Pascal 4 0 Borland s Flagship Comes of Age This is a special piece It s special be cause Borland has added very significant new features to Turbo Pascal features which make it a viable language for large projects It s also special because Jim has ex tensive experience working with Pascal and working on large projects Here is his reac t
80. you can try all features yourself Best the demo includes a dazzling menu driven tutorial you experiment in one window while another gives instructions 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 Yes Yes Built in macros Yes No Yes Yes Keystroke macros Only1 No No 100 Multiple file editing 20 2 No 20 Windows 20t 2 No 20t 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 34sec 1 07 min 6 sec 20sec C
81. 002 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 89 00 115 00 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 kkk kk A Ak SUPER SPECIALS kkk kkk IK PC Mastercard by Magnum Computer Up to 1 5 Megabytes of RAMDISK and PRINT SPOOLER or boost your syst
82. 49 199 C COMPILERS VFEATURE DELUXE 120 110 TOOLKIT 169 139 C86PLUS 497 375 WINDOW PACKAGE 49 39 f LATTICE C 500 265 EDITORS ROM PACKAGE AND CROSS MICROSOFT C 450 269 RIEF 195 CALL RUNTIME DEBUGGER 299 239 QUICK C SPECIAL 99 59 O DBRIEF 275 CALL REPERTOIRE TURBO C 100 65 EDIX 195 155 Terms and Policies We honor MC VISA AMERICAN EXPRESS No surcharge on credit card or C 0 D Prepayment by i check New York State residents add applicable sales tax Shipping and handling 3 00 per item sent UPS ground Rush service available prevailing rates Programmer s Paradise will match any current nation 1 800 445 7899 In NY 914 332 4548 Customer Service 914 332 0869 International Orders 914 332 4548 Telex 510 601 7602 ally advertised price for the products listed in this ad Prices and Policies subject to change without notice Hours 9AM EST 7PM EST Ask for details Some manufacturers will not allow returns once disk seals are broken Corporate Buyers Call for special discounts and benefits A Division of Hudson Technologies Inc 42 River Street Tarrytown NY 10591 Reader Service Number 68 Evaluating 11 MS DOS C Compilers C ing The Forest For The Trees The competition among vendors of C compilers has become quite intense over the last two years What used to be considered optional is now essential New features and benchmark speeds are touted as proudly as national flags at the Olympic
83. 65 507 645 7997 Please ADD Shipping on all Orders COD Add 3 00 Credit Cards ADD 5 Limited to Stock on Hand Subject to change Reader Service Number 15 MICROCORNUCOPIA 40 Mar April 1988 75 John Paul Jones 6245 Columbia Ave St Louis MO 63139 3 Turbo Pascal 4 0 Modula 2 Features In A Pascal Compiler John compares Turbo Pascal with Modula 2 and finds that Pascal has matured well Then continue on as he delves into graphics with his 6 00 scan ner orland is finally shipping Turbo Pascal version 4 I got my copy just over a week ago If you have version 3 you should have received an upgrade offer from Borland for 40 shipping you can get the latest and greatest Version 4 is a MAJOR upgrade Although syntactically it looks and feels like Turbo it s entirely new Borland has managed substantial though not complete compatibility with their earlier releases Translation from version 3 is aided by a translator program provided with the pack age not perfect but very good The High Points Release 4 0 retains the integrated editor com piler environment but with major improve ments Functions and options are normally accessed through pull down menu windows hot keys or function keys The editor retains the WordStar compatible command structure and as with earlier ver sions can be customized for both commands and screen appearance You are still limited to about 60K of text for t
84. 988 By David Thompson Comqdex Past Disk Cash It s 9 30 p m Still early The spoils of Comdex past tower over my desk in unsteady stacks Interesting uninteresting interesting uninteresting very interest ing very very interesting What s this Why do I have a box of Verbatim disks Because Verbatim was giving away boxes of disks Why were they giving away boxes of disks Hold on I m looking Oh yeah Verbatim was bought out by Kodak and they ve come up with a teflon coating that protects the media You can supposedly spill anything on it boiling hot coffee white out catsup or ketchup At least that s what their P R person said See it s right here in my notes Okay Ili cut open the disk s jacket and pull out the floppy little center so I ll have a clean jacket to put the disk into after the fun Let s see I want to get fingerprints all over the sur face this disk likes fingerprints Where s the bottle of white out Darn it s dried up Some white indelible ink should work Now to the kitchen Aha peanut butter catsup and hot sauce VERY hot sauce I haven t had this much fun since I edited an IBM punch card with a sewing machine Gentlemen The Results Anyway it was great fun I covered the disk with gooey edibles and then dropped it into a pan of boiling water couldn t be any worse than hot coffee After about a minute the edges curled up so I flipped it over
85. ANTY ON SYSTEM 1095 Kaypro II RAMdisk on an IBM XT parallel port And more to the point EGA UPGRADE FOR ABOVE 75 has anyone written the software to 512K UPGRADE 1024 INSTALLED 80 anve i 5339 KEYBOARD UPGRADE 30 An external RAMdisk with an inde A ae E e OERE T HARD DRIVES FOR XT AND AT useful on a clone as it has proved to be on the Kaypro especially for floppy RE KIT FOR XT 20 MEG 279 based systems There are probably a lot 238 KIT FOR XT RLL 30 MEG 299 of MicroSphere RAMdisks out there ST 251 FOR AT 40 MEG 425 gathering dust that could be put to use on clones if the software became avail MONITORS able Color Monitor RGB CGA 275 Color Monitor RGB EGA 379 Cameron Hall Monochrome TTL Green 95 PO Box 221543 Monochrome TTL Amber 95 Carmel CA 93922 EGA Color Video Card 129 Editor s note With a little hardware tweak ing you could make the parallel port listen as well as talk an important feature unless CITIZEN PRINTERS you really want write only memory Take a MODEL 120D 120 CPS 9 look at Bruce s article on p 28 of Micro C MODEL 180D 180 CPS 9 Issue 38 for loads of info on the parallel MODEL MSP 15E 160 CPS 15 port MODEL MSP 40 240 CPS 9 We haven t talked to anyone who s done MODEL MSP 45 240 CPS 15 this mod If you have let us know and we ll MODEL MSP 50 300 CPS 9 pass along the particulars MODEL MSP 55 300 CPS 15 CASCADE ELECTRONICS INC ROUTE 1 BOX 8 RANDOLPH MN 550
86. Apr 1988 9 module format although a utility is available at extra cost which converts its object modules to standard Intel for mat The lightning fast compiler easily the fastest in the group generates quite small executable programs However run times were average memory al location was fast but disk I O was slow The standard library adds a few extra functions such as graphics and fast video display routines The code generated by DeSmet C88 shows a lack of support for register variables Neither register variable is stored in a register and SI and DI are never used in the code Unlike most of the other compilers DeSmet does not push the address of an I O buffer onto the stack as a parameter for putchar Computer Innovations C86Plus v1 09g The now famous file archive management program ARC from Sys tems Enhancements Associates was written using this compiler The installation program is quick and simple The documentation is very nice housed in two colorful three ring binders These are some of the friendliest manuals I looked into well organized and with a touch of humor Compile times were abysmally slow slower than with any other compiler reviewed Computer Innovations pat terned their compiler switches after those used by Microsoft C86Plus comes with a linker and librarian and they ve reserved a chap ter in the manual for a future symbolic debugger The extensive library in clu
87. DEVELOPMENT KIT 500 309 MS MACRO ASSEMBLER 150 95 TURBOCTOOLS 129 99 SINGLE USER W SOURCE CODE 495 399 PANEL PLUS 495 395 PASM86 E we MULTIUSER 495 399 PANEL QC OR TC SPECIAL 129 89 PLINK86PLUS COBOL MULTIUSER W SOURCE CODE 990 789 QUICKSCREEN 195 175 RELMS UNIWARE X ASMS CALL cal E Z PAGE 295 259 INFORMIX PRODUCTS CALL CALL SCREENSTAR W SOURCE 198 169 VISIBLE COMPUTER 80286 100 MICRO FOCUS PHACT MANAGER 249 219 VITAMIN C 225 149 COBOL 2 SPECIAL 900 uae XQL NEW 795 599 VC SCREEN 99 719 BBLS 139 119 Pe eS banas NEY EOU c E FORTRAN COMPILER VIEW MANAGER ae 1500 CA L RTRANC s W Prapor BE a eS LAREIRA roenn A A 149 119 LAHEY PERSONAL FORTRAN 77 95 MS QUICKBASIC 99 65 OTHERS CALL CALL MICROSOFT FORTRAN 430 269 HARDWARE PRODUCTS QUICKPAK 69 59 MICROSOFT COBOL 700 429 RM FORTRAN 595 479 ME ONITO TRUE BASIC 100 69 MICROSOFT SORT 195 129 AMPER 727 MONITOR 10 TURBO BASIC 100 65 OPT TECH SORT 149 99 FORTRANUTILITIES LIBRARIES AMDE K7 S0 MONI TOR nns qe DATABASE TOOLBOX 100 65 REALCICS 995 785 DIAGRAM ERORDOCUMENT ER 129 115 AST ADVANTAGE PREMIUM W 512 85 EDITOR TOOLBOX 100 65 REALIA COBOL 995 785 DIFF E Q 495 445 AST RA eS Ca a 5 TELECOM TOOLBOX 100 65 W REALMENU 1145 899 FORTRAN ADDENDA 165 139 MENU LES R A SEARD EL S 29 RM COBOL 950 759 GRAFMATIC OR PLOTMATIC 135 119 HERGU ULES IN COLOR CARD 499 RM COBOL 85 1250 999 MAGUS NUMERICAL ANALYST 295 249 IRMA TD TURBO EGA XENIX UNIX PRODUCTS RM SCREENS 395 315 MATHPAC 495 445 ORCHID TURBO PGA SCRE
88. E BUYER S GUIDE Call or write for our FREE comprehensive Buyer s Guide containing hundreds of lan guages utilities and books specially for IBM personal computers and compatibles We re the world s leading independent dealer of programmer s development tools because we provide sound advice low discount prices fast delivery FREE domestic shipping and no hidden charges Programmer s Connection 800 336 1166 USA 7249 Whipple Ave NW North Canton OH 44720 800 225 1166 Canada 9102406879 Telex 216 494 3781 International Reader Service Number 51 aa ForPCs aunnnamA 1250 WEEE WANNA 212 580 0257 P i M_ parallel arall0N processors Human Devices Inc 322 W 71 St NY NY 10023 Reader Service Number 45 HOW COMPLEX IS YOUR SOFTWARE FIND OUT WITH PC METRIC e computes popular complexity metrics e checks program against standards e predicts bugs and effort e versions for many popular languages e includes 100 page tutorial manual SET Laboratories Inc Dept MC Box 03627 Portland OR 97203 Reader Service Number 58 Macro Language 1 ML 1 The fast language independent macro processor Extend your current programming language or define your own _ Many useful utility ML 1 definitions included Speed source program conversions or level upgrades Unlimited macro definition passes Supports 30K macro definitions per pass Define 4GL extension to your production
89. EE TECHNICAL SUPPORT applies to this offer To order or for additional information call 703 356 7029 or 703 847 1743 or write PEACOCK SYSTEMS INC 2108 GALLOWS ROAD SUITE C VIENNA VA 22180 PEACOCH SYSTEMS INC Trademarks Turbo C Borland Quick C Microsoft Let s C Mark Williams DeSmet Software Datalight Datalight Lattice C Lattice Microsoft C Microsoft Aztec C Manx Software Computer Innovations C Computer Innovations Eco C Ecosott Inc Reader Service Number 20 READ WRITE FORMAT DUPLICATE Disks from over 300 other micros i ions Upgrades available from previous aks i for only 25 00 Call for Authorization To Order Contact S lt EBNGSUFT 1454 Sixth Street Berkeley CA 94710 se 415 525 3113 gor we good software is it s own reward Reader Service Number 39 88 MICROCORNUCOPIA 40 Mar April 1988 After I assured him that he could remain nameless he told me some interesting tales He says we ll soon be seeing single board XT clones They are now starting to manufacture single board XTs with floppy controllers graphics controllers serial parallel game port real time clock the works everything Are you Big Board owners getting a little nostalgic He said the main board con tains two ASICs a V20 and RAM That s it I know there isn t room for all that stuff in three chips and memory You know there isn t room Fortunately they don
90. ENIO 400 379 NO LIMIT 129 109 MICROPORT amp Sco PRODUCTS CALL CALL SPINDRIFT LIBRARY 149 135 PARADISE SYSTEMS ADVANTAGE C 695 CALL DEBUGGERS SSP PC 350 269 VGA PROFESSIONAL TRIEVE 595 455 ADVANCED TRACE 86 175 115 AUTOSWITCH EGA 480 CARD INFORMIX ESQLIC 749 CALL S SPRITE 175 19 GRAPHICS ld INFORMIEESO a CALL PERISCOPE 345 275 ADVANTAGE GRAPHICS C 250 225 MEE SOL CAE PERISCOPE Il 175 139 ESSENTIAL GRAPHICS 250 185 ADDITIONAL PRODUCTS MEN SHELL a TY PERISCOPE IlI 8 MHZ 995 799 GSSGRAPHIC DEV TOOLKIT 495 375 ADVANTAGE VCMS 379 329 RRO ORAL LANGUAGES cae cae PERISCOPE III 10 MHZ 1095 875 HALO SPECIAL 300 199 BASTOC 495 399 PANEL ie ne PFIX 86 PLUS 395 209 HALO 5 MICROSOFT LANG 595 389 CARBON COPY PLUS 195 159 AT T DEBUG PLUS 60 49 METAWINDOW PLUS 275 229 DAN BRICKLIN S DEMO PROGRAM 75 59 REAL TOOLS XVIEW86 60 49 TURBOWINDOW C 95 79 DB2C 299 CALL REAL TOOI TURBO HALO FOR TURBO C 99 79 FLOW CHARTING II 229 205 RMCOBOL DISK DOS KEYBOARD UTILITIES MAGIC PC 195 179 O MOLT EW 288 COMMAND PLUS 80 69 LINT MKS TOOLKIT 139 115 SCO MULTIVIEW 230 DISK OPTIMIZER 60 55 PC LINT 139 99 NORTON GUIDES 100 65 FETCH SPECIAL 55 45 PRE C 295 155 PFINISH 395 209 INTELLIGENT BACKUP 150 135 POLYMAKE 149 125 C NORTON COMMANDER 75 55 MODULA 2 POLYTRON PVCS CALL CALL ADVANTAGE C 495 479 ADVANCED NORTON UTILITIES 150 99 LOGITECH MODULA 2 SOURCE PRINT 95 75 PFORCE 395 209 PDISK 145 9 COMPILER PACK 9 79 TREE DIAGRAMMER 77 69 VFEATURE 8 75 DEVELOPMENT SYSTEM 2
91. EW 183 Sio RUN C PROFESSIONAL 230 as PENT 19 109 OTHER MICROFORT SCO 250 155 149 109 PHARLAP 386 ASM LINK 495 419 PIEDITOR SPECIAL NEW 195 149 WENDINPRODUCTS CALLICALL PHARLAP 386 DEBUG 195 155 C LIBRARIES PMATE 195 109 PASCAL COMPILERS SCO XENIX SYS V 386 COMPLETE 1495 1195 BASIC_C 1715 129 SPF PC 195 145 MARSHAL PASCAL 189 155 VM 386 SPECIAL 195 119 C ASYNCH MANAGER 175 135 VEDIT PLUS 185 129 MICROSOFT PASCAL 300 185 X AM 595 535 C FOOD SMORGASBORD 150 95 PASCAL 2 350 319 W SOURCE CODE 300 179 FILE MANAGEMENT TURBO PASCAL NEWYV 4 0 100 65 ARITYSTANDARDEROLOG 95 79 CUTILITYLIBRARY ies oas XTRIEVE 242 ne PASCAL DEV LIB NEW A 185 119 245 5 ATIONS 185 119 595 455 N SMALLTALK V NEWV 2 0 99 85 COMMUNICATIONS PLUS 250 189 XTRIEVE N 595 455 SCREEN DISEGAY WINDOWS 279 265 TURBO PROLOG 100 65 GREENLEAF C SAMPLER 95 69 REPORT OPTION N 345 269 CURSES W SOURCE CODE 250 169 TURBO PROLOG TOOLBOX 100 65 GREENLEAF COMM LIBRARY 185 125 CBTREE 159 139 GREENLEAF DATA WINDOWS 225 155 GREENLEAF FUNCTIONS 185 125 C TREE 395 315 W SOURCE CODE 395 259 ASSEMBLERS LINKERS MULTI C 149 135 R TREE 295 239 HI SCREEN XL 149 119 ADVANTAGE DISASSEMBLER 295 269 PFORCE SPECIAL 295 199 C TREE R TREE BUNDLE 650 519 JYACCFORMAKER 495 449 ADVANTAGE LINK 395 359 RESIDENT C W SOURCE 198 169 DBC III 250 169 JYACCIAM 750 679 ASMLIB 149 125 TIMESLICER 295 265 DBC III PLUS 750 595 MICROSOFT WINDOWS 99 65 EZ_ASM 70 65 W SOURCE CODE 1000 895 DB _VISTA OR DB_QUERY 195 159 MS WINDOWS
92. Equally done on both sides Finally I got some tissue from the kids bathroom and cleaned off the mess we ve got to get creamy peanut butter before I test disks again popped the disk back into the jacket and presto a new disk Well pretty new I stuck it in drive A Sector error I tried reformatting it Are you kidding My computer will be playing Hal in the next 2001 Okay maybe I overdid it That s hardly the word for it When computers Continued on page 87 Blaise puts the Accent on C with Enhance your Microsoft C programming environment with C TOOLS PLUS 5 0 a new quintessential library of C ctions C TOOLS PLUS 5 0 from Blaise Computing Inc puts a prime n quickly building professional applications using the full power of tC Version 5 0 and QuickC Now you can concentrate on program creativity by having full control over DOS menus interrupt service routines memory resident programs printer and keyboard control and more C TOOLS PLUS 5 0 prebuilt libraries are ready to use with either QuickC or the Microsoft C Version 5 0 com mand line environment Complete documented source code is included so that you can study and adapt it to your specific needs Blaise Computing s attention to detail like the use of full function prototyping cleanly organized header files and a comprehensive fully indexed manual makes C TOOLS PLUS 5 0 the choice for experienced developer
93. I changed the assembler a bit to make it easier to write and I had experience But coding in as sembly was as important a speed factor as any My assembler is one thirteenth as large program size as Intel s and it s over ten times as fast Also surprisingly it contains fewer lines of source code even factoring in the product simplifica tions How See the theoretical section Text Editors I have written four text editors in my career Two were written in high level language and two in assembly language The assembly language versions took the least time to develop Interestingly the assembly language versions had more features and more lines of source When I removed the code for the additional functions I found that the assembly language programs contained fewer lines of source code Theoretical Arguments Let s perform a point by point com parison between C and 8086 assembly We ll weigh their advantages and disad vantages with respect to speed reliability ease of development and maintainability Porting To New Systems One of C s strengths is software por tability As long as the compilers are compatible the computers don t even need the same CPUs This is an extreme ly powerful advantage especially for programs intended to be maintained and run on many different computers In the case of the text editor however that advantage is not so clear Editor s note Remember this is a letter
94. ICROCORNUCOPIA 40 Mar April 1988 dotadas AAA O O I m D m Turbo C Fixes I agree with the comments made in reviews of Borland s Turbo C in the not August issue 37 But I wish to pass on the details of a problem I had with the compiler in the hope of saving others from the same trap The atan2 y x function must be of much more use to engineers than programmers It seems to be poorly coded and untested in several com pilers Turbo C is one of them I got Turbo C early in June and found that this function failed for zero values of x Microsoft C Desmet without 8087 support and Greenhills C for the DSI 32 work well while Turbo C Desmet for the 8087 at least my version and the UNIX version 3 C compiler do not I sent a note with the registration card describing how the function would hang the system and got a prompt ac knowledgement from Borland A few days later a complete set of replacement disks came labelled version 1 0 same as the first with the problem fixed Technical Tips Couldn t ask for better support The code in Figure 1 has been useful for ex ercizing the atan2 function John S Innes 120 Macpherson St Cremorne NSW 2090 Australia The Woes Of Computer Neck So you ve got Mr Computer all as sembled and have been using him full tilt since sometime last week You ve been working 10 14 hours a day on the new job and your head aches Shoulders tight Eye
95. INTER INTERFA USES 8 ourPUuT DATA BITS AND THE PRINTER BUSY LINE FOR DATA INPUT CONTROL PROGRAM COMMANDS PROGRAM EPROM S FROM DISK FILE SAVE EPROM SYBUFFER TO DISK e READ DISK FILE INTO BUFFER e PROGRAM EPROM S FROM BUFFER e READ EPROM S INTO BUFFER e COMPARE EPROM S WITH BUFFER e VERIFY EPROM IS ERASED e COPY EPROM S e CHANGE EPROM TYPE e BUFFER MONITOR MODE SEE BELOW THE BUFFER MONITOR MODE HAS 17 SP CENAS FOR DETAILED OPERATIONS THESE INCLUDE FILL DUMP TRANSFER PROGRAM R VERIFY EXAMINE MODIFY CHECKSUM BIAS ah ae tie SINGLE BYTE BURN LOGICAL OP ERATIONS ANDGAROR SET BUFFER BIAS HEX AR ASSEMBLED AND TESTED UNIT WITH COMPLETE 1 99 DOCUMENTATON AND SOFTWARE ON DISKETTE PARTS KIT WITH SOFTWARE AND DOC 179 BARE BOARD SOFTWARE 8 DOC 69 SOFTWARE AVAILABLE ON 5 1 4 OR 8 DISK FOR IBM KAYPRO 8 OTHER FORMATS TO ORDER SEND CHECK MONEY ORDER WRITE OR CALL ne nou P O B MILFORD O 25150 513 752 7218 CALL OR WRITE FOR MORE INFORMATION ADD 4 00 FOR SHIPPING 3 00 COD Reader Service Number 30 Around the Bend continued from page 4 go they really go I grabbed another Verbatim disk This time I left the disk in its jacket and dumped it jacket and all in boiling water Within minutes the jacket fell apart but when I lifted out the disk it was dry shiny and unscathed except for a slight curl 1 popped the disk into a clean jacket and put i
96. K 3 5 Floppy Drive Ventura Desktop Publisher Word Perfect Version 4 2 Norton Utilities Advanced Turbo Basic Turbo Pascal Turbo C E Citizen 120D 180D Printer 189 215 Es Citizen MSP40 MSP45 Printer 379 495 Citizen Overture 10 page min laser 1595 laser printer includes toner DreamTech 408 996 2373 5175 Moorpark Avenue San Jose CA 95129 Reader Service Number 16 MICRO CORNUCOPIA 40 Mar Apr 1988 41 C Vs Assembly Language The Choice Is Obvious This article came with a short note from the author You may wish to point out that I m a little prejudiced I m the author of the A86 assembler package reviewed on page 66 of your Nov Dec 87 issue 38 Duly noted But considering his back ground what else can he say A lot Read on and you ll have a much better understanding of what your C compiler or any compiler does for you And to you hat follows is a memo I wrote to W client two years ago At that time he was considering trans lating one of my assembly language programs into C He thought coding the program in a high level language would improve it One of my main arguments in the memo was the lack of usable debugging facilities for Xenix based C In today s MS DOS environment the situation is not so grim good debuggers such as Codeview and Periscope make C more attractive I mentioned that VisiCalc and Lotus 1 2 3 were coded in assembly language That was based on hea
97. L based shift an optimization its larger brother missed Conclusions The quality of MS DOS C compilers has certainly improved and if anything I was surprised at the general quality of all these compilers Though documen tation hasn t always kept up It all comes down to this which compiler should you buy The answer depends on what you want to do and how much you want to spend Cheap Recommendations In the low cost arena under 200 I like Mark Williams Borland and Datalight I m also impressed with Let s C although its lack of many proposed ANSI features is a minus The documentation for the Datalight compiler needs a revision but the product produces excellent code for a paltry 129 Optimum C includes source for its library A big plus Turbo C has a slick environment and a large full featured library I d recommend Optimum C to professionals who need Lattice com patibility and either Mark Williams or Turbo C to beginning C ers Although not as easy to work with as Turbo C Quick C also deserves honorable mention Its claim to con sideration is its debugger a requirement for developing large systems Not So Cheap Recommendations On the high end above 200 I would choose the Microsoft C v5 0 for its excellent documentation CodeView debugger and extensive library It in cludes Quick C so you re getting a fast compiler along with an optimizing one If you re work
98. Manual Scaling Log Lin SemiLog An Indespensible Tool For Technical Professionals Special Introductory 79 Price System Requirements IBM PC XT AT or Compatible running DOS 2 0 or higher Screen graphs require graphics card Printer Graphs require Epson EX FX JX RX HS Star Gemini Radix SD SG SR IBM Graphics or compatibility with one of the above Plotter graphs require HP GL compatibility P O Box 956 Dept M Valley Forge PA 19482 For Technical Information 215 269 0198 Reader Service Number 60 MICROCORNUCOPIA 40 Mar April 1988 89 A Reliable PC XT Compatible For The Corner Stone of Your Products The SLY40 XT is a small 4 4 by 9 1 4 four layer card featuring all of the PC XT mother board functions The board simply plugs into a passive back plane or SLICER S 40 slot bus board e High Integration Composed of just 47 Low Power CMOS ICS e NEC s 8 MHZ V40 e One Megabyte of Zero Wait State RAM e 8087 Co Processor Socket e Standard Keyboard Connector e Slicer s Own Bios Source Code Included e Ideal For Tough Industrial OEM and Portable Applications e American Made and Fully Supported by Slicer _ Complete SLY40 XT System with 20 MEG Hard Disk Just 1299 95 Retail e Without Hard Disk Just 995 95 Retail 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
99. North Vancouver BC Canada V7R 2J5 oia ti ds iit is ad ici hit aa de iia ii A TRUE COMPILER Trilogy is an interactive compiler which produces native code for the 8086 8087 LOGICAL PURITY Trilogy was designed from scratch as a simple language with a completely logical foundation Trilogy s speed results from its design not from added commands Prolog s assert cut var and retract are not logical parts of that language They were added to improve performance DATABASE SUPPORT Trilogy supports varia ble size records records with arbitrary values lists re cursive trees plus record insertion deletion and modif ication Anywhere in the file Files are relations and can be queried from within the language PRICE Only 99 95 postpaid U S funds Plus 5 00 shipping amp handling Or 12 00 shipping amp handling outside North America Check money order or VISA accepted Reader Service Number 71 MICRO CORNUCOPIA 40 Mar Apr 1988 29 Integrand s new Chassis System is not another IBM mechanical and electrical clone An entirely fresh packaging design approach has been taken using modular construction At present over 40 optional stock modules allow you to customize our standard chassis to nearly any requirement Integrand offers high quality advanced design hardware along with applications and technical support all at prices competitive with imports Why settle for less Rack amp D
100. Number 74 MICRO CORNUCOPIA 40 Mar Apr 1988 23 Come to SOG VIT july 14 July 16 Bend Oregon Registration begins May 1st 1 503 382 5060 Come join the fun environment variable The program assumes that the dat file is in the PATH directory Argument list char name Return value FILE fp FILE open_data_file char name a string constant that is the name of the file containing the directory information a FILE pointer to the open file if successful program aborts on error char ptr p MAXBUFF temp MAXBUFF FILE fpin ptr getenv PATH if ptr NULL Find out where go dat is NOTE PATH must be in caps fprintf stderr nPATH not set Program and data file must i be on PATH An exit 0 strcpy p ptr ptr strtok p while ptr NULL strcpy temp ptr strcat temp strcat temp name if fpin fopen temp temp 0 0 ptr strtok char 0 else break if fpin NULL r nyy Find first PATH Save a copy of substring Form a path and file name NULL Start over again Try next path Must have a good fpin fprintf stderr nCannot find s on default path s n name exit 0 else return fpin What have YOU been missing Programmer s Toolbox Volumes I amp II Create better faster higher quality and easier to read programs in a fraction of the
101. O CORNUCOPIA 40 Mar Apr 1988 development time is relative to the num ber of lines of code Thus theoretically it takes less time to develop C programs While I accept these claims on average I have frequently found them untrue For short programs the claim of fewer lines of C code is certainly true because of C s library For longer programs we must consider the number and power of primitive constructs in each language C has 28 built in keywords and 43 punctuation marks or sequences of 2 marks My 8086 assembly language has 149 built in keywords not counting 20 keywords that are synonyms for other keywords and 15 punctuation marks Thus in terms of primitive tokens my assembly language is richer than C by a count of 164 to 71 How do we relate these counts to lines of code We must consider how ef ficiently each language makes use of its tokens and the kinds of tasks the lan guage is optimized for In C you can squeeze a lot of instruc tions onto a single line But that can be a false advantage The more code we stuff into a line the more time it takes to develop and debug that line Token Strengths C uses its tokens primarily for expres sion evaluation flow control and pointer manipulation the auto incre ment and auto decrement features Its primary advantage lies in run time ex pression evaluation understanding for mulas expressed in algebraic notation 8086 assembly language uses its toke
102. S Milan Systems America Inc 8351 Roswell Road 404 642 4131 Dunwoody GA 30350 MICROCORNUCOPIA 40 Mar April 1988 95 By Gary Entsminger 1912 Haussler Dr Davis CA 95616 The Other Side Of TSRs DOS Shells C shells by the C shore Prolog shells by the Prolog shore Here Gary looks at the backside of TSRs SHELLs f you want to have access to more than one program at a time you can try either of two approaches terminate and stay resident or TSR see Tidbits this issue or simply stay resident or SSR Another name for SSRs is DOS SHELLs and here s how they work You run the SHELL which executes other programs When the other program finishes executing the SHELL retakes control and idles until you tell it which program to run next Both Turbo Prolog and Turbo C make the writing of this kind of SHELL fun by providing a SYSTEM predicate in Prolog and a SYSTEM function in C I use one of these SHELLs all the time and assure you that from simple beginnings see Figure 1 and the addition of a little imagination you can create a sophisti cated i e Mac like SHELL easily This issue I ll show you how to get started and as time goes by we ll add user friendlier features The code in Figure 1 in Turbo Prolog creates a window on five functions e a directory program e an editor a memory status function e an exit to DOS e and an exit from the SHELL After creating the wi
103. S AT 40 MB Seagate 251 450 00 AT Hard Drive amp floppy controller WD 145 00 20 MB Miniscribe HD with controller 349 00 30 MB Miniscribe HD with controller 399 00 AT 40MB NEC HD 695 00 20 MB NEC HD with controller 449 00 30 MB NEC HD with controller 0 499 00 SOFTWARE The Twin Spreadsheet 49 00 Leading Edge Word Processor corie aante 49 00 Ventura Desktop Publisher by Xerox 525 00 Turbo C by Borland 89 00 ACCESSORIES 1200 Baud Modem Internal Leading Edge Model L Hayes compatible 99 00 2400 Baud Modem Internal Leading Edge Model L Hayes compatible 219 00 1200 Baud Modem External Hayes compatible 119 00 V20 8mhz ecunnideceieeian 14 00 Memory Chips call for prices BUILDING YOUR OWN CLONE FREE BOOKLET 90 day warranty 30 day money back subject to restrictions MicroSphere Inc P O Box 1221 Bend Oregon 97709 503 388 1194 Hours Monday Friday 9 00 5 30 Pacific Time tz aa o MicroSphere H8 wa e Reader Service Number 2 THe MICRO TECHNICAL JOURNAL VIICRO CORNUCOPIA MARCH APRIL 1988 ISSUE NO 40 FEATURES 20 26 32 36 42 4 8
104. Sort Merge Select utility Run as an MS DOS command or CALL as a subroutine Supports most lan guages and filetypes including Btrieve and dBase Unlimited filesizes multiple keys and much more MS DOS 149 XENIX 249 702 588 3737 Opt Tech Data Processing P O Box 678 Zephyr Cove NV 89448 Reader Service Number 64 8 Datadesk Int l 32 Digital Research Comp 52 16 Dreamtech 33 E21 Computer 9 Ecosoft 10 Emerald Microware Gimpel Software 55 Guidelines Software 11 Halted Specialties 26 Harger LN T 46 34 Hawthorne Technology 70 22 Integrand 42 McTek Systems 35 Merlyn Productions Micro Cornucopia Micro Methods 24 microSOLUTIONS 2 Microsphere 57 MMC AD Systems 20 Peacock Systems 20 Peacock Systems Advertiser wishes to be contacted directly Desktop Publishing Graphics Laser Printer Fonts amp More Our multiuser BBS has 3 lines on rotary and 260 Mb of files for MS DOS CP M and soon Macintosh users One small 40 00 per year fee gets you access to our huge online library Many disks available by mall for 5 00 each FREE catalog if you send disk mailer amp return postage to DataCOM Systems 2643 Cedarview Court Clearwater Florida 34621 3710 813 796 5627 modem 1200 or 2400 baud Reader Service Number 76 RAM DISK S 100 2 Meg Port I O New Warranteed 725 S Lugert 439 Peck Slip or call NY NY 10272 718 622 0654
105. US Version 2 33 95 Current version with windows LINE 15 COL 16 FILE PHOTO 263 INDOW 1 m Main loop displays the ma VEDIT PLUS is an advanced editor that o A makes your program development and word do processing as efficient and easy as possible VEDIT PLUS is simple enough to learn and use for the novice yet has the clrscreen scr ines 28 speed flexibility and power to satisfy shoul main_menu the most demanding computer professional ret_val getrange mm_pro VEDIT PLUS is particularly suited for process ret_val new_ved writing all types of programs and lengthy uhile ret_val EXIT_OX documents such as reports or manuscripts gt TEXT gt pMINDOW INSERT Et scrlines SCRLINES i A scruidth SCRUIDTH Sp 2 A Le This shows how DEDIT PLUS can perform windowing One window is used for word processing a s cond for program if new_vedit 48 table in t printf crt_sel if yesno setert ar development and the third for commands else outer If y WINDOW Up to 48 vindous are supported and you DIRECTORY C VEDIT HEW l COMPARE UDM CV203 UDM MAIL VDM MENU VDM PRINT VDN SORT VDM STRIPU VDM 280 8986 VDM te ee 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
106. Workstation Then 1 took working source code from the Sun and moved it over to the PC In two rather critical cases the Guidelines compiler broke Problems With Guidelines In my parser which 1 can t split up into smaller pieces Guidlines runs out of memory In my lexical analyzer it just hangs up the machine The technical help line has a recorder which plays TIl get back to you It lies The Guidelines compiler seemed to work fine for ordinary C although it wouldn t accept comments on the same line as a ttinclude But I want to take everything I do on the Sun and move it over to the PC so I can t count on Guidelines Note to run either compiler you must have 640K and a hard disk Advantages The Advantage package was a refreshing change The documentation was professional although the flag doesn t work as documented and it in cludes a good introduction to the lan guage with a summary card Plus they re very aware of the memory problem and are working on it as I write The next beta release will use free memory between 640K and 1meg for the compiler s internal stack I think that will solve my problem You also get all the source code for the examples from Stroustrup s book and for the examples in the Advantage manual By following the suggestions in the guide I was able to get Advantage to compile my lexer The parser however still ran out of internal stack When I called
107. ad sheet program that has been completely revised for Turbo 4 0 The Graphics in terface routines are also found on this disk What s New Turbo Pascal 4 0 sports a ton of new whistles I can t take the time or the space to cover all of them in ap propriate detail so I will highlight a few of the important ones The follow ing is a pretty complete list e Integrated development environ ment e Project management tools Build Make Pick list e Separate compilation of program parts UNITs e Library of standard UNITs e Symbolic debugger interface e Faster software only floating point IEEE standard reals if you have a numeric coprocessor e Faster compiler e Smaller object code hardly visible Faster object code e Device independent graphics e Additional data types including Longlnt and Word e Optional range and stack check ing and short circuit boolean ex pression evaluation e Variable and value type casting e Nested include files up to eight levels deep Interrupt procedure support al lows you to write Interrupt Ser vice Routines e Assembly language interface Ex ternal Separate Compilation Probably the most important new feature is the compilation of program parts Imagine finding one bug in your 9 365 line checkbook balancing program Think of the wear and tear on your disk drives and your patience just to recompile all 9 365 lines Now imagine makin
108. ademarks of Borland International Inc Copyright 1987 Borland International Inc Bl 1166A YES I want to upgrade to Turbo Pascal 4 0 and the 4 0 Toolboxes e A Suggested Upgrade If you are a registered Turbo Pascal user and have not been notified of Please check box es Retail Price Serial No Version 4 0 by mail please call us at 800 543 7543 To upgrade if you have not registered your product just send the original registration O Turbo Pascal 4 0 Compiler 99 95 39 95 fomi ith thi i O Turbo Pascal Tutor 69 95 19 95 orm from your manual and payment with this completed coupon to O Turbo Pascal Database Toolbox 99 95 29 95 Turbo Pascal 4 0 Upgrade Dept Borland International 5 hios iya a oe any rope ora uroo rasca itor 100100X A b 4585 Scotts Valley Drive Scotts Valley CA 95066 O Turbo Pascal Numerical Methods Toolbox 99 95 29 95 Name O Turbo Pascal Gameworks 99 95 29 95 Total product amount __ Ship Address CA and MA residents add sales tax EI City State In US please add 5 shipping and handling for each product Outside US please add 10 shipping amp handling Zip Telephone for each product Total amount enclosed This offer is limited to one upgrade per valid registered product It is good until June 30 1988 Not good with any other offer from Borland Outside U S make payments by bank draft payable in U S dol lars drawn on a U S bank CODs and purchase orders will not be accepted by Borland Paymen
109. aims the C user base is doubling every eight months I think the emergence of C will come from the grass roots like its predecessor It s the language Ill use whenever I can Guidelines Software 18 Evergreen Drive Orinda CA 94563 800 634 7779 415 254 9393 In California Programmer s Paradise 42 River Street Tarrytown NY 10591 800 445 7899 914 332 4548 In New York Phoenix Technologies 320 Norwood Parks Norwood MA 02062 800 344 7200 617 769 7020 In Massachusetts 949 MICRO CORNUCOPIA 40 Mar Apr 1988 35 Inside The PC s PPI Just Another Dumb Chip Well Just About There isn t much more boring than a parallel chip However before you say any thing nasty about this grumpy frog remem ber warts and all it exercises a lot of in fluence Make friends with this simpleton and you ve got control Lots of control hat a drag It s coming on VJ cisssinass should be high in the Cascade Mountains scout ing a location for this New Year s snow cave gala But here I sit stuck writing about the PPI I know it s been a long time since I said this article was next But quite frankly just about everything else has been more interesting than this dive into Intel s decidedly unglamorous 36 MICRO CORNUCOPIA 40 Mar Apr 1988 Programmable Peripheral Interface PPI chip the 8255 The PPI won t paint pretty pictures on the screen it won t talk on the phone and it won t t
110. ake out the trash But it does perform some vital functions in the PC so it deserves a little attention General Description As I ve said before just saying PPI makes me want to scamper off to the men s room But Intel saw fit to call their parallel I O chip the PPI so in the interests of conformity and world peace I ll stick with their name With 24 programmable I O pins the PPI is a general purpose workhorse Like the rest of the smart chips under the PC s hood it can do much more than the PC asks of it The 24 pins break down to three 8 bit ports Port A through Port C You can program any of the ports for either input or output Port A has the addi tional capability of bidirectional opera tion with Port C handling the hand shaking Along with the three ports the PPI contains a control register This register sets the individual ports for either input or output specifies the operational mode for each port and allows setting and resetting bits in Port C The latter function finds use in systems which use Port C for handshaking or interrupts Setting or resetting an individual bit disables or enables the corresponding interrupt The PC doesn t use this func tion Operational Modes The PPI has three modes Mode 0 is the basic I O configuration The PC uses this simple mode Mode 0 allows no handshaking only port reads and writes Any port can be input or output according to
111. amp l e ZRDOS ZCPR3 with exclusive Hyperspace operatin system offering 57 5K TPA NOT 48K like some others No 8 bit is bigger Richard Conn s ZCPR3 The Manual included free e Provisions for real time clock and on board terminal options e Socket for 28 pin EPROM Microcomputer MSC Srem ca Consultants P O Box 747 Santa Barbara CA 93102 805 963 3412 Reader Service Number 36 CALL FOR FREE CATALOG 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 CONVERTER 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 EXTERNAL AMPS DEMONSTRATION SOFTWARE AND ALIBRARY BUILDING PROGRAM ARE INCLUDED ONA5 INCH PC XT DISKETTE FULL DOCUMENTA TION AND SCHEMATICS ARE ALSO INCLUDED 6995 NEW AS cu ASSEMBLED en amp TESTED NEW IC TESTER 149 00 SIMILAR TO BELOW EPROM PROGRAMMER PLUGS IN TO YOUR PC OR XT TESTS ALMOST ALL 14 16 AND 20 PIN 74XX SERIES INCLUDES STANDARD POWER S AND Compare You won t settle for less Or slower Or smaller DT 42 Computer TMP on board terminal LS DEVICES ALSO TESTS CD4000 SERIES CMOS
112. anager Context Sensitive Help Command Window Relational Model Free Support Manual All Upgrades 1 CAN T PRODUCE CUSTOM SOFTWARE COMPETITIVELY F Name Address 800 227 7681 Got Software Problems Writer ete Now it s up to you to write the code to relate e OW one file to another The SLEEP AT relational model shows NIGHT 00 you how and it only takes a few minutes End to end all programming for 5 relational files f should take less than 30 minutes It s far superior to doing the whole thing BP from scratch Your user S Full Starter Version 289 99 Orders amp Information 800 227 7681 30 day money back guarantee less 14 s h YES Send me___copies of Turbo GhostWriter today ASCII 3239 Mill Run Raleigh NC 27612 Lattice Incorporated 2500 S Highland Lombard IL 60148 800 533 3577 312 916 1600 In Illinois Manx Software Systems P O Box 55 Shrewsbury NJ 07701 800 221 0440 201 542 2121 In New Jersey Mark Williams Company 1430 Wrightwood Avenue Chicago IL 60614 800 692 1700 312 472 6659 In Illinois MetaWare Incorporated 903 Pacific Ave Ste 201 Santa Cruz CA 95060 408 429 6382 Microsoft 16011 NE 36th Way Redmond WA 98052 800 426 9400 206 882 8088 In Washington Turbo GhostWriter is an application generator that creates 80 of your custom application auto matically as a Turbo
113. and fanfare Incorporating parts of the well regarded Wizard C compiler pur chased by Borland Turbo C continues the Borland tradition of excellent perfor mance and slick packaging at a relative ly small price Unlike most other MS DOS C com pilers Turbo C does not use environ ment variables to locate its header and library files instead it uses configura tion files Installation of the product is simple and well documented and it will run on a two floppy disk PC However they recommend a hard disk Documentation comes in two trade sized paperback books a user s guide and a reference I found it difficult to find certain information in the manuals they seem to be somewhat disor ganized Functions are documented in alphabetical order but are not one function per page as in many manuals so some are split across page boun daries Borland pioneered the integrated editor compiler with Turbo Pascal and has refined it for Turbo C You can edit compile and run a program without leaving the window environment If you prefer your own editor Borland has included a standard command line version of both the compiler and linker Turbo C showed excellent compile speeds good overall benchmark scores and extraordinary floating point perfor mance On the other hand tests indicate slow display especially printf and dynamic memory allocation functions The extensive library contains many p
114. and more from 350 STAR K BOX 209 MT KISCO NY 10549 914 241 0287 Reader Service Number 40 SOFTWARE SYSTEMS CORP Finally Affordable Intelligence TINY EINSTEIN The Expert System Shell e Create your own expert systems in minutes e With pulldown menus and windows e Context sensitive online help e Free example expert systems e Tutorial e Interactive full screen text editor e DOS access from shell e Turbo Fast execution e Cluster Trace Explain e For Diagnosing Simulating Predicting Planning Classifying Training and Monitoring systems Only 49 95 Plus 5 S H Designed amp implemented by Gary Entsminger amp Larry Fogg ACQUIRED INTELLIGENCE P O BOX 2091 e DAVIS CA 95617 916 753 4704 Reader Service Number 72 MULTIUISAS DOS INOW develop DOS multiuser applications now with Pecan s new Poly Power System On any XT AT PS 2 or compatible Under any version of DOS 2 0 or later All you need is Pecan s Poly Power System one or more of our compilers UCSD Pascal Modula 2 FORTRAN 77 BASIC Assembler C is coming soon and inexpensive dumb terminals on serial ports You can even have multiple programmers develop on a single machine Poly Power System 399 95 Compilers 79 95 each Call us for full details and to place your order lt d OC oF O aa om omic L t B u Tha UCSD Pascal Comp
115. annot Cannot 2sec 2 40 min Cannot Cannot 11sec VEDIT and CompuView are registered trademarks of CompuView Products Inc BRIEF is a MATE is a trademark of Phoenix Technologies Ltd Norton trademark of UnderWare Inc Editor is a trademark of Peter Norton Computing Inc determine each window s size and color PROGRAMMABLE EDITOR FREE Fully Functional Demo Disk Call for 286 XENIX Version _ Fully Network Compatible e Simultaneously edit up to 37 files of unlimited size 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 e 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
116. any 1 800 63 PECAN Pecan Software Systems Inc 1410 39th Street Brooklyn NY 11218 718 851 3100 Pecan Software Europe Ltd MGM House Oakfield Grove Clifton Bristol BS8 2BN England 0272 733633 Reader Service Number 29 FULL AT amp T C ANNOUNCING VERSION 1 2 Guidelines announces its port of version 1 2 of AT amp T s C translator As an object oriented language C includes classes inheritance member functions constructors and destructors data hiding and data abstraction Object oriented means that C code is more readable more reliable and more reusable And that means faster development easier maintenance and the ability to handle more complex projects C is Bell Labs answer to Ada and Modula 2 C will more than pay for itself in saved development time on your next project C from GUIDELINES for the IBM PC 295 Requires IBM PC XT AT or compatible with 640K and a hard disk Note C is a translator and requires the use of Microsoft C 3 0 or later To Order send check or money order to Here is what you get for 295 The full AT amp T v1 2 C translator Libraries for stream I O and complex math The C Programming Language the definitive 327 page tutorial and description by Bjarne Stroustrup designer of C Sample programs written in C Improved installation guide and documentation 30 day money back guarantee GUIDELINES SOFTWARE INC P O Box 749 MCC Orinda CA
117. ape key compatibility with IBM PC XT AT PCjr AT amp T 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 Switch allows you to swap position of Ctrl and Caps lock IBM moved Ctrl to bottom row you have no choice Positive tactile TURO ap eat Extra wide easy to Dedicated Caps Num and 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 an Arithmetic Separate Function keys Separate Cursor and Screen Control keys s DATADESK S SHANG 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 Not to 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 in
118. ascal 4 0 Turbo Pascal 3 0 Size of Executable File 2224 bytes 11682 bytes Execution speed 9 3 seconds 9 7 seconds Sieve of Eratosthenes run on an 8MHz IBM AT Since the source file above is too small to indicate a difference in compilation speed we compiled our CHESS program trom Turbo Gameworks to give you a true sense of how much faster 4 0 really is Compilation of CHESS PAS 5469 lines j Turbo Pascal 4 0 a E Turbo Pascal 3 0 Compilation spee 12 1 seconds 35 5 seconds Lines per minute 27 119 9 243 CHESS PAS compiled on an 8 MHz IBM AT 4 0 uses logical units for separate compilation Pascal 4 0 lets you break up the code gang into units or chunks These logical modules can be worked with swiftly and separately 4 0 also includes an automatic project Make 4 0 s cursor automat ically lands on any trouble spot 4 0 s interactive error detection and location means that the cursor automatically lands where the error is While you re compiling or running a program you get an error message and the cursor flags the error s location for you Only 99 95 60 Day Money back Guarantee For the dealer nearest you or to order now Call 800 543 7543 Run on an 8MHz IBM AT If within 60 days of purchase this product does not perform in accor dance with our claims call our customer service department and we will arrange a refund All Borland products are trademarks or registered tr
119. asked if ACE had all the features of PostScript No but that s not important Most of the market is less than power users and when people need the additional features they can get PostScript I don t know how you d feel being called a less than power user a power user is someone who s just discovered BASIC but if someone called me that I d byte him Anyway Yd think twice about paying a premium for a printer with a limited non standard page description language No matter how quick Right Ace A Powerful Procedural Database and Declarative Language SPEED Where Prolog must backtrack Trilogy can often solve the problem logically Trilogy takes advan tage of logic constraints they constrain the search to possible solutions which either eliminate backtracking or reduce millions of backtracks to a very few SYNTAX Trilogy uses an intuitive Pascal like pro gram structure INTEGRATION Trilogy is complete It s the only language you need for writing Pascal style routines database handlers and Prolog style programs MODULARITY Trilogy is modular language very similar to Modula 2 ENVIRONMENT A complete programming envi ronment you get editor library linker loader error handling automatic make and contextual help Plus you get modules for math string handling file manipu lation windows COMPLETE LOGIC SYSTEMS 604 986 3234 741 Blueridge Ave
120. atts 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 BROOKLYN BRIDGE The BROOKLYN BRIDGE supplies the link between the new PS 2 IBM com puters or laptops that use 3 5 diskettes i and the rest of the MS DOS world still using 5 drives The cable supplied will allow you to transfer files and software between the two computers FAST Simple to use and reliable Get it now for only 99 00 ASHER TECHNOLOGY PUTS FAX ON YOUR DESKTOP OR YOU CAN TAKE IT WITH YOU ON YOUR LAPTOP FOR LESS THAN 500 We have found the answer to every small business s need for FAX at a price they can afford and that works Get in on this exciting new technology Call for free demo disk Pp O Box 166 Riner VA 24149 1 800 323 4829 703 382 6624 call 24 hours 7 days a week Visa MasterCard C O D We Ship Worldwide Dealers Supported Reader Service Number 24 MICRO CORNUCOPIA 40 Mar Apr 1988 51 SCIENTIFIC SOFTWARE SCI GRAF Create huge hi res plots with log or linear scaling Screen 99 95 and printer output Automatic legends and labels Flexi ble ASCII input Works with CGA EGA Hercules and mono cards SCI GRAF Create custom hi res graphs from within your own pro MODULES grams by linking to our object code Supports all SCI 250 00 GRAF features plus plotter output and more Micr
121. aw are invoked through the function keys Here s a brief run down F1 Drawing modifications edit F2 Boxes and figures F3 Curves F4 Spraypainting and shading F5 Paint F6 Draw amp text F7 Copy erase amp move F8 Files Zoom printing F9 Cursor speed F10 Color Key macros library files and object definitions all permit the PC Key Draw user to save his work or procedures as building blocks that can be used later in assembling larger graphics projects The Bottom Line Ed Kidera s program is distributed on two disks complete with sample files the demo program and abridged documentation The registration fee for PC Key Draw is 100 at the high end for shareware programs On the other hand PC Key Draw is decidedly a high end shareware program And at 27 times the price does AutoCAD provide 27 times the power Payments should be sent to Edward H Kidera IV OEDWARE P O Box 595 Columbia MD 21045 0595 301 997 9333 My Wish List As we ve seen shareware is very strong in the traditional PC applica tions I hope to see user supported entries in a couple of other areas While high end word processing al ready encroaches on desktop publish ing s territory and PC Write s laser support makes it a clear high end con tender no true desktop publishing program has yet appeared on the shareware lists Is WYSIWYG document processing with text and graphics com bined too complicated for sha
122. backtracking programs run 10 to 100 times as fast as Prolog Maybe I could fudge and just check MICRO CORNUCOPIA 40 Mar Apr 1988 27 out the Pascal part I thought And we have arrays structures lists and unions All as concisely imple mented as they are in C Unions and structures I d almost forgotten the disappearing crab Plus a few things that aren t in any other language such as a decision proce dure to set constraints on variables so the program doesn t waste time trying ridiculous values A database file query system that reads dBase files Plus we have incremental compiling linking and loading of program modules as well as new data types like injections and relations Injections and relations sound as ap pealing as getting a tetanus shot from my father I mused But he d already made enough good points so I asked for a copy Back at my office I surrounded myself with piles Releases here notes and business cards there books here software there the really interesting stuff front and center On top of the real ly interesting stuff was Trilogy Two hours with the tutorial this is a truly great manual proved everything Paul had told me These technical folks you can almost trust them It s a simple language with only eight constructs and or not if case all rela tions and predicate It s an incredibly fast language even when doing
123. ber List When the initialization routine en counters the first line number list for the first module it saves the name of the source file and calls addlines for each line of line numbers Addlines works basically the same way as ad dsyms saving line numbers and code offsets in the line table In addition it stores the opcode in the table for later use by the breakpoint handler Stepping Through The Code After passing the source filename to the command_line routine and allowing you to set up your initial breakpoints the initializer sets up two interrupt vec tors These vectors are the key to how the debugger handles breakpoints and steps through code The 8088 has two special interrupt vectors Vector 1 is the single step in terrupt and vector 3 is the breakpoint interrupt They were built into the 8088 specifically to help us write debuggers The breakpoint interrupt is really not any different than any other interrupt except that it generates different code Normally the INT n instruction generates two bytes of code the first byte is the opcode and the next byte is the interrupt number n The break point interrupt INT 3 is unique be cause it generates a special single byte opcode This allows the breakpoint in terrupt instruction to be substituted for any other instruction in a program regardless of the length of that instruc tion You couldn t replace a single byte
124. ble objects When you need a certain kind of object you include the object s header file declare an instance of that object and use it Figure 1 Windows Object Definition include windows h By Bruce Eckel Eisys Consulting 1009 North 36th Street Seattle Washington 98103 create an instance of the object with specifications xf window Winl x_corner y 1 corner x 5126 y size color a 1 Use methods of the object the header file lists them vini write this is a string in the window wini gotoxy 12 24 winl write gt press any key to continue getch winl clear Figure 2 ad Class Definition clasa window a unsigned char old screen 80 24 21 a place to put portions of the old screen tf dnt x corner y corner x size y size color Data above can only be modified by member functions declared below publie AX how to make a new window object window int x 0 int y 0 intxs 0 int y s 0 gt int col BLUE BLACK BACK char title w window how to destroy an old window object Ho void write char st void write char c void write int i a void gotoxy int x 0 int y void clear e end oE class definition e This is significantly simpler than using conventional C libraries objects initialize themselves instead of requiring you to declare and initialize some
125. bmissions of micro computer software for publication You get e initial cash payments e generous royalties e to spend your time programming But we can t help you if you don t submit Call or write today for our submission guideline kit a we PUBLISHING GROUP 1240 Johnson Ferry Place Suite A10 Marietta GA 30068 404 977 6034 P S See us in Atlanta at COMDEX Spring 88 a 230 her ws e ras e MIM Reader Service Number 35 70 MICROCORNUCOPIA 40 Mar April 1988 Barbeque e Saturday Banquet Ri oot Reservations begin May 1st 1 503 382 5060 See you in July 68000 NOW TinyGiant 68000 Single Board Computer The HT68K TinyGiant is a great little 68000 single board computer It uses only 5 and 12 volts and has all of these features Two Serial Ports 1 Parallel Port Expansion Bus 128K RAM Expandable on Board to 512K Floppy Disk Controller uses MS DOS Disk Format 5 75 x 8 0 Fits on a 5 1 4 Drive K OS ONE Operating System and Software K OS ONE 68000 Operating System Package Get the K OS ONE operating system for your 68000 hardware With it you can read and write MS DOS format diskettes on your 68000 system Included in the package are K 0S ONE Operating System Source Code Editor Assembler HTPL Compiler Sample BIOS Code oo HT68K TinyGiant with K OS ONE 395 00 K OS ONE Operating System Package 50 00 HT Forth Language 100 00
126. bulletin board systems Register by purchasing regular ConIX To reduce the cost for those who want to purchase only the ConIX O S ConiX 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 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 ne 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 CP M Digital Research Inc Con X Computer Helper Industries Inc UNIX AT amp T Bell Labs Reader Service Number 6 Stephen S Mitchell 320 King St Suite 506 Alexandria VA 22314 703 360 4659 Small C Projects For CP M Public Domain Still Lives This is the Micro C C Issue so it s as good a time as any to start Stephen s two part series on Small C In this issue he includes a quick and easy file display program ith the cur
127. cable 8 ST 4038 0c000e 529 Taiheho external 3 12 105 150W power supply 55 Enhanced keyboard 59 386 16MHz 2MB 1599 ST 251 40MB 429 Everex 2400 external 195 Logimouse C7 75 XT keyboard o o 49 WD HD floppy controller 149 Reader Service Number 42 MICRO CORNUCOPIA 40 Mar Apr 1988 53 Gary L Mellor 10100 Independence Ave Chatsworth CA 91311 818 709 1057 source Level Debugging In Turbo C An Easy Way To Catch Creepy Crawlers It s easy to tell the difference between an ex perienced C er and a beginner The first knows the value of a source level debugger The second soon finds out If the introduction of Turbo C has con vinced you to try your hand at this powerful lan guage you should stop whatever it is you re doing such as reading this intro and read on ike thousands of others I purchased ver sion 1 0 of Borland s Turbo C It s easy to develop programs in the Turbo environ ment but once the program is ready to execute you re on your own Having been thoroughly spoiled by source level debuggers on other machines 1 found ad ding print statements and recompiling to be very tedious and frustrating What 1 needed was a source level debugger that would work within the Turbo C environ ment After giving it some thought I decided to put together my own debugger It needed to 1 Display the source listing 2 Display local and globa
128. ce level debugger C Sprite and an editor separately At Comdex Lattice displayed a fancy windowed source level debug ger They say it will compete directly with Microsoft s Codeview Compiles are slow and execution times are slightly longer than average Floating point performance is an excep tion being very quick Lattice had the worst display I O of the group Lattice includes a large library which has many useful functions for data con version and manipulation There are many third party libraries available too Interestingly Lattice is the only non Microsoft compiler in the set which is compatible with the Microsoft Windows Developer s Kit In the CODEQUAL test of code generation Lattice showed its was miss ing some common optimizations Al though it does use a SHL instead of a multiply in the line k k 4 it employs the shift using the CX register after loading CX with 2 rather than the faster pair of single shifts SHL x 1 Like several other compilers there is a significant amount of initialization code before the putchar call Manx Aztec C Developers Kit v4 10a Manx produces C compilers for everything from MS DOS to Amiga to Apple along with cross compilers They even sell older versions of their com pilers at reduced prices The manual comes in an ill fitting three ring binder The main manual was written for a much older version of the compiler so they ve added a large ad dendum
129. ck Ver 1 0 110 Online help and reference when you need it THE BEST QUALITY C PRODUCTS AT THE BEST PRICES ORDER TOLL FREE 800 356 0909 IN NEW YORK CALL 800 341 1950 EXT 889 FREE PC Write V2 71 complete word processor or Spectacular Two Player Real Time SPACEWAR V1 71 with every order FREE No charge for UPS Ground No surcharge for VISA or Mastercard 24 hour 1200 Baud order line 914 241 9324 e Customer Technical Support 914 666 8119 No APO FPO or international orders 30 day money back guarantee on unused items with intact seals The C Store Suite 277 487 East Main Street Mt Kisco NY 10549 0110 Reader Service Number 53 MICROCORNUCOPIA 40 Mar April 1988 57 By Laine Stump Redhouse Press Merkez PK 142 34432 Sirkeci Istanbul Turkey PC Keyboards The Real Truth Laine tangles with keyboard interrupts only to discover that some of his keys can t be trained to roll over very once in awhile I come up with a few problems that really bother me and I just have to tell someone about them The kind of problems I m talking about are 1 software that doesn t work like you think it should and 2 hardware that doesn t work like you think it should In the last three months I ve bought several of both I thought I d take this chance to warn you before you make the same mistake Software Incompatibility First software Major complaint Borland TSRs W
130. ckwise And what if that graphics processor loved doing 3 degree rotations You get the picture You know how slow Windows is TI has developed 34010 firmware which speeds up Windows by an order of mag nitude Anyway the 34010 and it s successor 5 MIPs 32 bit data bus 50 MHz look like real answers to graphics horsepower problems Plus as true processors they should make it possible for current graphics devices to support new graphics languages After all it ll just require software For more information on the 34010 contact Texas Instruments PO Box 809066 Dallas Texas 75380 800 232 3200 A Disassembler While the 34010 is a fancy chip produced by a large corporation as an answer to an industry wide problem I a found another product at Comdex that helps solve a very old problem for a rela tively small group For me this is as in teresting a product as the 34010 It s called Sourcer Feed it an 8088 or V20 or 80186 or 80286 or 80386 COM or EXE file and turns it into source Well commented source Hey now how is a disassembler going to comment the code It can comment the code because it assumes the code will run on a com patible OK that provides the DOS and BIOS calls It also makes up to five pas ses through the code digging out data including index tables marking calls to subroutines and in a crude way actual ly running the code I asked Frank van Gillu
131. cluding free of charge Borland s red hot Turbo Lightning software with each keyboard Now when using SideKick WordPerfect Micro soft Word 1 2 3 or most popular programs our Turbo 101 Keyboard will check your spelling as you type gives you instant access to Random House s 80 000 word Concise Dictionary and 60 000 word Thesaurus and much much more Ligbtning s good enough to make programmers and users cheer executives of other software companies weep says Jim Seymour of PC Week Sold separately Turbo Lightning retails for 99 95 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 Reader Service Number 8 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 SPECIAL OFFER ONLY 149 95 FOR BOTH KEYBOARD amp SOFTWARE Includes 30 day money back guarantee
132. compiler which generates a significant chunk of code to initialize buffers before a call to 14 MICRO CORNUCOPIA 40 Mar Apr 1988 putchar Microsoft Optimizing C v5 00 Microsoft C has been one of the lead ing compilers for some time and is con sidered by many to be the best MS DOS C compiler The automatic installation program is well documented and very flexible Environmental variables help the compiler find its components and libraries and one variable even stores default compiler switches This compiler uses over two megabytes of hard drive when fully in stalled but it can also be installed for floppies I wouldn t recommend it if you don t enjoy disk swapping exer cises Microsoft distributes generous documentation You get five manuals four in three ring binders and one paperback They re well organized with classy print and many examples Of the group this is the most professionally documented This package includes the Codeview symbolic source level debugger LINK LIB and several miscellaneous utilities Codeview is currently the premiere MS DOS debugger although that may change as other companies such as Lat tice and Borland create their own The code was outstanding better than the rest of the group on most benchmarks It never came in lower than second place in executable code speed Compile times were slow but Quick C see below included in the package compiles very quickly
133. cor field by field control with instant screen 2 access For Turbo Pascal Turbo POWERTOOLS PLUS 129 00 sem Screen and window management including EGA support DOS memory control ISRs scheduled intervention code and much more ae Now supports Turbo Pascal 4 0 Turbo ASYNCH PLUS 129 00 Interrupt driven support for the COM ports I O buffers up to 64K XON XOFF up to y 1 9600 baud modem and XMODEM control a E Now supports Turbo Pascal 4 0 e le do om PASCAL TOOLS TOOLS 2 15 00 ss Expanded String and screen handling graph ics routines memory management general iooi o program control a E For MS Pascal ASYNCH MANAGER 175 00 Full featured i interrupt driven support for the oS COM ports 1 0 buffers up to 64K XON XOFF up to 9600 baud modem control and a XMODEM For MS Pascal ie KeyPlayer 0 49 95 Super batch program Create batch files 0000 which can invoke programs and provide create demonstration programs analyze key o board usage gt pees EXEC AE L882 gosage ae NEW VERSION Program chaining execur os aii e tive Chain one program from another in dif a ferent languages specify commpn dala areas oe ae sess in mache ee RUNOFF E 549 95 EN e Text Scar fae all programmers flexible a 2 printer control user defined variables index _ generation general macro aci Crafted Sas e zin Tu
134. d the procedures ChkMin and Chk Max These are all globally available to any program or UNIT using MinMax In the IMPLEMENTATION section I declare variables MaxCnt and MinCnt and the function TotCnt These are not available outside the UNIT The coding at the end of the UNIT appearing as the main body of the UNIT is the initialization section It s optional but if present it will be ex ecuted before the main program This lets you initialize variables or poke at the hardware before main program ex ecution A UNIT is included in a program or another UNIT through the use of the new statement type USES The USES statement is placed at the front of the program or UNIT in the fol lowing manner Program CheckBook Uses Crt MinMax or Unit Balance Uses Crt MinMax In the above examples the program CheckBook and the Unit Balance both use two UNITs The INTERFACE sec tions of the Crt and MinMax UNITs will be included in the program CheckBook and the UNIT Balance as if they had been declared within the program or UNIT Note that a UNIT is not an include file A UNIT is separately compiled and stored on disk in binary form ready for the compiler to reference whenever it sees a USES Turbo Pascal 4 0 contains a library of pre defined UNITs The UNIT names and their functions are e System This UNIT contains all of the standard UNITs and func tions of Turbo Pascal System gets linked into every program
135. d they weren t selling onesies Tracking The Market First a look at what s happening and why Computers are getting faster memories are getting larger and there s more software There I said it Again What s driving the market is chang ing however Instead of discussing whether 64K of RAM is really necessary we re talking about displaying graphics at 1 024 by 1 024 with 64 colors or 256 colors or 32 000 colors or Meanwhile scanner manufacturers 26 MICRO CORNUCOPIA 40 Mar Apr 1988 are releasing the first units which handle grey tones at 4 or more bits per pixel No longer content to dither Now lets see 1K by 1K at 1 bit per pixel is 1 megabit At 8 bits per pixel it s 1 megabyte At 32 bits per pixel it s And that s just a single screen image Tie together image scanning editing display incorporation into a document and printing and you re talking about heavy duty processing Really heavy duty There was a small out of the way room at the convention center TI rented it and lined it shoulder to shoulder with living breathing and sweating desig ners They were showing off new products using the 34010 graphics processor You know the one Dean Klein wrote about in Issue 39 The race for the standard graphics en gine has been between Intel s dedicated graphics controller which can rotate size fill in a flash and TI s 34010 a real microprocessor with very complete instruc
136. der call 1 800 888 8087 or 503 382 5060 or use the prepaid order form bound in this issue The C Store EVERYTHING FOR THE C PROGRAMMER PLUS Free sorrware LATTICE C COMPILER Ver 3 2 229 The classic DOS development environment MICROSOFT C COMPILER Ver 5 0 269 Innovative CodeView debugger make more TURBO C COMPILER Ver 1 5 69 Fast full development environment bargain INSTANT C INTERPRETER Ver 3 0 379 Instant linking execution and debugging Directly link Microsoft Lattice libraries C TERP C INTERPRETER Ver 3 0 229 Virtual memory support versions for all compilers PC LINT Ver 2 10 99 Shake out C bugs before compiling neat PANEL PLUS Ver 1 0 w source 379 Complete screen I O development no royalty WINDOWS FOR C Ver 4 14 149 WINDOWS FOR DATA Ver 2 06 229 Flexible fast high quality windowing system GREENLEAF LIBRARIES Functions Ver 3 10 Communications Ver 2 10 Data Windows Ver 2 10 Data Windows With Source Seasoned reliable library leader of the pack CTREE Ver 4 1 RTREE Ver 1 1 CTREE RTREE Package One of the fastest B trees handles networks BTRIEVE Ver 4 1 179 XTRIEVE Ver 3 02 179 XTRIEVE report option Yer 3 02 99 innovative performer fault tolerant B tree dbVISTA with Source Ver 2 21 389 dbQUERY with Source Ver 1 0 389 Very fast portable B tree SQL query option NORTON GUIDE C Ver 1 0 69 NORTON GUIDE C ASM Twin Pa
137. des such functions as serial port I O and fast screen displays Figure 1 Results Of C Compiler Tests results are os lt obj size in bytes gt es lt exe size in bytes gt ct lt comp time in seconds gt rt lt run time in seconds gt Compiler Unfortunately the product did not live up to its documentation Two of the benchmark programs FXREF and CRUNCH would compile but did not execute properly There was some problem with recog nizing end of file in the gets function so FXREF simply read past the end of file into never never land As for CRUNCH it sent my PC into a hard crash after doing the equivalent of a Control PrtSc Execution times of the other benchmark programs were much slower than average and programs were quite large In the code we see a number of as sembler instructions used in the in itialization of the putchar I O buffers as in TurboC and MS C Upon return from the call to putchar this compiler uses a pair of POPs to clear parameters DryStn Grind Crunch FXRef Display DiskIO AllocMem Loops Sort Borland Turbo C v 1 0D standard Borland Turbo C v 1 0D 2 516 23 062 10 9 50 5 2 511 23 062 10 6 1 084 20 060 7 2 5 2 1 084 20 060 6 7 1 672 7 520 10 1 41 7 1 640 7 504 9 7 optimized C Ware DeSmet C v 3 03 Comp Innov C86 v 1 09g no opt Comp Innov C86 v 1 09g optimized Datalight Optimum C v 3 12 standa
138. dified StartPrinter and Scan routines from the implementa tion module of ScrnStuff This mini mizes the jitter but it is still present This should probably be combined with a routine that waits for the end of a reference black area put on the left of the picture before starting the scan One of the features of this scanner that was obvious even before the project began is that it s slowwwwww Once you ve got the adjustments made to give full scale readings 0 15 from black to white it s most economical time wise to just scan an image once save the data to a disk file and then do any image processing on the file There is a disadvantage to this at 4 bits input per pixel a full Hercules screen of 720 X 348 pixels packed 2 per byte is 125 280 bytes Figure 2 is last column s basic cap ture program modified slightly It prompts for a picture file name opens it then as each scan line of data is cap tured it gets packed into a temporary array and written to disk Very few changes to this code are needed to read from the file and display the data on the screen Also the processed data could be read directly from the screen memory and written to disk For that it s not necessary to worry about the screen interleave just blast it out to a file Processing I promised Id get into image 78 MICROCORNUCOPIA 40 Mar April 1988 processing this time but there won t be room for much more than a few con c
139. e This is a C issue right So we ve asked Eric to help us bash assembly language right Wrong 96 Last Page MICROCORNUCOPIA 40 Mar April 1988 3 THE MICRO TECHNICAL JOURNAL MICRO CORNUCOPIA Editor amp Publisher David J Thompson Associate Editors Gary Entsminger Cary Gatton Technical Department Larry Fogg Director of Advertising Laura Logan Accounting Sandra Thompson Order Department Tammy Westfall Graphic Design Carol Steffy MICRO CORNUCOPIA ISSN 0747 587X is published bi monthly for 18 per year by Micro Cornucopia Inc 155 NW Hawthorne Bend OR 97701 Second class postage paid at Bend OR and additional mailing offices POSTMASTER Send address changes to MICRO CORNUCOPIA PO Box 223 Bend OR 97709 SUBSCRIPTION RATES 1 yr 6 issues 2 yr 12 issues 3 yr 18 issues 1 yr Canada amp Mexico 1 yr Other foreign Make all orders payable in U S funds on a U S bank please CHANGE OF ADDRESS Please send your old label and new address MICRO CORNUCOPIA P O Box 223 Bend Oregon 97709 CUSTOMER SERVICE for orders amp sub scription problems call 503 382 5060 9 am to 5 pm Pacific time M F For technical help call 503 382 8048 9 am to noon Pacific time M F RBBS 24 hrs 300 1200 2400 baud 8 Bits No Parity 1 Stop Bit 503 382 7643 Copyright 1988 by Micro Cornucopia Inc All rights reserved ISSN 0747 587X 4 MICROCORNUCOPIA 40 Mar April 1
140. e MVI for the move of an im mediate constant into a register etc This makes assembly language code more closely resemble high level lan guage code Historical note The designer of the first 8086 assembly language wanted it to resemble high level language even more closely than it does He proposed an in fix notation with the equals sign as a valid synonym for MOV for example MOV AL 6 would have been coded as AL 6 This notation was vetoed by management and marketing I wonder if they vetoed the idea to make assembly s similarity to high level language less obvious At the same time Intel was saying that assembly language would be MICRO CORNUCOPIA 40 Mar Apr 1988 43 come obsolete within a few years 8086 assembly language has adopted one of the most valuable and wonderful of high level language features the recognition of long symbol names up to 32 characters This really improves program clarity You can use complete English words for procedure and vari able names Symbols in the old assembly languages were limited to six characters forcing gross abbreviations PRTCHK ENEIOT etc Ironically the situation has been reversed our Xenix based C compiler limits symbol names to seven characters More precisely longer symbols are al lowed but they must differ in the first seven characters The limit is seven not eight because the compiler prepends an underscore to all user symbols Of course thi
141. e command line arguments and how to declare functions To look at textfile txt enter A gt view textfile txt If you omit the textfile txt VIEW will ask you for it Runtime Library The runtime library is contained in two files CALL ASM containing the math and logic routines and IOLIB ASM which con tains the input output routines Files must be included in the correct order STDIOA H must be first then IOLIB ASM and finally CALL ASM STDIOA H contains definitions but no executable instructions IOLIB contains an ORG pseudo op as well as command line parsing If IOLIB ASM doesn t precede CALL ASM neither the compiler nor the assembler will complain but you will get an INVERTED LOAD ADDRESS error message when LOAD tries to create a COM file File Declaration Files in full C are normally declared in terms of a pointer to a structure something like this FILE infile where FILE is a typedef defined in the standard header file In Small C files are referenced by a file descriptor which is declared as an integer int infile infile contains the value returned by fopen fclose getc and putc then use this value to specify the file First VIEW checks the command line argc tells VIEW how many com mands the user entered and argv con tains the actual entries In full C the syntax for declaring argc and argv is int argc char argvl or int argc char
142. e default type int and specify floating point or character data formats The following command lines print float xxx print char yyy display xxx as a floating point number and yyy as a single character The pointer operator may be used to MICROCORNUCOPIA 40 Mar April 1988 55 reference pointer data print int zzz which uses the contents of zzz as a pointer to an integer value and displays that value The command line print char yyy will display the null terminated charac ter string pointed to by yyy You may also specify single dimensioned arrays by using the format print char yyy 2 or add and subtract single constant of fsets with print int zzz 2 print int zzz 2 No Locals Unfortunately Turbo C does not supply any information on local vari ables In fact if you do not turn register variables off compiler option r some local variables aren t even stored in local memory and are maintained in SI and DI for the entire function The PRINT command does have a mode that allows access to local vari ables or passed parameters using pseudo register _BP much the same way an assembly language debugger would access them using the BP register Let s assume the function int func pl p2 int pl char p2 float vl int v2 The normal C function call method will cause p2 and p1 to be pushed onto the stack followed by the return ad dress The first line of t
143. e programs are in comparably better than the best high level language programs They match high level programs in reliability read ability and speed of development And they far surpass high level programs in execution speed and code size MAILBASE SYSTEM Productivity Software for DBase Wordstar Ventura Publisher e Letters forms contracts e Production e Record keeping Grouped repeated work variations Secretarial or professional use e Meeting management e Desktop input e dBASE file organizer e Develop your own specialized system with no pro gramming Constant or on the fly formatting e Stackware with standard programs Painless construction of general letters customized contracts tabbed tables for Ventura Publishers etc from dBASE ll or Ill files Use any version dBASE amp Wordstar MM Track meeting participants contracts business letters automatically make action summaries Over 5 years of practical development Never again type anything twice MS PC DOS but also an Apple Il CPM Softcard version not 7 5 disks FEATURES 1 Use any dBASE file amp fields up to 214 characters or numeric 2 Automatically track outgoing multi copy letters amp variants 3 Select any fields at run time for letter integration adjacent fields for block text 4 Branch to alternate letters in a single mallmerge pass then summarize regional actions 5 Copy any fields to subsequent records either o
144. e they can get out their order pad Of course if you were too quick not unusual on your first time you ll have to call them back Hello my address is It s best to give them the number of a Of course it still comes down to sales return for the dollar spent If something makes money continue it And hopefully you ll find it before your money runs out And finally good luck There are lots of people doing very very well in this industry They are the people who find their P O box full of checks every day That s magic Real honest modern day magic SOG VIT July 14 July 16 Bend Oregon Rafting small post office box One they can t stick a salesman into But you forgot to mention that so you call again _ Don t bother to send a salesman the box is too small After the media kits arrive you can compare them in the privacy of your own home Calculate the cost per thousand Then estimate the percentage of readers who could use your product That gives you the true cost per thousand The point is to make that cost as low as pos sible Software Developers We need your program Do you have a program that s good enough to sell but don t want the problems or financial risk of producing typesetting printing packaging warehousing marketing distributing and sup porting a product Why start your own software house We ve done it for you Merlin Publishing Group is now accepting su
145. eatest designers forum you could imagine Back It Version 3 0 Y ve been watching for a good backup utility for a long time I even purchased one of those 600 tape backups that hooks to a floppy controller It didn t work I went back to MS DOS s BACKUP and RESTORE Free but not worth it Back It is a backup utility that corrects its own data and works incredibly fast However it has a menu system whose organization takes a little getting used to This appears to be a classic case where the programmer is too close to the package to see a new user s problems The disassembler 1 covered in the Comdex report was much easier to use than this backup program The program shouldn t require a lot of thought You should be able to point to some files specify a destination drive and turn the program loose The less fuss the better Requirements Apparently Back It expects a 765 floppy controller usually not a problem and apparently it expects XTs to be running 4 77 MHz If you can t verify a COPY because you speeded up your system and are no longer meeting setup and hold time on your floppy controller then Back It gets strange Southern California New York Washington sag Dallas Seattle and other major cities oe without blig Presentation Quality Graphics For Printers and Plotters Screen Graphs for Fast Previews Curve Smoothing Interpolations Gips to Mies Mtie la a Legends Placed Anywhere Built In Editor Auto
146. ebugger Works Now that we have seen what the debugger does let s take a look at how it works We initialized the debugger by calling the function debug_init from the main program and passing it the name of the program The initialization routine then begins reading the map file looking for the publics list Once it has found the publics list the initialization routine passes each line to the function addsyms which adds the public symbols to the debug symbol table Addsyms makes sure it s adding only data symbols by checking that each line s segment is equal to the data segment Addsyms allocates the space re quired for each new symbol entry on the far heap saving the far pointer for the newly allocated entry in the old last entry structure This creates a linked list to all of the symbols starting from the first symbol While not the most effi cient way to build a symbol table debugger searches are infrequent enough so that linear searching of the table to find a symbol is not a problem Once the space has been allocated and the link created the symbol offset and name are stored in the new entry along with a zero in the link field to in dicate the end of the table Also in order to remain consistent with the source listing the leading underscore is removed from the symbol name and up to 32 characters are saved to remain consistent with Turbo C s default for significant identifier length Creating The Line Num
147. ed a way to keep your Seagate drives the half heights running In stall an autopark routine after 30 seconds without a drive ac cess it parks the heads on the innermost track If something happens to the power and the heads are on the inside track there s no chance something will happen to the drive s guard band If something does happen to the guard band the drive will step back to track 0 and then try to keep going Usually it s be cause the heads were already at track 0 when the drive was started up When the head tries to back out past track 0 it hits the stop And if the stop has shifted the head won t find any thing So the head assembly starts banging repeatedly against the stop making a terrible ratcheting noise until the stepper motor dies If you hear the clatter turn off your system instantly if not sooner Take out the drive and underneath near one corner you ll see the stepper motor You ll also see the end of the stepper motor shaft pointing at you The shaft should be fully clockwise You want to turn it fully the other way counterclockwise to move the heads far away from track 0 The shaft doesn t stick out so you may need to be ingenious Now fire up the system Hopefully you won t hear that awful clatter If things are okay copy everything off the drive If you re using MS DOS s BACKUP make five copies at least Thanks Dusty SOG VII The Systems Design Conference
148. efined objects for the PC It s Pfor Ce from Phoenix the ROM BIOS People I found many problems with the package and at 395 list it seemed like a bust But then I discovered they had included source code So at 209 Programmer s Paradise price it might be worth it but I don t trust the code Or you can get the DAIMS source code on the Micro C bulletin board and the Advantage people are preparing their own public domain package another reason I like them The Book There s only one book about C Stroustrup said he had to choose be tween writing a novice expert or implementer s guide He wrote an expert s guide Chapter one is probably the most dif ficult It uses concepts which are intro duced much later in the book I suspect the author wanted to catch your attention by introducing all the powerful features right off but it s con fusing I recommend starting at chapter two two through four are a review of C and C enhancements Then tackle chap ters five through eight They cover C specific features Then try chapter one Stroustrup claims that people are working on six books most of them in troductory The Future What we need is a system which helps the programmer organize his code in a sensible manner without adding a burden C is an ideal candidate since it has the object oriented code organiza tion of languages like Smalltalk but it retains the efficiency of C Stroustrup cl
149. em 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 0k 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 PC Tools Deluxe by Central Point Software Fantastic Norton Mace Fast Back all in one 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 kkkkkkkkk kk bk kok bk kb bb A Four Device Printer Data Switch Quality with economy These four port boxes can be used with either RS232 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
150. epts The simplest processing you can do with the data is to alter the contrast based on the input values At the places in Figure 2 marked with gt I m doing just that The first place initializes the assembly character for either black CHR 0 back ground or white CHR 255 At the other mark the black white status of each captured pixel is set based on its value Experiment you will get significantly different displays for different values Dithering No this is not what you do when you re trying to get a better deal on a car Dithering is a technique to get ap parent gray scale from black and white dots The idea is to work with blocks of pixels the number of lit pixels being proportionate to the brightness of the block If we decide on a 2 X 2 pixel block five brightness levels can be represented by 0 1 2 3 or 4 lit pixels What a coin cidence The scanner provides us with five brightness values Of course the image will be of lower resolution but visually it will be much more pleasing and natural Now some serious decisions We can either reduce the number of captured data points by a factor of 4 and just ran domly light the proper number of pixels or process the larger database to provide the proper values Although it s more work the second alternative works better Image Enhancement Another relatively simple technique for improving a scanned image is to do a nearest neighbo
151. equivalent to Modula s IMPORT statement is the USES state ment If you change a module s interface section you ll have to recompile all the modules which call it So the Turbo 4 system has make and build Build recompiles all units used by your program make recompiles only those which are affected by changes in units they im port The built in linker is a smart linker It dis cards all portions of a unit not used by the im porting program Since all of Turbo s exten sions and some of the fundamental language features are contained in units minimum program size can be very small indeed Going to the other extreme since each unit can have a full 64K of code a Turbo program can have a full 640K of code Since the 64K limit on code was removed Borland also removed the overlay facilities This may or may not be the best idea I can envision situations in which you would want to be able to have over lay capabilities even in a relatively small program Since the linker can also handle standard OBJ files produced by other languages C as sembler Modula it is easy to include modules developed outside of Turbo Unfortunately the compiler will not produce OBJ files for use by other lan guages Perhaps Borland plans for Turbo Pascal to be the primary lan guage with the other languages provid ing an assist now and then Graphics I ll get into the specific language fea tures in future
152. er What you get in return are pages ready for the print shop And you ll get them for less usually 1 5th the price of the old fashioned graphics services Of course when it s time to revise the piece the old fashioned methods aren t even worth considering Services Include e Graphic Design e 300 dpi Proofing e 300 1270 2540 dpi Final Art e Illustrating e Scanning e Schematic Drafting Technical Editing Proofreading For more information contact Micro Cornucopia PO Box 223 Bend Oregon 97709 503 382 8048 Why are serious PC software developers demanding Serengeti wW Me j Software Lnn Because Show Me is the NEW must have tool for today s PC programmer With this memory resident file windowing utility see your productivity soar as you view as many as four files at once instantly in ASCII EBCDIC or hexadecimal at the touch of akey m escape that caged in feeling while programming in Turbo Pascal Turbo Prolog Turbo C Turbo BASIC QuickBASIC 4 0 dBASE BASICA and similar programming environments and work with up to four additional program files at once complete with copy amp paste print and search capabilities m view multiple source and listing files in up to four windows while using CodeView DEBUG SYMDEB and other debuggers great for assembly programming m peek at any ASCII file including Wordstar document files and easily paste all or part of a file into virtual
153. erations were quick Only on those benchmarks featuring floating point operations did it fall behind nearly to last place Unique among the compilers reviewed Datalight provides a list of known compiler bugs with possible work arounds No compiler is truly bug free and 1 commend Datalight for their honesty You get complete library source code free with the system The library is com plete to UNIX V standard but lacks many of the newer functions included in the ANSI draft It also includes several special functions such as fast video display and mouse interfacing Since Datalight produces Lattice com patible object modules several third party libraries are available Code wise Datalight does some uni que things like stripping local variables from the stack by ADDing to the stack rather than using BP to store the stack status Datalight does automatic register allocation when optimizing So it as signs the variable k to a register DI rather than the inner loop variable Why the compiler then moves DI to AX shifts AX for the multiply and then moves the value back to DI is a mystery It would be much faster to simply shift DI EcoSoft Eco C88 v4 02 This inexpensive compiler features excellent compatibility with the emerg ing ANSI standard Although installing the system was relatively easy defining the proper en vironment variables was not due to several spelling and syntax errors in the manual The ma
154. esk PC AT Chassis Rack amp Desk Models Accepts PC XT AT Motherboards and Passive Backplanes Doesn t Look Like IBM Rugged Modular Construction Excellent Air Flow amp Cooling Optional Card Cage Fan Designed to meet FCC 204 Watt Supply UL Recognized 145W amp 85W also available Reasonably Priced Call or write for descriptive brochure and prices 8620 Roosevelt Ave Visalia CA 93291 209 651 1203 TELEX 5106012830 INTEGRAND UD EZLINK 62926572 We accept BankAmericard VISA and MasterCard IBM PC XT AT trademarks of International Business Machines Drives and computer boards not included Fill in your back issues of Micro C today 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 Sp Si Son Be me ading Kaypro II to Upgrading Kao 4to8 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 Recovering Text From Memory 52 pages ISSUE 17 4 84 Voice Synthesizer 820 RAM Disk Kaypro Morse Code Interface 68000 Based System Review Inside CP M 86 56 pages ISSUE 18 6 84 Kaypro EPROM Programmer I O Byte A Primer Kaypro Joystick Serial To Parallel Interface
155. et the full source a 0000 ogether with the 120 page the C sour shat code for your code O cad E Y manual and full sourcecode FREE application Only 49 95 State Turbo C or Quick C version Ti 50 C E Only 49 95 State Turbo C or Quick C version Professional applications o ed programmers will find this F l GAMES versatile utility and it s associated wt Have you ever wondered how _ functions invaluable NEW C VIDEO to write a chess program Now we Comes complete with a reveal the secret algorithms and techniques of the masters with this prieto bb e manual and Now learn C the easy way dynamic Games toolkit Get the Complete C Video Only 49 95 State Turbo C or Quick C version Course from Zortech Inc The package comes complete together with our big 220 with the full source code to three e workbonk ready to play games of strategy NI pag i Chess Backgammon and Wari Yes Ten I hour tapes 36 lessons an ancient African game Rush me Easy to follow course you get these items an excellent introduction to A comprehensive the C language 150 page manual Y E HOTKEY Takes you step by step up to COMMS is provided giving an in gt E a y the intermediate and depth look at the history structure and program Y E PRO SCREEN AN advanced levels M WINDOWS _ GAMES Teach yourself at home or the design of such Strategy Games Jd SUPERTEXT O C VIDEO office at your ow
156. eturn from the breakpoint so that after execut ing our restored instruction we execute the single step handler via vector 1 This of course again replaces the in struction with the breakpoint resets the single step flag and off we go When we want to step through a C program we don t need to stop the processor on every instruction as we would in assembly language because one line of source may produce a lot of instructions Instead the STEP func tion sets a breakpoint at the first in struction from each line of source code More Details In order to avoid conflict with other debuggers like Microsoft s Debug the command line routine restores the old interrupt vectors and returns a value of zero when there are no breakpoints set This tells the break handler not to set the step flag when returning from the interrupt If it did the step interrupt would be serviced by whoever had that vector previously This might confuse things a bit or even cause the system to crash An interesting problem arose from allocating the symbol table in far memory I simply could not understand why the SYMS command would list the addresses but give blanks for all the symbol names It finally occurred to me that if I had a pointer table to a structure allo cated in far memory the address of a character array within that structure table string was also a far address and could not be passed to the normal st
157. eviation drive full_pathname n where abbreviation the abbreviation for the full path name drive the disk drive designator for the search full_pathname the full MSDOS pathname desired n a newline terminates the data for each possible directory Example tut c lessons prog tutorial When the user types go tut the user is moved to the lessons prog tutorial directory on drive C Argument list FILE fp a FILE pointer to the open file char where a string constant that is the short name for the directory desired Return value int 0 if successful 1 on no match int search_file FILE fp char where char ptr temp MAXBUFF int c i i 0 while c fgetc fp EOF if c An buff i char c continue buff i 0 strcpy temp buff ptr strtok temp if strcmp ptr where MATCH ptr strtok char 0 Get the disk drive strcpy drive ptr strcat drive ptr strtok char 0 Get the full path name strcpy path ptr return MATCH and we re done Shipping 7 50 i 0 No match start over TOTAL Name 7 return FAIL Address 5 an City o o State m Zip Phone eet a BAS Ce software 13810 Champion Forest Dr 235MC Houston Texas 77069 713 588 8184 Function attempts to open the data file that holds the information about the directory locations It does this by searching the PATH Reader Service
158. ey and Drop Kick for every Tom Dick and Jerry to stuff into their Big Kat Then we d have that many more programs to be incom patible with Laine s note maybe I should write a TSR program called SideTrack which would jolt the keys with 110 volts whenever it detected my writing digressing into another bitch session Back to the subject below Custom Interrupt Services If we want we can easily replace the standard scan code conversion and storage with whatever action we like All we need to do is write a new inter rupt service and point to it with INT 9 Figure 2 is a C program which does just that The new interrupt 9 simply keeps track graphically of which keys are cur rently pressed and which are not I originally wrote the program to test the n key rollover of various brands of keyboards Installing interrupt vectors in Turbo C programs has been beat to death the last couple issues and grateful I am that it was saved me a lot of guesswork so I won t get into those details either I will say however that the C version of this program is much cleaner than the original which was written in Turbo Pascal when I heard that this issue was going to be a C Issue I couldn t resist rewriting it Figure 3 is VIDEO H the header file for my own private set of video output functions for use with Turbo C Figure 4 is VIDEO C the actual code for the video routines and Figure 5 is KBDTEST PRJ the project
159. g that one line change to one of your nine source modules and having Turbo compile it and link it in under 13 seconds Wow Other compilers have supported modular compilation for years but not to this degree Let s take a closer look at this module concept as used by Turbo Pascal 4 0 UNITs And USES To understand the Turbo 4 0 version of modules we have to look at the UNIT The UNIT was first implemented by the University of California at San Diego in their UCSD Pascal A Turbo 4 0 UNIT is basically a col lection of data definitions and proce dures compiled together and stored on disk as a TPU Turbo Pascal Unit file Each UNIT contains its own code seg ment that may be up to 64K bytes long By combining segments you can create a program which can use up to 640K of memory A Turbo Pascal UNIT has two parts much the same as a Modula 2 module 1 The INTERFACE part containing the constants types variables and headers all of the things other UNITS will need to see 2 The IMPLEMENTATION part containing internal declarations as well as the actual procedures and functions The IMPLEMENTATION part may also contain some UNIT initialization code In Figure 1 I ve declared a UNIT named MinMax When compiled the resulting code will be placed in a file called MINMAX TPU This UNIT has declared in the IN TERFACE section the constants Min and Max the variables Total and Error an
160. 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 4 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 x x x 15 00 or two for 25 00 five for 50 00 135 00 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 Reader Service Number 10 By David Thompson I m probably the best guy to write this article be cause I see the selling side of advertising with Micro C and I see the buying side of advertising we advertise Micro C in magazines a card deck and direct mail Of course having a magazine also makes me the worst guy to write this article I m biased K you have the best new product ever Its impact on the computer world will make Intel look like just another parts house You ve sent copies to all conce
161. gning A Database Part 2 Interrupts On The PC Hacker s View Of MS DOS Vs 3 X Digital To Analog Conversion A Designer 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 ISSUE 38 11 87 Parallel Processing Laser Printers Typesetters And Page Definition Languages Magic in the Real World Build a Graphics Scanner for 6 00 Part 2 Writing a resident program extractor in C 96 pages ISSUE 39 1 88 PC Graphics Drawing the Mandelgrot and Julia Sets Desktop Graphics Designing a PC Workstation Board Around The TMS 3410 96 pages
162. goesinta and a goesouta and inbetween it should make some kind of sense Pascal C even BASIC work like I do But these languages don t think back track You can t just throw a problem at them and ask them to muddle through At this year s Silicon Northwest Press Reception yep another party I was within 10 feet of the supply of fresh crab when I found myself face to face with Paul Voda He was standing at an other wise deserted table holding up a small plain manual and smiling What s that I asked Trilogy he beamed What s that I asked My timing has never been good This time it was terrible If I d loaded up with crab and then returned for a Q amp A ses sion it would have been a perfect eve ning But no It s a language that has the power of Prolog and C and the structure of Pas cal Oh boy another language I ll let him send me a copy if it doesn t have GOTOs It s a complete programming en vironment editor compiler debugger library linker It can run just like Prolog programs can ask questions con tain symbolic variables whose values are determined by backtracking Unreadable I thought But we re a lot like Pascal with a concise nested program structure rather than Prolog s hard to read clauses Plus we have case and if clauses You can just as easily write fast non backtrack ing code that reads like Pascal And even our
163. he function will push BP on the stack so after that the stack looks like this SP 6 p2 SP 4 pl SP 2 return address SP old BP 56 MICROCORNUCOPIA 40 Mar April 1988 The SP register is moved to BP and SP is decremented by 4 to make space for the locals assuming register vari ables are off The new stack including locals shown relative to BP looks like this BP 6 p2 BP 4 pl BP 2 return address BP old BP BP 2 vi BP 4 v2 Given this information locals can be displayed using the pseudo register _BP with commands like print char BP 6 to display the string pointed to by p2 and print float BP 2 to display the floating point number in local variable v1 Note that in the last two examples the constant value is used as a byte count while in the earlier examples using global variable identifiers the constant value is sized according to the normal C conventions for pointer arith metic Static variables present a more dif ficult problem because they do not ap pear in the publics list Instead they are stored in a common data area and referenced by offset during compilation For this reason the debugger cannot resolve the locations of static variables and for that matter doesn t even know they exist If you have any static vari ables in your program you will not be able to print them from the debugger unless you know where they are located in memory How The D
164. he source file Since the editor can understand tabs rather than spaces things aren t too tight Other than frizzled up cosmetics and con veniences in the integrated environment the changes took place inside the compiler First the compiler does not produce ex ecutable code directly but generates linkable object code This is then linked automatically with other object modules by the built in linker to produce the executable program The com pile and link process is fast in most cases you probably won t even notice the link The final program can be directed either to 76 MICROCORNUCOPIA 40 Mar April 1988 memory for immediate testing or to an EXE file on disk Compile errors invoke the editor at the point of the error The separation of the compiler and linker has some interesting benefits For instance you can maintain libraries of precompiled routines which then need only the link step for inclusion in new programs This is contained in the new UNIT To compare it to Modula 2 a UNIT looks very much like a module with both DEFINI TION and IMPLEMENTATION portions in the same source file In a UNIT the INTERFACE section comes first It defines all the identifiers visible outside the unit The IMPLEMENTATION part follows it contains the executable portion of the unit and can also contain private definitions No EX PORT statement is needed all identifiers in the interface section are exported The
165. hematics as well as mechanical drafting of machine parts or complete systems Fourth it helps create drawings for tech nical papers Now that we ve frightened away the non technical readers 1 might mention that PC Key Draw will even compute the areas and centers of mass for objects drawn on screen Of course you have to sit and wait a while as the 84 MICROCORNUCOPIA 40 Mar April 1988 program grinds out the numbers but would you rather dust off your old calculus book and hand crank a few complex integrals Beauties In The Beast You might be surprised to learn that this heavy tech program also has a more gentle side Kidera credits the influence of three women for PC Key Draw s graphics flexibility His mother and wife are artists his sister an ar chitect Hence PC Key Draw provides nice graphic design functions that Kidera s wife takes full advantage of She has made considerable use of the program to design logos and letter heads says Kidera The design features include font design and modification shading filling rotating scaling and stretching the ability to track text along strange curves or mirror reflect it and pixel level editing Text can be mixed freely with graphics and can be positioned very flexibly flush left flush right centered or hand placed Seeing Is Believing I like demos Kidera provides one of the best on disk demonstrations I ve ever seen Enter demo at the DOS
166. hms efficiency Knuth in vented his own language and preserits in his books the coding of all his algo rithms in that language It is of course an assembly language for his mythical MIX computer Editor s note This of course makes Knuth the original MIX master If assembly is the antithesis of decent structured code then why does Knuth force his readers to plow through all that assembler Why didn t he invent some thing like Pascal or C to code his algo rithms The answer is that high level lan guage removes the programmer from the real machine It conceals from him the final code no matter how terse the source In assembly language however a one to one correspondence exists be tween source code and machine instruc tions Terse code is almost by definition efficient code Inflexibility Of C Yet another disadvantage of C and of other high level languages is in flexibility of the compiler e Procedures and parameter pass ing The rich 8086 register set makes it rarely necessary to pass parameters on the stack Yet C al ways does this It makes assembly language interfacing to C very tedious e Memory usage My C compiler as sumes that all data fits into a single 64 Kbyte segment e Flow control Since the assembly language programmer has com plete control he can invent con trols that drastically reduce program size and increase speed For instance in my assembler I created an error escape
167. ho do these guys think they are Allah I shelled out 75 bucks for Superkey be cause I needed to do some complicated and repetitive format translation with MS WORD files From reading the manual and all the rave reviews I thought Superkey would be the fastest way to get things rolling The package gets here and I suddenly find out that it trashes my Turkish keyboard program Not only that but it also trashes the foreign language keyboard programs supplied by Microsoft with MS DOS That means I have to boot up a separate disk for typing and for running Superkey Superkey can t handle the Turkish characters because it doesn t recognize the difference between alt c and alt shift c Besides that it doesn t even have a loop instruction So much for eliminating those repetitive keystrokes A positive note WORD 4 0 has built in macro keys with looping instructions even which should solve my problems Secondary complaint I just bought MS Win dows to set up an integrated desktop for Page Maker The magazines have been talking about Windows 2 0 for months What did they send Windows 1 04 of course And does it have a 58 MICROCORNUCOPIA 40 Mar April 1988 printer driver for the printer we re using Epson LQ 800 No Even the LQ1500 driver included in version 1 03 wasn t there anymore I had to find a friend with 1 03 and copy the driver from his disk Hardware Incompatibility Okay
168. il 1988 83 118 194 55 69 195 69 Anthony Barcellos P O Box 2249 Davis CA 95617 2249 916 756 4866 Graphic Prose And Graphic Pros Tony takes on graphics and CAD as he looks closely at PC Key Draw a powerful graphics and CAD package that s available as shareware hat are the gaps in shareware s coverage of the major applications PC Write PC Type and a host of others cover word processing Pro Comm and Qmodem dial up communications PC Calc and ExpressCalc calculate spread sheets Databases are addressed by PC File or FileExpress And for computer aided design Was that a gap we just detected 1 thought so until I came across the latest release of OEDWARE s PC Key Draw While PC Key Draw may not yet be a true CAD package it s a graphics program with high level drawing functions and entry level design features Author Edward Kidera says that a sub sequent release of PC Key Draw should offer 3D drawing autodimensioning and other ad vanced CAD features but let s see what resides in the current version 3 2 Get the Picture PC Key Draw was designed for mechanical engineers Kidera s profession In the documen tation he notes that PC Key Draw helps in four areas e First it creates presentation slides e Second it helps design and layout new systems It is very easy to try a geometry and test it for a new motion compensator or similar device e Third it s great for sc
169. ile while ALLOCMEM tests dynamic memory allocation and deallocation Raw loop speed is checked by LOOPS and SORT arranges a very large array of reverse ordered numbers using a recursive QuickSort algorithm Figure 1 shows the results of the benchmark tests In the case of com pilers with optimizing passes results are shown for compiles made with standard options and those made with full optimization I ran all the benchmarks on an 8Mhz V20 based Kaypro Professional Computer with a fast Miniscribe 42 megabyte hard disk Stack checking code was disabled for ALL compilers In some instances 1 modified a benchmark program to get it to compile This was because of limited ANSI com patibility For example SORT uses func tion prototypes which are not imple mented in the DeSmet or Mark Wil liams compilers I also used a special benchmark program CODEQUAL It is a very short simple program from which 1 recovered an assembler listing of each compiler s code This gave me a com parison of the code each was generat ing As I pointed out earlier benchmarks are only a part of the story Figure 2 shows basic compiler features Note that although the ANSI C standard has yet to be finalized individual features of it e g function prototypes void etc are firmly set Let s take a general look at each package and its features Borland Turbo C v1 0D Turbo C is a spirited newcomer ar riving amid considerable anticipation
170. ile re sponse is the bardware bargain of the year says Charles Humble Oregonian Jan 86 The best part of the key board is the way it feels It s ideal And fast I ve never worked on a keyboard with a nicer touch This keyboard is neat to type on and feels solid It bas tactile feedback keys I can type much faster on it Test Drive Scorecard DataDesk 10 Key Tronics 9 Teleconnect Magazine May 86 Aug 86 IT S WHAT S UNDER THE HOOD THAT COUNTS XT KIT W 2 Floppy Drives Includes 640 K RAM Serial parallel and game ports clock calendar AT Style keyboard cabinet power supply mono graphics card and amber or green monitor Keyboard switchable turbo 8 mhz with standard slide cabinet 10mhz with lock LED Reset amp Turboswitch 699 00 XT KIT W 20MB Hard Drive Includes 640 K RAM Serial parallel and game ports clock calendar AT Style keyboard cabinet power supply mono graphics card and amber or green monitor Keyboard switchable turbo 8 mhz with standard slide cabinet 10mhz with lock LED Reset amp Turboswitch For 30MB Miniscribe add 50 00 CASES amp POWER SUPPLY 150 Watt Power Supply XT 59 00 200 Watt Power Supply AT 99 00 XT Slide Case cccce cee eee es 32 00 XT Flip Top or XT Slide with Lock amp LED 49 00 AT with Lock amp LED 65 00 MONITORS EGA CGA Auto
171. iness applications at BARGAIN prices SAVE THOUSANDS of coding hours and MONTHS of development t INCLUDES HUNDREDS of TESTED Accounting routines INCLUDES MORE THAN 60 Report formats Check formats Invoices Credit Memos Statements EDUCATIONAL Learn how an accounting system is designed USE MODULES or ROUTINES as is or modify as required EXTENSIVELY COMMENTED Code for ease of use TRANSPORTABLE TO UNIX systems Uses ANSI screen handling PASSWORD PROTECTED at users option for all APPLICATIONS PAY NO ROYALTIES t Use any or all modules or routines in your systems Introductory Offer 179 00 What you get More than 76 Business Applications Programs in the BAS C Pack More than 94 40 lines of Turbo C code Shipped on 5 1 4 diskettes in MS DOS 360K format 302 pages of manuals in taxt files for easy erine Numerous programmers utilities and batch files or compiling linking C Function Run Time ibrary Data _ file layouts Programmer s notes BONUS For a limited time we will include the BASIC source code that these programs vere derived from AT NO EXTRA CHARGE tft For VISA MC Orders CALL 1 800 824 2222rx 2 ORDER FORM BAS C Pack 179 62 Texas Residents add 7 tax search file Function reads the data file that holds the information about the directory locations looking for a match on the string passed in The format for the input file is abbr
172. ing libraries of UNITs It is called TPUMOVER This utility helps you create or add to existing TPL Turbo Pascal Library files TPL files are collec tions of UNITs For instance the stand ard UNITs reside in TURBO TPL MICRO CORNUCOPIA 40 Mar Apr 1988 49 As you can see the UNITs and USES of version 4 0 are a major departure from the Turbo Pascal that we have come to love and curse Project Management Now that you have learned how to use UNITs and you have decided that breaking your large projects into work able pieces is a great idea you have one more problem How do you keep track of all those pieces How do you remem ber which ones to recompile after a long edit session Not to worry Turbo 4 0 will remember for you Make and Build help you manage your large programming projects The Make option performs three checks when you compile a program First Make compares the date and time on all of the TPU files to the PAS files for all of a program s UNITs If the PAS file has been modified since it was last compiled into a TPU then it s recompiled Then Make checks to see if the programmer has modified the INTER FACE portion of the recompiled UNIT If the INTERFACE has changed then Make recompiles all the other UNITs that use the modified UNIT The third check is to see if changes have been made to any include files or any OBJ files assembly language routines used by any UNITs If so all UNITs us
173. ing on machines other than PCs or clones Lattice and Aztec would also be good choices I hope this review has helped you in making a decision By the time this sees print there may already be new ver sions of some of these compilers All this competition should keep newer and better products coming Editor s note Scott worked on this ar ticle for nearly three months During that time most of the packages he was reviewing went through at least one and sometimes two or three revision Even a week after ar ticle deadline he was still receiving and in cluding new versions If this review isn t current you can t blame Scott Meanwhile fire up your compilers and enjoy Those of you struggling along without a debugger should check out the Turbo C debugger article in this issue So your C ing will be that much more fun without making a spectacle of yourself Companies Borland International 4585 Scotts Valley Drive Scotts Valley CA 95066 800 255 8008 800 742 1133 In California Computer Innovations 980 Shrewsbury Avenue Tinton Falls NJ 07724 800 922 0169 C Ware Corporation P O Box 428 Paso Robles CA 93447 805 239 4620 Datalight 17505 68th NE Ste 304 Bothell WA 98011 800 221 6630 Ecosoft Incorporated 6413 N College Avenue Indianapolis IN 46220 800 952 0472 nal GR rrr er rrr ne NOVICE PROGRAMM CAN T Version B Tree File M
174. ing these files are recompiled The Build option is a special case of the Make option When you use the Build option to compile a program all its UNITs are also compiled Borland also threw in a stand alone Make utility You use it when you re doing batch mode project management The New Environment Turbo Pascal 4 0 has a new look which strongly resembles the Turbo C package Borland calls it the Integrated Development Environment I call it super The new environment features two main windows one for the editor and one for capturing program output during a RUN Either window can zoom to fill the whole screen The screen is handled in one of three modes Mono or CGA mode with 25 lines EGA mode with 43 lines or VGA mode with 50 lines Borland included several pull down menus for controlling the compiler such features as the math method paths and directories memory model 50 MICROCORNUCOPIA 40 Mar Apr 1988 You set the defaults during installa tion The editor s default command set remains faithful to the older versions of the compiler and therefore to Word Star In fact the editor is so compatible with Turbo 3 0 that it still has the old file length limitation Come on guys When are you going to finish this fine upgrade The editor also maintains a Pick File list This is a pop up menu containing a list of names for the last eight files that you have edited When you reenter a file contained
175. instruction with a two byte instruction without also overwriting the next op code In order for control to be returned to the debugger when the program en counters a breakpoint our fancy vector 3 must be assigned to an interrupt handler Turbo C makes this very easy by allowing you to declare a function as an interrupt handler and use the setvect function to assign an interrupt handler to a vector Single Stepping Assume we want to set a breakpoint at some location After replacing the op code with a breakpoint INT 3 we ex ecute the program When execution reaches the breakpoint control returns to the breakpoint handler via interrupt 3 At that point we find ourselves in the debugger s command mode Continuing however creates a slight problem we must replace the break point with the original opcode Back at the beginning we saved the opcode in our table but if we simply put back the instruction and return from the interrupt we d lose our break point This isn t acceptable You see if the breakpoint is within a loop or in a function that gets called again the program will not stop the next time through We must have some method of restoring the breakpoint after executing the original instruction This is where we learn the single step The 8088 has a bit in the flag register that when set causes the processor to generate a type 1 interrupt INT 1 after each instruction We can set this flag when we r
176. inter either I have a list I thought that braindamaged firmware went out of style with Hazeltine terminals okay okay that s a low blow But somebody s got to let you know Real Business Okay enough complaining I promised last issue to talk about a nice little program to allow you to easily input foreign characters from the keyboard of an IBM compatible machine This came up in my discussion of working overseas and what you might expect to encounter there On my way to writing about this program I kind of got sidetracked into talking about all kinds of keyboard things as well as digging out another program and doing a marathon rewrite of it in C I became so sidetracked in fact that I couldn t get it all organized in time And I was nearly suffocated by noxious fumes from my kerosene heater while typing at 4 a m to boot So it looks like this one is going to be a two parter folks For some of you IBM keyboards may be ancient history Keyboard 101 If you already know about interrupts 9 this time and 16h next time then you should just turn the page this is all review probably If the lowest level keyboard input routines you know are read Pascal and getc C then you ll learn a few new tricks When A Key Is Pressed Before we get into the usual ex amples and specifics let s talk a bit about the route that a pressed key takes through the various BIOS interrupts and DOS se
177. into your n California Run Time Debugger monitors the execu TRE code 800 552 8885 tion of a program with user defined O Upgrade Package JA break points With their new mouse Call LOGITECH for information or based multiple window user interface re ea a these powerful debugging tools are Poa cee al pleasure to ue in U S only Total Enclosed O VISA O MasterCard Check Enclosed a NEW pa oe Card Number Expiration Date NW IOG ITE z Signature Links only those routines from a A e a a LOGITECH Inc particular module that you need so Name 6505 Kaiser Drive Fremont CA 94555 Address Tel 415 795 8500 you eliminate unreferenced routines and produce smaller more compact City executable files Zip In Europe LOGITECH Switzerland Tel 41 21 87 9656 Telex 458 217 Tech Ch In the United Kingdom LOGITECH U K Turbo Pascal is a registered trademark of Borland International VAX and VMS are registered trademarks of Digital Equipment Corp Tel 44908 368071 Fax 44908 71751 Reader Service Number 12 a A Programmer s Introduction To C C Grows Up Here s C with extensibility and objects That should make the FORTH and Smalltalk people happy It also accepts standard C programs so C folks should like it At this point however it s only available as a preprocessor for standard C just one of the growing pains of this very new language ou re in a bookstore searching for Y science fiction novel one wi
178. ion to version 4 0 other Turbo Pascal users you have been anxiously waiting for the new and improved version Though the programming environment of earlier versions of Turbo Pascal revolutionized software development those versions had some significant limitations Now Borland has come to our res cue They began shipping Turbo Pascal 4 0 the IBM PC version during the first week of November The upgrade price is 39 95 plus 5 shipping and handling They have even extended their upgrade offer to owners of CP M versions Now you can upgrade your old CP M ver sion to the new PC version The sug gested retail price is 99 95 My copy of Turbo 4 0 came on three disks in contrast to one for Turbo 3 0 New and improved always seems to mean larger doesn t it The first disk contains two copies of the compiler the integrated environ ment version and a command line only version It also contains the README file with a few corrections to the 654 page manual The second disk contains some utility programs to help you manage large projects and the upgrade program to help you convert your Turbo 3 0 programs to Turbo 4 0 Yes convert I ll cover conversion of Turbo 3 0 programs a bit later You will also find several coding examples of Turbo you are like me and millions of 48 MICRO CORNUCOPIA 40 Mar Apr 1988 4 0 programs The third disk contains source code for MicroCalc Borland s freebee spre
179. ivable reviewers and more than a few inconceivable reviewers Now you re ready to advertise In a magazine Before you pick up the phone and start call ing the advertising departments of the com puter magazines you probably should know something about the business In The Past If you d placed your call a few years ago the conversation would have gone Generic Micro advertising sales depart ment At the tone please leave your name ad dress size of ad and Visa Card number Dead line is April 1 No fooling Don t be late and don t forget our blue light special on quarter page verticals Beep At least that s how the conversation felt The only additional information they d give you was circulation At that point publications com peted on the basis of cost per thousand A full page in most magazines will cost you be tween 50 and 100 per thousand readers Anyway selling cost per thousand was real ly selling price Not bad if they could adjust double or triple their circulations simply by making up numbers The only thing that kept publications from being completely creative with their circulation figures was the once a year audit No major advertising agency would consider dealing with an unaudited publication Most 100 000 68 MICROCORNUCOPIA 40 Mar April 1988 Magazine Advertising A Little Background circulation publications are audited and the auditors simply provide an independent
180. l or Computer Language you re not so likely to get lost But you ll still pay extra for a special spot assuming it s available e Look at your ad The clarity the feeling the content and the offer are so important that there are specialists who work full time in just these areas However there is one big short cut Find an ad that s really attractive and modify it to fit your product Borland s ads are probably the most watched and most copied in the industry Think twice before dropping something from the ad like screens or color or the offer like a guarantee or toll free num ber They re using those things because they work e You don t have to participate in the reader service game If you re selling something that s expensive and needs lots of explanation use reader service Otherwise it may not be worth contacting all those people I ve seen small outfits go out of business because of the cost of replying to lots of uninterested people If they re really excited about your product they ll con tact you directly On average only 3 out of every 100 folks who check off the reader service form will purchase _ Get Media Kits After you pick out a magazine you ll need to get a media kit MICROCORNUCOPIA 40 Mar April 1988 69 Pick up the phone dial the number for their advertising department it s usually in the masthead Hello I d like a media kit goodby The key is to hang up befor
181. l variables 3 Set a breakpoint on a given source line 4 Execute the program a line at a time 5 Require no special code 6 Not change program execution 7 Provide all these functions without leav ing the Turbo environment Fortunately the Turbo C manual includes enough information on the load map to make most of these possible I could manage goal 1 by opening the source file counting lines and displaying them The load map relates source line numbers to their physical location compiler option y linker option D I could also include the addresses of global symbols in the map file linker option m so we ve covered goals 3 4 and part of 2 More on this later Of course I still had to take all of this infor mation and create a debugger that met the final three goals 54 MICROCORNUCOPIA 40 Mar April 1988 Small Model In an effort to keep the debugger as small and simple as possible I used the small memory model The easiest way to make the debugger run from within the Turbo environ ment is to make it part of the executed program In this case I used a single function call to the debug initialization routine The call to the debug initializer can be placed virtually anywhere in the program typi cally near the beginning but it could be in voked by a special hot key or hidden in the startup code The debugger adds about 10K to the com piled program size And it cal
182. la but you should not have too much trouble translating to Pascal if you want I ll probably do it myself real soon now I mentioned last time that to improve the resolution of the scanner we would probably have to aperture the sensor Doing this is unfortunately not as simple as it sounds Since both the emitter and detector are recessed in the sensor and also angled relative to the front face you can t just cover the end and put a pin MICROCORNUCOPIA 40 Mar April 1988 77 hole in the cover In order to eliminate the lens effect of a pinhole any mask has to be right on the surface of the photo device I got best results with a small 02 aperture on the surface of the emitter This is most easily done with a small black donut like the ones used for printed circuit board layout They are available many places Radio Shack used to carry kits of them Bishop Graphics and Datak are other sources I found Datak 08 O D X 02 LD donuts just fit inside the front of the _ sensor and can be positioned with a toothpick The package I bought for 2 contained 800 so if you have trouble finding an equivalent send me a SASE and TIl share them There is one final problem with this preliminary hardware software system horizontal jitter Because software timing is used to wait for the print head s return trip even minor mechani cal variations can shift the start of each scan line Figure 1 shows mo
183. ld or newly appended for letter contract production 6 Make consistent structure extended data dictionaries in dB format for transparent systems management 7 Produce correctly tabbed 2 3 or 5 col tables for Ventura Publisher from any dB file 8 Other dB file management amp production utilities 2 col Harvard Publisher tables other wp s on request 9 On disk documentation manual tutorial examples letter contract skeletons Hardcopy manual 12 extra 10 Use to customize invoicing systems meeting management operations without programming e NOT COPY PROTECTED e Mail order only 10 secondary sales rebate e Money order or personal check allow ten days to clear SEND TO HARGER I N T P O Box 20 Grand Central Station JKT Pouch New York New York 10163 ONLY 45 dBASE 1 amp dBASE III are trademarks of Ashton Tate Wordstar amp Mailmerge are trademarks of MicroPro Apple ll is a trademark of Apple Computer Inc Softcard MS DOS amp Microsoft are trademarks of Microsoft Corporation CP M is a trademark of Digital Research Inc PC DOS is a trademark of International Business Machines Corporation Ventura Publisher is a trademark of Univation Inc Harvard Publisher is a trademark of Softward Publishing Corporation Reader Service Number 26 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 o VEDIT PL
184. le If we find a match further calls to strtok break the string up into the drive drive and path path infor mation and return a MATCH flag If no match is found the FAIL flag gets set If MATCH is found we call do_switch The system function per forms a command com type directive to MS DOS Therefore if drive contains D it s as if that were typed in at the keyboard thus moving control to drive D The chdir function changes the cur rent working directory to the one specified by the argument passed to chdir Since path has the full path name for our desired directory chdir puts us in that directory and returns control to main If chdir doesn t find the directory it displays an error mes sage A successful chdir ends the program and you re in the desired directory ing Not too long ago I wanted to write a CAI computer aided instruction on the C language I started out writing printf s but Tim Leslie a colleague and friend con vinced me that a better approach would be to write a Pilot like interpreter in stead He was right While the initial costs were higher it took almost a month to write the inter preter the result is a program that lets me write and test new CATs in weeks rather than months The interpreter is very similar to what I ve presented here parsing program lines finding out what was read in the parse and then acting on it If you think abou
185. le list main a double 1st 7000 int i for i 0 i lt 6999 i List i i 1 stat list Es void stat double list int i e Taiu double x z dev square squares var sd TR double sqrt double sd a x squares 0 puts start See for im 0 i lt 6999 x list il squares list i 5 cala xi E print ef n 2 var squares a x Y printf n var sd sqrt var o A SEE IS NOTHING SACRED Now the FULL source code for TURBO Pascal is available for the IBM PC 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 and assembled and UNDERSTOOD ever did see SCG s are available for the following products Ea darndest thing 1 Pournelle BYTE TURBO Pascal ver 3 IBM PC 67 50 TURBO Pascal ver 3 Z 80 e o 45 00 CP M 2 2 60 AEO 40 10 0 45 00 CP M 3 b o o 0 Ee LO LbEO OE OESOIALLILO 75 00 A fast assembler is included free I have seen the original source and yours is much better Anorymous SOG VI The following are general purpose disassemblers _ Masterful Disassembler Z 80 DS _ Masterful Disassembler IBM PC 47 50 ___UNREL relocatable files 8080 45 00 VISA MC check Shipping Handling card Tax expires _ Total 1 50
186. le sales staff o 30 day money back guarantee MICRO FOCUS COBOL 2 Compiler system that can exploit the full memory of 80286 386 machines under OS 2 or under PC DOS Conforms to the highest certifiable level of ANSI 85 COBOL Includes the ANIMATOR source code debugger and offers full network support List 900 Special Price 729 PANEL QC or TC This best selling screen management library is now available for both Quick C and Turbo C Supports pop up fields and windows multi line fields horizontal and vertical field scrolling menus help boxes and custom field validation Generates C source code No royalties List 129 Special Price 89 FETCH New memory resident file librarian for those of us who have trouble finding files or forget what s in them The user is prompted for a 255 character description anytime a file is created Later Fetch can scan the file description library with its fast pattern recognition capabilities and will display the description directory and drive o Lowest price guaranteed o Latest versions Over 500 brand name products in stock if you don t see it call List 55 Special Price 45 LIST OURS LIST OURS LIST OURS E 386 SOFTWARE C INTERPRETERS EMACS 295 265 OFERATINGSYST ye 549 465 ADVANTAGE 386 C OR PASCAL 895 799 C TERP 298 219 EPSILON 195 149 SCO XENIX SYSTEM V 1295 989 MICROPORT SYSTEM INSTANT C 495 369 KEDIT 125 99 WENDIN D S 99 79 Ms WINDOWS 386 SPECIAL N
187. ll be all right ASP Update The Association of Shareware Profes sionals has sent out a press kit describ ing the longest meeting on record While ASP has never physically met their special conference on CompuServe is a non stop meeting place Seventy two active members are now on the ASP roster and prospective new mem bers are invited to contact the organiza tion at Association of Shareware Professionals 325 118th Avenue SE Suite 200 Bellevue WA 98005 206 454 0479 Cards and Letters The people at PC SIG have all they can do to keep up with the flood of shareware so you can imagine the task facing a lone columnist However if you ll all give me a hand this will be much more manageable I welcome sug gestions about shareware of special merit Please tell me about it even if it s something you wrote yourself MICROCORNUCOPIA 40 Mar April 1988 85 Complete 8MHz Monochrome System 995 Fully compatible with IBM AT e Intel 80286 CPU 80287 socket e 512K Memory on 1MB motherboard e HD FD controller Battery Backed Clock Calendar e 1 2 MB Floppy Drive MaxiSwitch AT Keyboard e FCC Class B approved e 48 hour factory burn in and testing e 12 Monochrome Monitor 720x350 with Tilt Swivel e Hercules Compatible 132 column video card e 200 page Documentation and User Manual e Designed and Made in U S A with 1 year warranty Call for our AT 386 machine 4075 dhrystones Opti
188. ll me how they work The details are well educational and particularly so when they include source So I m partial to a new series of Turbo C toolboxes released recently by Zortech I ve seen three of their packages a screen generator a communications program and a terminate and stay resi dent toolbox All three come with source and with terse technical manuals And they re only 49 95 each I was able to e read most of the TSR toolbox manual e compile amp link a C program which calls assembly language code to handle the TSR details in about an hour The manual begins with a short his tory of TSR software and then briefly ex MICRO CORNUCOPIA 40 Mar April 1988 81 plains the TSR process In a nutshell programs are loaded at LOAD POINTS Normally when a program exits it returns control to DOS which loads the next program at the LOAD POINT A TSR hotkey program does two things e it changes the LOAD POINT so DOS can t overwrite it e it filters keyboard input If the input is its hotkey then it runs itself if not it passes the input on to DOS This is essentially how Sidekick and numerous other TSR programs work The TSR toolbox includes well com mented assembly language modules for creating TSR programs a library of func tions you need to use with TSRs and several examples showing how to call these modules from C Although I haven t thoroughly tested these toolboxes I
189. ls common library routines like gets puts and printf A sample main program that calls the debugger might look like this main debug_init HELLO C printf Hello world n The function of debug_init is to read the map file and set up the line number and global symbol tables In order to do this debug_init must be passed a name HELLO C so it can find the map file Prior to MS DOS version 3 the name of the executable file was not passed from the com mand line so the name must be passed from the main program explicitly the identifier __FILE__ will work If you are using version 3 of MS DOS the name of the map file could be constructed from argvl0 as long as it has the same root as the name of the executable file on the command line In order to have minimum effect on the data space of the program being debugged I ve dynamically allocated the line number and symbol tables in a far heap using a simple linked list of far pointers Editor s note Farmers will also give you pointers about far heaps They smell better than near heaps This leaves the main program s local heap and storage area unaffected with the exception of a few global variables to maintain the table pointers and other necessary information Details In this implementation the debugger assumes the small model This means that all data offsets are within the data segment and all code offsets are within
190. ly any program that accepts keyboard input E visually compare files side by side in simultaneously scrolling windows a find your files in the built in directory window Order Show Me today for only 39 5 S H To order call toll free 800 634 3122 Visa and MasterCard accepted 30 day satisfaction guarantee Not copy protected cS Ask about So Help Me a flexible context sensitive help screen driver Add full color help screens to all your programs royalty free for only 79 Serengeti Software P O Box 27254 Austin Texas 78755 512 345 2211 Show Me amp So Help Me trademarks Serengeti Software Borland Int l MicroPro Ashton Tate amp Microsoft trademarks acknowledged Reader Service Number 27 Full Featured AT Motherboard fits XT or AT case 399 6 8MHz 489 for 6 10 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 K installed VLSI technology 8 expansion slots Clock Calendar Add 95 for 1MB memory installed and tested Other selected components available include 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 119 High density floppies 10 10 Call SoftSide Systems at 503 591 0870 Reader Service Number 28 MICRO CORNUCOPIA 40 Mar Apr
191. m impressed with what I ve seen so far The code I used worked with Turbo C and Tlink the Turbo linker although the manual and README file was a little confused about how Turbo C worked Zortech is both an American and European company which markets its own C compiler in Europe as well as these toolboxes The toolbox manuals currently refer to the Zortech compiler which is a little confusing since the products are intended as add ons for Turbo C So if you re beginner keep this in mind or ask Zortech for a clarification Meanwhile I think intermediate hackers and developers will benefit from study ing Zortech code For more info Zortech 361 Massachusetts Ave Arlington MA 02174 617 646 6703 And that folks is Tidbits 82 MICRO CORNUCOPIA 40 Mar April 1988 Figure 3 z Reader Results Compiler Size com exe os Turbo e a 0 a 20K 18 2 Turbo Pascal 3 x 12K 4 8 lt Turbo Pascal 4 0 6K 2 9 Turbo Prolog 1 1 41K 9 1 Eco C 4 05 12kK 12 2 a Mark Williams 3 1 12K n a 3 2 Turbo BASIC 29K n a n a o n a Quick BASIC 2 80186 computer is zunniag at 8 Miz 80286 computer is running at 10 MHz V 30 computer is running at 8 MHz A Times for 80286 V 30 Mark Williams C and BASIC compilers were contributed by readers Notes Figure 4 Lemma one pass algorithm _finclude lt stdio h gt void stat doub
192. mcrcccnonooo 1 200 00 Complete video sub system monitor SW Color 34010 cables Complete Color 34010 system based on the PC Tech X16 Consult PC Tech for price specifications and other options Monochrome 34010 Video Processor e 800 x 1024 resolution other options available e 2 Bits per pixel for 4 hardware gray shades e Hardware support for CGA MDA Hercules emulation e PC XT and AT compatible Available configurations Monochrome 34010 processor board and software 495 00 Complete video sub system monitor SW Monochrome 34010 cables 995 00 Complete Monochrome 34010 system based on the PC Tech X16 Consult PC Tech for price specifications and other options Introductory Special Window 995 complete mono system SPECIAL LIMITED TIME OFFER For a LIMITED TIME PC Tech is offering Color and Monochrome adapters as well as complete systems at special introductory prices All prices mark ed with an asterisk reflect special prices in effect for a limited time Designed Sold and Serviced By y l UE 904 N 6th St Lake City MN 55041 612 345 4555 AA 612 345 5514 FAX PC XT and AT are trademarks of International Business Machines Corp Reader Service Number 3 a Shift keys Switch selectable Two Ctrland Alt keys for firm feel ambidextrous keys access Isolated Esc
193. mption and cooroutine packages oa a 45 Biggerstaff s System Tools multi tasking window manager kit roca a 40 TELE Kernel Ken Berry s multi tasking kernel E ad SB Rl Gs GPO ie Bi ci eke ae OO TELE Windows Ken Berry s window package A E ke 30 Clisp Lisp interpreter with extensive internals documentation ger he Kies Sk on ee ae WS SOO Translate Rules to C YACC like function generator for rule based systems Pa ap Be Gee BAL es Gee OBO 6 Pack of Editors six public domain editors for use study amp hacking 2 2 30 ICON string and list processing language Version 6 and sa e WE ae Op e a ke gy RO LEX lexical analyzer generator de ie cas ee ee ge SO Bison amp PREP YACC workalike parser generator amp attribute grammar preprocessor aia de 2025 C Compiler Torture Test checks a C compiler against K amp R 20 Benchmark Package C compiler PC hardware and Unix system e 20 PKG task to task protocol package 0 o seni e neo LY E 520 A68 68000 cross assembler ou ooa a a a di e 20 Small C C subset compiler for 8080 and 8088 oer ear A 20 tiny c C subsubset interpreter including the tiny c shell se Ale fags dd 9020 Xlisp 1 5a Lisp interpreter including tiny Prolog in Lisp Sch a Shire Aas a O20 List Pac C functions for lists
194. n comes the 1 key which is 2 and so on The release code for each key is just the press code plus 80h When a key is pressed or released the hardware triggers an INT 9 which under normal operation points to the keyboard interrupt service routine in the ROM BIOS The ROM BIOS reads the scan code sent by the keyboard from the keyboard data port 60h and converts it into the appropriate ASCII character taking into account which of the shift and control keys are currently pressed remember 1 said you could keep track of the up down state of any keys you liked The new character is then placed in the keyboard typeahead buffer for later use by the keyboard software interrupt 16h more on that later Finally an ac knowledge is sent to the keyboard by flipping the highest bit of port 61h Keystrokes and shift key states are stored in the locations shown in Figure 1 I am showing this list for complete ness of information only Never directly use these variables unless you are com MICROCORNUCOPIA 40 Mar April 1988 59 pletely replacing either INT 9 or INT 16 Creating Problems It really upsets my stomach when I see yet another example program which stuffs characters directly into the typeahead What happens if someone decides to put the typeahead in a dif ferent place for some stupid reason like to make it bigger These guys should get a job at Borland writing great new programs like BlooperK
195. n speed Only 49 95 FREE SHIPPING VISA MC COD CHECK State Turbo Cor Y NOME coccion II A Quick C version HA N iii Turbo C is the trademark of Borland Inc Quick Cis the trademark of MicroSoft Inc AAA IE AI roer em eo oo A IE EEEIEE E Exp Date o omorrsoro a aa e on ZORTECH Inc 361 Massachusetts Ave Arlington MA 02174 ZORTECH Orders amp Enquiries Tel 617 646 6703 rut ORDER HOTLINE 617 646 6703 N LONDON FRANK GENEVA Reader Service Number 70 Program in the fast lane with Borland s new Turbo Pascal 4 0 ur new Turbo Pascal 4 0 is so fast it s almost reckless How fast Better than 27 000 lines of code per minute That s more than twice as fast as Turbo Pascal 3 0 san VERSION 4 0 Technical Highlights m Compiles 27 000 lines per minute Includes automatic project Make m Supports gt 64K programs m Uses units for separate picada 4 0 breaks the code m Integrated development barrier environment m Interactive error detection location m Includes a command line version of the compiler Highly compatible with 3 0 No more swapping code in and out to beat the 64K code barrier Designed for large programs Turbo Pascal 4 0 lets you use all 640K of memory in your computer For the IBM PS 2 and the IBM and Compaq fami lies of personal computers and all 100 compatibles Sieve 25 iterations _ Za Y Turbo P
196. nd Serviced by WOC 904 North 6th St Lake City MN 55041 612 345 4555 MICRO CORNUCOPIA 40 Mar Apr 1988 19 Programming For Change Using Data Files In Lieu Of Program Data You ve always wanted to write a parser right A simple but useful parser Of course that means saving the certified ADA parser for our second project Anyway it d be nice to write something that would accept a text file and do some thing with it Understand it Act on it Work a little magic progressed from tolerating my com puter activities to participating in them My wife does most of her reports and my daughter does her homework on my system That s the good part On the down side I really don t want them playing around with the stuff I m working on even accidentally So I created a directory for each of them to use That s where the problem begins guess I m pretty lucky my family has The Problem My hard disk has a directory struc ture that s confusing to anyone includ ing myself One of these days of course I m going to get organized But in the meantime I shouldn t be too surprised that neither wife nor daughter are ex cited about learning how neat the MS DOS hierarchical directory structure is We programmers in general assume it s obvious to everyone including non programmers how to move between directories on a hard disk Not so Al though learning to run a word proces sor wa
197. ndow it waits for a key and then tries to match the key to instructions in a table If it finds a match it executes the function or runs a program When the func tion or program is finished the window is recreated via FAIL and BACKTRACKING and the process recycles until the user enters a Q for quit 96 MICROCORNUCOPIA 40 Mar April 1988 i TOOLKITS FOR TURBO C amp QUICK C BOTLEY from ZORTECH INC A complete set of Terminate Stay Resident TSR functions that help you fo write reliable pop up programs m Now you can make your programs Sidekickable Two SUPERTEXT example programs are included This is not simply an Editor a pop up Calculator and a pop toolkit but a full blown up Critical Error Handler WordStar compatible The Hotkey toolkit handles all WO dpr ede with the full floating point functions in resident OI COGE mode As well as all the normal The 32 page manual includes editing functions you will also an interesting discussion of the find dot commands and full pat printer control The SuperText pek gin ane ro fa S function toolkit handles files of any size calls together with a full and allows full on screen WINDOWS explanation of the theory and configuration Add super fast text screen practical use of TSR s Do you need to incorporate a handling to your applications Onl 9 951 wordprocessor into your with the WINDOWS
198. ng com 1 7 99 screen is a fantastically readable You can also plug in a digital or analog plete price of only D 3 MB On Board AT XT Turbos 6 Supers Our McTek 286A is the most integrated AT compatible to date 640k 4 77 8MHz and 4 77 10 switchable XT turboboards It 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 FCC approved slide case eight slots Hercules compatible 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 graphics card amber monitor w base fully assembled and ports are all standard on board With Award 3 01 bios 640k 200W tested one year parts and labor warranty power supply Samsung amber monitor with Hercules 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 599 4 77 8MHz 4 77 10MHz Get in on the most advanced AT compatible 1 3 9 9 U Complete Complete on the market at the lowest price ever offered Mclek Systems Inc 2316 41 Street Berkeley CA 94710 e 415 843 0714 DIe Tox Fujitsu 360k 75 Citizen CD 120 159 Samsung amber
199. ng disassembler from V Com munications called Sourcer See his Comdex article in this issue IIl be using it to look at the various BIOSes we have at Micro C If I come up with anything l Il let you know We re Almost Done Well that wasn t nearly as bad as I d expected We even got some useful routines out of it Next time around I ll wrap up this series with a close look at the brains of the outfit the 8088 Editor s note Assuming there really are brains in this outfit We ll also take a step back from the small details and try to tie all these smart chips together into a coherent whole MICRO CORNUCOPIA 40 Mar Apr 1988 39 LJ A fi T L rm SERVING NORTHERI E FF A Lu l ken SINCE 1963 SPECIALTIES IC PROGRAMMERS KURTA XT AT COMPATIBLE SERIES ONE AED SLOT MOTHER ALL USE SINGLE SLOT IN YOUR AT AND INCL UDE GRAPHICS TABLET OARD EXPANDER ff ARETO INCLUDES INCLUDES PAL PROGRAMMER 1269 35 4 SLOT XT MOTHERBOARD PROGRAMS MOST 20 amp 24 e PALS MANUAL VERIFY PROGRAM amp BURN SECURITY FUSE LINK CORD OPTIONAL AT CONNECTORS 8748 49 PROGRAMMER 199 85 BASIC PROGRAM LISTING CABLING EPROM PROGRAMMERS e CASE NOT INCLUDED 125 21 25V DEVICES INCLUDES SOFTWARE FOR 29900 53490 oREATFORRaD Q095 STANDARD ENTEL HEX FORMATS spg with Stylus th Puck 309 95 HALTED SPECIALTIES offers its customers
200. nly 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 Display 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 See and change file attributes 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 ON R A Sa Rag Pama tes gs E Y A da i Po Y 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
201. ns primarily for allocation of scratchpad variables i e the registers for low level flow control low level manipulation of 8 and 16 bit quantities and assembly time evaluation of al gebraic expressions Also the 8086 s string instructions approach but don t quite match the efficiency of C s pointer manipulations The efficiency of C versus assembly language depends therefore on the type of task The screen editor spends most of its time manipulating text bytes buffering them filtering them displaying them etc and 8086 assembly language is well suited for this Since there is almost no run time evaluation of algebraic expres sions C holds no advantage Experience C has one advantage however Most programmers know a lot more about C than they do about assembly So they seldom take full advantage of their as sembler Top programmers such as the authors of VisiCalc Lotus 1 2 3 and the Macintosh use all of their assembler s features and write less code Another important factor in speed of program development is not the lan guage but the abilities of the debugger Debuggers Our C compiler has an effectively useless debugger so the task is done by inserting print statements into the code and recompiling This might work for small programs but it s hopelessly slow and hopelessly difficult for something as complicated as a screen editor How does a newcomer unfamiliar with 5000 lines of C code find
202. nual comes in a thick three ring binder It s well organized but it needs proofreading This compiler has many interesting traits For example its picky level tells the compiler how strict it should be when interpreting nonstandard code It comes with an editor and a source level debugger is available at extra cost In terms of performance it didn t do well Both compile and execution times were the slowest tested Executable code size was smaller than average however The library contains an acceptable number of functions with both UNIX and ANSI compatibility Eco C88 used a lot of data segments seven Otherwise the code is good though it doesn t recognize register variable declarations Lattice C v3 21 Lattice was the leader in MS DOS C compilers during the early 80s Al though it seems popular to knock the package now it remains competitive This was the only compiler reviewed which sends both 5 25 and 3 5 disks in the standard package Documentation resides in spiral bound manuals and it s clear that Lat tice does not rely on packaging to sell the compiler However I found no glar ing errors in the manuals with their detailed and accurate descriptions of utility programs and functions The disks contained a very long READ ME file which described new compiler fea tures and otherwise undocumented op tions Lattice throws in both a linker and a librarian You can purchase a simple sour
203. o easy CALL STRLEN ADD SP 2 MOV DI AX o o LEA SI BP 35 _ ied eid et EAS A ee ADD DI SI PUSH DI E MOV DL BP 4 POP BX A O MOV BX DL eee STRLEN PUSH BP MOV BP SP PUSH DI SI SUB AX AX me Me Bese ime Me NOES CALL CHKSTK point DI to our local copy of device name in C parameters are pushed onto the stack you can never just leave them in registers that would set AX to the length o the device name the 8086 has a special RET n instruction that allows procedures to pop their own on stack parameters but C never generates this instruction instead it generates this ADD after every CALL to _a function with parameters Cire spurious move why not leave it in AX here we see that our compiler is actually cleverer than many it has combined the pointer to the local array with the coded 1 at compile time now DI points to the last byte of the array ola spurious PUSH why not leave the pointer in DI fetch the parameter c from the stack it we were hell bent on moving DI to BX my PUSH then POP why not just MOV BX DI gt analy the byte is placed into the array always save BP whether we need to or not BP is set up for arta parameters whether there are any or not save DI and SI whether or not they are clobbered_ AX 0 for no local storage coded MOV AX nn if the procedure does have on stack local sto
204. o is type in C gt PATH E C bin C If you type C gt set and press Enter you ll see the status of your environment variables The use of the PATH environment variable solves one of our design problems accessing the program from any place in the sys tem I use the bin directory off the root directory to hold all of my ex ecutable files so that s where I ll store the directory program When I finish writing it Data Alternatives Next how do I want to access the in formation needed for each directory entry My first thought was to code the directory paths as a series of pointers to chars something like char paths Karol D family words karol Katie D family words katie projectl C eco88 tools source projectl 0 Y This data structure would work okay but I d have to recompile the program each time I want to add to or otherwise change the abbreviations for a directory path The last entry is zero so I would be able to sense the end of the list easily By now the final solution should be obvious Because we need a flexible means of storing directory path names we ll use a text file Now that we know 1 the data re quirements for the program 2 how to access that data from any point on the disk and 3 how the data will be stored writing the program is fairly easy The Solution The program in Figure 1 is the solu tion to
205. ock rates on my sped up clone XTs can use PB3 to attempt to disable 38 MICRO CORNUCOPIA 40 Mar Apr 1988 the keyboard But this depends on how the user has set jumper E5 So you can t depend on PB3 for this function Also depending on the system this method may allow the keyboard buffer to fill anyway Then when you reenable the keyboard all those nasty keystrokes will come back to haunt you PB4 and PB5 enable or disable RAM parity and I O bus error signals respec tively A low on PB6 disables the keyboard clock We ll use PB6 later on in a function which turns off the keyboard As stated above PB7 controls the behavior of Port A for old PCs New machines use it strictly as a keyboard acknowledge signal The low order half of input Port C reads either SW1 XTs and clones or SW2 old PCs a nibble at a time PB2 selects the nibble PC4 feeds cassette data to the proces sor in old PCs Again cassettes are pret ty useless so this bit would be a can didate for any project that needs input to the CPU XTs listen to the speaker output with PC4 I m not sure what use this serves other than keeping the PPI and the CPU entertained PC5 watches the output of Timer 2 before it gets ANDed with PB1 When things go all to hell and a non maskable interrupt NMI occurs the NMI handler needs to know who s causing problems PC7 and PC6 allow the handler a section of code in the ROM BIOS to differentiate between
206. old and staple both ends if check is enclosed LJ YES I WANT TO SUBSCRIBE foo MICRO CORNUCOPIA 40 US CANIMEX FOREIGN 2 yrs OTHER PRODUCTS Back Issues T shirts specify size O NEW L RENEWAL 1 yr 3 yrs 18 issues L 48 L 99 AO O MS DOS 5 O MS DOS 3 ES DISKS Soa is and size Save Specify Disk and 24 Off the newstand OTHER price TOTALS GRAND TOTAL To Place Your Order Immediately E D CHECK ENCLOS z CALL 1 800 888 8087 9 5 M F Pacific Time L VISA L MASTERCARD TEAN FERT ERRE Expires Are you a current Micro C subscriber J Yes L No MICROCORNUCOPIA 40 Mar April 1988 91 THE MICRO TECHNICAL JOURNAL ICRO CORNUCOPIA DAA 11D MAR APR 1988 ISSUE NO 40 Write in the reader service numbers NAME of any advertisers from whom you would like to receive free informa COMPANY tion ADDRESS CITY STATE_ ZIP FOLD HERE NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES BUSINESS REPLY MAIL FIRST CLASS PERMIT NO 19 BEND OR POSTAGE WILL BE PAID BY ADDRESSEE THE MICRO TECHNICAL JOURNAL MICRO CORNUCOPIA P O Box 223 Bend OR 97709 0223 IN ISSUE 41 e Neural Networks do they really think e Ray Tracing Algorithms on the PC Tech 34010 e Parser Generation and Turbo Prolog and C e Information Theory and Communications e Fractals In the Real World STAPLE TO CLOSE 92 M
207. on 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 ConlX 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 A structured programming language for ConlX extends CP M SUBMIT ConlX 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 AAA Special source code compiler that provides string and numeric variables An absolute must for CP M power users and developers a Over 25 utilities for ConIX written in the shell language including ConlX hierarchical directories with overlay adds pathname capability to Library Vol l existing software interactive debugger move copy link multiple files XCC Utilities print files with pagination review disk files for deletion unerase disk AA wilh stats full screen TYPE and more Source code included A new Shareware version of the ConIX O S includes our regular ConlxM 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
208. on does MS DOS need to change directories MS DOS needs to know only two things 1 the full pathname and 2 pos sibly a drive name Given what I wanted to do 1 needed a third piece of information an abbreviation for the full pathname as well For the pathname mentioned earlier the information might be 1 eco88 tools source project1 2 C 3 project1 Therefore if 1 type in projectl from any directory on any drive in my system 1 should end up in the directory C eco88 tools source project1 Second how can I access the program from anywhere on the disk Most programmers are familiar with the environment area available in MS DOS It s a small area of memory that MS DOS can examine for informa tion to be used with MS DOS com mands Of interest to us is the PATH command which tells MS DOS which pathnames to search if a file isn t in the current working directory The PATH environment variable lets us make a single copy of a program ac cessible from any directory on the disk This saves disk space At present my path is set to E C bin C which says Search drive E a RAM disk first and if you don t find the file there try Cibin If that fails try CN If all three path names fail MS DOS gives up and issues an error mes sage Notice that each path name in the PATH environment area is separated by a semicolon To set the PATH environment vari able all you d
209. ons 10MHz Upgrade 150 EGAMonitor Card Add 399 20MB XT Kit ST 225 299 Taxan770Multisyne 499 30MB XT Kit ST 238 329 2MB EMS Card 129 20MB 65ms Half Height 249 Everex 1200B modem 89 42MB 38ms Half Height 449 Everex 2400B modem 179 44MB 28ms Full Height 575 Software Call Call for information amp other options AmTech Computers 3701 Guadalupe St Suite 103 Austin Texas 78705 512 451 0921 Terms Cashier s Check Money Order VISA MC 3 personal checks allow 10 days to clear Prices and availability subject to change without notice Texas residents add 7 Tax Reader Service Number 44 AUTOTIME CORPORATION 183 OSWEGO SUMMIT LAKE OSWEGO OREGON 97034 503 635 8938 WIRELESS MODEMS 2800 BAUD 20 MILE RAN 15 FAX array rR PC OU 3 CALL FOR FAX SAMPLE 450 00 10 MEGABYTE INTERDYNE TAPE BACKUP 20 MEGABYTE XT DRIVE KITS 30 MEGABYTE XT DRIVE KITS LC CHIPS EPROMS LET US BURN YOUR ROMS ROMS BURNED AND ERASED USING INTEL SPEC 2716 250 450 2732A 200 300 2764 200 27C64 200 2 7128A 200 27256 200 MATH COPROCESSORS 8087 3 for IBM PC and XT 8087 2 8087 1 80287 3 for IBM AT amp 8 Mhz Clones 80287 F for 10 12 Mhz Clones MEMORY D RAMS 4164 150 41256150 4464 150 135 00 1 year warranty on chips 64K 4 for New Clones Reader Service Number 49 86 MICROCORNUCOPIA 40 Mar April 1988
210. oo good a development environment Now if I could just find some good fresh crab Trilogy 99 95 5 00 Shipping U S funds Complete Logic Systems 741 Blueridge Ave North Vancouver B C V7R 2J5 604 986 3234 P S Paul Voda has agreed to come to SOG VII to talk about designing the lan guage using the language and he ll do a more general presentation on designing compilers using predicate calculus See you at SOG VII July 14 16 in Bend Postscript Several companies are still trying to muddy the page definition language scene I saw folks pushing DDL and ACE like there was no tomorrow which is pretty close Genicom says its ACE is much faster than PostScript Ten times faster At least with their image processor on their laser printer Interesting PostScript printers are slow turning out the first page of a book etc because the 68000 is busy translating font out lines into pixel definitions and storing them in memory Once the translation is complete the pace really picks up I asked if ACE defined type faces via out lines Yes And didn t the image processor have to translate the outlines into pixel repre sentations before the characters could be used Yes So why was ACE faster than Post Script It turns out that they ve added a bitslice processor to speed up the out line to pixel translation OK so we re talking a lot more about hardware dif ferences than language differences I
211. oration CP M is a trademark of Digital Research Reader Service Number 33 74 MICROCORNUCOPIA 40 Mar April 1988 EEE CLONE SYSTEMS Letters One YEAR guarantee on system Continued from page 6 Turbo Mother Board 4 77 and 10 MHz simple to set up the Priam as three logi 640 K Ram installed on board a A Serial Parallel Game Ports n installed a total o 14 Seapate ST 2058 Al of them failed Clock Calendar AT Style Keyboard within one year of installation None Color CGA or Monochrome Video Board were bought from vendors who provide o Watt Power Supply Flip Top Case the one year warranty Bummer I E WITH 2 FLOPPY DISK DRIVES 599 00 refuse to buy or specify Seagate drives WITH 1 FLOPPY AND 20 MEG 859 00 because of the 100 failure rate and be WITH 2 FLOPPY AND 20 MEG 899 00 cause the company doesn t uniformly Assembled and Tested for 24 Hours support a one year warranty I now recommend Priams because of AT TURBO SYSTEM my success and the way they are built AT COMPATIBLE MOTHER BOARD WITH BIOS solid With an RLL or Konan controller 8 MEG AND 12 MEG SWITCHABLE SPEED you get allot of storage ataicheap price 512K RAM INSTALLED UP TO 1024 ON BOARD Gene Dasheill WA2 HARD DISK FLOPPY DISK CONTROLLER 220 S King St Suite 220 one OR ee CS VIDEO WITH PRINTER K FLOPPY Saale 220 WATT POWER SUPPLY AT CASE MicroSphere RAMdisk On A Clone AT KEYBOARD SET UP DISK Is it possible to install a MicroSphere ONE YEAR WARR
212. osoft i C Turbo C and Aztec C versions No royalties FORTY TWO FONTEDIT Create custom Greek math or other symbols for use 49 95 with SCI GRAF or SCI GRAF MODULES Requires IBM compatibility and CGA or EGA The thoughtful alternative from SemiDisk SCI DATA Perform least squares fits linear parabolic and exponen 59 95 tial and normal curve approximations Convert between polar and rectangular coordinates Also supports a variety of scaling transformations Great complement to SCI GRAF 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 SCI EVAL Pop up scientific expression evaluator more powerful 49 95 than other pop up calculators Complete expression edit ing facility Full range of functions scientific statistical logic Requires IBM compatibility How did we fit all these features on one 5 75 by 8 single board computer Free shipping on prepatd orders No credit cards e 9 216MHz 64180 Microprocessor runs 280 programs e 512K DRAM Zero wait states fully populated e Three RS232C serial ports Standard baud rates to 38 400 e One Centronics parallel printer port e WD2793 disk controller up to 8 drives SD DD or High Density 312 51 4 and 8 drives e SASI channel for hard disk controller software provided e Many popular disk formats supported e Requires only 5V 1
213. ous blunders and football each can easily be 72 MICROCORNUCOPIA 40 Mar April 1988 coded and debugged in a Sunday afternoon I assume you have compiled HELLO C It s covered in the file SAMPLE DOC on disk K7 True the program only prints Hello world but don t skip it As Kernighan and Ritchie point out when you try out a new language compiler or sys tem the last thing you need is a complex program Figure out the compiler first then tackle substantial programs For instance the C function library LIBASM C cannot be included in HELLO C using the include command LIBASM C also contains include statements and Small C does not support nested includes SAMPLE DOC recommends appending LIBASM C to the source file using PIP but there are easier ways If your editor supports block reads K R in WordStar for example you can simply insert LIBASM C Alternatively you can let the compiler do the appending That is A gt smc b hello c libasm c gt b hello asm will tell the compiler to create HELLO ASM from HELLO C and LIBASM C Most of the time you can and probably should avoid ap pending LIBASM C Okay you ve compiled and run HELLO Now you want something a bit more useful VIEW Figure 1 page 74 displays a text file on the screen pausing every 22 lines It also strips the high bits from WordStar files Though it s simple the program illustrates how to open a file unique in Small C how to us
214. out where to insert print statements Without some sort of single stepping facility there s no chance he or she will understand how the program works let alone where a problem might be My assemblers include a debugger optimized for stepping through a program while watching registers and memory change through window type displays of the machine state It s only slightly more cumbersome to run a program from the debugger than it is to run it directly Compilation Vs Assembly Compilation is significantly slower than assembly Slow compilation adds significantly to development time and contributes to the if it works don t touch it philosophy High level compilers also generate atrociously inefficient code As memory becomes cheaper the size of programs becomes less important But speed of ex ecution remains as important as ever There is a harsh inescapable reality microcomputers are slow and they are likely to remain slow because improve ments in the hardware will be taken away by multitasking I have seen claims that compiled programs are as little as 30 slower than optimized assembly language programs Such claims are ludicrous I have never seen a large high level language program that 1 could not make ten times faster by recoding in assembly language The factor of improvement is often a hundred times or more To appreciate just how bad compiler generated code is just grit your teeth and examine it Le
215. p 128K Ram expandable to 896K 68008 Chip 32 Bit processor 2 Built in mi crodrives Write for catalog and infor mation Sharp s Inc Rt 10 Box 459 Mechanicsville VA 23111 804 746 1664 PAUL MACE SOFTWARE INC MACE UTILITIES Data recovery and disk optimization tools Eliminates hard disk risks and optimizes hard disk performance 99 00 HTEST HFORMAT Advanced hard disk diagnostics Delivers what the manufacturer promised 89 95 400 Williamson Way Ashland OR 97520 Programmer s Paradise The microcomputer software source that caters to your programming needs Gives You Superb Selection Personal Service Unbeatable Prices CALL OR WRITE FOR THE LATEST CATALOG IBM Style Monochrome Card with parallel port Made in Japan 35 00 XT Style Keyboard without case mfg by Cherry 25 00 The dBase Book of Business Applications 335 p 3 95 Koala Computer Inc 4306 Torrance Blvd Torrance CA 90503 213 316 5866 Reader Service Number 68 Reader Service Number 88 In NY 914 332 4548 Programmer 1 800 445 7899 _ A Division of Hudson Technologies Inc 42 River Street Tarrytown NY 10591 94 MICROCORNUCOPIA 40 Mar April 1988 Before you code The Idea Generators Quickens and improves problem solving InfoWorld Usually 195 For you 145 Experience in Software Inc 2039 Shattuck Ave Berkeley CA 94704 415 644 0694 Reader Service Number 63 FRE
216. pecific benchmarks test only one portion of a compiler such as float ing point operation Editor s note Scott s benchmarks are available on the Micro C RBBS 503 382 7643 8 1 N 24 hrs or on our Issue 40 disk 6 for subscribers 8 for non subscribers and foreign call 800 888 8087 Composite Benchmarks The composite benchmarks are DRYSTN GRIND and FXREF DRYSTN is a slightly modified public domain dhrystone program which con tains a mix of statements corresponding to a typical program Optimizing com pilers which can recognize dead un executed code should do well with DRYSTN GRIND was created to test floating point looping and file operations It reads in 1000 floating point numbers sorts them and then calculates a table of trigonometric values At completion it writes the table to disk FXREF is a practical application Designed as a filter FXREF reads a file displays it builds a binary tree cross reference table for text tokens and prints the cross reference This tests dynamic memory allocation looping and file I O Specific Benchmarks The specific benchmarks are very short and each tests only a few func tions Because they are limited they give you a feel for the size of particular library functions look at the size of the EXE files CRUNCH reveals floating point cal culation and library performance DIS PLAY tests video I O using printf DISKIO reads and writes a large disk f
217. pplications since 1984 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 royalties on your applications that use CBTREE CBTREE supports multi user and network applications 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 OR WRITE Peacock Systems Inc 2108 C Gallows Road Vienna VA 22180 Reader Service Number 20 PEACOCK SYSTEMS INC MICROCORNUCOPIA 40 Mar April 1988 79 11010 TIDBITS By Gary Entsminger 1912 Haussler Dr Davis CA 95616 Benchmarking Sequel And A Toolbox For TSRs Gary surprises us with some floating point benchmarks and reviews some very very interesting TSR code ack in Issue 38 I wrote some simple statistical functions which I used to benchmark the Turbo C Pascal and Prolog compilers Many of you took the bait and sent me your comments compile times and other versions of the standard devia tion function Thanks a bunch for the feedback From your responses I conclude that you were genuinely amazed at the
218. prompt and PC Key Draw takes you on a tour of its innumerable features Text dances across the screen Fill patterns spruce up letters Polygons fly Smear patterns replicate an object as it s dragged about in several different ways Objects are cloned and reflected colors changed pixels edited Aspect ratios are modified and the screen scale zooms in and out On an 8088 based machine you re in for several minutes of remarkable illustra tion 3 D Although Kidera lists 3 D graphics as a fu ture enhancement judicious use of smearing and spray painting does a nice job of emulating it The demo grabs and pulls a cross sectional drawing to give the appearance of perspective it spray paints a disk to give it the shading of a sphere Converging lines add the il lusion of distance The current release of PC Key Draw only works with the color graphics CGA adapter and cannot take ad vantage of higher resolution video cards EGA and Hercules support are slated for version 4 0 The PC Key Draw images can be saved in a BASIC compatible form permitting further manipulation outside the program Edward supports several printers with plotter support due in ver sion 4 0 True to its name PC Key Draw works completely from the keyboard While the state of the art seems to demand a mouse and pull down menus Kidera s program was designed for people who feel comfortable at the keyboard The major modules of PC Key Dr
219. r functions within the small model I guess I ve been spoiled by Motorola 68000 s and other non segmented machines As a result I created the routine fstr which copies a far string to local memory and returns a near pointer to it Finally I hope I have provided enough in sight into how debuggers work for you to start developing your own source level debugger Even if you don t have Turbo C these techniques if you have line number and symbol information can be applied to other compilers and other processors The Motorola 68000 for example has similar breakpoint and step functions With a little help like local variable of fsets identifier types and structure in formation it doesn t yet compete with Microsoft s Codeview this could be a super debugger I m working on a program to pre process the source files and extract the above information but it sure would be easier if the necessary information were available directly from the compiler hint hint Borland Once you have used a source level debugger you may wonder how you ever developed code without one and like me you may never again want to debug high level languages in assembly Editor s note The debugger and some sample code are available on the Micro C RBBS 503 382 7643 300 1200 2400 24 hrs 8 bits no parity and on Micro C s Issue 40 disk for 6 postpaid for U S sub scribers and 8 for non subscribers and foreign orders To or
220. r analysis Editor s note This is something you should also do before moving into a new neighborhood Except for the border pixels each dot in the display has eight neighbors By looking closely at the neighbors work ing in different directions we can en hance vertical or horizontal edges I had hoped to have more done by now but the time to do it just wasn t there If you want to continue the project on your own there s a good series of articles on the basics of image processing in the March 1987 issue of Byte magazine CIRCUIT BOARDS PCB Edit creates multi layered PCB s with ease Included are solder mask and legend ink support plotter and printer drivers and one of the fastest CAD artwork layout packages for the IBM 99 95 Demo Disk 40 00 PCB Shop will build your double sided plated thru holes circuit boards from PCB Edit files or your artwork for only 1 00 per square inch in single quantity No set up charges for PCB Edit files 25 00 set up charge for other artwork ANALOGIC the 32 channel logic analyzer for the IBM PC XT has a 16 bit trigger word 80 nano second sample time and costs only ASSEMBLED BARE BOARD 399 95 99 95 Call or write for more information ANALOGIC Phone 602 458 4065 P O Box 3228 Sierra Vista Arizona 85636 Reader Service Number 38 ADD TO THE POWER OF YOUR PROGRAMS WHILE YOU SAVE TIME AND MONEY CBTREE does it all Your best value in a B
221. racters to the screen while direct con sole i o does not Since function 6 does not watch for a control C abort pause must check the entry Otherwise there would be no way short of using the reset button to abort the program You might wonder about the define NOCCARGC This statement tells Small C that called functions don t need an argument count In this implementa tion only printf can accept a variable number of arguments If you don t use printf and don t otherwise need to pass an argument count to your functions defining NOC CARGC will speed things up VIEW makes many calls to getc and putchar Also I m not appending LIBASM C because VIEW doesn t need any of its functions While appending LIBASM C would not affect the way the program ran it would significantly increase both the compilation time and the size of the output file Without LIBASM C VIEW C com piles and assembles to a modest 4K COM file This is larger than the equivalent in assembly language but not at all bad for a compiler Slimming Down The Runtime Support The compiler can be greatly speeded up and the size of the resulting ASM output file greatly reduced if you clean up the runtime support files CALL ASM and IOLIB ASM Comments make up approximately half of each file In addition CALL ASM uses spaces rather than tabs to separate fields By eliminating the comments in both files and by replacing the spaces in
222. rage insure the stack is not running rampant lines above occur in EVERY procedure coded in cit again we are very clever and have register variables an advanced compiler feature a INC SI MOV BX DI o Ieor MOV DL BX TEST DL DL Ne jump into loop this i is also a clever little optimization A ee increment th the return Length count spurious move why not index DI direct1y string pointer increments a p gt spurious load we could have tested BX directly semi clever I would have expected CMP DL 0 herea loop if the terminating zero byte has not been found move answer to ax it could have been there in the first place lines below occur VERY proce re co byte jump instruction to commor return poin MICRO CORNUCOPIA 40 Mar Apr 1988 45 most efficient way to perform a task The aura of laziness extends to the design of the C language itself Many features built into other languages are library functions in C Figure 1 for ex ample or printf These functions make a bare bones language usable but program efficiency suffers C conceals the price with it s terseness For instance Donald Knuth has writ ten probably the definitive books on computer science Their central theme is the analysis of algorithms with the goal of finding the most efficient way to per form a given task To enable the precise measurement of his algorit
223. rbo Pascal o sy ba ws LIGHT TOOLS 599 95 2 ae Bee Windows ISRs EGA 43 line text mode direct screen access DOS file handlingand o 0 aN more For the Datalight C compiler ne eae ee TOORDER CALL TOLL FREE E 800 333 8087 aes TELEX NUMBER 338139 _ E In Defense Of Konan Regarding your review of the Konan hard drive controller in Issue 38 of Micro Cornucopia You didn t state which of the Konan boards you reviewed I d like to know if it was the KDC 230 KXP 230 or KXP 230Z My present system consists of a Leading Edge Model M two Seagate 225s and the Konan KXP 230Z I use my computer both for developing software and as a hobby and have yet to see any problems that stem from the Konan board Some of the features you overlooked e Ability to configure drive from builtin menu e Intelligent cache You can keep most often used programs and data in memory _ Supports drives up to 301 MB e Supports two different hard drives simultaneously e Can create one DOS and 15 EDISK emulated disk partitions on the first drive Support diagnostics and utilities e Disk reorganization on the fly e Good telephone support While I haven t used my Konan in the high speed configuration or used various drives I am quite pleased with my purchase I highly recommend the Konan board l Larry Kraemer Route 2 Box 190 Jackson MO 63755 Editor s note Thanks for the comments Larry I used the 230Z
224. rd Datalight Optimum C v 3 12 optimized EcoSoft Eco C88 v 4 02 Lattice c v 3 21 10 MICRO CORNUCOPIA 40 Mar Apr 1988 50 5 2 919 13 824 7 0 66 4 2 882 35 790 101 5 137 5 2 531 35 470 105 0 134 7 3 046 19 111 11 4 64 7 3 049 19 079 28 0 64 3 2 983 16 404 17 9 72 9 2 896 19 760 25 6 65 2 5 2 41 6 1 996 11 776 6 6 41 2 2 268 12 934 128 9 12 502 1 824 130 3 2 359 8 110 12 9 30 8 2 414 8 078 31 5 30 7 2 216 11 896 23 4 43 2 2 228 10 258 30 1 49 3 320 19 294 5 3 31 3 320 19 294 4 8 31 3 450 7 432 5 6 21 0 463 7 448 5 1 20 7 228 1 886 459 1 934 6 3 7 0 from the stack On an 8088 this takes 24 clock cycles The traditional method adding to the stack pointer takes only 4 cycles Datalight Optimum C v3 11 Optimizing compilers are the current rage and Datalight had one of the first on the market Installation can be done saa or Compiler Manx Aztec C86 c v 4 10a rt Mark Wms Let s C v 4 0 6 os es ct rt MetaWare High C v1 4 os es ct rt Microsoft os Cc es v 5 00 ct no optim rt Microsoft os Cc es v 5 00 ct max opt rt Microsoft Quick C v1 0 no optim os es ct rt Microsoft Quick C v 1 0 max opt os es ct rt E ti Timings Compiler Turbo C DeSmet Comp Innov Datalight Eco Lattice Aztec Mark Wms
225. re a fast touch typist like I am that can be very frustrating For those of you interested in check ing out your own keyboard try the combinations of left shift R E as well as ctrl W U W E space and A S F Different brands puke on different com binations There are other bad combina tions but these come to mind im mediately The only keyboards in our entire of fice which performed acceptably were mine the keyboard of my Toshiba T1100 the keyboard on my Zenith Z181 and my faithful old Cherry I ve given up forever on 30 keyboards Are We Having Fun Yet Getting back to the main subject 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 menu 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 Once you ve experienced the convenience of instant access to DOS commands you ll neverbe 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 O
226. redit card ang COD 9 der Pre _ ao wae er STOO us certified check Please do not send cash Some items Jimi tedio to stock o hand pre subjed wo chame SPEC SHEET INCLUDED MANUAL CABLES 29 95 E SHI Sk Reader Service Number 11 40 MICROCORNUCOPIA 40 Mar Apr 1988 Unbelievable Creates commented source code and listings from memory COM or EXE files e CLARIFY UNDOCUMENTED CODE e EASILY MODIFY PROGRAMS SOURCER creates detailed com mented listings and source code di rectly suitable for assembly Builtin data analyzer and simulator resolves mul tiple data segments and provides detailed comments on interrupts and subfunctions I O ports and much more Determines all necessary assembler directives Complete support for 8088 through 80286 V20 V30 8087 and 80287 instruction sets No other prod uct comes close to the output quality of SOURCER PS 2 AT XT PC Clones e CHANGE amp ADD FEATURES e CLARIFIES BIOS INTERFACES e SPECIFIC TO YOUR MACHINE The bios pre processor to SOURCER provides the first means to obtain ac curate legal source listings for any bios Identifies entry points with full explana tions Resolves PS 2 s multiple jumps for improved clarity Provides highly de scriptive data labels such as video_ mode and keybd_q_head and much more Fully automatic SOURCER SOURCER w BIOS Pre Processor
227. ref other Req s HD N Y N 1 Library source available for 150 00 2 None of the compilers reviewed support protected mode programming only support for the special instructions available in real mode on these chips 3 Available at extra cost 4 Models are follows Tiny code and data both in 64K COM model Small small up to 64k code small data Medium large up to 1Mb code small data Compact small code large data Large large code large data Huge large code large data individual data items can be gt 64k 5 Producing OBJ files requires the use of a special utility 6 COM programs can be produced by using the EXE2BIN program provided with most versions of DOS on some small model programs 7 The compiler has limited built in make like facilities 8 Library source available for 400 00 9 80386 protected mode support is available in a separate product 10 Although the volatile qualifier is accepted by Microsoft compilers they perform no special processing because of it It does nothing 11 The large Microsoft Optimzing C compiler package includes Quick C For example the editor included with Microsoft C is actually the one from the Quick C environment Also although MS C cannot be placed on floppies Quick C can 12 MICRO CORNUCOPIA 40 Mar Apr 1988 during code development Optimum C performed very well on most benchmarks producing the fastest DRYSTN program I O op
228. rent upsurge of interest in C it s perhaps time to revisit Small C Micro C readers with long memories will undoubtedly recall Tony Ozrelic s caustic assessment of Micro C s Small C User disks K7 and K8 You might also remember Fred Scacchitti s defense Issue 23 April May 1985 of an upgraded version available on disks K35 and K36 The one drawback of the new enhanced version is that it requires Microsoft s M80 L80 package to assemble and link the compiler output And unfortunately that means that running Small C is no longer free The earlier version of the compiler produces output that assembles under ASM the 8080 assembler that comes free with CP M And with the money you save by not having to purchase a relocating assembler and linker you can easily afford to pick up James Hendrix s Small C Handbook and Brian Kernighan and Dennis Ritchie s The C Programming Language Both are essential A Real Tool Despite its price Small C is no toy It may lack a few features and it won t win any awards for ease or speed of compilation but you can write real programs with it and the resulting code will be reasonably compact and efficient Along the way you will learn a lot about both the C language and if you have Hendrix s book the operation of a C compiler What follows are a few modest examples of Small C These are working programs aimed at the weekend programmer myself included That means barring seri
229. replaced the clumsy and ugly C printf function with a concept called the stream The lt and gt have been overloaded for this purpose although they retain their usual meaning when working with integers Instead of stdin stdout and stderr we write to cin cout and cerr as follows cout lt an integer lt int_num lt a float lt floatnum No more format statements No barf ing if you don t have the right number of arguments So it s much more readable There are many other features of streams which make file handling much easier than with old C Extensibility Why is all this so useful For one thing it helps you organize your code Modula 2 users may see some familiar ideas More importantly once a class is completely defined it becomes part of your compiling environment you have truly extended the compiler and it will check errors for you as if your class were built in like an int or a float Extensible languages have gotten a lot of bad press and rightfully so Nowhere in his book The C Program ming Language by Bjarne Stroustrup Addison Wesley 1986 does Stroustrup use the word extensible and I think 34 MICRO CORNUCOPIA 40 Mar Apr 1988 it s because he doesn t want C besmir ched with FORTH s reputation FORTH is a fascinating language You create new keywords with the same status as the originals Creating keywords is what FORTH is all abou
230. results For those of you who didn t attend a reading of Micro C 38 those results are in Figure 1 On Your Mark In short Turbo Prolog 1 1 was twice as fast as Turbo C 1 0 and half as fast as Turbo Pascal 3 x One responder J Wilson from Rawland Heights California noted that I forced the C compiler into large model by declaring the list as a stack variable He suggested using register variables in order to move the list out of the stack and into small model J was able to tweak his code down to 3 2 seconds using the Mark Williams C compiler and an AT clone 80286 CPU running at 10 MHz The register variable suggestion is a good one In Turbo C we can specify a register vari able in the code see Figure 2 or in the compiler by turning the register variable optimization on Both produced identical benchmark results 2 5 seconds on an AT clone running at 10 MHz Note I ran the original benchmarks on an 80186 XT clone running at 8 MHz The 10 MHz AT clones are much faster Note also that the Turbo Prolog code runs in 1 2 seconds on a 10 MHz AT clone So the results are still relatively speaking the same Turbo Prolog is about twice as fast as Turbo C which is a little faster than Mark Williams C But Turbo Pascal is still faster than all the Cs 80 MICRO CORNUCOPIA 40 Mar April 1988 reported and tested And version 4 0 which is half again as fast as 3 x is roughly twice as fast as Turbo P
231. reware to attempt I doubt it Shareware does not compete on price alone In functionality and sophistica tion it has matched or exceeded many programs from the standard commer cial sources Since shareware is commer cial software with a non traditional dis tribution system authors aren t stinting on power or quality Now that desktop publishing is a hot field we should ex pect a shareware entry before too long Does anyone have a lead for me I also wish that soft fonts were easier to use with my laser printer Lasers aren t as expensive as they used to be but soft fonts continue to be expensive I ve now seen inexpensive commercial software that does a nice job of con figuring fonts for use with Microsoft Word and WordPerfect see the review of The Soft Font Manager in the Decem ber 8 1987 issue of PC Magazine so all I need is a nice shareware font gener ator Perhaps I should also mention that the font field is fraught with peril You can violate a copyright as quickly as you can say Times Roman Of course cloning fonts has become extremely popular because not every one wants to pay the licensing fees for Times Roman and Helvetica That s why Hewlett Packard for example of fers Tms Rmn and Helv on their LaserJet font cartridges So far there have been no look and feel suits that I m aware of Apparently all you have to do is choose slightly different names and everything wi
232. rminator We shall generously ignore the ter rible code generated to allocate the local array and copy to it and concentrate on the single line of C code iopmem strlen iopmem 1 c which duplicates a single assembly lan guage instruction Here we have a curious situation Be cause of the limitations of the C lan guage it s impossible at compile time to determine the location of the last ele ment of the fixed length array in this case the device name We therefore use the run time function strlen which cal culates the length of the string The last element lies at length minus one Let s hold our noses and look in Figure 1 to see the code generated by that single line of C If STRLEN had been skillfully coded in assembly language it would replace the six instruction loop with a single REP SCASB The length would have been calculated at the end by subtract ing pointers Further notice the tremendous over head involved in getting into and out of every procedure call My final count of machine instruc tions executed for the single line of C code is 153 versus 1 for assembly lan guage The example of this line while worse than average is not atypical A Lazy Language All those easily accessed library func tions can be very seductive the programmer stops bothering to find the _ Figure 1 Code Generated By A Single Line Of C LEA DI BP 34 PUSH DI meme Bem ae pees ie be to
233. rocedures for accessing the PC BIOS and MS DOS The object modules use Microsoft conventions so you can use Turbo C with many commercial libraries Borland provides minimal support for third party debuggers but it s cur rently testing its own symbolic model to be released sometime in 1988 Other missing elements such as an object module librarian and a graphics library will be included in version 1 5 See sidebar for the latest on version 1 5 Turbo C generates very intelligent assembler code which makes good use of shifts and registers The initialization code for the call to putchar in CODE QUAL is rather large though See Figure 3 for a listing of CODEQUAL C and the assembler output of each com piler C Ware DeSmet C v3 03 This compiler has been around for By Scott Robert Ladd P O Box 61425 Denver CO 80206 303 322 7294 quite some time and has a loyal follow ing It was one of the first lower cost C compilers for MS DOS Just recently C Ware repackaged their compiler with additional libraries and utilities Documentation comes in a simple three ring binder and appears complete though somewhat sparse Installation is not automatic but it s quite simple and the package lives hap pily on a two floppy system It takes less than 500K bytes on a hard disk An editor SEE assembler linker and debugger all come in the package DeSmet uses a nonstandard object MICRO CORNUCOPIA 40 Mar
234. rolog But the mystery deepens even as I write Dr Purdum president of Ecosoft in Indianapolis Indiana recently sent me the latest release of Eco C 4 05 so I compiled my original program n short Turbo Prolog 1 1 was twice as fast as Turbo C 1 0 and half as fast as Turbo Pascal 3 x and ran it on the original 80186 XT clone Result 12 2 seconds or 6 seconds faster than Turbo C on that machine And the code was only 12K 8K smaller than Turbo C s Jim Palmer Optical Sciences Center in Tuc son Arizona sent in his Turbo BASIC and Quick BASIC results which were little short of amazing both BASICS were better than twice as fast as Turbo Pascal 3 x See Figure 3 for a summary of these results Dr Purdum suggested that internal repre sentation of floating point might be part of the explanation Turbo Pascal all versions represents float ing point numbers in 6 bytes 1 bit for sign 39 bits of number and 8 bits of exponent Turbo C Turbo Prolog Turbo BASIC and many other C s like Eco C use the 8 byte IEEE standard 1 bit for sign 52 bits of number and 11 bits of ex ponent to represent floating point numbers Assuming something like 2 bytes a move Turbo Pascal saves a move every number or a fourth the time The rest of Turbo Pascal s secret is still open to speculation but Turbo Figure 1 Results from Micro C 38 Compiler _ Size COM EXE 80186 Turbo C a 0 20K 18 2
235. rsay I ve since had the chance to look at part of 1 2 3 with a debugger the part I inspected was apparently generated by a high level compiler I d appreciate hear ing from anyone who knows what per cent of VisiCalc and 1 2 3 were written in assembly language The Memo It is my opinion that 8086 assembly language is superior to C I realize my opinion runs against con ventional wisdom and I shall do my best to point out theoretical practical and historical flaws in this common knowledge 42 MICRO CORNUCOPIA 40 Mar Apr 1988 Practical Examples Ask any knowledgeable person to name the two most successful programs in the history of microcomputer sof tware They are likely to name VisiCalc and Lotus 1 2 3 probably the two most money making applications programs ever written Both programs are complex and sophisticated perfect examples of code that must be written in high level lan guage Yet their authors chose to write substantial portions in assembly lan guage Were they misguided in doing so I think not Lisa In 1979 Apple Computers was buoyed by the success of its Apple II computer in the business market due mostly to the success of VisiCalc Apple appeared to be in a perfect position to dominate the market before IBM gained a foothold So Apple set about building the ul timate business computer and they were going to do it right This meant coding every line in a high level lan guage
236. rvices before it is actually received by your program I ll not bore you with the electrical interface that s Larry s department explaining the electrical characteristics I mean not boring you Instead Pll start at the lowest level any POP Plain Old Programmer cares about A short primer goes something like this Finger presses key Keyboard sends scan code to PC PC receives an interrupt 9 from its keyboard interface Interrupt 9 tells the PC to read the scan code convert to ASCII character and save it Sometime later a program or MS DOS calls interrupt 16h to retrieve the character This issue we ll take a look at inter rupt 9 and see what we can do with it In the next thrilling episode we ll inter rupt this column with 16h INT 9 Keypress Servicing The PC keyboard doesn t work like normal ASCII keyboards That s be cause it isn t a normal ASCII keyboard Matter of fact it s not an ASCII keyboard at all Instead of sending an ASCII charac ter code when it sees a keypress or key release the PC keyboard sends a scan code Since every key on the keyboard has a unique press and release scan code even the control and shift keys a properly written program can know at any instant which keys are down Scan codes don t correspond to ASCII character codes at all The keys are simply assigned an arbitrary num ber according to their position on the board The ESC key is 1 for instance the
237. s The recent introduction of low priced under 200 compilers offering many of the features of their 400 brothers has really warmed things up eviewing 11 compilers is not as Rees as I had originally expected Benchmarks are a handy tool in these evaluations but they only look at a few aspects of a compiler What about ease of use library completeness and ANSI compatibility Many of the products also come with extra utilities including debuggers assemblers linkers and librarians All of these have to be taken into account when judging the contestants I ve included the following compilers in this review Borland Turbo C v1 0D C Ware DeSmet C v3 03 Computer Innovations C86Plus v1 09g Datalight Optimum C v3 11 EcoSoft Eco C88 v4 02 Lattice C v3 21 Manx Aztec C Developers Kit v4 10a Mark Williams Let s C v4 0 12 Metaware High C v1 4 Microsoft Optimizing C v5 00 Microsoft Quick C v1 00 Benchmarking Creating benchmark programs is an arcane art For example traditional benchmark programs such as the Fibonacci or Sieve tests have been in validated by modern optimizing com pilers These compilers recognize the 8 MICRO CORNUCOPIA 40 Mar Apr 1988 benchmarks and generate special code for them The benchmarks I wrote fall into two broad categories composite and specific Composite benchmarks use many different types of functions state ments and data types in longer programs S
238. s as well as newcomers to C Continuous refinement of Blaise Computing s library products has produced a collection of tools that are unsurpassed for reliability functionality and ease of use Built upon the widely acclaimed C TOOLS PLUS C TOOLS PLUS 5 0 includes such highly developed OINTERVENTION CODE Schedule C functions at specified times inter CTOOLS PLUS S0 a General s scr orders cursor memory Accept user input formatted output printf window oriented output NEW INTERRUPT SERVICE ROUTINES Capture DOS critical errors and keystrokes Install hardware interrupt handlers ORESIDENT SOFTWARE SUPPORT Install detect and remove memory resident programs O MENUS Horizontal and pulldown NEW Lotus style support NEW vals or with a hot key NEW Take full advantage of DOS even from memory resident programs NEW OFAST DIRECT VIDEO ACCESS All monitors even EGA 43 line mode OPRINTER CONTROL Access BIOS print functions NEW Control the DOS PRINT utility NEW OUTILITIES AND MACROS Take advantage of DOS file structure Manipulate data types far amp near pointers NEW ccess any memory areas with fast peek and poke macros NEW C TOOLS PLUS 5 0 supports the Microsoft C Version 5 0 and QuickC F compilers requires DOS 2 00 or later and is just 129 00 input to them run any
239. s blurry won t focus You can t get rid of the pain be tween your shoulder blades Lower back stiff and sore Welcome to the wonderful world of computer neck As a chiropractic physician specializing in spinal biomechanics I see a lot of computer necks You can have your own in as little as two hours Here are some simple steps you can take to help reduce this misery Al though there are conflicts between bits bytes and bones you can take advantage of the inherent design strengths of your musculoskelatal system There is a basic relationship which balances your bones and muscles with the effects of gravity If let your bones support you your muscles won t fatigue so quickly From the side while standing a line drawn from the lobe of the ear should go through the point of the shoulder the point of the hip and just behind the bump of the ankle Sitting your upper body balance should not change Sit upright with your chin in a neutral posi tion and your shoulders down and back Chair height should let your legs to reach the floor without dangling Thighs and forearms should be nearly level with the floor If you support either your wrists or elbows both is even better you re removing load from your shoulders The keyboard must be directly in front of and below the monitor I ve found that raising the middle or bottom of the monitor to eye level works best for most of my patients You simply cannot
240. s easy enough for my family get ting to the correct directory was a bog gle confusing I kept telling them how easy it was all they had to remember was to type D cd family words name where name is either Karol or Katie 20 MICRO CORNUCOPIA 40 Mar Apr 1988 In their defense I 1l admit there is an incredible number of combinations in the above sequence What the problem called for was a programming solution a tool to simplify moving among direc tories The more I thought about it the more I was convinced I wouldn t mind an easier way to move between direc tories and subdirectories myself Maybe I could get organized It s not uncommon for me to have a pathname something like C eco88 tools source projectl I know I m working on project1 but I m not always sure which subdirectory holds it Also it s a hassle to type in the pathname for project1 Yet I don t want to move the project from its logical place Designing A Solution When I first started thinking about how to address the problem several solutions seemed feasible The most direct is a batch file for each user that contains the sequence of MS DOS com mands that would place the user in the proper directory That s the easiest solu tion It would solve my family s im mediate problem but we d need a batch file for each directory pathname we wanted to use Again some form of program seemed to be the answer First what informati
241. s limitation of one C compiler extends to all C compilers if you want portability As far as I am concerned this single restriction renders C useless for significant projects Local Labels My assembly language features local labels These are redefinable labels L1 L2 R1 etc used as place markers for control mechanisms loops branches etc Without this feature you must in vent a different name for every minor place holder The really significant names become lost in the sea of ir relevant place names With this feature the symbol table becomes as clean and uncluttered as it is in high level lan guage and the identity of the control mechanisms is obvious Library C comes with an extensive library This is C s greatest strength when com pared to all languages not just assembly language It makes C a good choice for drafting short programs This advantage disappears however when the program becomes large and complex The library s usefulness stays fairly constant as the program grows so it becomes a smaller percentage of the total effort I designed my assembly language for easy linking of source modules with library routines Once you ve coded a routine admittedly nontrivial you can continue to use it by simply including its source in the list of files to be assembled Coding Time C claims it needs fewer lines of source than assembly to create an equivalent program C also claims that 44 MICR
242. s on your PC XT AT Just plug your external Mac drive into the MatchMaker and format read or write single or double sided Mac diskettes MatchMaker w Mac External Drive 325 00 UniDOS Z80 CoProcessor Card 169 95 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 Now includes UniForm PC The CompatiCard by MicroSolutions 169 95 This half card floppy controller allows you to run up to four 8 5 standard 96 TPI or high density or 3 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 disk formats Compaticard with UniFORM PC xxx SPECIAL kk Ak 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 disks copy delete and view files 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 Zorba or almost any 280 CP M 2 2 system HDS Host Board with Winchester Connection software HDS Board with software and WD1
243. t For the IBM PS 2 and the IBM and Compaq families of personal computers and all 100 compatibles Card to qualify for the upgrade price you must give the serial number of the equivalent product you are upgrading Please specify diskette size O 514 O VISA Credit card expiration date jp O 3 O MC O Check O Bank Draft Reader Service Number 1
244. t you just build keywords until you have one that does what you want and call that your program Once a new keyword submerges in the bubbling soup it becomes part of the morass There isn t a soup there s only owhere does Stroustrup use the word extensible and think it s because he doesn t want C besmirched with FORTH s reputation your soup You make your own keywords which have meaning to you and you write your programs in your own personal Captain Midnight Decoder Ring programming language This is why FORTH is called write only no one has the patience to go back and decode what you did I think FORTH might make a dynamite assembly language now that it s being cast in silicon for microproces sors But for general purpose program ming it s too out of control C has enough restrictions that ex tensibility is manageable The syntax is consistent you must write header files so the user can see the functions you re using and the compiler checks your syntax when you re using a class It s more work than defining a new keyword in FORTH but it does a lot more for you Introducing DAIMS DAIMS Data Analysis and Interac tive Modeling System is a project funded by the Institute of Naval Oceanography with principal inves tigators Tom Keffer and Dale Haidvogel and one programmer me Why are we doing this Scientists are still programming in Fortran They clutch wi
245. t for FREE product information package COVOX INC 675 D Conger Street WINDOWS SPRITES MULTIPLE SCREENS ARE EASY WITH OMNIVID PC olan aia IBM PC XT and compe BLAZING FAST Compatible with any language Offers support for multitasking CGA Monochrome Hercules Compatible mgm Available March 1988 VISA mm 9 95 Eugene OR 97402 606 325 3736 sexso 3987 Valley View Drive Ashland KY 41101 503 342 1271 Reader Service Number 25 Reader Service Number 67 Advanced C Source Code Analysis With C LINES C TREE e Outlined listings reflect flow of control within procedures e Tree diagrammer shows flow of control between procedures e Source code reformatter 59 95 shipping amp handling included Maryland residents add 5 sales tax Requires PC Compatible MS DOS 256K SOFTREX 4807 Bethesda Av Suite 287 Bethesda Md 20814 301 881 8274 Reader Service Number 56 GA 3 VIDEO CARD Use Up to 3 Monitors From One PC Use All 3 Monitors Up to 1000 Feet From Your PC Supports CGA HGC MDA in any combination e Works with standard PC software also e XT AT example software included e Long Distance Option 39 95 per monitor e Quantity OEM discounts GA 3 Video Card THI creeps ne ae w st Progress Lane Eas ng 000 523 0258 i Parker Colorado 80134 zea 303 841 4772 Colorado 800 237 2842 Outside CO Reader Service Number 65 Reader Service Number 81 QL Computer 99 95 p
246. t into the machine The first time through CRC couldn t read one of the files On the second time through however it read all of them correctly Then I grabbed the cheapest generic est oldest beater from my disk stack filled it with files and CRC d the lot Then I gave the disk the same boiling water treatment cut open its jacket and dried out its flimsier middle drying took two hours The surface of the disk looked awful but none of its data had evaporated Conclusion Common disks stand up amazingly well to water torture But I m surprised how well these teflon disks repel other things especially fingerprints It was hard to get fingerprints to even show up the surface was just too slick After the scalding water bath the second Verbatim was as shiny and clean as new I think the peanut butter was a little too much for the first disk it stuck to the roof of the drive Also the coating does more than just protect against grime The teflon coating should protect the drive s head from those hard little oxide particles And the coated disk surface should wear longer They ve run a disk 3 000 000 revolutions almost 21 days of head down reading and writing and found no phonographing circular tracks or gouging Prices are supposed to be 15 higher than standard Ver batim media The premium price might easily disappear however I noticed there was no burnishing on their disks no need to the head rides on the teflon no
247. t it interpreters are little more than parsers with a symbol table Using ASCII text files for storing data shouldn t be limited to large database type projects either Tim used this approach to write a simple metric to decimal conversion program for his father Then when his father wanted to add new conversions he used his word processor to add them Try that when the data is buried inside the program code Come to SOG VIT July 14 July 16 Bend Oregon Figure 1 Program To Parse Data File For Directory String program get exe Oct 23 1987 Version 0 2 JJP This program moves the user from the current working directory to a new directory Copyright c 1987 by Jack Purdum Each user is allowed to distribute up to 11 563 copies for non commercial use include lt stdio h gt include lt stdlib h gt include lt string h gt define DATAFILE define MAXBUFF 256 define MATCH 0 define FAIL 1 Has prototypes for un headered Need for string functions functions get dat Name of directory info file char buff MAXBUFF Input buffer for file reads path MAXBUFF Buffer for full path name drive 3 Buffer for disk drive Prototypes for non standard functions int search file FILE fp int do switch void FILE open_data_file char name int main int argc char argv int flag FILE fpin if argc 2 char where
248. t on the oxide That would account for their variation in coating thickness and it means that they have saved themselves a very big step They can punch the cookies out of the tape stick them in jackets and test them No more polishing If the coating hasn t reduced yield significantly they ve got a winner However the thickness of the coating is definitely a con cern They say they have no plans for higher density 5 1 4 or for 3 1 2 That tells me that coated standard double density may already be pushing the limits Too bad Their liquid resistant wear proof media inside those fold proof 3 1 2 packages would make for an almost indestructible disk Other Disk Manufacturers I asked other disk manufacturers what they thought about Verbatim s new product Each time they responded with statistics They insisted that only a tiny percentage of data loss results from physical damage to the disk Operator error mag netic fields and misplacement were all more significant But I also picked up an underlying note of terror Verbatim s ads showing a disk covered with everything you d find in an office except peanut butter of course have really spooked the competition Ah the joys of being a marketing type and blowing away the competition with a sexy new product And if Verbatim is manufacturing them for less Taiwan Hong Kong Korea In Comdex s press room I found myself by chance seated next to an editor from the
249. t s look closely at the very first lines of program code com piled for each of the programs driver init options opts phantom sconfig and uconfig They are as follows define IOPMEM dev iopmems B8alX0X zopen c char c char iopmem 30 strcpy iopmem IOPMEM iopmem strlen iopmem 1 c if z80 open iopmem O _RDWR 1 print can t open device s x n iopmem perror error system stty raw echo n exit 1 zopen opens a device that allows ac cess to the Z 80 memory within the 986 system The name of the device depends on the number of the user for whom the device is being opened Thus one must take the user number c and plug it into the device name I do the same thing in my assembly language screen editor it is coded as follows IOP_NAME DB dev iopmems 8a1x0 IOP_USER DB 0 parameter c has already been placed in the AL register MOV IOP_USER AL In assembly language the act of plac ing the user number into the device name takes precisely one machine in struction In C things are a bit messier C frowns upon the modification of pre declared arrays so we declare a local array and call the function strcpy which copies the string IOPMEM to the local array Note that IOPMEM is defined as a macro every usage of IOP MEM within the program will generate a distinct identical copy of the 19 byte file name plus the 1 byte te
250. tec C that originally sold for as much as 500 Each oom includes C compiler assembler linker librarian UNIX routines and more Special discounts are available for use as course material C Prime sesaciesseceocsdunadsaicernece 75 A Vv 3 W T aN anx Software Systems One Industrial Way Eatontown NJ 07724 Reader Service Number 17 Aztec ROM Systems 6502 65C02 8080 Z80 8086 80x86 680x0 An IBM or Macintosh is not only a less rece way to develop ROM code it s Targets include the 6502 8502 8080 280 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 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 Call for information and pricing CP M 8080 280 ROM C compiler 8080 280 assembler linker librarian UNIX libraries and specialized utilities Aztec C Il c CP M amp ROM 349 Aztec C ted 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
251. th a stimulating picture on the cover The cover of course has nothing to do with the content but you re here looking for escape and vulnerable to suggestion And publishers know these things So you find one and begin the acid test you open to the middle and start reading High Thizbin exclaimed Wicna this is a matter of Feeblum There will be oompla between the Snorts and the Bingos if we don t show our flexmuscle by using the Whambammer The Thiz bin looked thoughtful as he absently in serted his digiplex into a zitplorg It s a new language and one you suspect created as a smokescreen for bad writing Mumbling something about literary license and good ol English you jam the book back onto the shelf and move on It s a familiar case bad something trying to disguise bad something else But sometimes a concept is good and sometimes it genuinely needs a new lan guage Another Programming Language In November I attended the first Usenix Unix User s Group C Workshop There was a lot of arguing between two subgroups one wanting to extend the language and one thinking it was already too big A third hardly visible subgroup is the majority of programmers who haven t heard of 32 MICRO CORNUCOPIA 40 Mar Apr 1988 C And the programmers who are happy with what they re using and think there are already enough lan guages in the world In the middle of all this is C s crea
252. th white knuckle fierceness to the object which really slows them down It s understandable Fortran was one of the original non assembly program ming languages and scientists have been using it since the fifties As a result there are tons of debugged scientific Fortran routines out there and it s easy to think all I have to do is link this package and that package and the other one and it s done Of course it s never that easy We do need to tweak and some things just won t talk to others The scientist kills a lot of time struggling with the language and not much time struggling with science Fortran 1 scientist 0 Our goal is to leapfrog all that stuff and make it that easy To do this we need to lure people away from Fortran It s been tried before So the lure has to be powerful We chose C because it offers the power of object oriented programming without losing the efficiency of C We plan to produce the following 1 a standard simple data storage and retrieval system along with C classes and utilities to perform these Operations 2 as many C classes as we can create including interfaces to existing Fortran packages or collect from public domain sources 3 an interpreter including the most useful classes and we re porting version 1 of the interpreter to the PC I ve tried to make the interpreter a cross between BASIC and C It will evaluate arbitrarily complex expressions invol
253. the control register set ting the outputs are latched and the inputs are not latched By the way input and output are from the CPU s point of view A PPI output port accepts data from the processor and outputs it to the outside world or whatever Mode 1 takes advantage of hand shaking for more controlled strobed I O Ports A and B each use one nibble of Port C for transmitting status and receiving control signals Ports A and B can be either input or output with both inputs and outputs latched A nice feature of this mode and Mode 2 is that when interrupts are enabled an input device need only strobe its data into the PPI The PPI will take care of generating an interrupt re quest signal for the CPU Mode 2 does strobed bi directional I O It looks a lot like Mode 1 but data is received as well as transmitted Five bits of Port C transfer control and status information between the PPI and the CPU Only Port A may use Mode 2 The PPI Pinout The 8255 interfaces to the CPU in much the same manner as the interrupt controller 8259 and the DMA control ler 8237 Figure 1 shows a schematic of the 8255 as it s used in XTs and clones Older PCs are a bit different TIl detail those differences shortly The active low chip select CS lets the 8255 talk to the processor Chip select signals for the PC s smart chips come from an LS138 3 to 8 decoder Looking at TI s TTL Data Book we see that any port
254. ther compilers Eco C88 also features o E Aae o eer ees ene e Robust library including many new 4 Hi yee functions Memory Options e CED editor with online function help split oe windows compile edit link capability oe ae e New expanded manual with sample pro Model Code Size grams for the library functions AS Small 64K Compact Medium _ Large C more Source Code Debugger Finally if a really nasty bug persists put C more our source code debug ger to work With C more you can watch your program as it executes single step it set simple or conditional breakpoints test complex expressions use variables as indexes into other vari ables initialize and trace variables examine CPU registers display results with printf type options and much more C more can help you track down bugs in minutes rather than days The price for Eco C88 is 99 95 And for a limited time we ll give you our C more debugger at no extra charge Ecosoft Inc 6413 N College Ave Indianapolis IN 46220 317 255 6476 Tech Info 800 952 0472 Orders er Service Number 9 62 MICROCORNUCOPIA 40 Mar April 1988 ee unsigned len dE from fi together huh The results of testing keyboards by the way were appalling I didn t find a single Taiwanese manufactured keyboard which couldn t be made to produce alias incorrect keypresses when more than two keys were down at a time If you
255. time Let your system do the work for you With 23 powerful state of the art tools for the IBM PC and compatibles _ both beginners and experts will find programming a breeze Easy to use Unlimited program sizes Online documentation Determine program hierarchy external R T library functions etc More rigorously check program syntax Beautify source programs to user selected formats Cross reference and check symbol usage Determine a program s critical path Monitor program OS execution and more At 79 95 per volume or 130 for both with a 30 day money back guarantee the Toolbox is simply the best value today The Toolbox works with your existing C compiler s and enhances your development environment Call and Order Today Visa MasterCard Accepted MMC AD Systems Box 360845 Milpitas California 95035 408 263 0781 The C Tool Specialists Reader Service Number 57 24 MICRO CORNUCOPIA 40 Mar Apr 1988 and 6800 2 8 9 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
256. tion set including floating point primitives a 16 bit data bus and a 40 MHz clock The 34010 also contains a souped up 6845 style video and sync generator From the activity in the room and from talking to other folks around the show some of whom had designed boards with both the TI and Intel chips it looks like T s winning the graphics engine competition OK what difference does it make to you and me whether there s a super screamer graphics processor hidden in our new graphics card Well there are some very interesting high level graphics which are relatively easy for programs and CPUs to support Graphics languages include PostScript DGIS Halo Nova CGI Gem Windows Borland s new graphics interface and so on PostScript is a relatively high level interface DGIS lies at the low level end Your graphics editor and desktop package for instance might output graphics and text in PostScript form Your scanner might also generate Post Script Meanwhile if your video monitor also understood PostScript then everyone would be speaking the same language Want to redirect the image Redirect the PostScript Timely If you ve ever watched AutoCad rotate a complex image you know what a struggle it is for a CPU even a fast CPU with a math co processor to manipulate graphics simple 1 bit per pixel monochrome graphics What if the CPU could simply in struct the graphics processor to rotate the image 3 degrees clo
257. tor Bjarne Stroustrup Bee yarn eh he says And you have to be a Dane to pronounce my last name He makes a sound like clearing his throat And then he makes a case for keeping C small small languages have been more successful What s C 1 A better C Many of the ANSI C improvements have been taken from C for example function prototyping You can take old C code and compile it with C C programmers can use the language immediately and learn new features as they need them 2 C supports user defined types This is different from C s typedef which simply aliases one thing for another A true user defined type is in distinguishable from a native type like int or float Plus it follows normal scop ing rules and naming conventions With user defined types the compiler performs all the error checking it does for any other type You can define operations on types a matrix type can ometimes a concept is good and sometimes it genuinely needs a new language have the operator overloaded to per form matrix multiplication for example User defined typing or data abstrac tion is an important advance Once we ve packaged and debugged a type we can use it without learning all the details of the internals you tell it what to do not how and if you make a mis take the compiler tells you 3 C is object oriented This means you can not only define new types
258. tree source Save programming time and effort Access any record or group of records by You can develop exciting file access programs quickly and easily because CBTREE provides a simple but powerful program interface to all B tree Get previous operations Every aspect of CBTREE is covered thoroughly in the 70 page Get less than Users Manual with complete examples Sample programs are provided on Get greater than disk Get sequential block Get all partial matches e Insert key and record Delete key and record Change record location Get first e Get last e Get next Get less than or equal Get greater than or equal e Get partial key match Get all keys and locations Insert key Delete key Gain flexibility in designing 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 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 Your programs will be using the most efficient searching techniques CBTREE provides the fastest keyed file access performance with multiple indexes in a single file and crash recovery utilities CBTREE is a full function implementation of the industry standard B tree access method and is proven in a
259. trol byte of 10011001b 99h to I O port 63h sets up the PPI for operation in the PC Power On Test During power on self test POST the BIOS uses the PPI in a different manner During the first four checkpoints BIOS checksum Timer one memory refresh verification DMA test and memory test Port A is an output port The BIOS loads Port A with the check point number 1 4 prior to each test Failure of any of these four tests leads to an immediate HLT halt instruction At this point the intrepid repair per son can examine the status of Port A directly with a logic probe The value in Port A shows how far the system got before it puked A very handy diagnos tic since during the first four check points the system doesn t know how to beep much less write error messages to the screen Some PPI Utilities So you ve put up a Don t fool with me I m thinking message on the screen but you know that some ab user will bollix up the works by leaning on the keyboard at an inoppor tune moment It would certainly be nice to be able to kill the keyboard from time to time Figure 4 shows a routine which takes advantage of PB6 to shut down the keyboard We could just as easily have used the keyboard acknowledge bit PB7 but turning off the clock signal to the keyboard seems a more obvious method Since this is our C issue I chose Pascal for the examples KeyboardOff won t take any crap from the user
260. ugs quirks and inconsistencies It will catch subtle errors before they catch you By examining multiple modules PC lint enjoys a perspective your compiler does not have n ES Stephen D Cooper Blue Notes San Francisco PC Users Group Don Malpass IEEE Software Gimpel Software 3207 Hogarth Lane Collegeville PA 19426 215 584 4261 PRICE 139 00 first copy 100 each additional MC VISA COD PA residents add 6 sales tax Outside USA add 15 Runs on MS DOS works with any C compiler direct support for 12 major C compilers including Microsoft 5 0 Turbo C86 Lattice Datalight Desmet PC lint is a trademark of Gimpel Software 66 MICROCORNUCOPIA 40 Mar April 1988 EMERALD MICROWARE Your CP M and MS DOS Connection 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 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 Uniform for Kaypro and other machines 64 95 ok NEW xxx MatchMaker by MicroSolutions 139 95 MicroSolutions newest board gives you complete access to Macin tosh 32 diskette
261. ve all the gory details of INT 16h as well as some ideas on how to write programs to take the place of Superkey Until then please please PLEASE try to sleep more regular hours than I do And remember to adjust the air intake of your kerosene heater And don t wear wet sneakers on an empty stomach you ll get a head cold and die of nose fungus C CODE FOR THE PC source code of course C Source Code Bluestreak Plus Communications two ports programmer s interface terminal emulation 400 CQL Query System SQL retrievals plus windows 2 e eee eee S825 Greenleaf Data Windows windows menus data entry interactive form design 315 Barcode Generator specify Code 39 alphanumeric Interleaved 2 of 5 numeric or UPC 300 GraphiC 4 0 high resolution DISSPLA style scientific plots in color amp hardcopy 275 Vitamin C Mac Windows ie oho o han eat we ae Ge eG ea OS OURS 200 resident C TSRify C programs e e e 165 Greenleaf Communications Library interrupt mode modem control XON XOFF 160 Greenleaf Functions 296 useful C functions all DOS services 160 Essential C Utility Library 400 useful C functions 2 ee ee ee ee 160 Essential Communications Library C functions for RS 232 based communication systems 160 PC IP CMU MIT TCP IP implementation for PCs
262. ving integers double floating point numbers and matrices of any size which it easily reads from disk files All the results along with source code will be public domain C Compilers For The PC There are at least two C translators for the PC and I ve heard rumors of a third Note I m calling them translators generally your code is translated into standard C code which you run through your C compiler The current compilers of choice are Microsoft and Lattice but I suspect Turbo C might work with some tweaking if you use the Microsoft linker I had no trouble getting the translator usually called cfront from Guidelines but getting the Advantage C was much more difficult At the C workshop I met the marketing group Oasys who sell the PC version through Lifeboat and the developers Glockenspiel from Ireland They explained their reluctance in hand ing out Advantage for review The two compilers have been reviewed in Byte Computer Language and PC Tech Journal Apparently the reviewers were not C programmers They ran some benchmarks compared prices Guidelines is 195 while Ad vantage is 495 and said might as well get the cheaper one Glockenspiel Advantage claims to have made some 200 bug fixes to the AT amp T code Also he claimed Advantage was better adapted to the Intel ar chitecture I ported the AT amp T version of the C translator to my Sun 3
263. w header files so you often have to add your own function declarations for such functions as malloc and strepy The library is small but adequate This very complete package with an editor assembler and debugger even includes full source code for the microEMACS editor Let s C does rely upon the DOS linker though One especially neat feature is their shell program which lets you edit and compile without going back to MS DOS Compilation errors show up when you get back into the editor so you can make quick corrections Performance was very good This compiler turned in the fastest run of FXREF and did better than many com pilers advertising advanced optimiza tion Code size was small Due to the MICRO CORNUCOPIA 40 Mar Apr 1988 13 lack of support for function prototypes FXREF SORT and GRIND needed very minor modifications in order to com pile The first thing which caught my eye in Let s C s code generation was the im plementation of the putchar function It looks as though a near call is done based on an absolute address stored in the data segment SUBtracts are used to initialize registers to zero just as fast as the more commonly used XORs and much faster than the often used direct MOVs Metaware High C v1 4 This compiler felt massive when I used it For example the compiler itself takes up a single 600 K executable file which uses dynamic overlays High C has been used in
264. we the author how he knew so much about every program I d disassembled For one thing I keep tabs on the contents of each register as I walk through the object code That way I can specify in the comment what value is being output to a port or I can tell where an index call will wind up If the program has several segments I can tell when code in segment 1 uses data in segment 3 or vice versa Also I try to explain the complex in structions well enough in the comments so that novice assembly language programmers can understand them As far as I know this is the only product which automatically disas sembles indexed calls used a lot in BIOS calls the only product which lists who s calling a subroutine at the beginning of the subroutine rather than in a table at the end of the listing and this is the only disassembler I ve ever used where I simply SR the object filename a G and 20 seconds later have a complete com mented listing This all got started when Frank wrote a program to generate commented source of IBM s PS 2 BIOS IBM isn t releasing the source for PS 2 He markets that product as the BIOS Pre processor Just run it and it generates a commented listing of your BIOS ROM whether it be in a PC XT AT PS 2 or clone It had no trouble generating a thoroughly commented source of the X 16 s BIOS ROM Over 200K in a few minutes Dean and Earl at PC Tech will
265. ztec Eco Metaware Comp Inn ist 2nd 3rd 4th 5th 6th 7th 8th 9th 10th lith Datalight Microsoft Borland Metaware MS QuickC Comp Inn Aztec Eco Mark Wms Lattice DeSmet Crunch Borland Microsoft MS QuickC Lattice DeSmet Mark Wms Aztec Datalight Eco Metaware FXRef Display DiskIO AllocMem Mark Wms Microsoft MS QuickC Datalight Metaware DeSmet Borland Eco Aztec Lattice FXRef Display DiskIO AllocMem 1 834 5 716 21 4 45 0 2 130 7 362 17 3 28 1 1 859 21 792 53 9 33 2 2 088 9 295 26 6 29 0 1 946 9 135 35 3 28 7 2 831 9 359 14 7 29 0 2 570 9 215 26 2 28 7 NYN HF OWN Microsoft 666 7 058 8 2 34 5 438 11 408 7 4 23 2 450 18 160 2 34 2 25 2 482 21 324 9 3 20 6 451 21 308 9 7 20 6 810 21 324 8 1 20 7 771 21 436 14 2 20 7 2 JONN UP amp OO POW Microsoft MS QuickC MS QuickC Mark Wms Datalight Metaware DeSmet Eco Borland Aztec Lattice Comp Inn Datalight Borland Aztec Mark Wms Comp Inn Eco Lattice Metaware DeSmet 374 4 966 2 8 7 23 7 1 579 6 722 4 8 0 23 4 586 1 328 34 6 45 0 577 9 081 11 0 18 1 544 9 049 12 6 17 4 945 9 065 8 2 17 9 870 9 049 14 4 17 9 wr oP tI OWU SO J DeSmet Microsoft Mark Wms MS QuickC Datalight Aztec Comp Inn Lattice Borland Eco MICRO CORNUCOPIA 40 Mar Apr 1988 11 175 374 6 4 0 3 316 018 5 6

Download Pdf Manuals

image

Related Search

Related Contents

Manual R100  Technische Daten  Pipeline Priority Meeting Introduction Table of Content Time  Téléchargez son manuel d`utilisation ici.  LH110 Series Quick Start Guide  Samsung RDC-I500 Camcorder User Manual  Triarch 32321/16 User's Manual  Mamiya C3 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file