31 votes

What does this line: `T=C/2=INT(C/2)` do? Why is it valid syntax?

Explaining what this line does is easy enough: it checks if C is even by dividing it by 2 and comparing the result to its floor, then stores the result of the comparison in the variable T. Comparisons ...
user avatar
  • 16.4k
16 votes

Can you read the character definitions (font) in an Apple II using PEEK in Applesoft BASIC?

No, it's not possible to read the built-in text mode font data from "inside" the machine. (Update: Except perhaps in the Apple IIgs - see below.) In all Apple II models the font data is in a ...
user avatar
13 votes

What does this line: `T=C/2=INT(C/2)` do? Why is it valid syntax?

The line in question is T=C/2=INT(C/2) The first '=' is a variable assignment. The second '=' is part of the expression and is an equality test. The expression returns a boolean result, which is ...
user avatar
  • 1,589
10 votes

Why does Applesoft get confused by a nonzero value at $0800?

The Applesoft RUN command ($d912) begins by calling SETPTRS ($d665), which calls STXTPT ($d697) to initialize TXTPTR ($b8-b9) to the value in TEXTTAB ($67-68) minus one. In simple terms, parsing of ...
user avatar
  • 7,411
10 votes
Accepted

Extensions to Apple BASIC with ampersands

After a bit of research, it turns out it was Applesoft. The interpreter had a feature where, if it encountered an ampersand during execution of the program, it would unconditionally jump to a ...
user avatar
  • 2,386
6 votes

Extensions to Apple BASIC with ampersands

While paxdiablo answered the question confirming that it was AppleSoft, I can point out three things related to it as an extension: When you load your extension, it should attempt to relocate itself ...
user avatar
  • 14.1k
2 votes

What determines the amount of space occupied by an Applesoft BASIC program?

The ProDOS AppleSoft SAVE command: Creates the file if it doesn't exist Opens the file Writes all data from BEGPROG (zero page $67/$68) through ENDPROG (zero page $AF/$B0) Sets the file length to ...
user avatar
1 vote

How to use HGR2 (or HGR) on an Apple II

Just to add to the other answers - a somewhat odd solution, but doable for simple (but longish) "drawing" programs such as this, is to use Wozniak's old "Integer BASIC" (aka "...
user avatar
  • 656
1 vote

What books did schools use to teach BASIC?

Programming in BASIC for business by Bruce Bosworth is the one I used in High School: https://archive.org/details/programminginbas0000bosw Elementary school students would have been learing LOGO at ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible