Difference between revisions of "83Plus:Ports:21"
From WikiTI
m |
|||
Line 1: | Line 1: | ||
− | + | [[Category:83Plus:Ports:By_Address|21 - Hardware Type]] | |
− | + | [[Category:83Plus:Ports:By_Name|Hardware Type]] | |
− | + | [[Category:83Plus:Ports:By_Address:Protected|21 - Hardware Type]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Synopsis == | == Synopsis == | ||
− | '''Port Number:''' | + | '''Port Number:''' 21h |
− | '''Function:''' | + | '''Function:''' Hardware Type |
− | This port | + | This port is simply a protected register which is set by the boot code according to the hardware version. |
=== Read Values === | === Read Values === | ||
− | * | + | * Bit 0: 1 on either the 83+ SE or the 84+ SE, 0 on the 84+ basic. |
+ | * Bit 1: ''Unknown -- always set to zero'' | ||
+ | * Bits 2-7 do not seem to do anything. | ||
=== Write Values === | === Write Values === | ||
− | * [00h - FFh]: | + | * [00h - FFh]: New value for the register |
− | + | ||
− | + | ||
== Comments == | == Comments == | ||
− | + | This port does not exist on the standard 83+. See [[83Plus:Ports:02|port 2]]. | |
+ | |||
+ | There is no reason to write to this port, but by reading from it you can determine something about the HW version. | ||
+ | |||
+ | TIOS polls both bits 0 and 1, by taking the logical AND with 3. | ||
== Example == | == Example == | ||
− | + | in a,[[83Plus:Ports:02|(2)]] | |
− | + | ld b,a | |
− | + | and 80h | |
− | + | jr z,TI83p_BE | |
+ | in a,(21h) | ||
+ | and 3 | ||
+ | jr z,TI84p_BE | ||
+ | bit 5,b | ||
+ | jr z,TI83p_SE | ||
+ | ; calculator is an 84+ SE | ||
+ | |||
+ | TI84p_BE: | ||
+ | ; calculator is an 84+ BE | ||
+ | |||
+ | TI83p_SE: | ||
+ | ; calculator is an 83+ SE | ||
+ | |||
+ | TI83p_BE: | ||
+ | ; calculator is an 83+ BE |
Revision as of 14:17, 29 March 2005
Synopsis
Port Number: 21h
Function: Hardware Type
This port is simply a protected register which is set by the boot code according to the hardware version.
Read Values
- Bit 0: 1 on either the 83+ SE or the 84+ SE, 0 on the 84+ basic.
- Bit 1: Unknown -- always set to zero
- Bits 2-7 do not seem to do anything.
Write Values
- [00h - FFh]: New value for the register
Comments
This port does not exist on the standard 83+. See port 2.
There is no reason to write to this port, but by reading from it you can determine something about the HW version.
TIOS polls both bits 0 and 1, by taking the logical AND with 3.
Example
in a,(2) ld b,a and 80h jr z,TI83p_BE in a,(21h) and 3 jr z,TI84p_BE bit 5,b jr z,TI83p_SE ; calculator is an 84+ SE TI84p_BE: ; calculator is an 84+ BE TI83p_SE: ; calculator is an 83+ SE TI83p_BE: ; calculator is an 83+ BE