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

From WikiTI
Jump to: navigation, search
m
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]]
+
[[Category:83Plus:Ports:By_Address:Protected|21 - Hardware Type]] [[Category:83Plus:Ports:By_Address|21 - Hardware Type]] [[Category:83Plus:Ports:By_Name|Hardware Type]]
 
== Synopsis ==
 
== Synopsis ==
 
'''Port Number:''' 21h
 
'''Port Number:''' 21h

Revision as of 21:20, 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