  88	1000	  ff		%ff
  89	1001	  ff		%ff
  90	1002	  ff		%ff
  91	1003	  ff		%ff
  93	1004	  ff		%ff
  94	1005	  ff		%ff
  95	1006	  ff		%ff
  96	1007	  ff		%ff
  98	1008	  ff		%ff
  99	1009	  ff		%ff
 100	100a	  ff		%ff
 101	100b	  ff		%ff
 103	100c	  ff		%ff
 104	100d	  ff		%ff
 105	100e	  ff		%ff
 106	100f	  ff		%ff
 108	1010	  ff		%ff	;1010
 109	1011	  ff		%ff
 110	1012	  ff		%ff
 111	1013	  ff		%ff
 113	1014	  ff		%ff
 114	1015	  ff		%ff
 115	1016	  ff		%ff
 116	1017	  ff		%ff
 118	1018	  ff		%ff
 119	1019	  ff		%ff
 120	101a	  ff		%ff
 121	101b	  ff		%ff
 123	101c	  ff		%ff
 124	101d	  ff		%ff
 125	101e	  ff		%ff
 126	101f	  ff		%ff
 132	1020	  00		%00
 133	1021	  08		string	"\010go@ %102e" 
 133	1022	  67
 133	1023	  6f
 133	1024	  40
 133	1025	  20
 133	1026	  25
 133	1027	  31
 133	1028	  30
 133	1029	  32
 133	102a	  65
 133	102b	   0
 134	102c	  ff		%ff
 135	102d	  ff		%ff
 140	102e	  e4	setup:	ld	rp_save,rp		; save register pointer
 140	102f	  fd
 140	1030	  2f
 141	1031	  e4		ld	imr_save,imr		; save interupt mask register
 141	1032	  fb
 141	1033	  2e
 142	1034	  e6		ld	rp,#ioblock		; set rp to free registers 
 142	1035	  fd
 142	1036	  30
 143	1037	  e6		ld	_ty1_sptr,  #tty1_stat_high	; set up high byte of i/o status reg
 143	1038	  e4
 143	1039	  f4
 144	103a	  e6		ld	_ty1_sptr_1,#tty1_stat_low	;  "  "  low   "   "   "    "     "
 144	103b	  e5
 144	103c	  00
 146	103d	  e6		ld	_ty1_bptr,  #tty1_buf_high	; set up high byte of i/o buffer reg
 146	103e	  e6
 146	103f	  f0
 147	1040	  e6		ld	_ty1_bptr_1,#tty1_buf_low	;  "  "  low   "   "   "    "     "
 147	1041	  e7
 147	1042	  00
 148	1043	  c2		ldc	scratch1,@ty1_bptr
 148	1044	  16
 153	1045	  e6	start:	ld	arg1_l,#0
 153	1046	  15
 153	1047	  00
 154	1048	  e6		ld	arg0_l,#%5a
 154	1049	  13
 154	104a	  5a
 155	104b	  d6	st_bz:	call	putc
 155	104c	  10
 155	104d	  97
 156	104e	  8b		jr	true,st_bz
 156	104f	  fb
 159	1050	  e4	puts:	ld	_scratch2,arg0_h
 159	1051	  12
 159	1052	  e2
 160	1053	  e4		ld	_scratch3,arg0_l
 160	1054	  13
 160	1055	  e3
 161	1056	  c2	ptsl:	ldc	scratch0,@scratch2
 161	1057	  02
 162	1058	  a6		cp	_scratch0,#0
 162	1059	  e0
 162	105a	  00
 163	105b	  eb		jr	nz,ptss
 163	105c	  04
 164	105d	  d6		call	out_w	
 164	105e	  10
 164	105f	  cd
 165	1060	  af		ret
 166	1061	  e4	ptss:	ld	arg0_l,_scratch0
 166	1062	  e0
 166	1063	  13
 167	1064	  d6		call	putc
 167	1065	  10
 167	1066	  97
 168	1067	  a0		incw	_scratch2
 168	1068	  e2
 169	1069	  8b		jr	true,ptsl
 169	106a	  eb
 174	106b	  e4	sputs:	ld	_scratch2,arg0_h
 174	106c	  12
 174	106d	  e2
 175	106e	  e4		ld	_scratch3,arg0_l
 175	106f	  13
 175	1070	  e3
 176	1071	  c2	sptsl:	ldc	scratch0,@scratch2
 176	1072	  02
 177	1073	  a6		cp	_scratch0,#0
 177	1074	  e0
 177	1075	  00
 178	1076	  eb		jr	nz,sptss
 178	1077	  01
 179	1078	  af		ret
 180	1079	  e4	sptss:	ld	arg0_l,_scratch0
 180	107a	  e0
 180	107b	  13
 181	107c	  d6		call	putc
 181	107d	  10
 181	107e	  97
 182	107f	  d6		call	delay
 182	1080	  10
 182	1081	  8c
 183	1082	  a0		incw	_scratch2
 183	1083	  e2
 184	1084	  e6		ld	arg0_l,#%2a
 184	1085	  13
 184	1086	  2a
 185	1087	  d6		call	put_t0
 185	1088	  10
 185	1089	  e5
 186	108a	  8b		jr	true,sptsl
 186	108b	  e5
 188	108c	  e6	delay:	ld	_scratch1,#%ff
 188	108d	  e1
 188	108e	  ff
 189	108f	  e6		ld	_scratch0,#%ff
 189	1090	  e0
 189	1091	  ff
 190	1092	  80	deloop: decw	_scratch0
 190	1093	  e0
 191	1094	  eb		jr	nz,deloop
 191	1095	  fc
 192	1096	  af		ret
 199	1097	  a6	putc:	cp	arg1_l,#0
 199	1098	  15
 199	1099	  00
 200	109a	  eb		jr	nz,ptcs1
 200	109b	  04
 201	109c	  d6		call	put_t0
 201	109d	  10
 201	109e	  e5
 202	109f	  af		ret
 203	10a0	  a6	ptcs1:	cp	arg1_l,#1
 203	10a1	  15
 203	10a2	  01
 204	10a3	  eb		jr	nz,ptcs2
 204	10a4	  03
 205	10a5	  d6		call	put_t1
 205	10a6	  11
 205	10a7	  0c
 206	10a8	  af	ptcs2:	ret
 214	10a9	  a6	getc:	cp	arg1_l,#0
 214	10aa	  15
 214	10ab	  00
 215	10ac	  eb		jr	nz,gtcs1
 215	10ad	  04
 216	10ae	  d6		call	get_t0
 216	10af	  10
 216	10b0	  f8
 217	10b1	  af		ret
 218	10b2	  a6	gtcs1:	cp	arg1_l,#1
 218	10b3	  15
 218	10b4	  01
 219	10b5	  eb		jr	nz,gtcs2
 219	10b6	  03
 220	10b7	  d6		call	get_t1
 220	10b8	  11
 220	10b9	  22
 221	10ba	  af	gtcs2:	ret
 230	10bb	  a6	rdy_t:	cp	arg1_l,#0
 230	10bc	  15
 230	10bd	  00
 231	10be	  eb		jr	nz,rdts1
 231	10bf	  04
 232	10c0	  d6		call	rdy_t0
 232	10c1	  10
 232	10c2	  f1
 233	10c3	  af		ret
 234	10c4	  a6	rdts1:	cp	arg1_l,#1
 234	10c5	  15
 234	10c6	  01
 235	10c7	  eb		jr	nz,rdts2
 235	10c8	  03
 236	10c9	  d6		call	rdy_t1
 236	10ca	  11
 236	10cb	  19
 237	10cc	  af	rdts2:	ret
 247	10cd	  a6	out_w:	cp	arg1_l,#0
 247	10ce	  15
 247	10cf	  00
 248	10d0	  eb		jr	nz,otws1
 248	10d1	  04
 249	10d2	  d6		call	out_w0
 249	10d3	  10
 249	10d4	  df
 250	10d5	  af		ret
 251	10d6	  a6	otws1:	cp	arg1_l,#1
 251	10d7	  15
 251	10d8	  01
 252	10d9	  eb		jr	nz,otws2
 252	10da	  03
 253	10db	  d6		call	out_w1
 253	10dc	  11
 253	10dd	  04
 254	10de	  af	otws2:	ret
 256	10df	  76	out_w0:	tm	irq,#irq4
 256	10e0	  fa
 256	10e1	  10
 257	10e2	  6b		jr	z,out_w0
 257	10e3	  fb
 258	10e4	  af		ret
 260	10e5	  76	put_t0:	tm	irq,#irq4
 260	10e6	  fa
 260	10e7	  10
 261	10e8	  6b		jr	z,put_t0
 261	10e9	  fb
 262	10ea	  e4		ld	sio,arg0_l
 262	10eb	  13
 262	10ec	  f0
 263	10ed	  56		and	irq,#nirq4
 263	10ee	  fa
 263	10ef	  ef
 264	10f0	  af		ret
 266	10f1	  e4	rdy_t0:  ld	arg0_l,irq
 266	10f2	  fa
 266	10f3	  13
 267	10f4	  56		and	arg0_l,#irq3
 267	10f5	  13
 267	10f6	  08
 268	10f7	  af		ret
 270	10f8	  76	get_t0:	tm	irq,#irq3
 270	10f9	  fa
 270	10fa	  08
 271	10fb	  6b		jr	z,get_t0
 271	10fc	  fb
 272	10fd	  e4		ld    	arg0_l,sio
 272	10fe	  f0
 272	10ff	  13
 273	1100	  56		and	irq,#nirq3
 273	1101	  fa
 273	1102	  f7
 274	1103	  af		ret
 276	1104	  c2	out_w1:	ldc   	 scratch0,@ty1_sptr	; read the status register
 276	1105	  04
 277	1106	  76		tm   	_scratch0,#tbmt
 277	1107	  e0
 277	1108	  02
 278	1109	  6b		jr	z,out_w1
 278	110a	  f9
 279	110b	  af		ret
 281	110c	  c2	put_t1:	ldc   	 scratch0,@ty1_sptr	; read the status register
 281	110d	  04
 282	110e	  76		tm   	_scratch0,#tbmt
 282	110f	  e0
 282	1110	  02
 283	1111	  6b		jr	z,put_t1
 283	1112	  f9
 284	1113	  e4		ld	_scratch0,arg0_l
 284	1114	  13
 284	1115	  e0
 285	1116	  d2		ldc	@ty1_bptr,scratch0
 285	1117	  06
 286	1118	  af		ret
 288	1119	  c2	rdy_t1:	ldc	 scratch0,@ty1_sptr
 288	111a	  04
 289	111b	  56		and	 _scratch0,#dav
 289	111c	  e0
 289	111d	  01
 290	111e	  e4		ld	 arg0_l,_scratch0
 290	111f	  e0
 290	1120	  13
 291	1121	  af		ret
 293	1122	  c2	get_t1:	ldc   	 scratch0,@ty1_sptr	; read the status register
 293	1123	  04
 294	1124	  76		tm   	_scratch0,#dav
 294	1125	  e0
 294	1126	  01
 295	1127	  6b		jr	z,get_t1
 295	1128	  f9
 296	1129	  c2		ldc	 scratch0,@ty1_bptr
 296	112a	  06
 297	112b	  e4		ld	arg0_l,_scratch0
 297	112c	  e0
 297	112d	  13
 298	112e	  af		ret
