2.THIS IS PROBABLY THE MOST IMPORTANT SPEED HINT.

Use variables instead of constants. It takes more time to convert a constant to its floating point representation than it does to fetch the value of a simple or matrix variable. This is especially important within FOR...NEXT loops or other code that is executed repeatedly.

3.Variables which are encountered first during the execution of a BASIC program are allocated at the start of the variable table. This means that a statement such as 5 A=0:B=A:C=A, will place A first, B second, and C third in the symbol table (assuming line 5 is the first statement executed in the program). Later in the program, when BASIC finds a reference to the variable A, it will search only one entry in the symbol table to find A, two entries to find B and three entries to find C, etc.

4.Use NEXT statements without the index variable. NEXT is somewhat faster than NEXT I because no check is made to see whether the variable specified in the NEXT is the same as the variable in the most recent FOR statement.

D CONVERTING BASIC PROGRAMS NOT WRITTEN FOR AIM 65 BASIC

Though implementations of BASIC on different computers are in many ways similar, there are some incompatibilities which you should watch for if you are planning to convert some BASIC programs that were not written in AIM 65 BASIC.

1.Matrix subscripts. Some BASICs use "[" and "]" to denote matrix subscripts. AIM 65 BASIC uses "(" and ")".

2.Strings. A number of BASICs force you to dimension (declare) the length of strings before you use them. You should remove all dimension statements of this type from the program. In some of these BASICs, a declaration of the form DIM A$(I,J) declares a string matrix of J elements each of which has a length I. Convert DIM statements of this type to equivalent ones in AIM 65 BASIC: DIM A$(J).

AIM 65 BASIC uses "+" for string concatenation, not "," or "&".

AIM 65

BASIC uses LEFT$, RIGHT$

and

MID$ to take

substrings

of strings. Other

 

BASICs

uses A$(I) to

access

the

Ith

character of

the string

A$, and A$(I,J) to

take a

substring of A$ from

character position I to character position J. Convert as follows:

OLD

AIM

65

 

 

 

 

 

A$(I)MID$(A$,I,1)

A$(I,J)MID$(A$,I,J-I+1)

This assumes that the reference to a substring of A$ is in an expression or is on the right side of an assignment. If the reference to A$ is on the left hand side of an assignment, and X$ is the string expression used to replace characters in A$, convert as follows:

OLD

AIM 65

A$(I)=X$A$=LEFT$(A$,I-1)+X$+MID$(A$,I+1)

A$(I,J)=X$A$=LEFT$(A$,I-1)+X$+MID$(A$,J+1)

3.Multiple assignments. Some BASICs allow statements of the form: 500 LET B=C=0. This statement would set the variables B & C to zero.

In AIM 65 BASIC this has an entirely different effect. All the "='s" to the right of the first one would be interpreted as logical comparison operators. This would set the variable B to -1 if C equaled 0. If C did not equal 0, B would be set to 0. The easiest way to convert statements like this one is to rewrite them as follows:

500C=0:B=C

4.Some BASICs use "/" instead of ":" to delimit multiple statements per line. Change all occurrences of "/" to ":" in the program.

Page 251
Image 251
Apple II This is Probably the Most Important Speed Hint, Converting Basic Programs not Written for AIM 65 Basic, Old Aim

II specifications

The Apple II, launched in April 1977, was one of the first highly successful mass-produced microcomputer products. It marked a significant leap in personal computing, setting standards for future developments in the industry. Created by Steve Wozniak and Steve Jobs, the Apple II differentiated itself with its user-friendly design, appealing aesthetics, and robust capabilities.

One of the standout features of the Apple II was its open architecture, which allowed users to expand and enhance the computer's functionality. This design enabled hundreds of third-party hardware and software developers to contribute to its ecosystem, resulting in an array of peripherals, including printers, modems, and storage devices. The Apple II utilized a MOS Technology 6502 microprocessor running at a clock speed of 1 MHz. Initially equipped with 4 KB of RAM, the machine could be expanded to 48 KB, accommodating more complex applications and programs.

The Apple II was also notable for its colorful graphics. It was one of the first computers to support color display, offering a 6-color palette with a resolution of 280x192 pixels in 16 colors when using its Color Graphics Card. This feature significantly enhanced the visual appeal of games and educational software developed for the platform, making computing more accessible and entertaining for various audiences.

Apple's commitment to user experience was evident in the design of the machine. It featured an integrated keyboard and a plastic case, which was both durable and visually appealing. The self-contained design included drive bays for floppy disk drives, allowing for quicker data access than traditional tape drives. It also supported audio output, enabling sound effects and music, a novelty at the time.

The introduction of the Apple DOS operating system further underscored the machine's capabilities. DOS streamlined file management and made it easier for users to navigate and manage their data. The combination of hardware and software positioned the Apple II as an educational tool and a gaming platform, fostering a vibrant software ecosystem.

The Apple II family continued to evolve, with variations like the Apple II+, IIe, and IIgs being introduced over the years. These iterations brought enhancements in memory, processing power, and graphics capabilities. The legacy of the Apple II endures, not only as a foundational product in personal computing but also as a symbol of innovation that paved the way for future advancements in technology. Its impact is still felt today, as it inspired countless developers and shaped the trajectory of the computer industry.