Z80-Assembler	Release 1.9	Wed May 16 19:54:44 2018	Page 1
Source file: umzapex.asm
Title:       <Zapple Monitor Extension for MITS ALTAIR>

LOC   OBJECT CODE   LINE   STMT SOURCE CODE
                       1      1 	TITLE	<Zapple Monitor Extension for MITS ALTAIR>
                       2      2 ;
                       3      3 ; ADDITIONAL DRIVERS FOR ZAPPLE ON MITS ALTAIR
                       4      4 ; IMPLEMENTS LIST DEVICE CONNECTED TO PRINTER
                       5      5 ; AND READER/PUNCH DEVICE CONNECTED TO 2SIO B
                       6      6 ;
                       7      7 ; V1.0 - OCT. 2017 - UDO MUNK
                       8      8 ;
f800                   9      9 BASE	EQU	0F800H
                      10     10 ;
                      11     11 ; I/O DEFINITIONS
                      12     12 ;
0002                  13     13 LSTAT	EQU	02H		;PRINTER STATUS PORT
0003                  14     14 LDATA	EQU	03H		;PRINTER DATA PORT
0001                  15     15 LPTR	EQU	01H		;PRINTER READY BIT
                      16     16 ;
0012                  17     17 SIO2S	EQU	12H		;MITS 2SIO B STATUS PORT
0013                  18     18 SIO2D	EQU	13H		;MITS 2SIO B DATA PORT
0001                  19     19 RDA	EQU	01H		;MITS 2SIO RECEIVER DATA AVAILABLE
0002                  20     20 TBE	EQU	02H		;MITS 2SIO TRANSMIT BUFFER EMPTY
                      21     21 ;
                      22     22 	ORG	BASE
                      23     23 ;
                      24     24 ; JUMP VECTOR EXPECTED BY ZAPPLE
                      25     25 ;
f800  c3 24 f8        26     26 CILOC:	JP	CONIN		;CONSOLE INPUT
f803  c3 24 f8        27     27 COLOC:	JP	CONOUT		;CONSOLE OUTPUT
f806  c3 27 f8        28     28 RPTPL:	JP	RDRIN		;READER INPUT
f809  c3 3c f8        29     29 RULOC:	JP	STOIN		;STORAGE INPUT
f80c  c3 31 f8        30     30 PTPL:	JP	PUNOUT		;PUNCH OUTPUT
f80f  c3 3c f8        31     31 PULOC:	JP	STOOUT		;STORAGE OUTPUT
f812  c3 3d f8        32     32 LNLOC:	JP	LPTOUT		;LINE PRINTER
f815  c3 48 f8        33     33 LULOC:	JP	UPTOUT		;USER DEFINED PRINTER
f818  c3 25 f8        34     34 CSLOC:	JP	CONST		;CONSOLE STATUS
f81b  c3 49 f8        35     35 J1:	JP	ICMD		;COMMAND I
f81e  c3 49 f8        36     36 J2:	JP	KCMD		;COMMAND K
f821  c3 49 f8        37     37 J3:	JP	OCMD		;COMMAND O
                      38     38 ;
                      39     39 ; USER DEFINED CONSOLE
                      40     40 ;
                      41     41 CONIN:
f824  c9              42     42 CONOUT:	RET
f825  af              43     43 CONST:	XOR	A		;NO INPUT WAITING
f826  c9              44     44 	RET
                      45     45 ;
                      46     46 ; USER DEFINED READER/PUNCH
                      47     47 ; MITS 2SIO CHANNEL B
                      48     48 ;
f827  db 12           49     49 RDRIN:	IN	A,(SIO2S)	;GET STATUS
f829  e6 01           50     50 	AND	RDA		;DATA AVAILABLE?
f82b  ca 27 f8        51     51 	JP	Z,RDRIN		;NO, WAIT
f82e  db 13           52     52 	IN	A,(SIO2D)	;READ DATA
f830  c9              53     53 	RET
                      54     54 ;
f831  db 12           55     55 PUNOUT:	IN	A,(SIO2S)	;GET STATUS
f833  e6 02           56     56 	AND	TBE		;TRANSMITT BUFFER EMPTY?
f835  ca 31 f8        57     57 	JP	Z,PUNOUT	;NO, WAIT
f838  79              58     58 	LD	A,C		;GET DATA FROM REGISTER C
f839  d3 13           59     59 	OUT	(SIO2D),A	;AND SEND IT
f83b  c9              60     60 	RET
Z80-Assembler	Release 1.9	Wed May 16 19:54:44 2018	Page 2
Source file: umzapex.asm
Title:       <Zapple Monitor Extension for MITS ALTAIR>

LOC   OBJECT CODE   LINE   STMT SOURCE CODE
                      61     61 ;
                      62     62 ; USER DEFINED STORAGE
                      63     63 ;
                      64     64 STOIN:
f83c  c9              65     65 STOOUT:	RET
                      66     66 ;
                      67     67 ; LINE PRINTER
                      68     68 ; MITS ALTAIR
                      69     69 ;
f83d  db 02           70     70 LPTOUT:	IN	A,(LSTAT)	;GET PRINTER STATUS
f83f  e6 01           71     71 	AND	LPTR		;MASK FOR READY
f841  ca 3d f8        72     72 	JP	Z,LPTOUT	;LOOP TILL READY
f844  79              73     73 	LD	A,C		;SEND CHARATER
f845  d3 03           74     74 	OUT	(LDATA),A
f847  c9              75     75 	RET
                      76     76 ;
                      77     77 ; USER DEFINED LINE PRINTER
                      78     78 ;
f848  c9              79     79 UPTOUT:	RET
                      80     80 ;
                      81     81 ; ZAPPLE I, K AND O COMMANDS
                      82     82 ;
                      83     83 ICMD:
                      84     84 KCMD:
f849  c9              85     85 OCMD:	RET
                      86     86 
f84a                  87     87 	END
Z80-Assembler	Release 1.9	Wed May 16 19:54:44 2018	Page 3
Source file: umzapex.asm
Title:       Symboltable

BASE     f800 	CILOC    f800*	COLOC    f803*	CONIN    f824 	
CONOUT   f824 	CONST    f825 	CSLOC    f818*	ICMD     f849 	
J1       f81b*	J2       f81e*	J3       f821*	KCMD     f849 	
LDATA    0003 	LNLOC    f812*	LPTOUT   f83d 	LPTR     0001 	
LSTAT    0002 	LULOC    f815*	OCMD     f849 	PTPL     f80c*	
PULOC    f80f*	PUNOUT   f831 	RDA      0001 	RDRIN    f827 	
RPTPL    f806*	RULOC    f809*	SIO2D    0013 	SIO2S    0012 	
STOIN    f83c 	STOOUT   f83c 	TBE      0002 	UPTOUT   f848 	
