<?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%3APort00</id>
	<title>Z80:Ports:Port00 - 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%3APort00"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Ports:Port00&amp;action=history"/>
	<updated>2026-06-03T14:27:59Z</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:Port00&amp;diff=339&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:Port00&amp;diff=339&amp;oldid=prev"/>
		<updated>2016-02-06T00:08:38Z</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: 00&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
This port controls the calculator&amp;#039;s serial link port (the one labeled I/O on newer calculators, shaped like a circle).&lt;br /&gt;
&lt;br /&gt;
= Writing to Port =&lt;br /&gt;
&lt;br /&gt;
Bits 0 and 1: Setting a bit will pull the line low. Resetting a bit will stop holding the line low (allowing it to go high if the other calculator is not holding it low). A low line is read as a bit being reset, but when writing setting a bit brings the line low.&lt;br /&gt;
83+ only: Bit 2: Set this bit to enable the link receive assist. After setting this bit, poll port 0 until bit 3 is high, at which point read from port 5 to get the byte.&lt;br /&gt;
&lt;br /&gt;
= Reading from Port =&lt;br /&gt;
&lt;br /&gt;
Bits 0 and 1: These bits indicate the state of the link port&amp;#039;s two lines. If a bit is set that indicates the line is high, and if it is reset that indicates the line is low. When idle (no transfer in progress, no cable plugged in, etc), both lines are usually high. When a cable is connected on both ends, a line reads high if and only if both ends have set the line high. The line will read low if either calculator sets it low. Bit 0 is the tip and bit 1 is the ring.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;83+ only:&amp;#039;&amp;#039;&amp;#039; Bit 2: Set means link receive assist is active.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;83+ only:&amp;#039;&amp;#039;&amp;#039; Bit 3: Set when link assist has received a complete byte. The only way to reset this bit is to read port 5.&lt;br /&gt;
Bit 4 and 5: Bits 4 and 5 indicate which lines are pulled low by the calculator (unlike bits 0 and 1 they are not influenced by the other calculator). A 1 bit indicates your calculator is holding the line low. A 0 bit indicates your calculator is not holding the line low. (When both calculators have a 0 bit here, the corresponding line will read 1.) In other words, these bits reflect bits 0 and 1 from the most recent write to this port.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;83+ only:&amp;#039;&amp;#039;&amp;#039; Bit 6: Set if the link assist is currently receiving data.&lt;br /&gt;
&lt;br /&gt;
= Example Uses =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Sending/Setting&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    ld a,0     ; Set both lines high&lt;br /&gt;
      out (0),a&lt;br /&gt;
    &lt;br /&gt;
      ld a,2     ; Set tip high, ring low&lt;br /&gt;
      out (0),a&lt;br /&gt;
    &lt;br /&gt;
      ld a,1     ; Set tip low, ring high&lt;br /&gt;
      out (0),a&lt;br /&gt;
    &lt;br /&gt;
      ld a,3     ; Set both low&lt;br /&gt;
      out (0),a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Receiving/Reading&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    in a,(0)        ; Get link port value&lt;br /&gt;
    &lt;br /&gt;
      bit 0,a         ; Check tip&lt;br /&gt;
      jr z,tip_low&lt;br /&gt;
      jr nz,tip_high&lt;br /&gt;
    &lt;br /&gt;
      bit 1,a         ; Check ring&lt;br /&gt;
      jr z,ring_low&lt;br /&gt;
      jr nz,ring_high&lt;br /&gt;
&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>