<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 02 Jun 1992 21:01:00 GMT
From   : Alan Ralph <aralph@...>
Subject: Re: Comms program

Gerben 'P' Vos <gpvos@...> writes:
[Stuff about diffs. in VDU workspace between BBC B(+) and Master]
>Thanks a lot. I do indeed use some of these locations, so i'll have to add
>a check for the Master. Because of this, the program will be slower on
>such a machine, since i can't poke into the VDU system directly anymore,
>and i'll have to fall back on making 128 VDU 23's... Or is there a way to
>stuff the data into the right location without going through the VDU
>handler? My program runs in sideways RAM, so it may be difficult.

On the Master, the current character definitions are held in Private RAM
from &8900 to &8FFF. The observant amongst you will have spotted that this
lies on top of the space occupied by Sideways ROM or RAM. However, your
Sideways RAM code can access it, provided you don't need to call
subroutines from &8400 to &8FFF, with the following code:

LDA &F4
PHA              \ preserve current ROM number
ORA #&80
STA &F4          \ essential to do this first
STA &FE30        \ select sideways RAM

(your code)

PLA
STA &F4          \ restore original ROM
STA &FE30
RTS

(Note: The character definitions in this instance are for the range &20 to
&FF)

>Do you know how to check if your program is running on a Master? The INKEY
>call should return a unique value. Do you know what it is on a Master?

On a Master (and Compact), the value returned by INKEY(-256) will be 253.
In machine code that becomes A=&81, X=0, Y=255, call OSBYTE, and
X=whatever.

Let me know how you get on.

-Alan.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>