Difference between revisions of "83Plus:Ports:21"

From WikiTI
Jump to: navigation, search
Line 1: Line 1:
 
[[Category:83Plus:Ports:By_Address:Protected|21 - Hardware Type]] [[Category:83Plus:Ports:By_Address|21 - Hardware Type]] [[Category:83Plus:Ports:By_Name|Hardware Type]]
 
[[Category:83Plus:Ports:By_Address:Protected|21 - Hardware Type]] [[Category:83Plus:Ports:By_Address|21 - Hardware Type]] [[Category:83Plus:Ports:By_Name|Hardware Type]]
 
{{SE-Only Port|01}}
 
{{SE-Only Port|01}}
 +
{{Protected Port}}
  
 
== Synopsis ==
 
== Synopsis ==

Revision as of 14:15, 30 March 2005

This port only exists as a distinct port on the TI-83 Plus Silver Edition, the TI-84 Plus, and the TI-84 Plus Silver Edition. On the standard TI-83 Plus, it acts as a shadow of port 01.
This port is protected, which means user programs cannot ordinarily write to it directly.

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