Content deleted Content added
→Trivia: removed unsourced WP:TRIVIA - if reintroduced into the article, the burden is on that editor to provide reliable sources so that information can be verified |
I don't know about the rest of the Trivia, but this much, at least, was relating info from the Applesoft Manual; the 5th point from the DOS manuals; and one CALL address from the Disassembled ROM site |
||
Line 37:
==Apple Business BASIC==
Apple Business BASIC shipped with the [[Apple ///]] computer. Donn Denman ported Applesoft BASIC to [[Apple SOS|SOS]] and reworked it to take advantage of the extended memory of the Apple ///. Following the trend of avoiding absolute addresses, the PEEK and POKE commands were replaced with INVOKE and PERFORM statements that loaded and executed separately-assembled code modules.
== Trivia<ref>Applesoft II Basic Programming Reference Manual, Apple Computer, Inc., 1978</ref> ==
* Despite its heritage, Applesoft lacked commands common to non-6502 Microsoft BASIC interpreters, such as INSTR (which searched for a substring in a given string), PRINT USING (which formatted numbers with commas and currency signs according to a format string), and INKEY$ (which checked for a keypress without stopping the program as Applesoft's GET did), although a PEEK ___location did provide this functionality. It seems likely that memory constraints were at the root of these differences, as the Apple II ROM had only 10 kilobytes available for the interpreter, and the improved hi-res graphics support was clearly a higher priority. Microsoft's CLS command (for clearing the screen) was renamed HOME in Applesoft.
* There was a well-documented bug in Applesoft BASIC that could actually crash the interpreter if ONERR GOTO was in effect and numerous program errors occurred. Apple provided a short assembly-language routine which could be POKEd into RAM and CALLed to ameliorate the problem to an extent. Later it was discovered by an enterprising hacker that the required code was actually in the Applesoft ROM (though it was never executed) and could be called there instead: CALL -3288 or (equivalent) 62248.<ref>[http://www.txbobsc.com/scsc/scdocumentor/ Disassembled ROM]</ref>
* Applesoft could be extended by two means: the ampersand (&) command and the USR() function. These were two functions that called machine-language functions stored in memory. Routines that needed to be as fast or required direct access to arbitrary functions or data in memory could thus be called from a higher-level interpreted BASIC program. Additionally, these lower-level functions could read the data immediately following the "&" or "USR" command, allowing a BASIC program to pass parameters to the functions.
* Both Integer BASIC and Applesoft used [[tokenizing]] to reduce the memory requirements of programs and to speed their interpretation. As code was entered, BASIC keywords would be converted to single-byte tokens; the process was reversed when the program was listed. Integer BASIC used characters with codes above 127 for normal text and codes below 128 for tokens; Applesoft used exactly the reverse. Unlike Integer BASIC, Applesoft did not tokenize literal numbers appearing in the code but stored them digit by digit.
* Applesoft, like Integer BASIC before it, did not come with any built-in commands for dealing with files or disks. The Apple II disk operating system, known simply as DOS, thus intercepted all input typed at the BASIC command prompt to determine whether it was a DOS command. Similarly, all output was scrutinized for a Control-D character (ASCII 4), which BASIC programs would send before seemingly PRINTing a disk command to get DOS's attention (the disk commands would not really get PRINTed but were intercepted by DOS and prevented from making it to the screen output).<ref>The DOS Manual for Apple II, Apple Computer, Inc., 1980, 1981</ref> [[Apple ProDOS|ProDOS]] followed this lead, although the BASIC command interpreter was placed in a separate program called BASIC.SYSTEM and the hook worked in a different manner.<ref>Apple II ProDOS Manual, Apple Computer, Inc.</ref>
== Notes ==
{{Reflist}}
== See also ==
|