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

Re: IIgs and call-151



Jeff Blakeney <CUTjefbla@bconnex.net> wrote:

> On Thu, 04 Jan 2001 12:59:57 -0600, Dennis Jenkins <dennis@usb.com>
> wrote:
> 
> >     On my ROM1 GS, running either ProDOS or Dos3.3, I can not seem to use
> >the monitor rom program correctly.  I expect "F819L" to disassemble the
> >code that does HLIN.  The code that it displays has nothing to do with
> >lowres graphics.  Yes when my assembly and C programs 'jsr $f819', HLIN
> >is performed.  
> 
> When you get to the monitor prompt, instead of just typing F819L, type
> FF/F819L.  That appears to be the code you are looking for.
> 
> I have no idea why the code in 00/F819 is different from what is at
> FF/F819.

The IIgs monitor has special support for the "language card" RAM
($D000-$FFFF).  This means that whenever you examine memory in banks 0,
1, $E0 or $E1 within this address range (using a memory dump or a
disassembly), you will always see the language card memory, not the ROM.

There is also a special command to select the language card bank for
monitor commands.  Without going and looking it up, I think it is 1=L
and 0=L (case sensitive).  This selects between the two banks in the
$D000-$DFFF area.  The $E000-$FFFF area only has one bank.

If you want to see the ROM code that would normally be accessed in these
memory areas, you have to refer to it in bank FF (which is never
switched out).

The G (go) command always restores the language card bank switching to
the normal (or configured) state before calling the specified location.
This means that you can safely call monitor or BASIC routines in bank 0
(or call machine code programs which in turn make calls into the ROM).

Note that you can't use the G command unless the monitor's active bank
is set to 0, because the G command always executes code starting out in
emulation mode, and emulation mode cannot be used to run code outside of
bank 0 (at least, not safely).  If you've just done FF/F819L, you will
have to use 0/300G (or whatever) to call a routine in bank 0.