Skip to main content
typo
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976

One for every BASIC command, Everyevery Instruction and every function. They are what the fetch and execute loop calls with every found token, which brings the last two parts:

*1 - The name Wozniak used, at the time, and for the Apple 1, was Apple BASIC, but to a wider audience it was only introduced way later and with some extensions for the Apple II as, now named Integer-BASIC. Since thenBy now the term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

One for every BASIC command, Every Instruction and every function. They are what the fetch and execute loop calls with every found token, which brings the last two parts:

*1 - The name Wozniak used at the time, and for the Apple 1, was Apple BASIC, but to a wider audience it was introduced with some extensions for the Apple II as Integer-BASIC. Since then term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

One for every BASIC command, every Instruction and every function. They are what the fetch and execute loop calls with every found token, which brings the last two parts:

*1 - The name Wozniak used, at the time and for the Apple 1, was Apple BASIC, but to a wider audience it was only introduced way later and with some extensions for the Apple II, now named Integer-BASIC. By now the term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

added 312 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976

All of these parts are on their own quite manageable on paper and by hand. To give some rough numbers (*6), Integer BASIC occupies 6 KIB of code made up from about 2000 instructions (plus a bunch of tables). With over 50 user visible commands and function this would already average to less than 40 instructions per function. In reality most are way shorter, like PEEK or POKE being 4 instructions each. Even complex one like GOSUB and GOTO are only 14 and 26 instructions.

*1 - The name Wozniak used at the time, and for the Apple 1, was Apple BASICApple BASIC, but to a wider audience it was introduced with some extensions for the Apple II as Integer-BASIC. Since then term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

*5 - Usually, but Integer BASIC worked without.

*6 - These numbers are taken from Integer BASIC for the Apple II, which is the only one I had a disassembly at hand). The original Apple 1 BASIC is only 4 KiB and had about a dozend functions less, but the basic considerations match.

All of these parts are on their own quite manageable on paper and by hand. To give some rough numbers, Integer BASIC occupies 6 KIB of code made up from about 2000 instructions (plus a bunch of tables). With over 50 user visible commands and function this would already average to less than 40 instructions per function. In reality most are way shorter, like PEEK or POKE being 4 instructions each. Even complex one like GOSUB and GOTO are only 14 and 26 instructions.

*1 - The name Wozniak used at the time, and for the Apple 1, was Apple BASIC, but to a wider audience it was introduced with some extensions for the Apple II as Integer-BASIC. Since then term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

*5 - Usually, but Integer BASIC worked without.

All of these parts are on their own quite manageable on paper and by hand. To give some rough numbers (*6), Integer BASIC occupies 6 KIB of code made up from about 2000 instructions (plus a bunch of tables). With over 50 user visible commands and function this would already average to less than 40 instructions per function. In reality most are way shorter, like PEEK or POKE being 4 instructions each. Even complex one like GOSUB and GOTO are only 14 and 26 instructions.

*1 - The name Wozniak used at the time, and for the Apple 1, was Apple BASIC, but to a wider audience it was introduced with some extensions for the Apple II as Integer-BASIC. Since then term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

*5 - Usually, but Integer BASIC worked without.

*6 - These numbers are taken from Integer BASIC for the Apple II, which is the only one I had a disassembly at hand). The original Apple 1 BASIC is only 4 KiB and had about a dozend functions less, but the basic considerations match.

added 368 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976

As explained on Steven Weyhrich's great and authoritative Apple II History Site, Wozniak simply sat down and wrote his Integer-BASIC (*1) on paper, while assembling it at the same time by hand. In his own words:

Actual machine code on paper for the 6502. (*1,*2,*3)

  • A line editor
  • A cruncher (tokenizer) (*3*4)
  • A fetch and execute loop
  • An expression evaluator
  • Memory (variable) access
  • (Garbage collection *4*5)
  • An error handling/output function
  • Startup (cold boot) and recovery (warm boot)

*1 - The name Wozniak used at the time, and for the Apple 1, was Apple BASIC, but to a wider audience it was introduced with some extensions for the Apple II as Integer-BASIC. Since then term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

*2 - Since he did it in 6500 assembly, it can be assumed that this happened after acquiring a first 6502 at Wescon in September 1975. What's interesting is that despite having a 6502 and writing a BASIC in 6500 Assembler he still made the board to accept a 6800 as well.

*2*3 - 6502 Assembler is rather easy to translate by hand, as every mnemonic plus addressing mode equals a single opcode and parameter encoding can as well be directly made according to addressing mode. No complex encoding to manage, like on a 8086 or 6800.

*3*4 - Optional, but Woz did add it to save on RAM.

*4*5 - Usually, but Integer BASIC worked without.

As explained on Steven Weyhrich's great and authoritative Apple II History Site, Wozniak simply sat down and wrote his Integer-BASIC on paper, while assembling it at the same time by hand. In his own words:

Actual machine code on paper for the 6502. (*1,*2)

  • A line editor
  • A cruncher (tokenizer) (*3)
  • A fetch and execute loop
  • An expression evaluator
  • Memory (variable) access
  • (Garbage collection *4)
  • An error handling/output function
  • Startup (cold boot) and recovery (warm boot)

*1 - Since he did it in 6500 assembly, it can be assumed that this happened after acquiring a first 6502 at Wescon in September 1975. What's interesting is that despite having a 6502 and writing a BASIC in 6500 Assembler he still made the board to accept a 6800 as well.

*2 - 6502 Assembler is rather easy to translate by hand, as every mnemonic plus addressing mode equals a single opcode and parameter encoding can as well be directly made according to addressing mode. No complex encoding to manage, like on a 8086 or 6800.

*3 - Optional, but Woz did add it to save on RAM.

*4 - Usually, but Integer BASIC worked without.

As explained on Steven Weyhrich's great and authoritative Apple II History Site, Wozniak simply sat down and wrote his Integer-BASIC (*1) on paper, while assembling it at the same time by hand. In his own words:

Actual machine code on paper for the 6502. (*2,*3)

  • A line editor
  • A cruncher (tokenizer) (*4)
  • A fetch and execute loop
  • An expression evaluator
  • Memory (variable) access
  • (Garbage collection *5)
  • An error handling/output function
  • Startup (cold boot) and recovery (warm boot)

*1 - The name Wozniak used at the time, and for the Apple 1, was Apple BASIC, but to a wider audience it was introduced with some extensions for the Apple II as Integer-BASIC. Since then term Apple BASIC is more closely associated with Apple's Microsoft dialect Applesoft. Thus the term Integer-BASIC is used thruout the answer, despite being not all exact.

*2 - Since he did it in 6500 assembly, it can be assumed that this happened after acquiring a first 6502 at Wescon in September 1975. What's interesting is that despite having a 6502 and writing a BASIC in 6500 Assembler he still made the board to accept a 6800 as well.

*3 - 6502 Assembler is rather easy to translate by hand, as every mnemonic plus addressing mode equals a single opcode and parameter encoding can as well be directly made according to addressing mode. No complex encoding to manage, like on a 8086 or 6800.

*4 - Optional, but Woz did add it to save on RAM.

*5 - Usually, but Integer BASIC worked without.

added 108 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976
Loading
added 85 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976
Loading
added 424 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976
Loading
added 283 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976
Loading
added 2371 characters in body
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976
Loading
Source Link
Raffzahn
  • 236.1k
  • 23
  • 682
  • 976
Loading