ebook img

3-D Graphics / AI Theory PDF

100 Pages·2013·12.48 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview 3-D Graphics / AI Theory

No. 41 May/June 1988 $3.95 THE MICRO TECHNICAL JOURNAL 3-D Graphics / AI Theory Three-Dimensional Graphics, Part 1 page 8 Earl Hinrichs uses high performance graphics IC to create and display depth. Neural Networks page 16 Modeling human reasoning is the first step in creating a useful robot. The Logic Of Programming Languages page 22 Proving that a language is logically valid beats testing it for 10 years. Applying Information Theory page 42 Calculating the maximum theoretical data compression and then applying it. Plus: Updating The C Reviews page 48 RS-232 Interfacing page 30 Button's Great Share", page 58 MarketiJ , H' ..of AndMuc Mu II 11 •• 1 .. 1.1 11111.111 III II I " 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: • Featured on the cover of Micro Cornucopia. • From 800 x 512 through 1024 x 800 resolution (depending on monitor and configuration). • 8 Bits per pixel for 256 simultaneous colors • Hardware support for CGA/MDA emulation. • PC, XT, and AT compatible The PC Tech Color 34010 video processor is a superior 34010 native code and DGIS development tool. We support up to 4 megabytes of program (non-display) 34010 RAM as well as up to 76aK bytes of display RAM. Compare our architecture and prices to any other intelligent graphics board. Then choose the PC Tech Color 34010 Video Processor for your development engine and your production requirements as well. Color 34010 Video Processor ..................... $1, 195.00 Price includes 512K display RAM, 1024K program RAM, and utility software. Monitor not included. Also available: DGIS, 34010 C compiler, assembler, 34010 fractal software, additional display and program memory, and various monitor options. PC Tech Monochrome 34010 Video Processor and Monitor • 736 x 1024 resolution (other options available) • 2 bits per pixel for 4 hardware gray shades • Hardware support for CGA/M DA/Hercules emulation • PC, XT, and AT compatible • Full page 66 line text editing with many popular editors • Excellent windows 2.0 application development system The graphics and bit manipulation capabilities of the TMS 34010 make the PC Tech Monochrome 34010 Video Processor 66 line full page text and graphics display faster than many 25 line systems. The video processor is available separately or with the high resolution white phosphor monitor shown above. Monochrome 34010 Video Sub-System .......... $1,295.00 Price includes Monochrome Video Processor and monitor pictured above. Also available: DGIS, TI 34010 C compiler, TI assembler. Monochrome 34010 Video Processor also available separately. SOG SPECIAL! PC Tech will offer a 10% SOG DISCOUNT on all , Designed, Sold and Serviced By: 34010 based video products ordered within 1 week of SOGI Special pricing effective July 7-21, 1988 904 N. 6th St. Lake City, M N 55041 (612) 345·4555 (612) 345·5514 (FAX) PC, XT, AT, DGIS, Hercules, and Windows 2.0 are trademarks or registered trademarks of their respective companies. Reader Service Number 3 DataDesk's New Turbo-lOl Enhanced Keyboard Bundle! L 12 function keys Enlarged Dedicated Pause, with functional L-shaped Enter Key Scroll Lock, Print Fll & F12 Screen keys Switch-selectable for swallping Ctrl and Caps Lock positions ' /.1 /- Extra-wide ,/. ., Shift keys ,/i"!, ,;. . / ~\ ~? ,..OO "" ftt~~· C\~\,\\~ Positive-tactile, ~1.r\\\'\:~' ~'{',~."""~",,--~,,,,---- firm-feel keys Dedicated screen O:f"''J'J control and cursor keypad with S __ ~.-- movement keys enlarged Enter key ~~-"'" You don't have to think twice. Get both - the best-selling Turbo! 01 T" Enhanced I(eyboard and ThinkTank;" the award-winning outline processor. For an unthinkable $149.95! Now Both You and Your PC can be State-of-the-Art The Turbo-lOl Enhanced Keyboard gives " Great typing touch ... there's only you all of the features of IBM's newest key You Don't Have one DataDesk Turbo-WI-the first board standard (see above photo). It's ideal To Be A Brain Surgeon keyboard to challenge IBM products for word processing with its traditional To Understand This Special Offer. seriously. "Selectric" typewriter layout featuring Jim Seymour enlarged Shift, Enter and Control keys. ThinkTank is already a best seller at $i95. PC Magazine, January 1988 " Spreadsheet entry couldn't be easier be So it's easy to figure out that getting both cause we give you both a separate Cursor the critically-acclaimed Turbo-lOi keyboard and Numeric keypad eliminating the need and the ThinkTank software for the price of " The Turbo-WI can satisfy all ... it's Ttou rcboon-s1t0a1n t'lsy e txocglugsleiv Ne utamcsti lLeo-fceke. dAbnadck t hkee ys tthureb koecyhbaorgaerds yaoluorn PeC-$ w1i4th9o.9ut5 f-liastt ean dinegal ytohuart a rock-solid product that does double duty and then some. let you type faster with fewer mistakes than wallet. And that's not all, our USA-made Robert Luhn ever before. Turbo-Wi keyboard is so well built it carries ThinkTank is the world's most powerful out a full 2-year warranty-which is probably a ! PC World, October 1987 " liner and idea processor. It will introduce you lot longer than your PC's warranty! But just II in case you are not completely satisfied, step-by-step to a fascinating new way of you can always change your mind, ~-­ organizing and managing your ideas, your with our no-questions-asked ~ ... ..---- time, your business, and even your thinking. And to get you up and running quickly and 30-day money-bac~/ INTERNATIONAL easily we even include 30 predefined Think guarantee. -.....---- Here's Wh a t 7651 HASKELL AVENUE Tank Productivity Templates. ThinkTank is the Experts Think ... VAN NUYS, (A 91406 considered by many to be one of the most (818) 780·1673 BOTH important productivity enhancers on a micro computer. It turns thoughts into reality and " I really prefer the feel of the Data TURBO·101 ENHANCED ideas into results! Desk Turbo-WI. The keys have tactile KEYBOARD AND .T..H.. ®INKT ANK feedback. No mush at all. SOFTWARE FOR ONLY: Instantly Upgrade Your Productivity Jerry Pournelle $1~ (~TI L'B/ · The Turbo-lOl and ThinkTank are both Byte Magazine, August 1987 " CAi;) '- O. ·..· .QP designed to instantly streamline and improve pPIlnega saen add hda ndlinSgh.i P. - your computing performance regardless of residents must also include $9,75 sales tax which model PC, XT, AT, Tandy or com " Don't plop down your simoleons for for each keyboard, LIMITED OFFER patible you use. With our Turbo-l0l a Keytronic or others ... for ingenuity of Nome ________ ____________________ ________ __ ThinkTank bundle, you'll feel the design and sheer dollar-value those from ~ ~ difference from the tip of your Company ___- --:.. _____________ DataDesk can't be beat. fingers to the center of ... .... . .. ·C~\.\. Curt Suplee your brain. dO.~ ~a Washington Post, May 1987 " ~'i~PS1lio Phone _______________________ ~ ~O~)~;~\~ Models also available lor the Tandy 1000, AT&T, PCjr and all Computer Type MacIntosh computers. ' Credit Cord No, ____. .;...-_-,::. "Limited offer with purchase 01 Turbo-101 enhanced keyboard. Exp; ______- --::; All DataDesk International products are registered trademarks ~ or trademarks of DataOesk International, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders, Copyright 1987 DataDesk International. Reader Service Number 8 ~.~"""-" ~-" IT'S WHAT'S UNDER THE HOOD THAT COUNTS! XT KIT WI 2 Floppy Drives. Includes: 0K 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. 80386 KIT- 8 mhz with lock, LED, Reset & Turboswitch ............. 579.00 10mhz with lock, LED, Reset & Turboswitch............. 599.00 XT KIT W 120MB Hard Drive. Includes: 0K 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. Includes: 0K RAM, 1.2 MB FD, 1 360K floppy 8 mhz with lock, LED, Reset drive and 40 MB Seagate St 251 hard drive, . & Turboswitch ............. 879.00* 6/1Omhz, serial, parallel and game ports, clock/ calendar, AT-style keyboard, cabinet, power 10mhz with lock, LED, Reset supply, monographics card, amber or green & Turboswitch ............. 899.00* monitor, keyboard switchable turbo. - Pictured keyboard is 5339 - *(For 30MB Miniscribe add $50.00) 1595.00 KIT OPTIONS *MS DOS 3.21 or 3.3 w/ CASES & GW Basic ....................... 95.00 HARD DRIVES POWER SUPPLY *5339 Keyboard Sub ............... , 24.00 *Color Options: & CONTROLLERS 150 Watt Power Supply (XT) ....... 50.00 (Includes video card & monitor) AT 40 MB Seagate #251-1 .......... .495.00 200 Watt Power Supply (AT) ....... 80.00 CGA Color . . . . . . . . . . . . . . . . . . . .. 200.00 AT Hard Drive & XT Slide Case ........................... 34.00 CGA/EGA Color. . . . . . . . . . . . . . .. 410.00 XT Flip Top or XT Slide CGA/EGAlVGA Color .......... 590.00 floppy controUer (WD) ............ 140.00 with Lock & LED................... 38.00 ASSEMBLY AND TESTING 20 MB Miniscribe HD XT Systems ....................... , 60.00 with controller ....................... 349.00 AT with Lock & LED................. 65.00 AT /80386 Systems ................. 80.00 30 MB Miniscribe HD MONITORS with controller ....................... 399.00 EGA/CGA (Auto Switch) ........... 452.00 SOFTWARE VGA/EGA/CGA Color .............. 600.00 CGA Color .............................. 295.00 MOTHERBOARDS The Twin Spreadsheet................. 49.00 Amber 12" TTL ........................ 89.00 Leading Edge Word Green 12" TTL ......................... , 89.00 XTITurbo 4.77/10mhz ............... 109.00 Processor .............................. 49.00 AT 6/10 mhz (4 layer) Choice of Ventura Desktop VIDEO CARDS Phoenix or DTK Bios ............... 350.00 Publisher by Xerox .................. 525.00 Color IGraphics/Parallel .............. 52.00 XT/Turbo 4.77/8 mhz Turbo C by Borland.................... 89.00 256K EGA Graphics ................... 125.00 (2 layer) ................................ 99.00 Turbo Pascal V4 ........................ 89.00 Mono/Graphics/Parallel ... ,.......... 49.00 803868/16 mhzlA ward Bios & A T! Graphics Solution- 1MB RAM, made in U.S.A ..... 1595.00 ACCESSORIES Mono, Here. Color Emulation on For XT I AT memory ..................... $Call 1200 Baud Modem - Internal Mono CGA ............ (List 299) 125.00 FLOPPY DISK DRIVES (Leading Edge Model L) AT! Wonder Auto Switch Mono, Here Hayes compatible.. .. .. .. .. .. .. .. .... 99.00 Fujitsu 360K ................. ..... ....... 89.00 Any monitor, Any software, Auto conversion 2400 Baud Modem - Internal CGA, EGA, VGA ....... (List 499) 299.00 Toshiba 360K............................ 99.00 (Leading Edge Model L) EGA, CGA, PGA (64Ox480) ........ 185.00 Teac 1.2 MB ............................. 125.00 Hayes compatible .................... 219.00 Toshiba 3Y1" Drive Kit 720K ......... 125.00 EXPANSION CARDS Toshiba 3Y1" Drive 1.44mb ........... 145.00 1200 Baud Modem - External Hayes compatible .................... 119.00 Clock Card .............................. , 25.00 KEYBOARDS V20-8mhz ................................ 14.00 Dual Floppy Disk Controller ........ 25.00 Memory Chips ............ (call for prices) Joystick ................................... 25.00 5339 Professional XT-AT Gravis Analog Joystick................ 49.95 w/12 function key .................. 69.00 Game Port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 19.00 5060 Keyboard AT Style .............. 55.00 BUILDING YOUR Multi-Function, 1 ser/par/clk/gamel KB 101 Keytronic .................... '" 6 7 .00 OWN CLONE 2 floppy ................................ 61.00 ****FREE BOOKLET**** Free Instructions with Each System Parallel (printer) ........................ 19.00 *90-day warranty/30-day money back Serial Port (RS232) 1 port ........... 29.00 (subject to restrictions) 640K RAM (0K installed) ............ 35.00 XT/AT RS232 MicroSphere, Inc. (4 port/2 installed) ................. 59.00 P.O. Box 1221 Bend, Oregon 97709 Prices are subject to change without notice. (503) 388. . 1194 '., Shipping CHARGES will be added. Hours: Monday.Friday ...... 9:00·5:30 Pacific Time 1IIiIiII. 2 MICRO CORNUCOPIA, #41, May-June 1988 THE MICRO TECHNICAL J OUR N A L MICRO CORNUCOPIA MAY/JUNE 1988 - ISSUE NO. 41 8 Earl Hinrichs 48 C'ing Clearly Graphics In 3-D (Part 1) Scott Ladd updates his review of C packages and then There's a lot more to three dimensions than gluing a updates us on memory model sizes. balsa-wood model to the face of your CRT. Earl tackles the nits and grits (mathematics and chip manipulation) 54 required to give depth to your flat screen. 86 World Laine returns to the U.S. and celebrates by building a keyboard translator. 16 Diane Ingraham, Gurmail Kandola, Mark Pillon Neural Networks 58 Making computers think the - ShareWare way you think isn't as easy as you might think. 62 On Your Own 22 Paul Voda The Logic Of 66 Pascal Column Programming Languages 71 If you can prove mathematically that a language works and Culture Comer prove that the program is valid, then you've proven the results. Unfortunately many languages are unprovable. 85 Technical Tips Bruce Eckel 30 The Mysteries Of RS-232 If you need connections in the computer world, let Bruce put in a plug for you (so all your handshakes will be successful). 72 CP/M Notes Larry Fogg 36 Intel's 8088 73 Kaypro Column Larry exposes PC brains in this, his last look at the monster chips ... . in the MS-DOS machines. • n - ~~ :r ...... :: 42 RHaomwac Mhanudcrhan Bharath .-"....-..r- :..~.. . - 82 Information Does A ;:. " Tidbits .... Message Contain? Know anything about 96 LastPage information theory? It's that stuffy theoretical stuff they teach in graduate school. Right? Well, it's not so stuffy and it's not just for students anymore. Cover illustration by Paul Leatherwood MICRO CORNUCOPIA, #41, May-June, 1988 3 By David Thompson TH£ MICRO TECHNICAL JOURNAL MICRO CORNUCOPIA Museum Pieces Editor & Publisher David J. Thompson Associate Editors Gary Entsminger Cary Gatton Technical Department Larry Fogg Director of Advertising There's something magic about climbing into a Stin Laura Logan son, a fabric and frame tail-dragger that's pushing the ragged side of 40. And there's even more magic when I Accounting bring to life its cranky old Franklin engine, six giant Sandra Thompson cylinders, 165 horses, sounding every bit like 600. Forty years ago Stinsons were fast, but since then the Order Department rest of the world has more than caught up. They were Tammy Westfall once the most popular plane in the air. Now they're Graphic Design rare enough to be a curiosity and wherever one goes, a Carol Steffy group gathers. "A friend had one of these. Once."._ "1 built a model Stinson when I was in the fifth grade. Or was it the sixth grade? I've always dreamed of flying in one." "Do you still fly it?" MICRO CORNUCOPIA (ISSN 0747-587X) is Occasionally a burled hand gently presses the var published bi-monthly for $18 per year by nished fabric. The hand remembers another Stinson, Micro Cornucopia Inc. 155 NW Hawthorne, Bend, OR 97701. Second-class postage paid perhaps. at Bend, OR and additional mailing offices. The plane is quiet too. POSTMASTER: Send address changes to "It used to have a wooden prop," I tell them: "But a MICRO CORNUCOPIA, PO Box 223, Bend, OR 97709. rough landing shortened it a bit." That happened before the Stinson and I met, and I've often wondered how it flew with that hand-rubbed, SUBSCRIPTION RATES: wood-grained prop. Better, I think. 1 yr. (6 issues) ...................... $18.00 2 yr. (12 issues) ..................... $34.00 You can tell the pilots from the non-pilots. Pilots 3 yr. (18 issues) ..................... $48.00 know that props suffer occasionally and let it pass. 1 yr. (Canada & Mexico) ............. $26.00 Non-pilots glance at the gray-metal replacement and 1 yr. (Other foreign) ................ $36.00 Make all orders payable in U.S. funds on a then, casually, move away. U.S. bank, please. They needn't worry, I'm not offering rides. CHANGE OF ADDRESS: Please send your I remember one afternoon. I was preparing to depart old label and new address. . from a wind-torn coastal airstrip and was trying to wrestle the Stinson away from a fence when a gnarled MICRO CORNUCOPIA wisp of a man approached. P.O. Box 223 Bend, Oregon 97709 "Could you use a hand?" "Great," I shouted against the gale, wondering if he CUSTOMER SERVICE: for orders & sub could really help. But together we moved it. Then, as he scription problems call 503-382-5060, 9 am to 5 pm, Pacific time, M -F. held the quivering frame I jumped in and cranked up the Franklin. For technical help call 503-382-8048, 9 am to As the ancient bird and I rose from the runway I noon, Pacific time, M -F. spotted the old man, standing alone by the fence, the RBBS -24 hrs. 300-1200-2400 baud damp coastal wind whipping at his thin clothes. I 8 Bits, No Parity, 1 Stop Bit waved, the Stinson dipped a wing, and we were gone. 503-382-7643 I think he would have liked a ride. Metal prop or not. Copyright 1988 by Micro Cornucopia Inc. All rights reserved ISSN 0747-587X (Continued on page 77) 4 MICRO CORNUCOPIA, #41, May-June 1988 Interlocking Pieces: ]ffin~n§e~Iffi@ 1funrrlb)(Q) JP~§(C~no Whether you're a Turbo Pascal expert or a novice, you can benefit from using professional tools :, Turho P'CHVER SCREEN " $129.00 to enhance your programs. With Turbo POWER TOOLS PLUS™ and Turbo ASYNCH PLUS~ , NEW! General screen managemerit; paint:,' Blaise Computing offers you all the right pieces to solve your 4.0 development puzzle. :screens; blocknlodedata entrY or'fieJd·by~·: . . fieIdcontrol with instant screen access; Now, '. Compiled units (TPU files) are provided so each package is ready to use for Turbo Pascal 4.0, soon forC and llASIC.' . c, with Turbo Pascal 4.0. Both POWER TOOLS PLUS and ASYNCH PLUS ~~~. ... use units in a clear, consistent and effective way. If you are familiar ,'T~rboC'TO()LSC,'-': , ' .. $129.()(r "" ,< (J:!.~~,.~~;;J with units, you will appreciate the organization. If you are just getting , Full spectrum of gerierarservice utility func-<,~; " , .... started, you will find the approach an illustration of how to construct tions including:windows;'rilenus; memorY ,:~.; ~ resident applications; i'nterrupt service ~roll-::;" ': ~ ,\...-~. and use units. lines; intervention code; and 'direct video,:', ':<'~~; " ~... ","'" ~ POWER TOOLS PLUS is a library of over 180 powerful functions , access for fast screen handling. I:orTurbo c,':;'; ;::"" ::: ~ .,":;'~ CJJ""'" .' and procedures like fast direct video access, general screen ':":CTOOLSi~LU~r , ,", <-',$1~9.VO:\:::~~i<>: . ~ ' . handling including multiple monitors, VGA and EGA 50-line , :Windo.,ys;menusiJSRs; inierV~ntionc~de:', ::;"';::~~,~; (,: and 43-line text mode, and full keyboard support, including , ,screen handling and EGA 43-line tex{mode ": ~;'::' ':,: '. , .. " ~"""'"~ the 101II02-key keyboard. Stackable and removable win- , support; dire<;t screen access: DOSfile'hari~:.::: ~' :".'~; ,:' dows with optional borders, titles and cursor memory ,dling:and more. Specifically desig,n'e,rd' Jor~'.;; .;,,', 7, ,::, ': . complete windowing capabilities. Horizontal, ver ,:·Microsoft C 5.0, andQ~ickC;:;;:. ',', :,.': ~;", ;:"~»:"':, , grid and Lotus-style menus can be easily incorporated ~', ',;,ASYNCH MANAGER: ':<·"'~${/5.00~,·(f;::~'~' ,?:. into your programs using the menu management routines. ,F,ull featured interrupt driVen $ttpport forthe:",.;,,:,:];,:,,: ::~ You can create the same kind of moving pull down menus <COM ports. I/O: buffers up to64K~:XO~f.··\::'/;:,,':'': that Turbo Pascal 4.0 uses. , ',','XOFF; upt o 9600 baud~ modem controlaud:::;'::'<,';">' r:':;'XMODE~file'transfe'r~for¥icro~6{iqand::'';;~,;::';,;;::';" Control DOS memory allocation. Alter the Turbo Pascal heap size when your program executes. Execute any program from l;..' ';.. :· T,:u,r'bPoACSCo~r'MTOSOLP~aisTcOaOtL S;2:''::,,$', i:7:{"::d'r:i.t.~"t";t~/;,~";"~; h· within your program and POWER TOOLS PLUS automatically compresses your heap memory if necessary. You can even force ~. ,:'; Expaf!dedstringand screen hiu;'<Jling: grapb~ >::; '::.; -,", the output of the program into a windowf 1;',,: "" ks rOiltinys; memorY mimageioent; generat:'",~';~;:',( : ; .' . ,'programconirol; DOSfilesupportandmore::,~;,'.';,:,~ ;" ,::-". I;;': Write general interrupt service routines for either hardware or ;;:y~li:::~Cat\"~" '-.;:::~;:~t.~i~:;,;)~~;;)" software interrupts. Blaise Computing's unique intervention code lets you develop memory resident (TSRs) applications ;',;.;,~"Super.::batch': program; Creat~:RatP)i ~Ilesi::.;;.:;\;i)'.<, that take full advantage of DOS capabilities. With simple pro i-;."" ,.which,can invokeprograrnsandprQvldeiJlP4t',;~,ir: ;;( ',> cedure calls, "schedule" a Turbo Pascal procedure to execute I" ',to tllem; ni~~l1Y program:~na~ieftded.;"c,r~a~e:1:>; ;;:;',;;~'l ;';:, either when pressing a "hot key" or at a specified time. f '. " . ,demo,nstratlon programs; analyt!!Keyboaru';:; .',;" ";,;,::+' .•• ¢ASYNCH PLUS provides the crucial core of hardware interrupts l:$~:1~d.':)· )2)?~t;:%~:;~'1t¥W~Si~~~f~ needed to support asynchronous data communications. This package offers simultaneous buffered input and output to both COM ports, and up to four t :::.': : 'NEW VERSION! Program~hainU)gexecu;:::';<;";~n:;::':' ( ports on PS/2 systems. Speeds to 19.2K baud, XON/XOFF protocol, hard n:::':"tive. ,Ch~jn' ~)fle p'rogram' fr~m;anqther:)ti: ~,'.\:';;::;:;~"j)~; ware handshaking, XMODEM (with CRC) file transfer and modem control :) '-;':,differentlanguages; 'specify:,c()mmimi data.':-:;·;~';:", ;':;./ are all supported. ASYNCH PLUS provides text file device drivers so you t:;'~f.~~~i;~fl~JI]!~~~9i~~%~~~~~1 can use standard "Readln" and "Writeln" calls and still exploit interrupt-driven communication. f>: ;~:inTurbO pascal: flexibl\6,p rirlter cohh'Qt;:us~ The underlying functions of ASYNCH PLUS are carefully crafted in assembler ['::' :"d~fin~d \tiu~hiblesi!itldex'gerieraJiorii::~iia :f;t.ne:.~~ :=o~~[d;':~ these functions directly to your application i::(i;e;~~;!~;IT' ~~:~ty, :,i}:Dl~IJ~1;~~~ Blaise Computing products include all source code that is efficiently crafted, :. ,:' TO ORDER C.Att rrOI,;:ttF~t,E:' c re~:~J~~~6~~ ~::~~~~~l:J~~~~~~ r:~~~ ~i~ ~~=~~ E,c'~c::·,j:/,Z;~:'·,;.':~~.9'·~~~;~.~~~i:~f:a;;' '~r 'Jt .' code fragments. Many complete examples and useful utilities are !;.:·:-'i;::'·:P".:;~TELEX~MJMBEii~~3r included on the diskettes The documentation examples and I:'<~"':':;'<:':""":-:<;'"'J .•... .... v;~.·~'" source code reflect the attention to detail and ~ommitment to ;,}: ;;";/;'~.;:<;/;'~'~'}~::::}:' ':'~;,:;;·,\':0::·:;:~~':";~'~~£';';-;;';:·"""'· technical support that have distinguished Blaise Computing over ~.::,:,;-':::}:::",~2.:,: 0;;~ ~:,;,;;,~~ ~';,;;'''' - ...... the years. 1,,':":" .><", '_-- . --~~;~:c;s\ d~~ Designed explicitly for Turbo Pascal 4.0, Turbo _---.... COllies POWER TOOLS PLUS and Turbo ASYNCH _--- ndtUetheng ior~ourllro 1\ 00 ior ~.' PLUS provide reliable, fast, professional routines-, ~£S\ S~ is $~niorrnat\on. orders add $ ~ir. ____ the right combination of pieces to put your Turbo Pascal\ Bnc\O~e send tne tn~ 'I~. Dotnlt~ress standard ) ___- puzzle together. Complete price is 8129.00 each. , 0 \' e . dents add S~ior federal l'P hone: ~__ _____ _____ \ c~reS\'~lng,$10, .. _____ ____ .... l1li,. \ U\'Sshlllll . ___ 'LW· Date:~ ....... \ Natne: State. £~ll' :. ~JI!: \ ~ddr ' BLAISE COMPUTING INC. \ ~~~~or~S~~~~~l~%f' : 2560 Ninth Street, Suite 316 Berkeley, CA 94710 (415) 540-5441 \._. ... ~~,~: ' .. /. l,{,(~r;fli:l,~~ad~I1JCI~~;(JI;B9r~aJ1.d.I!J'tf!r[l,f;I Reader Service Number 5 .. ,', ;it,,;:};{~;·,;;~:;\:~~,:,.,:>"\.;j:,'<:;~:.~::<""<. :;,,}'~: ·__, :T';:. ~<~~.:<~n,; ,: ";:5'o;?"~,{=';~,.~,.,~ ./,:.',,~._, ",-:,."~_",«,: __ ;;:~-,;;;'~~:~:~'~';;;:? ~\;;': ~':':;:: ';'; ,:. t,.· ',i,E;~t,':~;i~}R~~f~:4:~,; Letters C Vs. Assembly Language -One yields the following assembly code C with CodeView, a fine debugger. This letter is in response to the article when compiled with Microsoft C Verso MSC sports 31-character symbol C vs. Assembly Language in Micro C issue 5.0 using "cl-Fa -Gs test.c": names, and an excellent optimizer #40. with automatic register allocation, On the whole, I agree with Mr. ;misc constant declarations loop optimization, intrinsic code for Isaacson's assertion that a program is _DATA SEGMENT more common functions (such as more efficient when written in assembly _iop_name DB '/dev/iopmem/8alXO*',OOH strlen) as well as the more common language than in any other language. _DATA ENDS optimizations that Mr. Isaacson finds Additionally, I agree it can take less _TEST SEGMENT so trivial. time to develop the assembly language ;pre 5.0 MASM setup stuff Well-written assembly code can be program than the C version of the same PUBLIC _main more efficient, and certainly more fun program-given that well-qualified _main PROC NEAR to write. But portability, availability of programmers are working on each mov BYTE PTR _iop_name+19,99 maintenance talent, and client team. ret paranoia often preclude its use-not I take issue, however, with his ab _main ENDP without good reason. surd example. He makes several state _TEST ENDS ments about the C language that show William E. Weinman he knows as much about C as those This is equivalent to Mr. Isaacson's 1800 S. Robertson Blvd., Ste. 206 who write unmaintainable assembly one line of assembly language. To Los Angeles, CA 90035 code do about 8086 assembly language. write code like this requires a good un Most glaring is his statement justify derstanding of the language. Editor's note: Thanks Bill. And, thanks ing the construct: He points at the common I/O func for agreeing to speak at SaG (a talk en tions defined as part of many lan titled "C Isn't The Devil's Own = iopmem [strlen (iopmem) - 1] c; guages but implemented as functions Language"). in C. He says this is a defect of C; I see He says: "Because of the limitations it as an advantage. The code isn't C V s. Assembly Language -Two of the C language, it's impossible at linked in unless necessary, and I don't Mr. Isaacson raises a few good compile time to determine the location use it very much in a large system points in his article, but I must point of the last element of the fixed-length where I'm likely to use my own I/O out a few incorrect and unduly harsh array. .. " library. items. In fact, the sizeof operator is a unary Mr. Isaacson points to the terse na First let me say that C compilers, operator that, according to ANSI section ture of this small, elegant language as especially for PCs, have been greatly 3.3.3.4, "yields the size (in bytes) of its a fault saying, "that cryptic, incom improved in the last couple of years. operand. .. When applied to an operand prehensible code becomes easy to The code generated by Mr. Isaacson's that has array type, the result is the write," and that K&R "give some ex compiler doesn't look like the code total number of bytes in the array." amples (with a tone of approval!) of that comes out of Microsoft C vS. 5.0. Hence the following code: atrocious C programming technique." MSC doesn't save SI or DI unless Is C more cryptic than assembly? Is they're used in the function. It also 'define iop_user it difficult to write "atrocious" assemb leaves values in registers if con (sizeof (iop_name) - 1) ly code? Is K&R the Devil's program venient, which happens often with volatile char iOp_ name [ ] ming guide? Well, isn't that special. I pointers that are used more than once. \ "/dev/iopmem/8alXO*"; think Mr. Isaacson is not a C-literate It may be true that Mr. Isaacson's I ) main() programmer. compiler limited him to seven-charac { In his summary, he states that lack ter names. But a Unix port I've used of a debugger, short symbol names, allowed 32 characters while the as and inefficient code make C a poor sembler had an eight character limit. choice for large efforts. I· use Microsoft (Continued on page 70) 6 MICRO CORNUCOPIA, #41, May-June 1988 LIST OURS TURBO PASCAL ADD·ONS ASCII TURBO GHOST WRITER STARTER NEW 99 89 COMPLETE NEW 289 259 FEATURED PRODUCTS ~o~~ire?~~~!~ci~~~.u;~s~:l~bt'!rg~~~~i:~:r f~\\:::pf:~~~~~i~~0~[FOii!RA~~77~i~h~:~rlrs. A Ph~~~~AS~r{fN~) assembly language. (Requires List: $595 Special Price: $545 SPINDRIFT LIBRARY - Collection of 150 ~~~!~~et~u~tNgo~J~b~stf{Ey~OlKlr~;J SCREEN. The windowing system allows an unlimited number of windows to be defined on the screen. each having its own color, cursor position and border type. Supports automatic wrap and/or scrolling. List: $149 Special Price: $129 ~!~t~I~;~~;;. ~C;d:~m~~~~~~~:tl!b;;~~u~r fields and windows. multi· line fields. horizontal and vertical field scrolling. menus. help boxes. and custom field validation. List: $495 Special Price: $389 Programmer's Paradise Gives You Superb Selection, ~~t~pre~~vJ;i~~~i~i~~x~fi'i~~o!;J~~~~r~~nsa~;r~es Personal Service and Unbeatable Prices! code on DOS systems. Storage. retrieval. tracking and branching text files are effectively managed. List: $189 Intro PrIce: $169 Welcome to Paradise. The microcomputer software source that caters to your programming needs. Discover the Many Advantages of Paradise ... AZATAR DOS TOOLKIT NEW 99 85 o Lowest price guaranteed o Huge inventory, immediate shipment 0 Special orders DFLOASS/BHIO·USP & MOUSE TOOLS 7859 6799 o Latest versions o Knowledgeable sales staff 0 30-day money-back guarantee SMCERTEREANB SYCTUE LDPATTOAR A CQ. TOOLS 110205 8959 Over 500 brand-name products in stock - if you don't see it, call! SYSTEM BUILDER 150 129 IMPEX 100 89 REPORT BUILDER 130 115 T·DEBUG PLUS V. 4.0 SPECIAL 45 39 W/SOURCE NEW 90 79 TURBO.ASM 99 69 TURBO ASYNCH PLUS 129 99 TURBO GEOMETRY LIBRARY NEW 100 89 LIST OURS LIST OURS LIST OURS TURBO HALO 99 85 386 SOFTWARE CLIBRARIES FILE MANAGEMENT TURBO MAGIC 99 89 386·TO·THE·MAX NEW 75 65 C ASYNCH MANAGER 175 135 BTRIEVE 245 185 TURBO POWER TOOLS PLUS 129 99 ADVANTAGE 386 C OR PASCAL 895 829 C·FOODSMORGASBORD 150 95 XTRIEVE 245 189 TURBO POWER UTILITIES 95 79 DESQVIEW 130 109 C TOOLS PLUS/5. 0 129 99 REPORT OPTION 145 109 TURBO PROFESSIONAL 4.0 99 79 FOXBASE+ 386 595 CALL C UTILITY LIBRARY 185 125 BTRIEVE/N 595 455 TURBO WINDOW/PASCAL 95 79 HIGH C·386 NEW 895 835 ESSENTIAL COMMUNICATIONS 185 125 XTRIEVE/N 595 459 TTMASMPAVNMPXCCUUH·RDMRIUASV CORARIPSWMLT/T/R 33B BRCXYICI 88IOSOOLHFN6E 6 P OSPA IEND(PP·TORC8CPMIRROA 7X RIOFOOW ENA3I TOMSLNL8 D SLYSR6OOTPA/IY S3TIGGALER 8NSRV ERS6DTTTA MTP3O EPENER8/MORL6)L·E3L O I (LTN8BCL6EIKOOOG RX GME SS PNPPLCEEECENCTI IEEAA)WL L1 3574411152099999909094555950505055 156415111674918623779999559959595 TGGCTEMGPRMUFI·ERRORIUZCCCMPOCRSEEEPBCOOLOREIRBEEEAT·DOMBBOCSCONNNIGOEOLL MI·E LLLCFCENCLIL EEEOUC S /lTT22AAAECN OCTRFFFUICO L WSFCCALS UO /STSESNMA IOTOCMM UNTR PISLLOC IPBEENLRR SUA SRS YP ECIAL1 92112119215209825899904095059585059005 12217721111121663622582989559959999959 CCIDDXDPNHBQ·BBISCMRMRDTFALCLTICR··OE·UNUTT TCRV PlEIRRRLGLIRITEIOEIlSMTTEE LE EM TRPIIEEIEE UAULTXA / UU RSS OONPEES·STRRAP RRE RTOG DRWIEED OBWER/ US_N BQ/OCS/UNUUTON SERU RDCRYLEC E E NEWC A36249733722411L59545959994999L50005955905555 CCCCCCAAAAAA553221152LLLLLL336191692LLLLLL999995599 jjSCGMMHPVVSCPYYCAAUCIIR·IASAWIVSET·RCNN SRERCCCWACW/ERCEEESCSCE AM SEILOLEORN MNEJFPCNI /SASEUPLNQDONEAR SOMLEWER O CRNSCTEUNFA C WM//AA EOTSS WEFXGN ROS RAW DLC IE UKDW/ NAIORTNREET/DCD SCDRVA EOOEO EW UWWLCRIOONSSC PDD EMOE WESSNPPS TEE CCKIIIATA LL 3272441522112595294990279297055909555950989 263411311112574168519664976999995599999995 AOPMAPJADPSS..TS V[SMNMAAEKASN8MM86CT6 RAB POGLL UEEA SRDS SISSE/ALMSIBNSLEKEMERBR LSE R NEW 214119599950555 22117769199995 MMOREPIIOPLCCATEETRR·LRVTHOOCSEEEISSOCLCROONH SSIFF IA S TTCLO SCO CROOBOTRBO BTOLO LL CA371119L449049L995095 CA217411L718402L959959 LMLFRFAAOMOICHHRR/FREETTOYYORRR SFPATAOOERNFNRRA TCSTLN OFROI OBANMRRNATP LAFRI 7RLFA7OEINLERR SETSRMI UA/1TN6I 7L7I TIES645 99595505 64227885959 WAABDADWINVSD/DTASIOOONTCWTUIO ARSGN CFEEAO VLRC PDMRASTO AD UCTS 324597995950 CCAA33LL92LL99 MBFFMDILBAANSA /CASQLSHLIIUHBC L2I ·Y CU !KP B ASIC SPECIAL 19739895999 11856795995 SRRRRCEMMMWAR///C/SCELRCOIOEEARNBBA ECOIOLOEOLLMN B·8ESO5N LU 11994312950495500505 837937895791599995 MSSGDMSPRIAAAPIAGTN/GPHFUDRMCPSRAA ANIMCFTU T'IECM LR IOE BORRRRI APC DLRAOOYLCT AMUNMAATELINSYCPST TE'E CRI AL 213411293495959550 224111414612559999 MBDAXTIDIRCRVEERIACEONTVNPOETOIR/ARNXYGT SEI&HCU SE+CL+NQL (PI2RX8O6)D SUCOTSF TCWA635L499LA955 CRA634LE251L555 QTTQURUUTURIIUCCBERKKO BBPWM AABOIASKN BISOD CAIO CSUW ICS ST WOE/OSLO BPUORRXCEEO S DUC11196000T90090 S 5687699999 CCASCPDITAOOSEDSAECR·MUBEPSLOBPTPEUM OMLPASGNIOUSLICVG IRKNCAO ET IOTNC RI pO(AS2yN T UP ILSOUENSRS ) NNNEEEWWW 21111149592729505055 2111125745185555995 AGGTTHMEHUUDSAASRESSRVRLLTA EOOBAABGPN O NWOR(HT5WT AI HINIAMAPICANDGHLISLOEDCI OG C WORG R OW(D RFPASEA/OLPCOVPURH .FH S ITTTC ICU OSLSR OA B(LNCOKG) I.CT) ) 2532245597990900559505 2233212029787799999599 JjIMFEDKPYYNOAPIOAIAFRSCNXCRCOEIREBCLNCCRLO AOJSTFMA SSPNHOOMIOLE XERRUF+ LYM PT SL R A SL HOKAEDENLURGL CU (TA3SG8 6E)S CC1AA8734171LL9954999LL5505555 CCAA18674112LL0241471LL9595995 LOWWWG///IPPPTLLLEUUUCSSSH,,, LS LSOOOEFGGRTIIICWCAPALAAD ORIDNER MT B OUUS SMEO USE 111481999 11941999 APPPEEEDRRRVIIIASSSNCCCCOOOEPPPDEEE TII1I RI lA8 CMEH·8Z6 SSSPPPEEECCCIIIAAALLL 931194775555 721138615999 LMOCODGOEDIVMTUEEPLCLIALOH·E2P MR M OKEDINTUT L SAY·2S TEM 29499 17999 ....WRR._ MMIN/iCFD_OOORBW_TOSRL F_A ONR _ DA_TA_ ____1_727955500_ C_A95L44- L99. 1 LOWWWWWG/////IPPPPPTLLLLLEUUUUUCSSSSSH,,,,, PCPPPSAAAUAEIIIBDRNNNLDITTTEI ,,, SP SPCCHU 2UAAEB WBDDRLLDD/. MPM. .M LOPOUOUUUSUBSS SELEE . 22111953799399999 21111057584599995 PPCDAEFODIRISMVXKIASM8INC6DAC OPONELPDSDUE / SKPN1 LIEOlU1YRS0TB MOONHA ZUR TDI UNLSSIPPETTEEWIILECCVSIIIT .AA2ILL.E0 S 13 0199855500 8169969999 OSSTOBrWOLJo/NElUDYmCTBBTI~L+R·TOI OTTR OIOEIKOSEML NBOTODEXUD LPAR·2O GRANMEMWI N13m994G955 21m698999 DFMDLABADON2GEWC IMBC CR OPHI CCPA KRROLTIGINNR'GSA DMIIE IMI O PROGRAM 22112799959559 CA211L0575L5995 SMPPUCCIWW CMMMI/RMMEOOOASAUUS SMWSSOYEEOFIC NTSBUADE USSDOREES W. RW WS O/ P/PRN NBTTU &S& PM POOOPPUUUSPEPS S 211111075751099059 1111991321999995 DFPVNPCEDOIFS TEIRTKSCAOTK HOTOO U PNLTR SCIE MDO EMIZLMEURAX NE DER NEW 1874578005550 1566047555595 ASSAPMMFCDAOTVAAPORALLPRCLNLL TETTICAA A+ALLG +KTKE II IOVCV N2+8 P+6A CKS NEW 43412959900505500 2441711846955959 MMMPNPOCOKKKL·RLSSSYTI·TRSMNOOCQTNASOP K GSLE UK IIDTE S NEW. SSPPEECCNIIEAAWLL 111411803943990959 4111966621599595 EDITORS OPERATING SYSTEMS POLYTRON PVCS CALL CALL CCOMPILERS BRIEF 195 CALL MICROPORT SYS V/AT 549 469 PRE·C 295 159 LATTICEC SOO 269 W/DBRIEF 275 CALL SCO XENIX SYSTEM V 1295 995 SOURCE PRINT 95 75 MICROSOFTC 450 285 EMACS 295 265 WENDlN·DOS 99 79 TREE DIAGRAMMER 77 69 QUICKC SPECIAL 99 65 EPSILON 195 149 OTHER MICRO PORT. SCO, TURBOC 100 65 KEDIT 12.5 99 WEND IN PRODUCTS CALL CALL MKSVi 75 69 CINTERPRETERS MULTI·EDIT NEW 99 89 PASCAL COMPILERS C·TERP 298 229 PC/EDT 250 229 MICROSOFT PASCAL 300 189 INSTANTC 495 379 PM ATE 195 115 PASCAL·2 259 CALL RUN/C 120 79 SPF/PC 245 185 TURBO PASCAL 100 69 RUN/C PROFESSIONAL 250 155 VEDITPLUS 185 129 TURBO PASCAL DEV. LIB. 395 289 BORLAND ADD·ONS CALL CALL Terms and Policies 1-800-445-7899 • We honor MC, VISA. AMERICAN EXPRESS No surcharge on credit card or C.O.D. Prepayment by check. New York State residents add applicable sale. In NY: 914-332-4548 :~~T.J. ::~~~:~Fe..il~~·r~:. UPS • Programmer's Paradise wiD match any current nation .. Customer Service: 1Pou~" :~~~e~10fl~~ ~:bj~t~~!~:::n~ :. 914332-0869 ••• MHWeoa'Uull r MsO 9arAtdcMhe "a nE ,y,S ,NdTua -tdi7oenPa 'U0M'y" A EpdSvITelor t"is,e ,d. . .P."r ibcee r International Orders: ·Ask for details. Some manufacturers will not allow 914332-4548 return$ once dis.k seals are broken. Dealers and Corporate Buyers-'Call for Telex: 510-601-7602 A Division of Hudson Technologies, Inc. special discounts and benefits! Reader Service Number ~8 42 River Street, Tarrytown, NY 10591 The 34010 is the fastest, smartest, most Graphics In 3-D: gung ho video controller ever devised (at least by TI). Since it's so smart and fast it may as well help with the chores-chores Ray Tracing On The 34010 -, Part 1 like creating 3-D images. Here's part one of a very significant two-part series. While ray tracing provides the motivation and examples, the principles that follow apply to any three-dimensional computer gra phic program. I'll supply 34010 assembly language code which implements the geometric principles. Some if-then conditions will help you navigate through the paragraphs. If you're not at all interested in programming, you can easily skip the programming sections. I've separated each topic into theory and program- 8 MICRO CORNUCOPIA, #41, May-June 1988

Description:
Also available: DGIS, 34010 C compiler, assembler, 34010 fractal software, additional ADVANTAG E DISASSEMBLER. MS MACRO ASSEMBLER. OPTASM.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.