Integer BASIC

Integer BASIC

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. [cite web
url=http://apple2history.org/history/ah02.html
title=The Apple II
pages=page 2
last=Weyhrich
first=Steven
date=2001-10-20
accessdate=2007-09-16
quote=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)...
] 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. [cite web
url=http://apple2history.org/history/ah03.html
title=The Apple II
pages=page 3
last=Weyhrich
first=Steven
date=2001-12-12
accessdate=2007-09-16
quote=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.
]

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. Whilst written by Microsoft, Applesoft is not directly related to Microsoft BASIC, and the two behave quite differently. 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.

witching 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

ee also

* Applesoft BASIC

External links

* [http://www.landsnail.com/a2ref2.htm INTEGER BASIC Reference] – From Landsnail.com's "Apple II Programmer's Reference" website


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Integer BASIC — Integer BASIC  первая версия интерпретатора языка программирования Бейсик, использовавшаяся на компьютерах Apple II, написанная Стивеном Возняком …   Википедия

  • Integer BASIC — Das Apple Integer BASIC ist der BASIC Interpreter des Apple I dort von Cassette einzuladen und des ursprünglichen Apple II Modells dort im ROM fest eingebaut und mit dem Computer ab Werk ausgeliefert. Die Integer BASIC Sprache beruht in Syntax… …   Deutsch Wikipedia

  • Integer BASIC — El Integer BASIC, escrito por Steve Wozniak, era el interpretador BASIC de los computadores Apple I y del original Apple II. Originalmente disponible en cassette (para el Apple I), luego incluido en el ROM de la computadora original del Apple II… …   Wikipedia Español

  • Apple Integer Basic — Das Apple Integer BASIC ist der BASIC Interpreter des Apple I – dort von Cassette einzuladen – und des ursprünglichen Apple II Modells – dort im ROM fest eingebaut und mit dem Computer ab Werk ausgeliefert. Die Integer BASIC Sprache beruht in… …   Deutsch Wikipedia

  • BASIC — Класс языка: алгоритмическое, процедурное, объектное программирование Появился в: 1963 г. Расширение файлов: .bas Типизация данных: нестрогая Бейсик (от BASIC, сокращение от англ.  …   Википедия

  • BASIC-256 — с …   Википедия

  • BASIC — This article is about the programming language. For the think tank, see British American Security Information Council. For the group of countries, see BASIC countries. For other uses, see Basic (disambiguation). BASIC Screenshot of Atari BASIC,… …   Wikipedia

  • BASIC — Información general Paradigma estructurado imperativo Apareció en 1964 Diseñado por John George Kemeny; Thomas Eugene Kurtz …   Wikipedia Español

  • BASIC-PLUS — was an extended dialect of the BASIC programming language developed by Digital Equipment Corporation (DEC) for use on its RSTS/E time sharing operating system for the PDP 11 series of 16 bit minicomputers in the early 1970s through the… …   Wikipedia

  • Integer-valued polynomial — In mathematics, an integer valued polynomial P(t) is a polynomial taking an integer value P(n) for every integer n . Certainly every polynomial with integer coefficients is integer valued. There are simple examples to show that the converse is… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”