*Although the ATN function is not included in AIM 65 BASIC, the ATN command is recognized (see Appendix H).

202DIRECT AND INDIRECT COMMANDS DIRECT COMMANDS

Try typing in the following: PRINT 10-4 (end with RETURN)

BASIC will immediately print: 6

The print statement you typed in was executed as soon as you hit the RETURN key. This is called a direct command. BASIC evaluated the formula after the "PRINT" and then typed out its value, in this case "6".

Now try typing in this:

PRINT 1/2,3*10("*" means multiply, "/" means divide)

BASIC will print:

.5 30

As you can see, BASIC can do division and multiplication as well as subtraction. Note how a "," (comma) was used in the print command to print two values instead of just one. The command divides a line into 10-character-wide columns. The comma causes BASIC to skip to the next 10-column field on the terminal, where the value 30 is printed.

INDIRECT COMMANDS

There is another type of command called an Indirect Command. Every Indirect command begins with a Line Number. A Line Number is any integer from 0 to 63999.

Try typing in these lines:

10 PRINT 2+3

20 PRINT 2-3

A sequence of Indirect Commands is called a "Program." Instead of executing indirect statements immediately, BASIC saves Indirect Commands in memory. When you type in RUN, BASIC will

execute the lowest numbered indirect statement that has been typed in first, then the next higher, etc., for as many as were typed in.

In the example above, we typed in line 10 first and line 20 second. However, it makes no difference in what order you type in indirect statements. BASIC always puts them into correct numerical order according to the Line Number.

Suppose we type in

RUN

BASIC will print:

5 -1

203 OPERATING ON PROGRAMS AND LINES

In Subject 202, we typed a two-line program into memory. Now let's see how BASIC can be used to operate on either or both lines.

LISTING A PROGRAM

If we want a listing of the complete program currently in memory, we type in

LIST

Page 219
Image 219
Apple II manual Direct and Indirect Commands Direct Commands, Operating on Programs and Lines, Listing a Program

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.