[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does the Applesoft INT (vs. FP) command work?



On Sun, 22 Jan 2012, MdntTrain wrote:


Hi, folks.

 On a II+, if INTBASIC is loaded into the Language Card ram (LCr), I
know *what* the INT command does -- it switches from Applesoft in ROM
to the BASIC in the LCr ..  but does anyone know exactly what steps
occur when INT is run?

 At some point, INT must activate the LCr bank, which would then
immediately make Applesoft (thus presumably the rest of the INT
command code) disappear.. so I does INT set up something like a page 3
route to do the bank switch, then start intbasic at E000?

 Thank you for any explanations-
-John


FP and INT are part of DOS, not BASIC. And these are located in DOS space.

A57A- A9 4C     CMDFP:    LDA       #$4C
A57C- 20 B2 A5            JSR       SETROM

A59E- A9 20     CMDINT:   LDA       #$20
A5A0- 20 B2 A5            JSR       SETROM

Basically, there is code in the lower 48 that determines which BASIC you want and which BASIC you're in, checks to see if the one you want is in either ROM (C081) or RAM (C080). This works for both romcards and ramcards. If it finds it, it will reinitialize DOS and eventually wind up at E000.

FPBASIC has a JMP at E000, while INTBASIC has a JSR there.

The FP command also has code to load Applesoft off disk from an Integer BASIC file called APPLESOFT, if necessary.

-uso.