1 REM Ins{nd av Bo Kullmar SYSOP <1789> 1986-01-26 09.43.15 Programs from BYTE The following programs complement articles that originally appeared in BYTE magazine. These programs are not intended for commerical use. This catalog follows the form month/year, article name, author, page number, program listings, and program size. January 1986 ------------ Ciarcia's Circuit Cellar: "Build an Analog-to-Digital Converter," by Steve Ciarcia, p. 104. LISTING.TXT Programming Project: "A SIMPL Compiler, Part 2: Procedures and, Functions," by Jonathan Amsterdam, p. 130. SIMPL2.TXT Source code for the revised SIMPL compiler. READSIM2.ME "Creating Reusable Modules," by Namir Clement Shammas, p. 145. QUIKSORT.MD2 EDITSORT.MD2 Programming Insight: "Easy 3-D Graphics," by Henning Mittelbach, p. 153. APPLGRAF.BAS MACGRAF.BAS PCGRAF.BAS "AI in Computer Vision," by John L. Cuadrado and Clara Y. Cuadrado, p. 237. To run these programs, you must download PDProlog, which is under the August 1985 heading in this file area. NOTE: PDProlog is an MS-DOS or PC-DOS program only. AIREAD.ME FRAMES.PRO LISTING2.PRO LISTING3.PRO Mathematical Recreations: "Euclid's Algorithm," by Robert T. Kurosaka, p. 397. GCD.BAS LCM.BAS CYCLFRAC.BAS December 1985 ------------- Programming Project: "A SIMPL Compiler, Part 1: The Basics," by Jonathan Amsterdam, page 106. SIMPL.1ST The SIMPL source code, written in Modula-2. SIMREAD.ME A read.me file for SIMPL. "English Recognition," by Roy E. Kimbrell, p. 125. BTREE.C BTREE.H DICT.H HIGGINS.C Programming Insight: "Virtual Fielding in Microsoft BASIC," by C. R. J. Currie, p. 155. CURRIE.DOC Listing 1, page 158. Programming Insight: "Travesty with Database," by Neil J. Rubenking, p. 161. BREKDOWN.PAS The source code for this version of Travesty. Written in Turbo Pascal. BREKDOWN.DOC Documentation for BREKDOWN.PAS. "Common Ground," by Chris Hancock, page 239. The author expresses his regrets, but the source code for Common Ground will not be available until after the new year. We regret the delay. November 1985 ------------- Ciarcia's Circuit Cellar: "The World's Smallest 1200-bps Modem," by Steve Ciarcia, p. 86. CIARBAS.LBR The sample BASIC programs described in the article. Requires LU.EXE (below). (Note: These programs are tokenized BASIC files.) MOSTERM.BAS The first file contained in CIARBAS.LBR. MOSANSWR.BAS Contained in CIARBAS.LBR. MOSDTMF.BAS Contained in CIARBAS.LBR. SPEECH.BIN Contained in CIARBAS.LBR. SPEECH.TBL The last file contained in CIARBAS.LBR. CIAR4TH.LBR FORTH programs mentioned by Steve in the article. Requires LU.EXE (below). FSCRENZ.4TH The first file contained in CIAR4TH.LBR. UTIL.4TH Contained in CIAR4TH.LBR. SAVEME.4TH Contained in CIAR4TH.LBR. HOST.4TH Contained in CIAR4TH.LBR. H1.4TH Contained in CIAR4TH.LBR. H3.4TH Contained in CIAR4TH.LBR. H4.4TH Contained in CIAR4TH.LBR. CALC.4TH Contained in CIAR4TH.LBR. H2.4TH Contained in CIAR4TH.LBR. VDICT0 Contained in CIAR4TH.LBR. VDICT1 Contained in CIAR4TH.LBR. VDICT2 Contained in CIAR4TH.LBR. VDICT3 Contained in CIAR4TH.LBR. M_DRIVER.ASM Contained in CIAR4TH.LBR. DEMO.DOC The last file contained in CIAR4TH.LBR. LU.EXE The library extractor needed to unpack CIARBAS.LBR and CIAR4TH.LBR. LU.DOC Documentaion for LU.EXE. Programming Project: "An Assembler for VM2," by Jonathan Amsterdam, p. 89. READVM2.ME ASSEMBLE.ASC Programming Project: "Extending Turbo Pascal," by Bruce Webster, p. 123. INTEGERS.LIB LINKED.LIB STRINGS.LIB STRUCT.LIB USERIO.LIB "High-Resolution Printer Graphics," by Mark Bridger and Mark Goresky, p. 219. PRINTPAK.PAS Listing 1, page 222. PRINTOUT.PAS Listing 2, page 223. TESTCURV.PAS Listing 3, page 226. PIXEL_LN.PAS Listing 4, page 229. "Five C Compilers for the Macintosh," by Tim Field, p. 275. These are the C language benchmarks: FRAME.C Performs an empty loop that cycles 10,000 time. FIB.C Calculate the 24th value in the Fibonaci sequence. FLOAT.C Performs a number of multiplication and division operation on double-precision, floating-point numbers. INTERFAC.C Makes repetitive calls to the Mac ROM GetNextEvent(). INTMATH.C Performs a variety of integer operations. POINTER.C Measures the efficiency of pointer use for array access. NQORT.C The new version of QSORT, as promised. QSORT.C Creates and sorts an array of 1000 random long integers. SIEVE.C The Sieve of Eratosthenes. RFRAME.C Tests the efficiency of register variables; see FRAME.C. RINTMATH.C Tests the efficiency of register variables; see INMATH.C. RPOINTER.C Tests the efficiency of register variables; see POINTER.C. RQSORT.C Tests the efficiency of register variables; see QSORT.C. RSIEVE.C Tests the efficiency of register variables; see SEIVE.C. Mathematical Recreations: "Repeating Decimals," bu Robert J. Kurosaka, p. 433. CYCLE.BAS Calculate the cycle for repeating decimals. Inside the IBM PCs ------------------ "Writing Desk Accessories," by Thomas Wadlow, p. 105. TRIVIAL.ASM Listing 1, p. 108. TEST.PAS Listing 2, p. 110. VECTORS.PAS Listing 3, p. 114. KEYSTROK.ASM Listing 4, p. 118. "A MIDI Recorder," by Donald Swearingen, p. 127. MPU401.PCF This program provides receording and playback of MIDI data on eight separate tracks. Laboratory Micro- systems's PC/FORTH. "Programming the Enhanced Graphics Adapter," by Richard Wilton, p. 209. LISTING1.ASM This routine demonstrates a bug in EGA's ROM (see p. 212). LISTING2.ASM Sample subroutine using Write Mode 0 (see p. 212). LISTING3.ASM Sample subroutine using Write 2 (see p. 216). LISTING4.ASM Sample subroutine using Read Mode 0 (see p. 217). "IBM PC Interrupt Service Routines," by Paul M. Dunphy, p. 223. ACQUIRE.TXT "Pick, Coherent, and THEOS," by Marc J. Rochkind, p. 231. BENCH1.PRG BENCH2.PRG BENCH3.PRG BENCH4.LST October 1985 ------------ Programming Project: "Building a Computer in Software," by Jonathan Amsterdam, p. 112. README.VM2 MONITOR.VM2 Programming Insight: "IBM PC Joystick Control Using Turbo Pascal," by James P. MacAdams, p.143. JOYSTICK.PAS "Testing Large-Scale Simulations," by Otis F. Bryan Jr. and Michael C. Natrella, p.183. SIMPROG.DOC "Analyzing Government Policies," by Ross M. Miller and Alexander S. Kelso Jr., p. 199. TABLE1.WKS Lotus 1-2-3 worksheet template. TABLE2.WKS Lotus 1-2-3 worksheet template. TABLE3.WKS Lotus 1-2-3 worksheet template. TAB1.PRN Modifiable template. TAB2.PRN Modifiable template. TAB3.PRN Modifiable template. TAB3A.PRN TAB3.PRN as seen by Lotus 1-2-3. September 1985 -------------- Programming Project: "An Analysis of Sorts," by Jonathan Amsterdam, p. 105. SORT.PAS In Mac Pascal. "An Algorithm for Disk Caching with Limited Memory," by Brian McKeon, p. 129. CACHE.C Routines for buffer manipulation, buffered block, and character I/O. "Turbo Pascal Drives the Mouse," by John Figueras, page 161. MOUSE.PAS Listing 1, p. 164. Turbo Pascal mouse procedures. MOUSDEMO.PAS Listing 2, p. 168. A demonstration of mouse programming in Pascal. "IBM Compatibility for the NEC APC III," by Herbert Stein, p. 171. NECPATCH.ASM Listing 1, p. 172. READNEC.DOC Programming Insight: "Build A Travesty Tree," by Peter Wayner, p. 183. TRAV100.BAS Listing 1, p. 184. TRS-80 Model 100 BASIC. TRAVTREE.BAS The travesty tree builder for the IBM Personal Computer. Programming Insight: "Printing Pascal Graphics," by Kelly W. Davis, p. 193. SCRDUMP.ASC Screen dumps from Apple Pascal. "The Quarter-Meg Atari 800XL," by Claus Buchholz, p. 247. ATARIRAM.ASM This program provides a RAM disk for the quarter-meg Atari 800XL. You'll need to convert this program from ASCII to ATASCII (Atari ASCII) and then assemble the listing. ATARIRA2.ASM Same program with line numbers. Mathematical Recreations: "Pi, e, and All That," by Robert T Kurosaka, p. 409. BUFFON.BAS Listing 1, p. 412. Buffon's needle experiment. HATCHECK.BAS Listing 2, p. 414. The transcendental hatcheck person. August 1985 ----------- Programming Project: "Context-Free Parsing of Arithmetic Expressions," by Jonathan Amsterdam, p. 139. TICALC.PAS Listing 1, p. 141. "Prolog Goes to Work," Clara Y. Cuadrado and John L. Cuadrado, p. 151. README.PDP PROLOG.DOC Documentation for PDPROLOG.EXE. PDPROLOG.EXE Version 1.6, late August 1985. PROLOG.LBR A squeezed library of PDProlog demonstration programs. Download LU.EXE and AUSQ.COM (below) so that you can extract and unsqueeze the library files. MAZE1.PRO A sample program written in PDProlog. MAZE.PRO A sample program *NOT* written in PDProlog. Try your hand at converting a program to PDProlog. LU.EXE The library extractor needed to unpack CIARBAS.LBR and CIAR4TH.LBR. LU.DOC Documentaion for LU.EXE. AUSQ.COM The file unsqueezer needed to unsqueeze the files in PROLOG.LBR. AUSQ.DOC Documentation for AUSQ.COM. "A Hope Tutorial," by Roger Bailey, page 235. HOPE.EXE SYS.HOP July 1985 --------- "New Perspectives on Nearby Stars," by Bruce Webster, p. 107. If you already have version 4 or 5 of BinHex, all you need to run StarMap are the following files: README.DOC STARMAP.HQX STARS.HQX PMACHINE.HQX PRUNTIME.HQX If you do *NOT* have BinHex, go to the Apple file area (#6) and download BINHEX.V30 and BNHX.HEX. If you have the MacAdvantage development system and wish to make adaptations to StarMap, you will need the following files: README.DOC STARMAP.PAS READSTAR.PAS RAWSTARS.DOC SMAP.R Programming Insight: "Travesty Revisited," by Murray Lesser, p. 163. TRAVPC1.BAS Travesty compiled in BASIC for the IBM PC. Programming Insight: "Real-Number Formatting on Your Apple," by Brent Daviduck, p. 171. FORMAT.BAS FORMAT.ASM "Comet Lines in FORTRAN," by David S. Dixon, p. 203. ASTRO.FOR Main program. DSKPRP.FOR ENCKE.FOR NEWTON.FOR Contains the subroutine KEPLER. ORBIT.FOR Contains the subroutine ELEMENT. "Tracking Earth Satellites," by E. H. Weiss, p. 215. STUMPFF.BAS BASIC source code. STUMPFF.EXE Compiled version. Mathematical Recreations: "Parsing and Solving Linear Equations," by Robert T. Kurosaka, p 385. LINEAR.BAS June 1985 --------- "Switch," by Werner F. Grunbaum, p. 221. SWITCH.BAS, Listing 1, p. 223. FLOWCHRT.BAS Listing 2. p. 224 BLACKBRD.BAS listing A, p. 226. "Subroutine Libraries in Pascal," by Bruce Webster, p. 253. TURBUTIL.PAS A public-domain source-text library for Turbo Pascal running under MS-DOS. See p. 262. Latest version--June 1985. These are the Apple Pascal listings of the subroutine library: LOWLIB.ASM LOWLIB.PAS May 1985 -------- "Set Extensions with Apple Pascal," Alfred L. Schumer, p. 128. SCHUMER.DOC The SuperSets program. "Build a Talking Clock Speech Synthesizer," by Ernest H Piette, p. 143. TALKER.PRG This is the program TCLOCK.BAS. HELLO64.PRG This is the program HELLO64.BAS. TCLOCK.TXT Printable version of the source code with annotations. HELLO64.TXT Printable version of the source code with annotations. "Data-Movement Primitives," by J. Eric Roskos and Ching-Dong Hsieh, p. 239. LISTING1.DOC LISTING1.BAS LISTING2.DOC INPUT.DOC OUTPUT.DOC READWRIT.DOC "Mathematical Recreations: An Exercise in BASIC Bitwise Logic Operations," by Robert T. Kurosaka, p. 417. NIM.BAS Listing 1, p. 420-421. "Programming Insight: Computing Pi," David J. Crawford, p. 433. PI1.ASC Listing 1, p. 434. PI2.ASC Listing 2, p. 436. April 1985 ---------- "PROUST," by W. Lewis Johnson and Elliot Soloway, p. 179. PRSTREAD.ME Directions on how to run MicroPROUST. (See p. 182.) MPROUST.LSP EXAMPLER.PAS EXAMPLEA.PAS EXAMPLE1.PAS EXAMPLE2.PAS EXAMPLE3.PAS EXAMPLE4.PAS EXAMPLE5.PAS RAINFALL.PRB AVERAGE.PRB "Inside an Expert System," by Beverly A. Thompson and William A. Thompson, p. 315. RULEXREF.PAS CONIFERS.TXT SAMPLE.TXT The following are the same programs in Apple Pascal. RULXREF1.TXT RULEXREF.TXT CONFER.TXT SMPLE.TXT Programming Insight: "Load Assembler Routines from BASIC," by Douglas F. Yriart, p. 429. TEST.ASM See listing 1, p. 430. READASM.BAS Listing 2, p. 431. March 1985 ---------- "Arithmetic on Your PC," by Peter Rice, p. 119. ARITH.BIN Listing 1, p. 120. In binary. DDTARITH.BAS, Listing 1, p. 120. In BASIC. LISTING.2 Assembler (LONGMATH.ASM). LISTING.3 A BASIC listing. "Navigation: Putting The Microcomputer to Work at Sea," by Frederick N. Rounds, p. 141. Program in TRS-80 Model III BASIC. SUNFIX.BAS Compute your ship's position. "The Commodore 64 80-Column Terminal," by John C. Fields, Greg Richards, and Eric Beenfeldt, p. 183. ASSEMBLE.PRG EDITORC6 TERM80.PRG "A Unit Conversion Algorithm," by David L. Kahn, p. 151. CONVERT.BAS Listing 1, p. 154. "The Kit Solution," by Laine Stump, p. 193. Benchmark programs written and compiled with Turbo Pascal version 2.0. STUMP1.PAS See Table 1 on page 198. STUMP2.PAS STUMP3.PAS STUMP4.PAS "An XLISP Tutorial," by David Betz, p. 221. XLISP.EXE A compiled version. Version 1.4. XLISP.DOC *The complete XLISP source code is available for $6 from PC SW Interest Group, Suite J, 1030 East Duane, Sunnyvale, CA 94086, (408) 730-9291. Request volume 148, XLISP. Add $4 for postage and handling. Here's a version of XLISP for the Macintosh. You'll need BINHEX.V30 and BNHX4.HEX, both of which can be found in the Apple file area (#6). README.GW XLISP.HCX Mathematical Recreations: "Magic Squares," by Robert T. Kurosaka, p. 383. SQUARE.BAS Listing 1, p. 386. Programming Insight: "Factoring with Hyper," by Richard B. Leining, p. 396. HYPER.BAS Listing 1, page 398. Programming Insight: "An Assembly-Language Emulator Program," by John R. Robbins, p. 404. MAC10.BAS Listing 1, p.406. Application Note: "Taming The Submit Utility," by Mark Anacker, p. 412. TESTFILE.ASM Listing 1, p. 414. PAUSE.ASM Listing 2, p. 416. February 1985 ------------- Ciarcia's Circuit Cellar: "Build A Serial EPROM Programmer," p. 104. IBMPROGA.BAS Listing 1, p. 114. "C To Pascal," by Ted Carnevale, p. 138. C-TO-PAS.C Listing 1, p. 140. "A Low-Cost Data-Acquisition System," by Kiyohisa Okamura and Kamyab Aghai-Tabriz, p. 199. EXPL.SEQ LISTING1.PRG LIST2.SEQ LISTING3.SEQ LISTING4.SEQ LISTING5.SEQ "Fourier Smoothing Without the Fast Fourier Transform," by Eric E. Aubanel and Keith Oldham, p.207. FOURIER.BAS Listing 1, p. 212. Microsoft BASIC. FOUREXT.BAS Microsoft BASIC. FTEXT.BAS Hewlett-Packard BASIC. FT.BAS HP BASIC. "Paranoia: A Floating-Point Benchmark," by Richard Karpinski, p.223. PARANOIA.DOC Listings 1 and 2, pp. 230 through 235. "Viewing Molecules with the Macintosh," by Earl J. Kirkland, p. 251. MODEL3D.BAS Listing 1, p. 253. SIGEN.BAS Listing 2, p. 256. "Interfacing for Data Acquisition," by Tom Clune, p. 269. HEATSUB.BAS Listing 1, p. 278. "Janus/Ada," by Mark J. Welch, p. 295. JANUS-L1.LST Listing 1, p. 297. JANUS-L2.LST Listing 2, p. 297. JANUS-L3.LST Listing 3, p. 298. January 1985 ------------ "Audio-Frequency Analyzer," by Vince Banes, p. 223. TUNE.BAS Listing 7, p. 244. SWEEP.BAS Listing 8, p. 246. "Mathematical Recreations: The Fundamental Counting Principle," by Michael W. Ecker, p. 425. FACTOR.BAS Listing 1, p. 426. PRIME.BAS Listing 2, p. 427. NOSQUARE.BAS Listing 3, p. 428. December 1984 ------------- "Writing Communications in BASIC," by Barry J. Arnow, p. 187. COMM-BAS.LST Listings 1, 2, and 3, pp. 190 and 191. November 1984 ------------- "A Go Board for the Macintosh," by Bruce F. Webster, p. 125. GO.4TH Listing 1, p. 126. MacFORTH. "A Travesty Generator for Micros," by Hugh Kenner and Joseph O'Rourke, p. 129. TRAVESTY.PAS Listing 1, p. 450. HELLADD.PAS Listing 2, p.469. "Mathematical Recreations: Toggling Functions," by Michael W. Ecker, p. 425. MATHREC1.BAS Listing 1, p. 426. MATHREC2.BAS Listing 2, p. 426. October 1984 ------------ "Using A Mouse with Lotus 1-2-3," by John Doolittle, p. 124. READ.ME MOUS123.COM MOUS123.ASM M123.COM M123.ASM "Generating and Testing Pseudorandom Numbers," by Charles A. Whitney, p. 128. RANDNUM.BAS Listing 1, p. 462. MS-BASICA. September 1984 -------------- "Ciarcia's Circuit Cellar: Build the AC Power Monitor," p. 107. POWER.BAS Listing 1, p. 116. "Cluster Analysis," by Rob Spencer, p. 129. CLSTR.BAS Listing 1, p. 423. Microsoft BASIC. "Fractals," by Peter R. Sorensen, p. 157. FRACTAL.BAS Greg Turk's fractal program. Listing 1, p. 172. Applesoft. "Computer Landscapes," by Daniel Cooper, p. 211. SINESCAP.BAS Listing 1, p. 212. Applesoft. "Real-Time 3-D Graphics for Microcomputers," by Marcus Newton, p. 251. 3DVIDSYN.LST Listing 1, p. 252. Miscellaneous ------------- ANSIX364.TXT Listing of ANSI standard terminal-control codes, as used in DEC's VT100 video terminal. See April 1984 BYTE, pages 365 through 374. ASCII.TXT Table of ASCII code in column/row format, for use with ANSIX364.TXT.