CP/M RMAC ASSEM 1.1	#001	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                	title	'Root module of relocatable BIOS for CP/M 3.0'
                
                	; Baudraten Initialisierung eingefuegt
                
 FFFF =         true	equ -1
 0000 =         false	equ not true
                
 FFFF =         banked	equ true
                	
                
                
 000D =         cr	equ 13
 000A =         lf	equ 10
 0007 =         bell	equ 7
 0011 =         ctlQ	equ 'Q'-'@'
 0013 =         ctlS	equ 'S'-'@'
                
 0100 =         ccp	equ 0100h	; Console Command Processor gets loaded into the TPA
                
                	cseg		; GENCPM puts CSEG stuff in common memory
                
                
                    ; variables in system data page
                
                	extrn @covec,@civec,@aovec,@aivec,@lovec ; I/O redirection vectors
                	extrn @mxtpa				; addr of system entry point
                	extrn @bnkbf				; 128 byte scratch buffer
                
                    ; initialization
                
                	extrn ?init			; general initialization and signon
                	extrn ?ldccp,?rlccp		; load & reload CCP for BOOT & WBOOT
                	extrn binit			; baudraten init fuer PROF-80
                
                    ; user defined character I/O routines
                
                	extrn ?ci,?co,?cist,?cost	; each take device in <B>
                	extrn ?cinit			; (re)initialize device in <C>
                	extrn @ctbl			; physical character device table
                
                    ; disk communication data items
                
                	extrn @dtbl			; table of pointers to XDPHs
                	public @adrv,@rdrv,@trk,@sect	; parameters for disk I/O
                	public @dma,@dbnk,@cnt		;    ''       ''   ''  ''
                
                    ; memory control
                
                	public @cbnk			; current bank
                	extrn ?xmove,?move		; select move bank, and block move
                	extrn ?bank			; select CPU bank
                
                    ; clock support
                
                	extrn ?time			; signal time operation
                
CP/M RMAC ASSEM 1.1	#002	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                    ; general utility routines
                
                	public ?pmsg,?pdec	; print message, print number from 0 to 65535
                	public ?pderr		; print BIOS disk error message header
                
                	maclib modebaud		; define mode bits
                
                
                    ; External names for BIOS entry points
                
                	public ?boot,?wboot,?const,?conin,?cono,?list,?auxo,?auxi
                	public ?home,?sldsk,?sttrk,?stsec,?stdma,?read,?write
                	public ?lists,?sctrn
                	public ?conos,?auxis,?auxos,?dvtbl,?devin,?drtbl
                	public ?mltio,?flush,?mov,?tim,?bnksl,?stbnk,?xmov
                
                
                    ; BIOS Jump vector.
                
                		; All BIOS routines are invoked by calling these
                		;	entry points.
                
 0000 C30000    ?boot:	jmp boot	; initial entry on cold start
 0003 C36C00    ?wboot:	jmp wboot	; reentry on program exit, warm start
                
 0006 C37701    ?const:	jmp const	; return console input status
 0009 C39201    ?conin:	jmp conin	; return console input character
 000C C3DA00    ?cono:	jmp conout	; send console output character
 000F C3E600    ?list:	jmp list	; send list output character
 0012 C3E000    ?auxo:	jmp auxout	; send auxilliary output character
 0015 C39801    ?auxi:	jmp auxin	; return auxilliary input character
                
 0018 C37100    ?home:	jmp home	; set disks to logical home
 001B C34200    ?sldsk:	jmp seldsk	; select disk drive, return disk parameter info
 001E C37400    ?sttrk:	jmp settrk	; set disk track
 0021 C37A00    ?stsec:	jmp setsec	; set disk sector
 0024 C38000    ?stdma:	jmp setdma	; set disk I/O memory address
 0027 C39700    ?read:	jmp read	; read physical block(s)
 002A C3AD00    ?write:	jmp write	; write physical block(s)
                
 002D C31201    ?lists:	jmp listst	; return list device status
 0030 C38C00    ?sctrn:	jmp sectrn	; translate logical to physical sector
                
 0033 C30601    ?conos:	jmp conost	; return console output status
 0036 C37D01    ?auxis:	jmp auxist	; return aux input status
 0039 C30C01    ?auxos:	jmp auxost	; return aux output status
 003C C3D200    ?dvtbl:	jmp devtbl	; return address of device def table
 003F C30000    ?devin:	jmp ?cinit	; change baud rate of device
                
 0042 C3D600    ?drtbl:	jmp getdrv	; return address of disk drive table
 0045 C3CE00    ?mltio:	jmp multio	; set multiple record count for disk I/O
 0048 C3D200    ?flush:	jmp flush	; flush BIOS maintained disk caching
                
 004B C30000    ?mov:	jmp ?move	; block move memory to memory
 004E C30000    ?tim:	jmp ?time	; Signal Time and Date operation
 0051 C32502    ?bnksl:	jmp bnksel	; select bank for code execution and default DMA
CP/M RMAC ASSEM 1.1	#003	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

 0054 C38800    ?stbnk:	jmp setbnk	; select different bank for disk I/O DMA operations.
 0057 C30000    ?xmov:	jmp ?xmove	; set source and destination banks for one operation
                
 005A C30000    	jmp 0		; reserved for future expansion
 005D C30000    	jmp 0		; reserved for future expansion
 0060 C30000    	jmp 0		; reserved for future expansion
                
                
                	; BOOT
                	;	Initial entry point for system startup.
                
                	dseg	; this part can be banked
                
                boot:
 0000 31D200    	lxi sp,boot$stack
 0003 CD0000    	call binit	; setzte  duplex baud fuer PROF-80
 0006 0E0F      	mvi c,15	; initialize all 16 character devices
                c$init$loop:
 0008 C5CD0000C1	push b ! call ?cinit ! pop b
 000D 0DF20800  	dcr c ! jp c$init$loop
                
 0011 CD0000    	call ?init	; perform any additional system initialization
                			; and print signon message
                
 0014 0100102100	lxi b,16*256+0 ! lxi h,@dtbl	; init all 16 logical disk drives
                d$init$loop:
 001A C5        	push b		; save remaining count and abs drive
 001B 5E235623  	mov e,m ! inx h ! mov d,m ! inx h	; grab @drv entry
 001F 7BB2CA3900	mov a,e ! ora d ! jz d$init$next	; if null, no drive
 0024 E5        	push h					; save @drv pointer 
 0025 EB        	xchg					; XDPH address in <HL>
 0026 2B2B7E32F1	dcx h ! dcx h ! mov a,m ! sta @RDRV	; get relative drive code
 002C 7932F000  	mov a,c ! sta @ADRV			; get absolute drive code
 0030 2B        	dcx h					; point to init pointer
 0031 562B5E    	mov d,m ! dcx h ! mov e,m		; get init pointer
 0034 EBCDB601  	xchg ! call ipchl			; call init routine
 0038 E1        	pop h					; recover @drv pointer
                d$init$next:
 0039 C1        	pop b					; recover counter and drive #
 003A 0C05C21A00	inr c ! dcr b ! jnz d$init$loop		; and loop for each drive
 003F C36300    	jmp boot$1
                
                	cseg	; following in resident memory
                
                boot$1:
 0063 CD7800    	call set$jumps
 0066 CD0000    	call ?ldccp				; fetch CCP for first time
 0069 C30001    	jmp ccp
                
                
                	; WBOOT
                	;	Entry for system restarts.
                
                wboot:
 006C 31D200    	lxi sp,boot$stack
 006F CD7800    	call set$jumps		; initialize page zero
CP/M RMAC ASSEM 1.1	#004	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

 0072 CD0000    	call ?rlccp		; reload CCP
 0075 C30001    	jmp ccp			; then reset jmp vectors and exit to ccp
                
                
                set$jumps:
                
                  if banked
 0078 3E01CD5100	mvi a,1 ! call ?bnksl
                  endif
                
 007D 3EC3      	mvi a,JMP
 007F 3200003205	sta 0 ! sta 5		; set up jumps in page zero
 0085 2103002201	lxi h,?wboot ! shld 1	; BIOS warm start entry
 008B 2A00002206	lhld @MXTPA ! shld 6	; BDOS system call entry
 0091 C9        	ret
                
                
 0092           		ds 64
 00D2 =         boot$stack	equ $
                
                
                	; DEVTBL
                	;	Return address of character device table
                
                devtbl:
 00D2 210000C9  	lxi h,@ctbl ! ret
                
                
                	; GETDRV
                	;	Return address of drive table
                
                getdrv:
 00D6 210000C9  	lxi h,@dtbl ! ret
                
                
                
                	; CONOUT
                	;	Console Output.  Send character in <C>
                	;			to all selected devices
                
                conout:	
                
 00DA 2A0000    	lhld @covec	; fetch console output bit vector
 00DD C3E900    	jmp out$scan
                
                
                	; AUXOUT
                	;	Auxiliary Output. Send character in <C>
                	;			to all selected devices
                
                auxout:
 00E0 2A0000    	lhld @aovec	; fetch aux output bit vector
 00E3 C3E900    	jmp out$scan
                
                
                	; LIST
CP/M RMAC ASSEM 1.1	#005	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                	;	List Output.  Send character in <C>
                	;			to all selected devices.
                
                list:
 00E6 2A0000    	lhld @lovec	; fetch list output bit vector
                
                out$scan:
 00E9 0600      	mvi b,0		; start with device 0
                co$next:
 00EB 29        	dad h		; shift out next bit
 00EC D2FF00    	jnc not$out$device
 00EF E5        	push h		; save the vector
 00F0 C5        	push b		; save the count and character
                not$out$ready:
 00F1 CD2C01B7CA	call coster ! ora a ! jz not$out$ready
 00F8 C1C5      	pop b ! push b	; restore and resave the character and device
 00FA CD0000    	call ?co	; if device selected, print it
 00FD C1        	pop b		; recover count and character
 00FE E1        	pop h		; recover the rest of the vector
                not$out$device:
 00FF 04        	inr b		; next device number
 0100 7CB5      	mov a,h ! ora l	; see if any devices left
 0102 C2EB00    	jnz co$next	; and go find them...
 0105 C9        	ret
                
                
                	; CONOST
                	;	Console Output Status.  Return true if
                	;		all selected console output devices
                	;		are ready.
                
                conost:
 0106 2A0000    	lhld @covec	; get console output bit vector
 0109 C31501    	jmp ost$scan
                
                
                	; AUXOST
                	;	Auxiliary Output Status.  Return true if
                	;		all selected auxiliary output devices
                	;		are ready.
                
                auxost:
 010C 2A0000    	lhld @aovec	; get aux output bit vector
 010F C31501    	jmp ost$scan
                
                
                	; LISTST
                	;	List Output Status.  Return true if
                	;		all selected list output devices
                	;		are ready.
                
                listst:
 0112 2A0000    	lhld @lovec	; get list output bit vector
                
                ost$scan:
 0115 0600      	mvi b,0		; start with device 0
CP/M RMAC ASSEM 1.1	#006	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                cos$next:
 0117 29        	dad h		; check next bit
 0118 E5        	push h		; save the vector
 0119 C5        	push b		; save the count
 011A 3EFF      	mvi a,0FFh	; assume device ready
 011C DC2C01    	cc coster	; check status for this device
 011F C1        	pop b		; recover count
 0120 E1        	pop h		; recover bit vector
 0121 B7        	ora a		; see if device ready
 0122 C8        	rz		; if any not ready, return false
 0123 04        	inr b		; drop device number
 0124 7CB5      	mov a,h ! ora l	; see if any more selected devices
 0126 C21701    	jnz cos$next
 0129 F6FF      	ori 0FFh	; all selected were ready, return true
 012B C9        	ret
                
                coster:		; check for output device ready, including optional
                		;	xon/xoff support
 012C 682600    	mov l,b ! mvi h,0	; make device code 16 bits
 012F E5        	push h			; save it in stack
 0130 292929    	dad h ! dad h ! dad h	; create offset into device characteristics tbl
 0133 11060019  	lxi d,@ctbl+6 ! dad d	; make address of mode byte
 0137 7EE610    	mov a,m ! ani mb$xonxoff
 013A E1        	pop h			; recover console number in <HL>
 013B CA0000    	jz ?cost		; not a xon device, go get output status direct
 013E 112B0219  	lxi d,xofflist ! dad d	; make pointer to proper xon/xoff flag
 0142 CD5D01    	call cist1		; see if this keyboard has character
 0145 7EC46F01  	mov a,m ! cnz ci1	; get flag or read key if any
 0149 FE11C25001	cpi ctlq ! jnz not$q	; if its a ctl-Q,
 014E 3EFF      	mvi a,0FFh 		;	set the flag ready
                not$q:
 0150 FE13C25701	cpi ctls ! jnz not$s	; if its a ctl-S,
 0155 3E00      	mvi a,00h		;	clear the flag
                not$s:
 0157 77        	mov m,a			; save the flag
 0158 CD6601    	call cost1		; get the actual output status,
 015B A6        	ana m			; and mask with ctl-Q/ctl-S flag
 015C C9        	ret			; return this as the status
                
                cist1:			; get input status with <BC> and <HL> saved
 015D C5E5      	push b ! push h 
 015F CD0000    	call ?cist
 0162 E1C1      	pop h ! pop b
 0164 B7        	ora a
 0165 C9        	ret
                
                cost1:			; get output status, saving <BC> & <HL>
 0166 C5E5      	push b ! push h
 0168 CD0000    	call ?cost
 016B E1C1      	pop h ! pop b
 016D B7        	ora a
 016E C9        	ret
                
                ci1:			; get input, saving <BC> & <HL>
 016F C5E5      	push b ! push h
 0171 CD0000    	call ?ci
CP/M RMAC ASSEM 1.1	#007	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

 0174 E1C1      	pop h ! pop b
 0176 C9        	ret
                
                
                	; CONST
                	;	Console Input Status.  Return true if
                	;		any selected console input device
                	;		has an available character.
                
                const:
 0177 2A0000    	lhld @civec	; get console input bit vector
 017A C38001    	jmp ist$scan
                
                
                	; AUXIST
                	;	Auxiliary Input Status.  Return true if
                	;		any selected auxiliary input device
                	;		has an available character.
                
                auxist:
 017D 2A0000    	lhld @aivec	; get aux input bit vector
                
                ist$scan:
 0180 0600      	mvi b,0		; start with device 0
                cis$next:
 0182 29        	dad h		; check next bit
 0183 3E00      	mvi a,0		; assume device not ready
 0185 DC5D01    	cc cist1	; check status for this device
 0188 B7C0      	ora a ! rnz	; if any ready, return true
 018A 04        	inr b		; drop device number
 018B 7CB5      	mov a,h ! ora l	; see if any more selected devices
 018D C28201    	jnz cis$next
 0190 AF        	xra a		; all selected were not ready, return false
 0191 C9        	ret
                
                
                	; CONIN
                	;	Console Input.  Return character from first
                	;		ready console input device.
                
                conin:
 0192 2A0000    	lhld @civec
 0195 C39B01    	jmp in$scan
                
                
                	; AUXIN
                	;	Auxiliary Input.  Return character from first
                	;		ready auxiliary input device.
                
                auxin:
 0198 2A0000    	lhld @aivec
                
                in$scan:
 019B E5        	push h		; save bit vector
 019C 0600      	mvi b,0
                ci$next:
CP/M RMAC ASSEM 1.1	#008	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

 019E 29        	dad h		; shift out next bit
 019F 3E00      	mvi a,0		; insure zero a  (nonexistant device not ready).
 01A1 DC5D01    	cc cist1	; see if the device has a character
 01A4 B7        	ora a
 01A5 C2B201    	jnz ci$rdy	; this device has a character
 01A8 04        	inr b		; else, next device
 01A9 7CB5      	mov a,h ! ora l	; see if any more devices
 01AB C29E01    	jnz ci$next	; go look at them
 01AE E1        	pop h		; recover bit vector
 01AF C39B01    	jmp in$scan	; loop til we find a character
                
                ci$rdy:
 01B2 E1        	pop h		; discard extra stack
 01B3 C30000    	jmp ?ci
                
                
                ;	Utility Subroutines
                
                
                ipchl:		; vectored CALL point
 01B6 E9        	pchl
                
                
                ?pmsg:		; print message @<HL> up to a null
                		; saves <BC> & <DE>
 01B7 C5        	push b
 01B8 D5        	push d
                pmsg$loop:
 01B9 7EB7CAC801	mov a,m ! ora a ! jz pmsg$exit
 01BE 4FE5      	mov c,a ! push h
 01C0 CD0C00E1  	call ?cono ! pop h
 01C4 23C3B901  	inx h ! jmp pmsg$loop
                pmsg$exit:
 01C8 D1        	pop d
 01C9 C1        	pop b
 01CA C9        	ret
                
                ?pdec:		; print binary number 0-65535 from <HL>
 01CB 01F30111F0	lxi b,table10! lxi d,-10000
                next:
 01D1 3E2F      	mvi a,'0'-1
                pdecl:
 01D3 E53C19D2DE	push h! inr a! dad d! jnc stoploop
 01D9 3333C3D301	inx sp! inx sp! jmp pdecl
                stoploop:
 01DE D5C5      	push d! push b
 01E0 4FCD0C00  	mov c,a! call ?cono
 01E4 C1D1      	pop b! pop d
                nextdigit:
 01E6 E1        	pop h
 01E7 0A5F03    	ldax b! mov e,a! inx b
 01EA 0A5703    	ldax b! mov d,a! inx b
 01ED 7BB2C2D101	mov a,e! ora d! jnz next
 01F2 C9        	ret
                
                table10:
CP/M RMAC ASSEM 1.1	#009	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

 01F3 18FC9CFFF6	dw	-1000,-100,-10,-1,0
                
                ?pderr:
 01FD 21D400CDB7	lxi h,drive$msg ! call ?pmsg			; error header
 0203 3AF000C641	lda @adrv ! adi 'A' ! mov c,a ! call ?cono	; drive code
 020C 21E600CDB7	lxi h,track$msg ! call ?pmsg			; track header
 0212 2AF200CDCB	lhld @trk ! call ?pdec				; track number
 0218 21EB00CDB7	lxi h,sector$msg ! call ?pmsg			; sector header
 021E 2AF400CDCB	lhld @sect ! call ?pdec				; sector number
 0224 C9        	ret
                
                
                	; BNKSEL
                	;	Bank Select.  Select CPU bank for further execution.
                
                bnksel:
 0225 323B02    	sta @cbnk 			; remember current bank
 0228 C30000    	jmp ?bank			; and go exit through users
                					; physical bank select routine
                
                
 022B FFFFFFFFFFxofflist	db	-1,-1,-1,-1,-1,-1,-1,-1		; ctl-s clears to zero
 0233 FFFFFFFFFF		db	-1,-1,-1,-1,-1,-1,-1,-1
                
                
                
                	dseg	; following resides in banked memory
                
                
                
                ;	Disk I/O interface routines
                
                
                	; SELDSK
                	;	Select Disk Drive.  Drive code in <C>.
                	;		Invoke login procedure for drive
                	;		if this is first select.  Return
                	;		address of disk parameter header
                	;		in <HL>
                
                seldsk:
 0042 7932F000  	mov a,c ! sta @adrv			; save drive select code
 0046 69260029  	mov l,c ! mvi h,0 ! dad h		; create index from drive code
 004A 01000009  	lxi b,@dtbl ! dad b			; get pointer to dispatch table
 004E 7E23666F  	mov a,m ! inx h ! mov h,m ! mov l,a	; point at disk descriptor
 0052 B4C8      	ora h ! rz 				; if no entry in table, no disk
 0054 7BE601C270	mov a,e ! ani 1 ! jnz not$first$select	; examine login bit
 005A E5EB      	push h ! xchg				; put pointer in stack & <DE>
 005C 21FEFF197E	lxi h,-2 ! dad d ! mov a,m ! sta @RDRV	; get relative drive
 0064 21FAFF19  	lxi h,-6 ! dad d			; find LOGIN addr
 0068 7E23666F  	mov a,m ! inx h ! mov h,m ! mov l,a	; get address of LOGIN routine
 006C CDB601    	call ipchl				; call LOGIN
 006F E1        	pop h					; recover DPH pointer
                not$first$select:
 0070 C9        	ret
                
CP/M RMAC ASSEM 1.1	#010	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                
                	; HOME
                	;	Home selected drive.  Treated as SETTRK(0).
                
                home:
 0071 010000    	lxi b,0		; same as set track zero
                
                
                	; SETTRK
                	;	Set Track. Saves track address from <BC> 
                	;		in @TRK for further operations.
                
                settrk:
 0074 6960      	mov l,c ! mov h,b
 0076 22F200    	shld @trk
 0079 C9        	ret
                
                
                	; SETSEC
                	;	Set Sector.  Saves sector number from <BC>
                	;		in @sect for further operations.
                
                setsec:
 007A 6960      	mov l,c ! mov h,b
 007C 22F400    	shld @sect
 007F C9        	ret
                
                
                	; SETDMA
                	;	Set Disk Memory Address.  Saves DMA address
                	;		from <BC> in @DMA and sets @DBNK to @CBNK
                	;		so that further disk operations take place
                	;		in current bank.
                
                setdma:
 0080 6960      	mov l,c ! mov h,b
 0082 22F600    	shld @dma
                
 0085 3A3B02    	lda @cbnk	; default DMA bank is current bank
                			; fall through to set DMA bank
                
                	; SETBNK
                	;	Set Disk Memory Bank.  Saves bank number
                	;		in @DBNK for future disk data
                	;		transfers.
                
                setbnk:
 0088 32F900    	sta @dbnk
 008B C9        	ret
                
                
                	; SECTRN
                	;	Sector Translate.  Indexes skew table in <DE>
                	;		with sector in <BC>.  Returns physical sector
                	;		in <HL>.  If no skew table (<DE>=0) then
                	;		returns physical=logical.
CP/M RMAC ASSEM 1.1	#011	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                
                sectrn:
 008C 6960      	mov l,c ! mov h,b
 008E 7AB3C8    	mov a,d ! ora e ! rz
 0091 EB096E2600	xchg ! dad b ! mov l,m ! mvi h,0
 0096 C9        	ret
                
                
                	; READ
                	;	Read physical record from currently selected drive.
                	;		Finds address of proper read routine from
                	;		extended disk parameter header (XDPH).
                
                read:
 0097 2AF0002600	lhld @adrv ! mvi h,0 ! dad h	; get drive code and double it
 009D 11000019  	lxi d,@dtbl ! dad d		; make address of table entry
 00A1 7E23666F  	mov a,m ! inx h ! mov h,m ! mov l,a	; fetch table entry
 00A5 E5        	push h				; save address of table
 00A6 11F8FF19  	lxi d,-8 ! dad d		; point to read routine address
 00AA C3C000    	jmp rw$common			; use common code
                
                
                	; WRITE
                	;	Write physical sector from currently selected drive.
                	;		Finds address of proper write routine from
                	;		extended disk parameter header (XDPH).
                
                write:
 00AD 2AF0002600	lhld @adrv ! mvi h,0 ! dad h	; get drive code and double it
 00B3 11000019  	lxi d,@dtbl ! dad d		; make address of table entry
 00B7 7E23666F  	mov a,m ! inx h ! mov h,m ! mov l,a	; fetch table entry
 00BB E5        	push h				; save address of table
 00BC 11F6FF19  	lxi d,-10 ! dad d		; point to write routine address
                
                rw$common:
 00C0 7E23666F  	mov a,m ! inx h ! mov h,m ! mov l,a	; get address of routine
 00C4 D1        	pop d				; recover address of table
 00C5 1B1B      	dcx d ! dcx d			; point to relative drive
 00C7 1A32F100  	ldax d ! sta @rdrv		; get relative drive code and post it
 00CB 1313      	inx d ! inx d			; point to DPH again
 00CD E9        	pchl				; leap to driver
                
                
                	; MULTIO
                	;	Set multiple sector count. Saves passed count in
                	;		@CNT
                
                multio:
 00CE 32F800C9  	sta @cnt ! ret
                
                
                	; FLUSH
                	;	BIOS deblocking buffer flush.  Not implemented.
                
                flush:
 00D2 AFC9      	xra a ! ret		; return with no error
CP/M RMAC ASSEM 1.1	#012	ROOT MODULE OF RELOCATABLE BIOS FOR CP/M 3.0

                
                
                
                	; error message components
 00D4 0D0A074249drive$msg	db	cr,lf,bell,'BIOS Error on ',0
 00E6 3A20542D00track$msg	db	': T-',0
 00EB 2C20532D00sector$msg	db	', S-',0
                
                
                    ; disk communication data items
                
 00F0           @adrv	ds	1		; currently selected disk drive
 00F1           @rdrv	ds	1		; controller relative disk drive
 00F2           @trk	ds	2		; current track number
 00F4           @sect	ds	2		; current sector number
 00F6           @dma	ds	2		; current DMA address
 00F8 00        @cnt	db	0		; record count for multisector transfer
 00F9 00        @dbnk	db	0		; bank for DMA operations
                
                
                	cseg	; common memory
                
 023B 00        @cbnk	db	0		; bank for processor operations
                
                
 023C           	end
