http://beebwiki.mdfs.net/index.php?title=KEYV&feed=atom&action=historyKEYV - Revision history2024-03-28T17:29:26ZRevision history for this page on the wikiMediaWiki 1.30.0-rc.0http://beebwiki.mdfs.net/index.php?title=KEYV&diff=4229&oldid=prevJgharston: Adjusted formatting.2021-10-08T19:05:26Z<p>Adjusted formatting.</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 19:05, 8 October 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:MOS API]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:MOS API]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Specification==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Specification==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del>This vector is only called by the operating system to do keyboard processing, and can</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This vector is only called by the operating system to do keyboard processing,</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del>be called by user programs through the relevant OSBYTE calls to read keyboard</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>and can be called by user programs through the relevant OSBYTE calls to read</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del>information.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>keyboard information.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   </div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   On entry:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   On entry:</div></td></tr>
</table>Jgharstonhttp://beebwiki.mdfs.net/index.php?title=KEYV&diff=3754&oldid=prevWikiSysop: Corrected category.2020-11-04T23:10:34Z<p>Corrected category.</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 23:10, 4 November 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del class="diffchange diffchange-inline">MOSAPI</del>]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<ins class="diffchange diffchange-inline">MOS API</ins>]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Specification==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Specification==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  This vector is only called by the operating system to do keyboard processing, and can</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  This vector is only called by the operating system to do keyboard processing, and can</div></td></tr>
</table>WikiSysophttp://beebwiki.mdfs.net/index.php?title=KEYV&diff=3719&oldid=prevJgharston: Added category.2020-10-17T12:10:03Z<p>Added category.</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 12:10, 17 October 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">(Initial page)</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">[[Category:MOSAPI]]</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Specification==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Specification==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  This vector is only called by the operating system to do keyboard processing, and can</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  This vector is only called by the operating system to do keyboard processing, and can</div></td></tr>
</table>Jgharstonhttp://beebwiki.mdfs.net/index.php?title=KEYV&diff=3257&oldid=prevJgharston: Initial page.2019-09-22T22:48:21Z<p>Initial page.</p>
<p><b>New page</b></p><div>(Initial page)<br />
==Specification==<br />
This vector is only called by the operating system to do keyboard processing, and can<br />
be called by user programs through the relevant OSBYTE calls to read keyboard<br />
information.<br />
<br />
On entry:<br />
VS=Keyboard interupt<br />
CC=Keypress interupt<br />
CS=Centisecond keypress poll<br />
VC=Scan keyboard for keypresses<br />
CC=Test SHIFT and CTRL keys<br />
CS=Scan full keyboard<br />
All registers can be trashed by the handler<br />
<br />
===VS+CC - Keypress interupt===<br />
The keyboard hardware has caused an interrupt, the MOS has called the keyboard<br />
handler to deal with it. The handler should clear the interupt, scan the keyboard<br />
to find which key has been pressed, and set up for the timer entry. All registers<br />
can be trashed.<br />
<br />
===VS+CS - Centisecond keypress poll===<br />
Once a key has been pressed, the MOS calls the keyboard handler every 1cs to<br />
read the keypress, debounce it, deal with rollover and repeats, and enter<br />
bytes into the keyboard buffer.<br />
<br />
The handler should update the keyboard status variable with the state of SHIFT<br />
and CTRL and other modifier keys, debounce the keypress, if it is different<br />
from the previous keypress cancel the previous keypress and reset the repeat<br />
counter, else update the repeat counter. The keypress should be translated to<br />
an ASCII key, and inserted into the keyboard buffer, checking for the current<br />
Escape character. All registers can be trashed.<br />
<br />
===VC+CC - Test SHIFT and CTRL keys===<br />
[[OSBYTE &76]] or various parts of the MOS have called to read the<br />
state of the SHIFT and CTRL keys. An example is the VDU driver testing CTRL<br />
and SHIFT for pausing text output.<br />
<br />
The driver should update the state of the keyboard LEDs to match the state of<br />
the keyboard, and test the state of the CTRL and SHIFT keys.<br />
<br />
On exit: MI=Control, VS=Shift, A.b7=Control, A.b6=Shift<br />
<br />
As various callers either use the flags or the A register on return, they must<br />
match. The easiest way to do this is to set the flags then end the routine with<br />
PHP:PLA:RTS to copy the flags into bit 7 and bit 6 of A. You must not copy the<br />
other way as that will set the other flags to indeterminate values. The X and Y<br />
registers may be trashed.<br />
<br />
Note that these flags are returned to OSBYTE &76, but then the OSBYTE handler<br />
uses the flags for other purposes. The only result returned by OSBYTE &76 is<br />
X.b7=CTRL pressed, so OSBYTE &76 is normally documented as<br />
''Update state of keyboard LEDs''. SHIFT and CTRL would normally be read the<br />
normal way with INKEY-1 and INKEY-2.<br />
<br />
===VC+CS - Scan full keyboard===<br />
[[OSBYTE &79]], [[OSBYTE &7A]] or [[OSBYTE &81]] has been called to to do a<br />
negative INKEY keyscan.<br />
<br />
On entry: X=&00-&7F scan range, X=&80-&FF scan for single keypress<br />
<br />
On exit: A=X=bit 7 set if key pressed, Y can be trashed<br />
<br />
As various callers either test the X register or the A register on return,<br />
they must match. The simplest way to do this is to end your routine<br />
with TXA:RTS or TAX:RTS as appropriate.</div>Jgharston