Integer BASIC

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search

Integer BASIC, written by Steve Wozniak, was the BASIC interpreter of the Apple I and original Apple II computers. Originally available on cassette, then included in ROM on the original Apple II computer at release in 1977, it was the first version of BASIC used by many early home computer owners.[1] Thousands of programs were written in Integer BASIC. Apple originally called it Apple BASIC; it was renamed to Integer BASIC once the newer "floating point" Applesoft BASIC became available.

Little Brick Out

Steve Wozniak, who had earlier been involved with Atari in the development of the original version of Breakout, set as an internal goal in the design of the Apple II computer to be able to faithfully reproduce that game, using only BASIC instructions. This is seen in the design of the "low-res" graphic modes and making the Apple II one of the first microcomputers to use color graphics. This design goal was realized with the program "Little Brick Out" when it was demonstrated at a meeting of the Homebrew Computer Club in 1976. It should also be noted that Wozniak did not have any software development tools for the 6502 processor other than an assembly language reference manual, and instead wrote out the software with pen and paper and then hand assembled the instructions into raw machine code for the 6502.[2]

Relationship to Applesoft BASIC

The most frequently cited flaw of Integer BASIC was, as one might expect from the name, that its variables were all 16-bit integers and it was very difficult to write a program that could do calculations using floating point numbers, or even integers outside of the range -32768 to +32767. It was therefore very difficult to write financial or math programs.

Apple Computer licensed a more full-featured (but also much slower) BASIC from Microsoft, introduced some tweaks, named it Applesoft BASIC, and included the second version of it in the ROMs of the Apple II Plus, which was released in 1979. Integer BASIC was relegated to a file on the system floppy disk that Apple II Plus users could load into a RAM card for backward compatibility, if needed. Applesoft BASIC was included in the ROMs all Apple II models from the Apple II Plus forward, and eventually became the platform for far more programs.

Integer BASIC's speed advantage was partly due to some syntax checking being performed at entry-time, as well as numbers being converted to binary form, rather than these things being done at run-time. (A popular speed optimising technique in most interpreted BASICs — including Applesoft — is to put all frequently used constants into variables, because fetching the variable's value is faster than converting a number from text — a difference which becomes significant, given perhaps hundreds of iterations. This method is superfluous in Integer BASIC.)

The Mini-Assembler and other auxiliary firmware

The Integer BASIC ROMs also included a "Mini-Assembler" that let programmers type assembly language programs, line by line, which were entered into memory. This was of course far easier than looking up the corresponding opcodes in machine language and typing those in. These ROMs also included an interpreter for a 16-bit bytecode language, called SWEET16, which was very simple, compact, and worthy of study. These two features, some cassette tape I/O routines, and a few seldom-used floating point math routines were removed in the transition from the Integer BASIC ROMs to the Apple II Plus ROMs, in order to accommodate the larger size of the Applesoft BASIC interpreter.

Switching between BASICs

When running Apple DOS, it was possible (at the expense of clearing the current BASIC program from memory) to switch between Applesoft BASIC and Integer BASIC by typing either INT (to enter Integer BASIC) or FP (to enter Applesoft BASIC)—provided, of course, that the requested language was either in ROM or loaded into RAM.

There was also a plug in board available that could be installed into slot 0 that allowed the user to switch between the on board or external ROMS.

The command-line prompt for Integer BASIC was a right-facing arrowhead (greater-than symbol) (>). (Applesoft's prompt was a right square bracket (]), giving the user a clear indication which BASIC they were using.)

Editing

The editing method for Integer BASIC (actually part of the system monitor's line-input subroutine) was a slightly more primitive version of the method available in the Apple II Plus firmware. Pressing Escape followed by A, B, C, or D would move the cursor right, left, down, or up, respectively. It was necessary to press Escape each time — unlike with the later Escape K, J, M, and I (Apple II Plus and later) and Escape right, left, down, up (Apple IIe and later). Each successive version supports all previous methods; for example, even on the Apple IIe, one could press Escape then A and move just one space.

In all systems, pressing the right arrow key, whilst not in escape mode, would pick up the character under the cursor, allowing on-screen text to be effectively retyped into the input buffer.

There were third party programmes — for example PLE, GPLE from Synergistic Software and later Beagle Bros, and GALE — which offered more powerful and programmer-friendly editing facilities.

References

  1. Weyhrich, Steven (2001-10-20). "The Apple II". pp. page 2. http://apple2history.org/history/ah02.html. Retrieved 2007-09-16. "There were also several program cassettes available to purchase (assuming that you had the cassette interface). These included Wozniak's BASIC (which took about 30 seconds to load)..." 
  2. Weyhrich, Steven (2001-12-12). "The Apple II". pp. page 3. http://apple2history.org/history/ah03.html. Retrieved 2007-09-16. "The [Integer] BASIC, which we shipped with the first Apple II's, was never assembled — ever. There was one handwritten copy, all handwritten, all hand-assembled." 

See also

External links

de:Apple Integer Basic ko:정수 베이직 nl:Integer BASIC ru:Integer BASIC

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...