[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IIgs - read 40/80 setting at runtime?
On 21 fév, 03:43, lyricalnan...@dosius.ath.cx (Steve Nickolas) wrote:
> I'm able to do this on the //c, is there a defined way to do this on the
> IIgs?
>
> I'm writing some code that checks the 40/80 setting on a computer that
> supports it, and if it's set to 80, does a PR#3. It's tested and working on
> a //c, and on the IIgs I don't need to do it after a reset but would still
> like to do it upon signon (it is initially forced to 40-column mode).
>
> -uso.
* HARDWARE EQUATES
RD80VID EQUDS.B 1 ;Bit 7=1 if 80 column hardware in
00/C01F byte r:RD80VID
Read the value, if bit 7 is set, then the 80-col mode is active.
* Display selections (at boot time)
USERCOL EQUDS.B 1 ;Columns: 40
That value is located at offset $19 of the battery RAM. If value is 0
then the 40-col mode is selected in the control panel. A value of 1
indicates a 80-col mode selection.
A copy of the battery RAM can be found at $E1/02C0, and the Firmware
looks
there directly. System software should generally go through
ReadBParam and WriteBParam rather than examining or changing the
buffer directly.
antoine