09.07.2015 Views

peelings-ii-v4n1-1983

peelings-ii-v4n1-1983

peelings-ii-v4n1-1983

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

aid in learning machine language programming. This could be a realplus, depending on your interest.ENHANCEMENTSAs with the !BC, strings may be dimensioned longer that 255characters. INPUT variables preceeded by $ are treated as hex numbersand three new functions are available: WEEK (sixteen bit peek),CHR$ (obvious), and HEX$ (four character hex value). In addition,there are thirty-one statements that can be used in extended REMstatements. Without itemizing them all, there are the screen displaycontrol commands, DAT A and READ statements, RESTORE to aline number of a DAT A statement, sixteen bit POKE, all of theApplesoft HIRES commands, WAIT or delay command, GET,TONE, and NOTE. It is evident that FLASH! BASIC has many enhancementsthat even Applesoft doesn't have.Integer BASIC CompilerThe option allowing the creation of an assembler source codeshould not be taken lightly. A serious programmer, willing to delveinto machine language programming, can further increase the speedof execution of the compiled program by recoding some of the codemore efficiently. It is claimed that an additional two to four - fold increasein speed can be realized by doing some optimizing. A beginnercould use this option to help learn machine language.DOCUMENTATIONThe sixty half-sized pages constitute both a learner's guide as wellas a reference manual. All the options are very clearly explained withevery effort made to explain the full use of each option. There is afour page glossary, five appendixes, and a few pages devoted to adiscussion of bugs in Integer BASIC and the programmer's aid ROMand how to fix them in the RAM versions of each. In my opinion, it isfar more than a simple instruction manual.D ·By Chris GalfoSynergistic Software830 N. Riverside Dr., Ste 201Renton, WA 98055206-226-3216Machine Language32K, DOS 3.3Partially LockedRating: Aments include CHR$, GET, and a KEYboard input function. A "DSPkeyword" statement gives control over the screen display features.The keyword can be any one of eight words: HOME, CLEAR,INVERT, NORMAL, FLASH, FULL, MIXED, or LO, with the obviousmeanings.Even though !BC is locked, there are different versions for runningfrom slots 4 or 5 (for hard disks) included on the system disk.INTRODUCTIONThe Integer BASIC Compiler (!BC) compiles Integer BASIC tocreate pure Galfo Stack Language (GSL) code or mixed 6502 andGSL code. In either case, the execution speed is considerably improvedover Integer BASIC.Obviously, you must start with a working Integer BASIC program.!BC allows certain extensions, to overcome some of the shortcomingsof Integer BASIC, which will be discussed later.THE COMPILER!BC comes on two diskettes: a system disk (unlocked) and a compilerdisk (locked). The system disk must first be booted and the IntegerBASIC program to be compiled loaded into memory. Then !BC isBRUN. The program asks that the compiler disk be placed in thedrive and further questions are asked. One of these 'optimize forspeed,' depending on how it is answered, will generate pure GSLcode or mixed GSL/6502 code. The mixed code will execute fasterthan the pure GSL code. Another option generates a disassembledlisting of the program in symbolic code. After the compiler is finished,the length of the object code is reported and a starting address is chosen.The code is then moved to the appropriate memory location andit may be saved to disk or immediately executed. The generated codeis relocatable to any 6502 page boundary. The largest programs thatcan be compiled are 25K (48K RAM) or 36K (DOS on RAM card).The object code is approximately twenty-five percent smaller thanthe source, using the pure GSL option. A program AUTO COMPILEis included on the disk to construct an EXEC file for automaticallycompiling and BSA Ving a program. This requires a two drive system.ENHANCEMENTSA version of the HIRES graphics routines, modified to run withcompiled code, is included on the disk. The Integer BASIC programcan be debugged in the regular way using the normal routines withthe modified routines added prior to compilation. As stated in the introduction,you have just been forced to use some machine languagecode in your programming, which was the object in the first place.!BC allows strings to be dimensioned up to 32767 and by a clevertrick lets you set aside a type of common block similar to the way theEQUIVALENCE statement is used in FORTRAN. Other enhance-28DOCUMENTATION!BC comes with a forty page, half-size booklet. The operatingprocedures are clearly described with examples and sample screenmessages. Several pages are devoted to the use of the HIRES graphicsroutines from Integer BASIC. Two pages contain the compiletimeerror messages and possible causes of each. Most errors willhave been detected by the BASIC interpreter long before the compilestage. An Appendix includes benchmark program execution timesfor Integer and Applesoft BASIC programs compared to the two optimizationoptions of the !BC. In either case the difference in speed istypically a factor of ten. I will discuss this more fully in the summaryand comparison with FLASH! .DSummaryAs with every evaluation of two fine products, neither of the IntegerBASIC compilers is a clear winner. Let us discuss the speed ofthe compiled programs. The following chart displays runtime andsize of three different programs compiled by both of the compilers.Program A Program B Program C--------- ---------------------time size time size time sizeseconds sectors seconds sectors seconds sectors!BCsize opt. 3.2 9 20 4 3.3 3speed opt. 2.9 20 17 5 2.9 3FLASH! 4.2 18 20 4 5.6 3Integer BASIC 18.6 10 238 5 28 2Applesoft N/A N/A 298 5 44 2Program A was the color demo program from the system masterprovided with the disk II system. The time was that required to runthe hyperbola program through one complete hyperbola, calculatedfrom the average of ten changes. Program B was the Sieve of Eratostheneswhich computes all the prime numbers from 3 to 16000. Thisprogram was published in Byte (Sept 1981) and was furnished as ademo program with the FLASH! compiler. Program C was from a setof benchmark programs published in Call -A.P.P.L.E. (Mar/Apr1980) and published in the !BC manual. The sizes shown are not in-Peelings II

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!