Difference between revisions of "83Plus:Ports:0D"

From WikiTI
Jump to: navigation, search
m
(Just realized the original example code was laughable.)
 
Line 21: Line 21:
 
  SendByteSE:
 
  SendByteSE:
 
  ld b,a  
 
  ld b,a  
 +
WaitToSend:
 
  in a,[[83Plus:Ports:04|(4)]]
 
  in a,[[83Plus:Ports:04|(4)]]
 
  and 8
 
  and 8
Line 27: Line 28:
 
  bit 5,a
 
  bit 5,a
 
  jr nz,SendByteSE_OK
 
  jr nz,SendByteSE_OK
  and 58h
+
  bit 6,a
  jr z,SendByteSE
+
  jr z,WaitToSend
jr LinkError
+
LinkError:
 +
scf
 +
ret
 
  SendByteSE_OK:
 
  SendByteSE_OK:
 
  ld a,b
 
  ld a,b

Latest revision as of 01:25, 31 March 2006

Synopsis

Port Number: 0Dh

Function: Link Assist Output Buffer

This port allows you to write data to be sent by the link assist.

Read Values

None

Write Values

  • [00h - FFh]: The byte to be written

Comments

This port only exists on the 83+ SE and the 84+.

Check port 9 before you write this port, to be sure that the assist is ready.

Example

SendByteSE:
	ld b,a 
WaitToSend:
	in a,(4)
	and 8
	jr z,LinkError
	in a,(9)
	bit 5,a
	jr nz,SendByteSE_OK
	bit 6,a
	jr z,WaitToSend
LinkError:
	scf
	ret
SendByteSE_OK:
	ld a,b
	out (0Dh),a
	or a
	ret 

Credits and Contributions

  • Michael Vincent: Original documentation of the link assist