<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3APorts%3APort05</id>
	<title>Z80:Ports:Port05 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3APorts%3APort05"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Ports:Port05&amp;action=history"/>
	<updated>2026-05-28T18:12:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Ports:Port05&amp;diff=331&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Ports:Port05&amp;diff=331&amp;oldid=prev"/>
		<updated>2016-02-05T23:59:59Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Basic Info =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Port Address:05&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
= TI-83+SE and TI-84+ Family =&lt;br /&gt;
&lt;br /&gt;
RAM Paging Port&lt;br /&gt;
&lt;br /&gt;
This port can be used to control what RAM page is paged into the C000h-FFFFh memory bank. Note that it can only map RAM pages, not flash pages.&lt;br /&gt;
&lt;br /&gt;
== Writing to Port ==&lt;br /&gt;
Sets the current RAM page, by giving a value in 00h-07h, inclusive.&lt;br /&gt;
&lt;br /&gt;
== Reading from Port ==&lt;br /&gt;
Returns the current RAM page.&lt;br /&gt;
&lt;br /&gt;
= TI 83+ =&lt;br /&gt;
&lt;br /&gt;
[[Z80:Ports:Port16|Port 16]] Configuration Port/Link Assist Read&lt;br /&gt;
&lt;br /&gt;
This port configures which memory pages are locked or unlocked (i.e. whether or not the PC register is allowed to point within the page) by port 16h. Only bits 0..2 are considered, the rest have no effect. Also, this port is used to read the last byte the link assist received.&lt;br /&gt;
&lt;br /&gt;
== Writing to Port ==&lt;br /&gt;
&lt;br /&gt;
The last byte received by the link assist (see [[Z80:Ports:port00|port00]] for more information).&lt;br /&gt;
&lt;br /&gt;
== Reading from Port ==&lt;br /&gt;
&lt;br /&gt;
Writing a set bit to 16h protects the page; writing a clear bit unprotects the page. The value of Port 05 affects which bits of [[Z80:Ports:port16|port16]] are acted on. An &amp;#039;X&amp;#039; in the table indicates the bit is ignored.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! !! !! Port 05h Bit !! !! !! !! !! !! !! !! Port 16h Bit&lt;br /&gt;
|-&lt;br /&gt;
! 2 || ~ 1 || ~ 0 || ~ 7 || ~ 6 || ~ 5 || ~ 4 || ~ 3 || ~ 2 || ~ 1 || ~ 0 &lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0 || ROM 0F || ROM 0E || ROM 0D || ROM 0C || ROM 0B || ROM 0A || ROM 09 || ROM 08 &lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 1 || ROM 17 || ROM 16 || ROM 15 || ROM 14 || ROM 13 || ROM 12 || ROM 11 || ROM 10 &lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0 || X || X || X || X || ROM 1B || ROM 1A || ROM 19 || ROM 18 &lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1 || X || X || RAM 01 || X || X || X || X || RAM 00 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Example Uses =&lt;br /&gt;
&lt;br /&gt;
It has been tested and confirmed that you can unlock RAM 00 on a Ti-83+ by using this port in conjunction with port $16. This allows you to run code in the $C000-$FFFF area. Once you succeed in unlocking flash, the following code can be used to unlock RAM page 0 from within TIOS:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ;Tested on OS 1.16 - 1.19&lt;br /&gt;
    &lt;br /&gt;
       ld a, %00000111&lt;br /&gt;
       out ($05), a&lt;br /&gt;
       ld a, $1F&lt;br /&gt;
       out ($06), a&lt;br /&gt;
       xor a&lt;br /&gt;
       call $46DA  ; (assuming boot version 1.00; if you wanted to make&lt;br /&gt;
                   ; this work in general, you&amp;#039;d need to search the boot&lt;br /&gt;
                   ; page to find the appropriate code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At least on my TI-84+, if you output a value with bit 3 set, reading from the port will return a value with bit 3 set. This would imply that you can use RAM pages 08h-0Fh, but these RAM pages do not exist--this bit is simply ignored (only bits 0-2 actually determine what RAM page is active.) - WikiTI&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
[[Category:Z80 Assembly]]&lt;br /&gt;
[[Category:Z80 Heaven]]&lt;br /&gt;
[[Category:Z80 Ports]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>