Questions tagged [applesoft-basic]

For questions related to the Applesoft BASIC interpreter and language.

Filter by
Sorted by
Tagged with
8 votes
2 answers
954 views

Help understanding TAIPAN source code for the Apple II

I am trying to run the source code found at https://taipangame.com/BASIC.txt on Epple 2 (with Apple II+ roms) to eventually run on my own Apple II+, but the program keeps crashing. First, I used a ...
EvanTheGamer's user avatar
10 votes
4 answers
3k views

How did the Apple IIe convert to upper case?

TL;DR How did the Apple IIe convert commands to upper case? Background I've been using the Virtual ][ emulator in Apple IIe mode (with an Apple IIe Enhanced ROM). After getting the ELIZA code from ...
Greenonline's user avatar
  • 3,349
5 votes
3 answers
460 views

Examples of floating-point numbers that don’t round-trip losslessly through text conversion in Microsoft BASIC

For a long time I thought it was kind of crazy that 8-bit Microsoft BASIC stores numeric constants in ASCII and has to parse them into its 32- or 40-bit floating point format at runtime. Why not parse ...
Willis Blackburn's user avatar
7 votes
1 answer
217 views

Did any AppleSoft language enhancements patch CHRGOT?

Some BASIC language enhancements for Commodore 8-bit machines, such as the 1982 DOS Wedge, worked by patching the CHRGOT routine. Even though BASIC is in ROM, every byte that is fetched from a ...
supercat's user avatar
  • 34.7k
8 votes
1 answer
300 views

Why did ProDOS trace Applesoft?

When running an Applesoft program under ProDOS, BASIC.System watches for OS commands by looking for PRINT statements that start with Ctrl+D. This is similar, but not equivalent, to the DOS behavior. ...
fadden's user avatar
  • 8,775
2 votes
1 answer
290 views

Motivation for DOS 3.3 using I/O hooks rather than ampersand-hook

AppleSoft BASIC is designed so that if it encounters an ampersand while processing a program, it will jump to address $03F5, allowing code there to examine what follows and process it suitably. While ...
supercat's user avatar
  • 34.7k
15 votes
1 answer
1k views

How are the randomizer values on the Apple II maintained?

Looking at a comment on this question, it reminded me of how there are two memory locations in the Apple II zero page that are used for random number generation: 0x4E and 0x4F (78 and 79, respectively)...
bjb's user avatar
  • 15.8k
8 votes
2 answers
1k views

Apple IIe SYNTAX ERROR

I inherited an old Apple IIe computer. I have a dual disk drive and connected to a modern TV screen as the original monitor was fried. On turning on the computer, nothing happens except "Apple ][&...
Andrew Highfield's user avatar
11 votes
3 answers
1k views

Extensions to Apple BASIC with ampersands

I have a vague recollection of some early software that extended the Apple II BASIC language, though I'm not sure if this was Integer or Applesoft BASIC. It provided more features for the language by ...
paxdiablo's user avatar
  • 4,594
12 votes
1 answer
672 views

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

Can you read the character definitions (font) from ROM in an Apple II using PEEK in Applesoft BASIC? You can do this on some other computers e.g. Sinclair ZX81, Commodore 64, and Amstrad PC1512, but ...
mobluse's user avatar
  • 503
14 votes
1 answer
757 views

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

Applesoft BASIC programs start at location $0801 in memory (usually). If you put a nonzero value at address $0800, though, you get an error when you try to run the program: ?SYNTAX ERROR IN 65124 ...
fadden's user avatar
  • 8,775
6 votes
1 answer
211 views

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

I've been writing an Applesoft BASIC program over the last few months or so (IIgs and IIe, ProDOS 2.4.2 with BASIC.SYSTEM v1.6). My large BASIC program was sitting at something like 51 ProDOS blocks. ...
user22121's user avatar
18 votes
3 answers
2k views

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

I do not understand line 80 of the short Applesoft BASIC program below. Didn't even know it was possible to have a single instruction be T=C/2=INT(C/2). Naturally, I tried breaking this line up / ...
Grant's user avatar
  • 189
9 votes
4 answers
884 views

Applesoft (pseudo) Random Numbers - alternatives?

What are the alternatives (with examples on how to implement) to Applesoft RND(1) command? I have read of people using a completely different algorithm by poking machine code stored in a DATA ...
user21656's user avatar
9 votes
1 answer
1k views

Why does the Applesoft BASIC have shapes?

Why did Apple include shapes in Applesoft BASIC? There are no sprites on the Apple II, but shapes provide a simple vector drawing tool. As graphics go the shapes are kind of an odd duck, they provide ...
Michael Shopsin's user avatar
8 votes
2 answers
2k views

Are there standalone emulators of Applesoft Basic?

My only retrocomputing desire is to program in Applesoft Basic and relive the Apple II days from the 1980's. Playing games is of no particular interest to me. I just want to use a keyboard, not a ...
James Rybak's user avatar
26 votes
4 answers
5k views

Why was it common to reference memory locations using negative numbers on some BASICs?

If you had an Apple II, it was common in BASIC to reference memory locations above the 32K point by using a negative number. For example, if you wanted to click the speaker you would PEEK/POKE -16336 ...
bjb's user avatar
  • 15.8k
2 votes
2 answers
269 views

INPUT with comma vs. semi

I certainly don't recall this at the time, but I'll ask to be sure. According to the GW-BASIC documentation, a semicolon between the INPUT prompt and the variable suppresses the question-mark prompt. ...
Maury Markowitz's user avatar
7 votes
4 answers
2k views

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

I am a big fan of the TV show lost, and I was trying to make the Dharma Initiative logo. But at certain point I couldn't add new lines of code and the final part of the logo was cut off. I tried to ...
Arthur Oribe's user avatar
6 votes
2 answers
708 views

Where can I find the Applesoft line-drawing algorithm?

I’m trying to make some graphics in Processing that look just like what I’d get on an Apple //e. I think the info I seek is in the ROM disassembly but I can’t find anything by googling. I'm also ...
novelistparty's user avatar
3 votes
0 answers
419 views

How do Apple II BASIC compilers compare? [closed]

Programs like The Beagle Compiler allow AppleSoft BASIC or other Apple II BASIC variants to be compiled. How do the compilers compare in terms of compatibility with AppleSoft language features? Eg how ...
Michael Shopsin's user avatar
4 votes
0 answers
333 views

How to use IIgs enhanced graphics modes in AppleSoft BASIC with System 6?

There are many packages that let you use the enhanced graphics modes of the IIgs in AppleSoft BASIC. However most packages like Iconix do not like System 6 so they have to run off disks and not the ...
Michael Shopsin's user avatar
10 votes
4 answers
2k views

What are the rules for Applesoft BASIC formatting for code?

What are the rules for Applesoft BASIC formatting for code? I've been doing some BASIC coding and noticed that: 10 input "some question?"; name$ Will be reformatted as: 10 INPUT "some question?";...
Michael Shopsin's user avatar
5 votes
1 answer
413 views

1980's ROM used which exp(n) algorithm?

In 1980's ROM (Apple IIe, Commodore 64, VIC-20, ...) which algorithm is used to compute exp(x), and where do the coefficients below come from? (Chebyshev, Remez, Pade, ...) .byte $71,$34,$58,$3E,$...
jpcohet's user avatar
  • 51
2 votes
1 answer
430 views

Turn off Apple IIe sound

Is there a way to disable sound output on the Apple IIe from Applesoft Basic? Can't seem to find this in any of the documentation or online. Update: Found this From http://www.calormen.com/jsbasic/...
dashnick's user avatar
  • 1,178
6 votes
2 answers
459 views

How can you reset the behavior of ONERR in AppleSoft BASIC?

In an Applesoft BASIC program you can use the standard MS-BASIC ONERR statement to perform error trapping. For example: 10 ONERR GOTO 100 20 POKE 0, 400 : REM INVALID VALUE WILL CAUSE ERROR 30 END ...
bjb's user avatar
  • 15.8k
7 votes
4 answers
882 views

What books did schools use to teach BASIC?

What books would have been used to teach school aged kids BASIC in a classroom setting back when BASIC was in common use? 8-Bit computers commonly came with tutorials to learn BASIC, like A Touch of ...
Michael Shopsin's user avatar
8 votes
2 answers
441 views

In Applesoft BASIC, does combining statements into a single line speed up execution?

In Applesoft BASIC, does combining statements into a single line speed up execution? For example, would this: 10 PRINT "HELLO WORLD" : FOR I = 1 TO 100 : PRINT I : NEXT I Run faster than this: 10 ...
Tantalus's user avatar
  • 183
5 votes
2 answers
1k views

Apple II: Applesoft variable syntax error weirdness

While typing immediate-mode commands in Apple II Applesoft / floating point BASIC, I discovered an odd situation where I will get other programming error messages before a syntax error. Why does it do ...
Dale Mahalko's user avatar
  • 3,639
27 votes
2 answers
4k views

Apple II: Applesoft BASIC memory management

I am trying to write an Applesoft / floating point BASIC program using high resolution graphics and some assembly language code. My BASIC program is quite large, and after running the program for a ...
Dale Mahalko's user avatar
  • 3,639
10 votes
1 answer
500 views

Apple II: HPLOT crashes system. Why?

While I was writing a program on an Apple IIe, I set up access the graphics page using softswitches, and then tried to draw on it, but the system crashed so hard I had to do a Control - Open Apple - ...
Dale Mahalko's user avatar
  • 3,639
12 votes
4 answers
1k views

At what address do Apple II Applesoft programs get stored?

Online references disagree on whether Applesoft programs were stored at 0x801 (2049) or 0x3001 (12289). A quick test on my OpenEmulator install with an Apple II Plus definitely puts it at 0x801. ...
zellyn's user avatar
  • 1,005
35 votes
6 answers
3k views

Did the LET statement actually do anything in 8-bit Microsoft BASICs?

I know the LET statement was available in AppleSoft and other Microsoft 8-bit BASICs back in the day, but I can't think of a time where I actually used it. Frankly, I get the impression that it was ...
bjb's user avatar
  • 15.8k
11 votes
1 answer
2k views

Testing/using a joystick in AppleSoft?

How does one use joysticks in a program on the Apple //? I have three different joysticks here and I would like to visualize their state (pot and button values), maybe similar to the SDL joystick ...
knghtbrd's user avatar
  • 1,039
18 votes
2 answers
2k views

Apple // screen editing

I've heard mention many times of screen editing commands on the Apple // for fixing typos in BASIC programs (and patching code in the monitor?). I did not learn these growing up, never having the ...
knghtbrd's user avatar
  • 1,039
18 votes
3 answers
2k views

What are the differences between the versions of AppleSoft BASIC?

Apple did make some changes to AppleSoft BASIC over the years between the first version on the Apple II and the last version on the Enhanced IIe and IIe card. What are the differences between the ...
Michael Shopsin's user avatar