1I"CP/M Version 3.0COPYRIGHT 1982, DIGITAL RESEARCH1512826543218/82Invalid Filename$DIRECTORY FULL$DISK FULL$Creating Password$File not found$File not available$  ,.;=:<>_[]*? ERROR - $Password ? $Cannot Edit Wildcard Filename$Enter Output file: $FILE IS READ/ONLY$NEW FILE$-(Y/N)?$Insufficient memory$Enter Input file: $Output File Exists, Erase It$ BREAK "$" AT $END OF LINE$1I"1I"̈́""%*"%}0!#6%!"I" ͫ!+!#s͠!#s#r! ͎ð :%T ð :%U6 :%2}#ð :%V… f %%!DMt/͟ *K"DMt  :%2~#} !#6 !#6ð :% ± :%: %HҮ ͑ð :%Hҭ :%A !%6*%"%*K""%ͅ   !%6ͅê :%F M \ ê :%J¤ Mx: %2 %xҡ \: %=2%:%<2%! %f *%&$ ~2%-E *%"%* %M* %~ ! %: %%!"%!%6ͅ*%DM͘4 ê :%M: %H !%6>%! L:%<2%O!%$ Hqy :%2 %!%6*%#)!R#+##R#3R#ͺ:#)>>!P#ͧ!!d%s{@*P#!e%s!"P#!c%6:d%!c%*P#*L#DM+#́ʵ]>P#!ʦ*P#:e%ͷ!*P#*L#DM*L#*P#:e%ͷ!"P#$*P#"P#!c%4S!"P#!f%q#P#!,*P#*L#:f%w*P##"P#!g%q:#,Q:~"2":"2"r"́'$$!#6*#&" :g%w!#4:#2h%>!h%Y!h%4Dr"K!i%6 :i%=2i%ʐ*i%&r" *i%&P" ʍ>e>:"2~"r":"2"Qr"q:"2"!#6>!#*#&" ~!#4¾*P#},:s#\i h,0 dad sp ;save stack shld ret$stack lxi sp,loc$stack mvi c,pstring lxi d,test$msg ; print message call next ; call BDOS lhld ret$stack ; restore user stack sphl lxi h,0031h ; return version number = 0031h ret test$msg: db cr,lf,'**** ECHOVERS **** $' ret$stack: dw 0 ds 32 ; 16 level stack loc$stack: end s function 12? mov a,c cpi 12 jz begin ; yes - intercept jmp next ; some other function begin: lxI"!^ ͵ #I"!++s#r!#ͧ!+s#r!"#*#ͺ!"L#*I"% 6*I"+"K"ͫ!"M":] sr ͡ !#6\Mڀs:#Ҷ\S:h2y#!h6*"%|¶12!%¶!!%6!#6!+#:\:t#/H+#͍͋!%6 !"%*K""%!#6à1I"! %6#@1I"! %6?@1I"! %6>@1I"! %6F!"$%@! %6F!"$%1I"!w#6 * %M͟  :% :% H| Ã*%M͟ >$%!ʝ*$%DM !"$% 1I"!{#6! %6!z#6͂ ! %6E: $2%E͑  sð H͑  !s#6#~:+#2%:\2+#:%2\s#rê :%Nf Mc * %` ͭ/ @̀ !%6!"%͇ͅ!%6K"%!]   ê :%S¶ Mxҳ \: %2%%!DM͘! %:%Ұ *%&$ ~2%!%4-Ï t ê :%W ê :%Xu P"m2 %!#6 !u#6P"^:#  r `!u# ͓B !u#6 r"P"!"6#6!~"6!"6r":#B 5*%"%%%!o *%% N*%"%K >ê :%ZŸ ҏ ;  @Ҝ Ï ê :%ʪ ð ív!&%q:w# *&%&!'%q:'% !#4:'%  !V6*H#~2Y!Z4N*P :M( !`6> *Z&*P:Y> !`6!V4N*H ~2Y*V&*H~2Y*YM=2L:L>!LHҗ !V4N*H ~2Y*YM=2Lf :V2KH͂#+s#r*HN=2L! *H#"Hê ͙ b I I!es+q+p+q:e=2e *b:dw*b#"b !fq I:f) b:f7 b:f:fHU b:fc b:fq b:fҁ !hp+q:2Қ *g >w3ͫ*g:\w*gDM"i*g >w*i} *i|2k:kH *kM :k>Y2la :l{ title 'wd1797 w/ Z80 DMA Single density diskette handler' ; CP/M-80 Version 3 -- Modular BIOS ; Disk I/O Module for wd1797 based diskette systems ; Initial version 0.01, ; Single density floppy only. - jrp, 4 Aug 82 dseg ; Disk drive dispatching tables for linked BIOS public fdsd0,fdsd1 ; Variables containing parameters passed by BDOS extrn @adrv,@rdrv extrn @dma,@trk,@sect extrn @dbnk ; System Control Block variables extrn @ermde ; BDOS error ged into for the purpose of density determination. ; It may adjust the parameters contained in the disk ; parameter header pointed at by ret ; we have nothing to do in ; simple single density only environment. ; disk READ and WRITE entry points. ; these entries are called with the following arguments: ; relative drive number in @rdrv (8 bits) ; absolute drive number in @adrv (8 bits) ; disk transfer address in @dma (16 bits) ; disk transfer bank in @dbnk (8 bi lxi b,16667 ; 100 ms / (24 t states*250 ns) spin$loop: ; wait for head/seek settling dcx b mov a,b ! ora c jnz spin$loop same$track: lda @trk ! out p$fdtrack ; give 1797 track lda @sect ! out p$fdsector ; and sector lxi h,dma$block ; point to dma command block lxi b,dmab$length*256 + p$zdma ; command block length and port address outir ; send commands to Z80 DMA in p$bankselect ; get old value of bank select port ani 3Fh ! mov b,a ; mask off DMA bank and save ld :l :lb3 !m6>!mڗ 2n D *m&3 :nw:n O × :nZ  :n€ :mm  :m=2mO!3 6 , :n !m4# ͙2n!oq:1 :\A=OI:I I!v6> !v :v .I*v&*/NI!v4 bb*oM \͂ 2wQ :w$ *wM B :wB *wM͞ \͂ 2w:wQ *wM͞ !L6!J6:L:LH:LH Jt:J b.bLb:KH͜+"p!r6:K!r *pNI*p#"p!r4¹ :J !26:J !16\ !tmode ; Utility routines in standard BIOS extrn ?wboot ; warm boot vector extrn ?pmsg ; print message @ up to 00, saves & extrn ?pdec ; print binary number in from 0 to 99. extrn ?pderr ; print BIOS disk error header extrn ?conin,?cono ; con in and out extrn ?const ; get console status ; Port Address Equates maclib ports ; CP/M 3 Disk definition macros maclib cpm3 ; Z80 macro library instruction definitions maclib z80 ; common ts) ; disk track address in @trk (16 bits) ; disk sector address in @sect (16 bits) ; pointer to XDPH in ; they transfer the appropriate data, perform retries ; if necessary, then return an error code in fd$read: lxi h,read$msg ; point at " Read " mvi a,88h ! mvi b,01h ; 1797 read + Z80DMA direction jmp rw$common fd$write: lxi h,write$msg ; point at " Write " mvi a,0A8h ! mvi b,05h ; 1797 write + Z80DMA direction ; jmp wr$common rw$common: ; seek to ca @dbnk ! rrc ! rrc ; get DMA bank to 2 hi-order bits ani 0C0h ! ora b ; merge with other bank stuff out p$bankselect ; and select the correct DMA bank lda disk$command ; get 1797 command call exec$command ; start it then wait for IREQ and read status sta disk$status ; save status for error messages pop b ; recover retry counter ora a ! rz ; check status and return to BDOS if no error ani 0001$0000b ; see if record not found error cnz check$seek ; if a record not found, we mp+q*s~ ~ H% *s#"s *s~1 >>!`i^#V#~#for0V y wÇ G:„ xA  a{k_  ~ ~r_ogi`N#Fogo&og_{_z#Wcontrol characters cr equ 13 lf equ 10 bell equ 7 ; Extended Disk Parameter Headers (XPDHs) dw fd$write dw fd$read dw fd$login dw fd$init0 db 0,0 ; relative drive zero fdsd0 dph trans,dpbsd,16,31 dw fd$write dw fd$read dw fd$login dw fd$init1 db 1,0 ; relative drive one fdsd1 dph trans,dpbsd,16,31 cseg ; DPB must be resident dpbsd dpb 128,26,77,1024,64,2 dseg ; rest is banked trans skew 26,6,1 ; Disk I/O routines for standardized BIOS inorrect track (if necessary), ; initialize DMA controller, ; and issue 1797 command. shld operation$name ; save message for errors sta disk$command ; save 1797 command mov a,b ! sta zdma$direction ; save Z80DMA direction code lhld @dma ! shld zdma$dma ; get and save DMA address lda @rdrv ! mov l,a ! mvi h,0 ; get controller-relative disk drive lxi d,select$table ! dad d ; point to select mask for drive mov a,m ! sta select$mask ; get select mask and save it out p$select ; selight need to seek dcr c ! jnz retry$operation ; suppress error message if BDOS is returning errors to application... lda @ermde ! cpi 0FFh ! jz hard$error ; Had permanent error, print message like: ; BIOS Err on d: T-nn, S-mm, , Retry ? call ?pderr ; print message header lhld operation$name ! call ?pmsg ; last function ; then, messages for all indicated error bits lda disk$status ; get status byte from last error lxi h,error$table ; point at0 Ç 6 .ʙ (Ý  #6Ÿ ;ʳ (÷ r0 33 yy#q#p#w!!0(#* 6? w 0 0(333333.;;33,;;#w 0#6 (O O n.:;=,/[]<>a{k_  ~ ~r_ogi`N#Fogo&og_{_z#Wterface ; Initialization entry point. ; called for first time initialization. fd$init0: lxi h,init$table fd$init$next: mov a,m ! ora a ! rz mov b,a ! inx h ! mov c,m ! inx h outir jmp fd$init$next fd$init1: ; all initialization done by drive 0 ret init$table db 4,p$zpio$1A db 11001111b, 11000010b, 00010111b,11111111b db 4,p$zpio$1B db 11001111b, 11011101b, 00010111b,11111111b db 0 fd$login: ; This entry is called when a logical drive is about to ; be logect drive more$retries: mvi c,10 ; allow 10 retries retry$operation: push b ; save retry counter lda select$mask ! lxi h,old$select ! cmp m mov m,a jnz new$track ; if not same drive as last, seek lda @trk ! lxi h,old$track ! cmp m mov m,a jnz new$track ; if not same track, then seek in p$fdmisc ! ani 2 ! jnz same$track ; head still loaded, we are OK new$track: ; or drive or unloaded head means we should . . . call check$seek ; . . read address and seek if wrong trackInvalid FCB.Media change occurred.Disk I/O error.Invalid drive error.Invalid SCB offsetMissing right parenthesis.Missing SCB value.Missing left parenthesis.Unrecognized option.No modifier for this option.OPTION: This file was not used.GENCOM completed.Requires CP/M 3 or higher.1n$1n$" %* %|<Ó* %}0HÓ::$]Ç:$jZÇ:$wÇ:$҄ZÇer ͺv!n$q*n$& ͤ!p$p+q*o$~*o$Nͤ*o$#"o$  ͤ ͤ+ͱ :;" rͺ :;2 !%6? :;? !%6:$H :$Q :$ˆ :;} rͺ;+ͱ È aͧ !%6:$‘ :$š :$£ *$#";*;Ny 2$ *$DM*;i *:&: w*$##"$ *$;i *:&: w*;"$!:4*$Ny 2$\Q *$#"$*$Ny 2$:$1*$#"$*$Ny 2$!L:$IY!M:$YwQ *$#"$*$Ny 2$!N*$#"$9*$0͸ *$#";*;Ny 2$!L:$£!M:$°6*$0͸ F*;0͸ *$DM*;i *:&v: w*$##"$2*$;i *:&v: w* ( w*<&') ^#V"(!<6>!!%(z:$/H!"$$#͞%U!$6̓!"<6:"<#ڀ*"<&( 6:"<<2"<_!"<6:$!"<ک*"<&$) >w#6:"<<2"<…!(" (* (:Ow:%/* ( :Ow* ( 6* ( :$w!"$:%:O2)x* (DM (*("(!"$:%N:%/!$N!)6 *( 6*(DM͛2$:$H !"$:%1:$d~õ:$ʚ x*(DMZ:$ʚ:{$$͂#+s#r*(DMZy:{$$͂#+s#r!$#+s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