Z3MSG1 Z80 Z3MSG2 Z80OZ3MSG3 Z80{Z3MSG4 Z80TZ3MSG5 Z80xZ3MSG6 Z80!xZ3MSG7 Z80&\Z3MSG8 Z80,Z3MSG9 Z801 Z3MSGA Z808yZ3MSGB Z80<+Z3MSGC Z80DZ3MSGD Z80JiZ3MSGE Z80P&Z3MSGF Z80UZ3MSGG Z80[Z3MSGH Z80aZ3PCL ZQ0g6Z3PCRT Z80u4Z3PDUOK Z80{(#Z3PFIND ZQ0Z3PFNX ZQ0Z3PMDISKZ80HZ3PMUSERZ80LZ3PPRT Z80hZ3PQUIETZ80Z3PRGLD ZQ0#Z3PRS1 ZQ0I|Z3PRS2 ZQ06Z3PRS3 ZQ0>"XZ3PSPEEDZ80`ŘZ3PWHL Z80dZ3PZNC Z80iZ3PZR Z80qM&Z3QCOUT Z80xPZ3QCRLF Z80|eZ3QNDR ZQ0 %Z3QOUT Z80Z3QPRINTZ803Z3QPSTR Z80cZ3ROOT Z80Z3SHEMPTZ80Z3SHFULLZ80IZ3SHPOP ZQ0 xZ3SHPUSHZQ0\Z3SNDR ZQ0dZ3W1 Z80Z3W2 Z80/Z3W3 Z80 ; ; Z3LIB Module Name: Z3MSG1 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public geter1 ext getmsg ; ; GETER1 returns the error flag message in A. Zero Flag is set ; accordingly. ; geter1: push hl ;save HL call getmsg ;get ptr to messages ld a,(hl) ;get error flag pop hl or a ;set Z flag according to error flag ret end ; ; Z3LIB Module Name: Z3MSG2 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public puter1 ext getmsg ; ; PUTER1 sets the error flag message in A. No registers are affected. ; puter1: push hl ;save HL push af ;save PSW call getmsg ;get ptr to messages pop af ;get PSW ld (hl),a ;store message pop hl ret end ; ; Z3LIB Module Name: Z3MSG3 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public geter2 ext getmsg ; ; GETER2 returns the error code message in A. A=0 and Zero Flag Set ; if No Error. ; geter2: push hl ;save HL push de ;save DE call getmsg ;get ptr to messages ld de,6 ;offset to code add hl,de ld a,(hl) ;get error flag pop de ;get DE pop hl ;get HL or a ;set flag accordingly ret end ; ; Z3LIB Module Name: Z3MSG4 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public puter2 ext getmsg ; ; PUTER2 sets the error code message in A. No registers are affected. ; puter2: push hl ;save HL push de ;save DE push af ;save PSW call getmsg ;get ptr to messages ld de,6 ;offset to code add hl,de pop af ;get PSW ld (hl),a ;store message pop de pop hl ret end ; ; Z3LIB Module Name: Z3MSG5 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public getcst ext getmsg ; ; GETCST returns the ZCPR3 command status message in A. A=0 and Zero ; Flag Set if command status is normal. ; getcst: push hl ;save HL call getmsg ;get ptr to messages inc hl ;offset of 3 inc hl inc hl ld a,(hl) ;get command status message pop hl or a ;set zero flag accordingly ret end ; ; Z3LIB Module Name: Z3MSG6 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qshell ext getmsg ; ; QSHELL returns the ZCPR3 command status message in A and the ; Zero Flag Set (Z) if this message indicates that a Shell has been ; invoked. Only the PSW is affected. ; qshell: push hl ;save HL call getmsg ;get ptr to messages inc hl ;offset of 3 inc hl inc hl ld a,(hl) ;get command status message pop hl cp 1 ;set Z flag if shell ret end ; ; Z3LIB Module Name: Z3MSG7 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qerror ext getmsg ; ; QERROR returns the ZCPR3 command status message in A and the ; Zero Flag Set (Z) if this message indicates that an Error has been ; encountered. If such is the case, HL contains the address of the ; first character of the error line. The PSW and HL are affected. ; qerror: call getmsg ;get ptr to messages inc hl ;offset of 3 inc hl inc hl ld a,(hl) ;get command status message push af inc hl ;pt to error address ld a,(hl) inc hl ld h,(hl) ld l,a ;HL contains error address pop af cp 2 ;set Z flag if error ret end ; ; Z3LIB Module Name: Z3MSG8 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public getzex ext getmsg ; ; GETZEX returns the ZEX message byte in A. A=0 and Zero Flag Set ; if ZEX is running normally (intercepting chars). ; getzex: push hl ;save HL push de ;save DE call getmsg ;get ptr to messages ld de,7 ;offset to message byte add hl,de ld a,(hl) ;get message byte pop de ;get DE pop hl ;get HL or a ;set flag accordingly ret end ; ; Z3LIB Module Name: Z3MSG9 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public stopzex,strtzex,putzex ext getmsg ; ; STOPZEX suspends ZEX processing. No registers are affected. ; stopzex: push af ld a,2 ;suspend ZEX call putzex pop af ret ; ; STRTZEX resumes ZEX processing. No registers are affected. ; strtzex: push af xor a ;A=0 means to resume ZEX processing call putzex pop af ret ; ; PUTZEX sets the ZEX message byte in A. No registers are affected. ; putzex: push hl ;save HL push de ;save DE push af ;save PSW call getmsg ;get ptr to messages ld de,7 ;offset to message byte add hl,de pop af ;get PSW ld (hl),a ;store message pop de pop hl ret end ; ; Z3LIB Module Name: Z3MSGA ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public geterc ext getmsg ; ; GETERC returns the address of the error command line in HL and ; A=0 and Zero Flag Set if no entry in command line. HL and PSW affected. ; geterc: push de ;save DE call getmsg ;get ptr to messages ld de,10h ;offset to buffer add hl,de ld a,(hl) ;get first char pop de ;get DE or a ;set flag ret end ; ; Z3LIB Module Name: Z3MSGB ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public puterc ext getmsg ; ; PUTERC stores the string pted to by HL into the error command line ; buffer. Return with A=0 and Zero Flag Set (Z) if string (incl ending 0) ; longer than 32 bytes. Affect only PSW. ; puterc: push hl ;save HL push de ;save DE push hl ;save ptr to string ld b,32 ;check size put1: ld a,(hl) ;get char or a ;zero = done jp z,put2 inc hl ;pt to next dec b ;count down jp nz,put1 pop hl ;clear stack and return error code pop de pop hl xor a ;return Z ret put2: call getmsg ;get ptr to messages ld de,10h ;offset to code add hl,de pop de ;get ptr to string put3: ld a,(de) ;copy string into buffer ld (hl),a inc hl ;pt to next inc de or a ;done? jp nz,put3 pop de ;restore regs pop hl xor a ;OK return dec a ;return NZ ret end ; ; Z3LIB Module Name: Z3MSGC ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public getreg ext getmsg ; ; GETREG returns the value of the register specified in B. This ; value is returned in the A register. Zero Flag is set accordingly. ; Only PSW is affected. ; getreg: push hl ;save HL push de ;save DE call getmsg ;get ptr to messages ld de,30h ;offset to registers add hl,de ld a,b ;get register number add a,l ;make HL pt to register ld l,a ld a,h adc a,0 ld h,a ld a,(hl) ;get register value pop de ;get DE pop hl ;get HL or a ;set flags ret end ; ; Z3LIB Module Name: Z3MSGD ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putreg ext getmsg ; ; PUTREG sets the value of the register specified in B. This ; value is input in the A register. No registers are affected. ; putreg: push hl ;save HL push de ;save DE push af ;save value call getmsg ;get ptr to messages ld de,30h ;offset to registers add hl,de ld a,b ;get register number add a,l ;make HL pt to register ld l,a ld a,h adc a,0 ld h,a pop af ;get value ld (hl),a ;put register value pop de ;get DE pop hl ;get HL ret end ; ; Z3LIB Module Name: Z3MSGE ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public erradr ext getmsg ; ; ERRADR returns the address of the first char of the command line ; in error which ZCPR3 attempted to process. HL affected. ; erradr: push af ;save PSW push de ;save DE call getmsg ;get ptr to messages ld de,4 ;offset to buffer add hl,de ld a,(hl) ;get address inc hl ld h,(hl) ld l,a ;HL = address pop de ;get DE pop af ret end ; ; Z3LIB Module Name: Z3MSGF ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putcst ext getmsg ; ; PUTCST sets the ZCPR3 command status message to the value in A. ; No registers are affected. ; ; PUTCST is intended to be used by Shells to indicate that the command ; they are passing is a "normal" command or whatever type of command ; (normal, shell, or error) is desired. ; putcst: push hl ;save HL push af ;save A call getmsg ;get ptr to messages inc hl ;offset of 3 inc hl inc hl pop af ;get code ld (hl),a ;set command status message pop hl ret end ; ; Z3LIB Module Name: Z3MSGG ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public getshm ext getmsg ; ; GETSHM returns the value of the shell message specified in B. This ; value is returned in the A register. Zero Flag is set accordingly. ; Only PSW is affected. There are only three shell messages, so 0 <= B <= 2. ; getshm: push hl ;save HL push de ;save DE call getmsg ;get ptr to messages ld de,13 ;offset to registers add hl,de ld a,b ;get register number add a,l ;make HL pt to register ld l,a ld a,h adc a,0 ld h,a ld a,(hl) ;get register value pop de ;get DE pop hl ;get HL or a ;set flags ret end ; ; Z3LIB Module Name: Z3MSGH ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putshm ext getmsg ; ; PUTSHM sets the value of the shell message specified in B. This ; value is input in the A register. No registers are affected. There are ; only three shell messages, so 0 <= B <= 2. ; putshm: push hl ;save HL push de ;save DE push af ;save value call getmsg ;get ptr to messages ld de,13 ;offset to registers add hl,de ld a,b ;get register number add a,l ;make HL pt to register ld l,a ld a,h adc a,0 ld h,a pop af ;get value ld (hl),a ;put register value pop de ;get DE pop hl ;get HL ret end vZ3PCL.Z80D  "!#%$'&(*)+-,./1024359678;:<@=>?oACBݴ#'l~,݁cu# '7:ϴPҎCj+X"ӎ\磝^qϗkqvvz!cE#?i7.;}&wnݴ:41?{ssa~PMM&$M?I$b~PMMiܼwԆֹғߧc)pEnqq* …uJ1-W}g\1鷸TLn/Pt M?; ; Z3LIB Module Name: Z3PCRT ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putcrt ext envptr ; ; PUTCRT stores the selection of 0 or 1 in the CRT Selection buffer ; in the Environment Descriptor. ; On exit, A=0 and Zero Flag Set if invalid selection value (not 0 or 1) ; putcrt: push hl ;save regs push de cp 2 ;range check jp nc,pcerror push af ;save selection ld hl,(envptr) ;pt to environment ld de,2fh ;pt to entry add hl,de pop af ;get selection ld (hl),a ;store selection pop de ;get regs pop hl or 0ffh ;set NZ for OK ret pcerror: pop de ;restore registers pop hl xor a ;error return ret end ; ; Z3LIB Module Name: Z3PDUOK ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putduok ext envptr ; ; PUTDUOK sets the DU OK byte from A. ; No registers are affected. ; putduok: push hl ;save regs push de push af ld hl,(envptr) ;pt to environment ld de,2eh ;pt to byte address add hl,de pop af ;get value ld (hl),a ;put byte in A pop de ;restore regs pop hl ret end vZ3PFIND.Z80H   "!#$&%')(*+-,/.1023456987:;o<=@?AB>CFEGD8Gw7fq;553GUFD/2qҸ=[|m4ݐ,g,Tnj+$zJi;mYƭ4oꌷѤ,e2N1۩ɨ팷eҼ*3FoA۩̃Ժa,ѷ>vq2NRg68;',tf#2clD7G2N%fS O?z~suxx%>1>n9azz~!kC3YGR:dm4ϸՏfW?x3 gaIYx3q,#W\48'_dQFWxHmej]Y~A5j;sr"u8?CF39DWqӌwN?jc@tձS='[^WD.u8? 'S4ز7\s7\^x*]n&xvuG?cQ+v9q.o*?~.2WcԃޯGAJ4Fx@-3׾q2N!ltVNn9`됵1F= ƨcԃgHZ]|6(V8'>x8HSQ[_q3F=qazPLԁյW\QFpNX1|8 $*Ƹ᯽@R [+q2NEj q]u2w_<4c HBG|S%6$tc['$]fBG^x_f[aI1[ӌ1. iT Q{_Y ^^z~6ƨ ijcԃgHZ]|6"Sm2js2F=}IU{=gzn6F=(n&@+~"Sm2js2F=?dm(HZu8Ycƨýq i<1Aq1|?N@k-cWc8I%Ѩau}%e|¥e0N:[^.rid\6'z1|\9 $-crn]1+S5[' IkljN%Okܗ~;QF@Ayk qٜiƨý/u$z~uţI㵲~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/ݢGlEKrY|`%|:yv6?Q#%h[ͺ dtdOC?AQ#VQ!{K v~Zr.`hpE#6||:D lLIbڵiV"J'EY,nټ7?@~iVr#hp 3(QB(G[EiDEhGK7".7/6?~z#go\t0Dx_f%7vџ͋ vm~eⱑ=̒!zvfFYGyۼQT_]FצY(-`E9JR}Ļ6JDiDEhẆ .m<(ޚm۸ݚm۸ݢ?[Ŋ&%+:8k}ÊzbAɦܷ\gXłM+98® ;UTQ(Ppy/L~Q6]ZqFK?\^ ţ_; ; Z3LIB Module Name: Z3PSPEED ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putspeed ext envptr ; ; PUTSPEED sets the processor speed in A. ; No registers are affected. ; putspeed: push hl ;save regs push de push af ld hl,(envptr) ;pt to environment ld de,2bh ;pt to byte address add hl,de pop af ;get value ld (hl),a ;put value pop de ;restore regs pop hl ret end ; ; Z3LIB Module Name: Z3PWHL ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putwhl ext envptr ; ; PUTWHL sets the wheel byte to the value in A. ; No registes are affected. ; putwhl: push hl push de push af ld hl,(envptr) ;pt to environment ld de,29h ;pt to wheel byte address add hl,de ld a,(hl) ;get address in HL inc hl ld h,(hl) ld l,a pop af ;get wheel byte ld (hl),a ;put wheel byte in A pop de ;restore regs pop hl ret end ; ; Z3LIB Module Name: Z3PZNC ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putznc ext getenv ; ; PUTZNC sets from the address in HL the ptr to the next character which ; ZEX will return. Carry Flag is Set if data not available. ; putznc: push hl call getenv ;pt to environment ld a,h ;any environment? or l jp z,error push de ;pt to message byte ld de,34 ;offset to message ptr add hl,de ld e,(hl) ;get address of messages inc hl ld d,(hl) ex de,hl ;HL pts to message pop de ld a,h ;any messages? or l jp z,error push de ;pt to Zex Next Char Address ld de,9 add hl,de pop de ;restore DE ex de,hl ld (temp),hl ;save DE ex de,hl pop de ;get ptr to next char ld (hl),e ;get address inc hl ld (hl),d push de ;save ptr ld hl,(temp) ex de,hl ;restore DE pop hl xor a ;set Z and Clear Carry ret error: pop hl ;restore HL scf ;set carry ret temp: ds 2 end ; ; Z3LIB Module Name: Z3PZR ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public putzrun ext getenv ; ; PUTZRUN sets the ZEX run message byte with the value in A. ; Carry Flag is Set if no such message available. ; putzrun: push hl push af ;save value call getenv ;pt to environment ld a,h ;any environment? or l jp z,error push de ;pt to message byte ld de,34 ;offset to message ptr add hl,de ld e,(hl) ;get address of messages inc hl ld d,(hl) ex de,hl ;HL pts to message pop de ld a,h ;any messages? or l jp z,error push de ;pt to Zex Running Flag ld de,8 add hl,de pop de pop af ;get byte ld (hl),a ;put byte pop hl ;restore HL ret error: pop af ;restore A pop hl ;restore HL scf ;set carry ret end ; ; Z3LIB Module Name: Z3QCOUT ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qcout ext getquiet,ccout ; ; QCOUT outputs the character in A with control character processing ; if the quiet flag says it is OK to do so. ; qcout: push af ;affect no regs call getquiet ;get flag jp z,notquiet ;not quiet, so print pop af ;restore PSW ret notquiet: pop af ;restore PSW jp ccout ;perform normal output end ; ; Z3LIB Module Name: Z3QCRLF ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qcrlf ext getquiet,crlf ; ; QCRLF outputs the CR-LF sequence if the quiet flag ; says it is OK to do so. ; qcrlf: push af ;affect no regs call getquiet ;get flag jp z,notquiet ;not quiet, so print pop af ;restore PSW ret notquiet: pop af ;restore PSW jp crlf ;perform normal output end vZ3QNDR.Z80@  !#"$&%)'*(+,/-.0312465789:;<=>?o4 &N_ lDM(1'ϢȖi@Ab`'و1qe ݏ,W~Ӏ!ݏ,Wi0=7~=-djzVQ֫njL>knLwBK4Lͻ+]|x }g{;kԫgz?M^Mir٤0 I6M{ײMO߅^=Fz_jn 97~5Z5}zR^rLo{6=.7㙞_L+].1M[YbO_=EM w\wj Tp'ӣz4\drQd {5Jvl1S;FQd }Sܼ2z]Ճ{7 lޔ=Շ)_bZ)黐dXtc v>mXezS62TBb~5)wk#9.$]J'Z)Ыy/2=t7.݅$+bދLox k zmzTϔh|\פZM13.ӛri0 L)&x_o5jB!7w]b<~!7w]a "[]W; ; Z3LIB Module Name: Z3QOUT ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qout ext getquiet,cout ; ; QOUT outputs the character in A if the quiet flag ; says it is OK to do so. ; qout: push af ;affect no regs call getquiet ;get flag jp z,notquiet ;not quiet, so print pop af ;restore PSW ret notquiet: pop af ;restore PSW jp cout ;perform normal output end ; ; Z3LIB Module Name: Z3QPRINT ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qprint ext getquiet,print ; ; QPRINT prints the string at the return address if the quiet flag ; says it is OK to do so. QPRINT returns to the byte following this ; string on exit. ; qprint: push af ;affect no regs call getquiet ;get flag jp z,notquiet ;not quiet, so print pop af ;restore PSW ex (sp),hl ;get ptr to string push af ;save PSW qpr1: ld a,(hl) ;get next char inc hl ;pt to following char or a ;end of string? jp nz,qpr1 pop af ;restore PSW ex (sp),hl ;done ret notquiet: pop af ;restore PSW jp print ;perform normal print end ; ; Z3LIB Module Name: Z3QPSTR ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public qpstr ext getquiet,pstr ; ; QPSTR prints the string pted to by HL if the quiet flag ; says it is OK to do so. ; qpstr: push af ;affect no regs call getquiet ;get flag jp z,notquiet ;not quiet, so print pop af ;restore PSW ret notquiet: pop af ;restore PSW jp pstr ;perform normal print end ; ; Z3LIB Module Name: Z3ROOT ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public root ext envptr,retud ; ; ROOT returns the DU of the root directory in BC. No other registers ; are affected. ; root: push de ;save DE push hl ;save HL ld hl,(envptr) ;pt to environment ld de,9 ;pt to path entry add hl,de ld e,(hl) ;get path address in DE inc hl ld d,(hl) ex de,hl ;HL pts to path call retud ;get current DU ld a,h ;no path? or l jp z,rootx rootl: ld a,(hl) ;get next path element or a ;end of path? jp z,rootx ;done if so call retud ;get current DU cp '$' ;current disk? jp z,root1 ld b,a ;get disk in B dec b ;adjust for A=0 root1: inc hl ;pt to user ld a,(hl) ;get user inc hl ;pt to next path element cp '$' ;current user? jp z,rootl ;advance ld c,a ;set user jp rootl ;continue rootx: pop hl ;restore HL pop de ;restore DE ret end ; ; Z3LIB Module Name: Z3SHEMPTY ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public shempty ext getsh ; ; SHEMPTY tests the shell stack to see if it is empty. If so, ; A=0 and Zero Flag Set (Z), else A<>0 and NZ. ; shempty: push hl ;save HL call getsh ;get ptr to shell stack jp z,noshell ;error if no shell stack ld a,(hl) ;check first element noshell: or a ;set flags pop hl ;get HL ret end ; ; Z3LIB Module Name: Z3SHFULL ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public shfull ext getsh ; ; Macros ; putrg macro push hl push de push bc endm getrg macro pop bc pop de pop hl endm ; ; SHFULL tests to see if the Shell Stack is full. A=0 and Zero ; Flag Set (Z) if so, else A<>0 and NZ. ; shfull: putrg ;save registers ; ; Get Shell Data ; call getsh ;get ptr to shell stack jp z,noshell ;error if no shell stack ld e,b ;size of element in DE ld d,0 ld b,a ;number of elements in B ld c,0ffh ;set not full code ; ; Check to see if shell stack is full ; fchk: ld a,(hl) ;get next element or a ;last element on stack? jp z,fchk1 ;stack ok add hl,de ;pt to next element dec b ;count down jp nz,fchk ; ; No Shell Error - Say that Shell is Full ; noshell: ld c,0 ;set full code fchk1: ld a,c ;get full code getrg ;restore registers or a ;set flag ret end vZ3SHPOP.Z80C   "!#$%&'()*,+-/.0213456879o;:<=>?@AB-݊@-S/$V,-_"ܜ*[)u+Vh7[x*Ԇ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Һ:W͎,s÷%];Q$&1<7 1+F7S6b֞ _FkS%g ONMMTz÷L--ߎt<8tge.$O y32o)6>Aqӷh}dPc E.ʳ̒YS>NEoH"(L6q&G9E{H e}_B>84M"E1p}p"sk{5V8/$OY08GʹUn"|߳GTns 8DEPtA:8-CvjyҺ77$bTP-Һ=J5bm(lJ>vp{Ƈsτ lJ8E ݹ};6aSZ-1 ͻW#&fe>Tlݖ,TB{ʬm3!\·S쑥 n¦.~s[x]|02+?)ɓ.|)zw3(A,HY Y̞m@Lc}bTg~)-n3(A%tSox oHfф_?hpuMm.n3_u; .дK}fzvhB/J~3wnKYr·S-?47  %t`*y la}<`Ŭ6E)-,fO)n3 jgyjpwh[xF?T}q-7&.|߳xu~~_>NE=̦|&Kv&ix oHJ;Sx DMᅴ6[Į- o rx ?nStA}z*<|KND{Ƈsτ lJ8E ݹ};6aSZ-1 ͻW#&fe>Tlݖ,TB{ʬ; ; Z3LIB Module Name: Z3WAIT1 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public wait1s ext getspeed ; ; WAIT1S delays for approximately 1 second. The ZCPR3 environment ; (particularly processor speed data) is assumed. ; wait1s: push af ;affect no regs push de push bc call getspeed ;get processor speed jp nz,w1 ld a,4 ;assume 4MHz if none given w1: ld b,a ;speed in B loop0: ld d,50 ;50 outer loops = 50*20,010 = 1,000,500 cycles loop1: ld e,230 ;230 inner loops = 230*87 = 20,010 cycles loop2: ex (sp),hl ;18 cycles ex (sp),hl ;+18 = 36 cycles ex (sp),hl ;+18 = 54 cycles ex (sp),hl ;+18 = 72 cycles dec e ;+ 5 = 77 cycles jp nz,loop2 ;+10 = 87 cycles dec d ;outer loop jp nz,loop1 dec b ;speed loop jp nz,loop0 pop bc ;restore regs pop de pop af ret end ; ; Z3LIB Module Name: Z3WAIT2 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public wait1ms ext getspeed ; ; WAIT1MS delays for approximately 1 millisecond. The ZCPR3 environment ; (particularly processor speed data) is assumed. ; wait1ms: push af ;affect no regs push de push bc call getspeed ;get processor speed jp nz,w1 ld a,4 ;assume 4MHz if none given w1: ld b,a ;speed in B loop0: ld e,20 ;20 inner loops = 20*51 = 1020 cycles loop1: ex (sp),hl ;18 cycles ex (sp),hl ;+18 = 36 cycles dec e ;+ 5 = 41 cycles jp nz,loop1 ;+10 = 51 cycles dec b ;speed loop jp nz,loop0 pop bc ;restore regs pop de pop af ret end ; ; Z3LIB Module Name: Z3WAIT3 ; Author: Richard Conn ; Z3LIB Version Number: 1.3 ; Module Version Number: 1.1 ; public waitp1s ext getspeed ; ; WAITP1S delays for approximately 0.1 second. The ZCPR3 environment ; (particularly processor speed data) is assumed. ; waitp1s: push af ;affect no regs push de push bc call getspeed ;get processor speed jp nz,w1 ld a,4 ;assume 4MHz if none given w1: ld b,a ;speed in B loop0: ld d,5 ;5 outer loops = 5*20,010 = 100,050 cycles loop1: ld e,230 ;230 inner loops = 230*87 = 20,010 cycles loop2: ex (sp),hl ;18 cycles ex (sp),hl ;+18 = 36 cycles ex (sp),hl ;+18 = 54 cycles ex (sp),hl ;+18 = 72 cycles dec e ;+ 5 = 77 cycles jp nz,loop2 ;+10 = 87 cycles dec d ;outer loop jp nz,loop1 dec b ;speed loop jp nz,loop0 pop bc ;restore regs pop de pop af ret end