HOW TO CHECK THAT IS KEY "40/80 DISPLAY" PRESSED?

Started by MIRKOSOFT, June 15, 2009, 08:38 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

MIRKOSOFT

Hi!
I tried with PEEK(212) or PEEK(211) to check key which was pressed. Every key has any value, but...
I can't recognize if is key "40/80 DISPLAY" is PRESSED or its STATUS - that if is LOCKED DOWN or NOT...
All informations will be helpfull.
Thanks for answers.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

megabit


The 40/80 DISPLAY switch is not part of the Keyscan routine. The 40/80 DISPLAY switch is read during the reset routine.

If you want to know what screen mode you are in, you can peek 215. If it is 0, then you are in 40-col mode. If it is 128, then you are in 80-col mode.

Dan...

MIRKOSOFT

Hi!

I found solution how to read status and check waiting for "40/80 DISPLAY" key.
It's stored at $D505, 7th bit. If is 1 then is not pressed, when is 0 then is locked down.
In Basic is it simple:
PEEK(54533)AND128 - 128=up/0=down

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk