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record/Sector Not Found, Corrupt Data/ID mark/CRC, Lost Data, Data ReQuest Fault, Busy, Bad/Wrong Track, Corrupt ID mark/CRC, Write Protect/Write Fault, Corrupt ID mark Retry (Y/N) ?  Allow (Y/N) ?  WARNING : CORRUPT DATA TRANSFERED ""!9"1W2ugto|@ʝ}!q|:=!p~<'`6+~<'`6+~<'$6*l#"lw2:2:<:ѷ:ӷ#2:GNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN *^#V+:O:ӹ8>2 :<ͨ:2*\: Է>2 2>2 ԯ2 !9"\1\!9:8ژ:Oz:ȯ2 y2 !9"\1\!9:8ړ:Oz: :2 Ol~#fo:O:1+ "y2:2 *": Է1=2 :! Ծ1*<1*:Ӿ1#:=$*#": Ol~#fo:"2ԯ2:ȯ2 >2ԯ2 :G:Ӑ_:ԷO{Vȷ PȀ2F""C"####:Ӿ*ʛ k"~ʬ#~ͤ*6#:w#*s#r#:w:8:Է*#Ͱ*"U*!^#V:G:ӐG:Է!ɠPNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN!***:>22 2 ͏n*06[#Ow#yw#6:#Ow#yw#6:#Ow#yw#6]/G~<W~_,V,~x--s^,F,{Ny<_yO q>28!q"9>202(>2QCERT223COM>>?ABQSYSG D<<<Ѱyi&) !~#fo~#fo <?ƒ ^g~OO #@z>/<e33ZO _ W{X!>:AO !>*R!>*R BIOS Error on : T-, S-!p=|~#O JNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNgo*: Է#*66:w: :ͤ*|}*<***MD! s! NC! ~w{" r*MDq#p>Ú>2!ý>ò>22 9.:<*:w:>G:O:>y*:w:>G:>:Oh*K|g}o>222"`)":!Ӿʅwo& ^#fk"!:ӷ~•×?w:ӷ§> w*f"*h"*j"*l"*n"*"f*"h*"j*"l*"n!"f!"h!#~"j!"l!QNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN! Please mount disk :AO in drive :0O, press when ready   ` ttPROFILEͧ >2:sQ!"<<<iYNeneration Uti Version 2.23 YPE RETURN DESTINATION DRIVE NAME (OR RETURN TO REBOOT) DEԞԧ԰uuԊkԀkԀkԀkԀz  ט'ا׶'٧ 'ڧhT\NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN1ԉ'xʐlQNNNNNNNNNNNNNNNNNNNNN!ڻ(?VC HqC 0C HqC 0C HqC 0C HqC 0( # (L?# (L?# (L?# (L? !"#$  %&'( !"#$  %&'(%&'(1234=>?@ )*+,5678ABCD !"#$ !"#$  %&'( !"#$  %&'(%&'(1234=>?@ )*+,5678ABCD !"#$   NNNNNNNNNNNNNNNN$NNNNNNNNNNNNNNNNNNNNNN>>( <02&((*$ **>> "&*2""  >> " $>> <" <"">""""""8 >>""*., "">""<""<""<" "<"""""<> < >> <  &"""">"""""$(0($" >"6**"""""2*&"""""""<""< """*$<""<($"" ">""""""""""""""**6"""""""> >>00000> >>">paNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN5CDDB02CDA !"#$  %&'(%&'(1234=>?@ )*+,5678ABCD !"#$   s=!ͧ 0>2:s_!!3MEGATEL QUARK System Generation Utility Version 2.23 R01SOURCE DRIVE NAME (OR RETURN TO SKIP) SOURCE ON , THEN TYPE RETURN DESTINATION DRIVE NAME (OR RETURN TO REBOOT) DESTINATION ON , THEN TYPE RETURN PERMANENT ERROR, TYPE RETURN TO IGNORE FUNCTION COMPLETENO SOURCE FILE ON DISKSOURCE FILE INCOMPLETE,!awNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN! $$$ ,2"< &""<  8&" ,2"" "$(4$4**"",2"""""",2"< "&,2  << """&""""**""""&>> ***:}NNNNNNNNNNNNNNNN7NNNNNNNNNNNNNNNNNNNNNNA9C0211800019EB2AA4022B7DB4C2EAF2 :1003D600032A9A025E23567EB3C8234E234623225F :1003E6009A02696022A402EB229C022AA202233A04 :10;255 BECOMES 00 JNZ RDOK ;OK TO READ IF NOT 255 ; ; FILE NOT PRESENT, ERROR AND REBOOT ; LXI H,NOFILE CALL CRMSG JMP REBOOT ; ;file present ; RDOK: XRA A STA FCBCR ;CURRENT RECORD = 0 ; ; PRE-READ AREA FROM TPA TO LOADP ; MVI C,(loadaddr-tpa)/cpmsectleng ; PRE-READ FILE PRERD: PUSH B ;SAVE COUNT LXI D,FCB ;INPUT FILE CONTROL COUNT CALL DREAD ;ASSUME RsNNNNNNNNNNNNNNNNN+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNNNNNNNNNNNNNNNNSET TO DEFAULT BUFFER POP B ;RESTORE COUNT ORA A JNZ BADRD ;CANNOT ENCOUNTER END-OF FILE DCR C ;CONT DOWN JNZ PRERD ;*!*$*'*'*3F#~!uw<#C! ~#fo~~#fo~22!"MD!u"!t^#V~"#^#V#""*MD*N:ʮñ! ͧ 0**+}*^#V~#N#F#"i`""*#:=*#"MD!u:"2Ð1!85~2p:] ~\0 < """"UUUU 0 00 0 $B$B~$~$8DD8$$ >"">""**>"">">>>>>".&."> >><0($ >Ti|NNNNNNNNNNNNNNNN INNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN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RLCRRCRSTSBBSBISETSHLSHRSTASTCSUBSUIXORXRAXRICALLENDMLDAXLHLDPCHLPUSHSHLDSPHLSTAXXCHGXTHLENDIFMACROTITLE  PF FP! ( 2/NNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNĽ y0G G t :):,.>C :|: Jü;r :R: ʼʋ!ʼR!ʼʋ>SR{ozg!~4ʧͦ !6 ! **̈́**̈́\iͩ !w#H USE FACTOR !* "z{*"* "I !" :1 R O*UR X* G:xl :  *̩ : l x͖ *#"EH DH 0:~ ! ^4! w͆ Æ *! 6z͖ {͖ 4>R>V>D >P >L >NdNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN3։(z̐nNNNNNNNNNNNNNNNNNNNNNN; ; ; ; A L P H A N U M E R I C T E R M I N A L E M U L A T I O N ; ; implemented for the Quark runing CP/M 2.23r01 ; version equ 22 ;cpm version 2.2 iversion equ 41 ;internal version 3r01 ; false equ 0 true equ 0ffffh ; valpha equ TRUE ;flag graphics/ alphanumeric video alphterm equ valpha ; grph8x8 equ false ;graphics mode 8 by 8 character font (vs 7x8) ; memnage equ false ;is memory management routine available(not for 64 k) banked equ memnage ; bellon equ true ;want toNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN; ;graphics video display memory starts gvdm50 equ vidend-7800h ;;start addr of vdm for 50hz gvdm60 equ vidend-6000h ;;for 60hz ; ;alpha video display memory starts vdm50 equ vidend-1400h ;;top of video display memory address - 50 hz vdm60 equ vidend-1000h ;; for 60 hz ; vout equ vidparm ;front/bank end of voutsz equ 0400h ;terminal emulator size(maximum) indvout equ vidparm-voutsz ;system independent portion of vout ; ;number of lines on each of 3 screens - installable ; vdpline equ -1?BNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN ring the bell when ascii '07h' is received ; clk50 equ 50 ;;50 ticks per second - 50 hz clk60 equ 60 ;;60 ticks per second - 60 hz ; ;I/O ports ; pprport equ 05fh ;;parallel printer port viaport equ 60h ;;VIA-6522 base address-16 ports piaport equ 74h ;;PIA-6821 base address-4 addresses aciaport equ 78h ;;ACIA-6850 base address- 2 addresses ; piadra equ 74h ;;pia data reg A or pia data direction cntl reg piacra equ 75h ;;peripheral interface adapter control reg A piapb equ 76h blpNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN! + 1 ;|008| ;;number of lines on the screen minus 1 vnmline equ -1 + 27 ;|009| ;;number of lines on the screen minus 1 vstline equ -1 + 2 ;|010| ;;number of lines on the screen minus 1 refline equ vdpline+vnmline+vstline+3 ;;total number of lines cY. ; numcol equ 80 ;number of columns displayed ; blcycle equ 000100 ;number of cycles for bell to produce blhigh equ 000020 ;number of loops for high portion of cycle bllow equ 000020 ;number of loops for low portion of cycle ; ;* * NNNNNNNNNNNNNNNN!2NNNNNNNNNNNNNNNNNNNNNNport equ viaport ;;on PB0 of 6522-initialization code change if modifying this ; blbit equ 000001 ;bell mask ; ;* * * * * * * * * * ; ; absolute(fixed) origin of variables/routines in common memory ; these are the addresses we want the code to run at when system is up ; vidparm equ 0ea80h ;terminal emulator variables, and stack mvfix equ vidparm+100h ;start location of memory managment module ; ;* * * * * * * * * * ; ;linkage to memory management routines ; ;bank/move routne jump table e pNNNNNNNNNNNNNNNNNtaNNNNNNNNNNNNNNNNNNNNNN* * * * * * * * ; ;graphics terminal emulator equates ; if not alphterm table equ 2000h ;;address of character table endif ; ; note col$off must be 0 if 8x8 cells are used ; if (not alphterm) and (not grph8x8) col$off equ 00000 ;|013| ;;column offset for graphics screen endif if (not alphterm) and grph8x8 col$off equ 0 ;;column offset is null if using 8x8 chars endif ; if not alphterm ; ; NOTE chrhite=8 and 96 byte/line ; line3 equ vstline+1 tscrn3 equ vidend+16-(96*8*lineaNNNNNNNNNNNNNNNNGPNNNNNNNNNNNNNNNNNNNNNNntry points - absolute address ; Ymove equ mvfix ;entry point for move routine Yxmove equ mvfix+3h ;; xmove Ybank equ mvfix+06h ;; bank ;;for coldboot(for both the loader and bios) bankinit equ mvfix+09h ;; bank init ivdmbank equ mvfix+0ch ;; vdm init ;;for interrupt servicing svdmbank equ mvfix+0fh ;; select vdm bank from non mapped stpabank equ mvfix+12h ;; select tpa bank from non mapped ;;for terminal emulator servicing sinvdm equ mvfix+15h ;; select vdm bank from anywhere soutvdm equ pNNNNNNNNNNNNNNNNNWnNNNNNNNNNNNNNNNNNNNNN!3) ;;top line of status screen ; line2 equ vnmline+1 tscrn2 equ tscrn3-(96*8*line2) ;;top line of main screen. ; line1 equ vdpline+1 tscrn1 equ tscrn2-(96*8*line1) ; totline equ line1+line2+line3 ;;make sure this is not bigger ;;than what it should be ;;ie max 30 for 60hz, and max 38 for 50hz linewid equ 80 ;;number of characters/line byteline equ 80 ;;number of bytes per line (displayed) ; ;; from beginning of used screen lineleng equ 96 ;;number of bytes per line totSBNNNNNNNNNNNNNNNN d_NNNNNNNNNNNNNNNNNNNNNNmvfix+18h ;; restore original bank after sinvdm ; ;abosolute address in move/bank routines ; top16k equ mvfix+1bh ;;accessing hidden memory hz equ mvfix+1ch ;;clock pulse( value 50/60 for 50/60 hz) memsize equ mvfix+1dh ;;0 - 128k, 1 - 256k bnkinrp equ mvfix+1eh ;;ei/nop, ret curbnk equ mvfix+20h ;; = @cbnk banktab equ mvfix+21h ;;address of the bank select table used by ; ;; the bank routine ;* * * * * * * * * * ; ;terminal emulator equates ; vidend equ 0000h ;end of video memory 2f\NNNNNNNNNNNNNNNN 1 NNNNNNNNNNNNNNNNNNNNNNal chrhite equ 8 ;;character height in scan lines endif ; ;* * * * * * * * * * ; ;Video control character definitions ; null equ 0 ;;null character EOT EQU 4 LF EQU 0AH ;;LINE FEED VT EQU 0BH ;;VERTICAL TAB (HOME-UP AND CLEAR) CR EQU 0DH ;;CARRIAGE RETURN FF EQU 0CH ;;FORM FEED DEL EQU 7FH ;;DELETE BLANK EQU 20H ;;space chBELL EQU 07H ;;BELL CHARACTER BELL equ chbell CHLEFT EQU 08H ;;CURSOR LEFT CHARACTER CHUP EQU 0BH ;;CURSOR UP CHARACTER CHRIGHT EQU 0CH ;;CURSOR RIGHT CgNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN3׉)z̐oBNNNNNNNNNNNNNNNNNNNNNNHARACTER CHHOME EQU 1EH ;;CURSOR HOME CHARACTER CHCLEAR EQU 1AH ;;CURSOR HOME AND CLEAR SCREEN CHARACTER CHESC EQU 1BH ;;ESCAPE LEAD IN CHARACTER chlead equ chesc ;;leadin character CHADDR EQU 3DH ;;CURSOR ADDRESS CHARACTER (AFTER LEADIN OF CHESC) chhighf equ 19h ;;highlite off toggle chrevoff equ chhighf ;;see above chhighn equ 1fh ;;highlite on character chrevon equ chhighn ;;see above chceol equ 15h ;;clear end of line(after leadin of chesc) CINSLINE EQU 13H ;;INSERT LINE - AFTER LEADpNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN!vdisp0ex ; ; which could be just return or pop ; ; ..fall thru VDISP0EX: LXI H,VDISP0 ;NEXT ROUTINE TO BE EXECUTED IS THE "0 CHARACTERS BEFORE" ROUTINE ; ; IE WHEN NEXT CHARACTER HAS INDEPENDENT MEANING ; VDISPEX: ;ENTRY FOR OTHER ROUTINES-common exit for all routines SHLD VDISPADDR ;STORE ADDRESS FOR VDISP ROUTINE call vcuron ret ; ; VDISP1EX: pop d ;get rid of extra return address LXI H,VDISP1 ;NEXT ROUTINE TO BE EXECUTED IS THE "1 CHARACTERS BEFORE" ROUTINE ;jr vdispeNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNIN CDELLINE EQU 14H ;;DELETE LINE - AFTER LEADIN CCEOP EQU 16H ;;CLEAR TO END OF PAGE - AFTER LEADIN choff equ 12h ;;cursor off chon equ 11h ;;cursor on cstat EQU 17H ;;GO INTO status screen mode (bottom) MODE - AFTER LEADIN cnorm EQU 18H ;;GO INTO normal display mode -AFTER LEADIN cdisp equ 1dh ;;go into display (top line) mode-after leadin ; chldterm equ 01h ;;load character thru terminal 8 data bytes ; ;; followed by which character to load cmode equ 'm' ;;set write mode - NOT USED $NNNNNNNNNNNNNNNNNNdNNNNNNNNNNNNNNNNNNNNNNx db 018h,0ffh and vdispex-$-1 ; ; ; ;ROUTINE VDPCHL ; ; This routine branches to the routine whose address is contained in the table VADDRTAB ; with the index contained in the BC register. ; VDPCHL: LDA VNOCHECK ;CHECK FOR CONTROL CODE IGNORE - STILL NEED NOCHECK ENTRY TO TURN OFF ORA A MOV A,c ;preload index to a register ;jrz vdpchl0 ;jump if normal db 028h,0ffh and vdpchl0-$-1 ; ; THIS SECTION WILL ONLY ALLOW FUNCTION CONTROL CODE TOGGLE TO OCCUR ; - VDISP0/VDISP1 ARE RE|NNNNNNNNNNNNNNNNWNNNNNNNNNNNNNNNNNNNNNNcpix equ 'p' ;;pixel on/off/xor - NOT USED if alphterm vnumspec equ 29 ;;number of terminal control code sequences endif ; the termina emulator recongnizes if not alphterm vnumspec equ 30 endif vnumtab equ 35 ;;total number of entries in 'vdtab', some ; ;; of which are not checked ; org indvout ; ;bank independent portion of terminal emulator ; ; This program is the main driver for the video CRT driver. The routine ;VDISP or routines called by VDISP are responsible for turn theݽNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNSPONSIBLE FOR PLACING CHARACTERS ON SCREEN CPI VNOCHENTRY ;CF ABOVE COMMENT JNZ Vputchar ;in graphics mode?? ; ;FALL THRU TO GET TO ROUTINE VDPCHL0: ; CHECK ENTRY FOR VALID - IN TABLE CPI VNUMSPEC ;NUMBER OF ENTRIES rNC ;ENTRY IS BASED 0-error-back to vdisp0ex ; LXI D,VADDRTAB ; ; entry below was never used ;VDPCHL1: ;ENTRY FOR "NORMAL" GOTO ROUTINE MOV L,A MVI H,0 DAD H ;DOUBLE INDEX (WORD ADDRESSING) DAD D ;ADD IN THE ADDRESS MOV E,M ; LOAD ADDRESS INX H MOV D,M l^aNNNNNNNNNNNNNNNN1NNNNNNNNNNNNNNNNNNNNNN cursor back on. ; NOTE: it should be possible to incorporate this routine into VDISP. ; start: onlyonce: jmp terminit ;terminit will move code from onlyonce+3 to ;endonlyonce up 3 bytes, thereby nullify ; ;the call to itself when this routine is called ; ;next time around. execution after terminit ;is returned to onlyonce call vcuroff ;turn the present cursor off lxi d,vdisp0ex ;set up dummy return address for most routines push d LHLD VDISPADDR ;GET ADDRESS OF ROUTINE ;WH^(NNNNNNNNNNNNNNNNNN!NNNNNNNNNNNNNNNNNNNNNNhld vmemadd ;preload hl=>de with vmemadd XCHG PCHL ;BRANCH TO ROUTINE ; ; ;ROUTINE VDISP0 ; ; This routine is invoked when any character is input which does not rely on previous ;data to determine what action should be taken (see the comments contained in VDISP). Characters ;are scanned for a match in the vdtab in the first byte location. IE the the table contains ;a two byte sequence for each entry. The first byte represents the leadin character of the two ;byte sequence if the second by&9NNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNICH SHOULD BE INVOKED AT THIS POINT ; ;NOTE:**** must have C register = character PCHL ; nop ;leave some space for possible patch/expansion nop nop nop nop nop nop endonlyonce equ $ ; ; The next section is the exit section to be executed when the next ;character is not to be used in conjunction with the previous character ;input. It is also the initial condition for termdrv routine. ; retnull: ;null return from dispatch tables pop d ;get rid of extra return address to 9aNNNNNNNNNNNNNNNN GNNNNNNNNNNNNNNNNNNNNNNte is not 0FFH. If the second byte is 0FFH the first byte does not ;indicate a leadin, but the actual character. IE in the original configuration a 07H is a bell ;character by itself (does not require a two character sequence). ; If the second byte is 0FFH the routine contained in same entry position in the table ;"VADDRTAB" is effectively called. If the second byte is non-0FFH the first byte is stored ;for routine VDISP1 and VDISPADDR is set to point to VDISP0. ; If character is not found in `.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN1ԉ%vȐjONNNNNNNNNNNNNNNNNNNNNNthe first byte column of VADDRTAB the routine called simply ;places the character on the screen. This includes characters lower than 20H and higher than ;7FH although normal program execution should not do this. The character generator has character ;representations for all characters. ; A third table "VSPECTAB" is used by the routine VDISPATCH VDISP0 and VDISP1 which specifies ;special actions to be taken before the actual handler is invoked. Such as mapping instructions ;to VMAP and the speciazyNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN address of next character if have not changed lines db 20h,0ffh and vcuraex-$-1 ; shld vmemadd ;now check for have to scroll xchg lhld vmemend ora a ;reset carry ;dsbc d db 0edh,D*8+42h ;jrz vcurascroll db 28h,0ffh and vcurascroll-$-1 ; lxi h,48 ;put into first column on next line dad d ;jr vcuraex db 18h,0ffh and vcuraex-$-1 ; vcurascroll: xchg ;get end of screen back lxi d,-80 ;put in column 0 of last line dad d shld vmemadd jmp vscroll ; vcuraex: shld vmema;NNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNNNNN!l for the routine to do ignore special routines- as this routine may not be ;ignored. ; The cursor is turned on only by VDISP. These routines set up VXYPOS for this routine. ; VDISP0: LDA VREGBC ;GET CHARACTER WHICH HAS BEEN INPUT ; ; ADDING CODE FOR FASTER CHECK OF NORMAL (NON CONTROL CHARACTERS) ; NOTE:MULTIPLE LEADIN AVAILABLE IF ALL BUT ONE LESS THAN 20H ; LXI H,VLEADIN CMP M JZ VDISP03 CPI BLANK ;jrnc vputchar ;output character if greater than space ; ;check for nulls-skip npNNNNNNNNNNNNNNNNNYNNNNNNNNNNNNNNNNNNNNN!dd ret ; ; ;ROUTINE VDISP1 ; ; This routine is invoked when any character is input which relies on previous ;data to determine what action should be taken (see the comments contained in VDISP). Characters ;are scanned for a match in the vdtab in the second byte location. IE the the table contains ;a two byte sequence for each entry. The first byte represents the leadin character of the two ;byte sequence if the second byte is not 0FFH. If the second byte is 0FFH the first byte does not ;indiNNNNNNNNNNNNNNNNhNNNNNNNNNNNNNNNNNNNNNNulls db 30h,0ffh and vputchar-$-1 ana a rz ;back to vdisp0ex ; VDISP03: STA VDISPSAV ;store for vdisp1, leadin check LXI H,vdtab ;LOAD ADDRESS OF vdtab INTO HL FOR VSEARCH CALL VSEARCH ;jrnz vputchar ;junp if no match, just put character on the screen db 20h,0ffh and vputchar-$-1 ; ; THIS SECTION HAS NOW RECOGNIZED THE BEGINNIN OF A SPECIAL CONTROL SEQUENCE lxi d,vnumtab-1 ;POINT TO SECOND BYTE OF EXPECTED SEQUENCE dad d MOV A,M ; GET SECOND CHARACTER INR A ; TESTING FOR 0FFH BNNNNNNNNNNNNNNNN;NNNNNNNNNNNNNNNNNNNNN!cate a leadin, but the actual character. IE in the original configuration a 07H is a bell ;character by itself (does not require a two character sequence). ; If the second byte is matched in the vdtab in the second byte location, and the first byte ;for that entry matched, matches the character saved by VDISP0 the routine contained in same entry ;position in the table "VADDRTAB" is effectively called. If the second byte does not match any 2nd ;byte in vdtab or the two character does not match, thenlBNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNN=> SINGLE CHARACTER SEQUENCE ;jrz vdpchl ;goto routine found by vsearch-single byte db 28h,0ffh and vdpchl-$-1 ;jr vdisp1ex ;set up vdisp (dispatch routine) to goto vdisp1 db 18h,0ffh and vdisp1ex-$-1 ; ;PUT CHARACTER ONTO THE SCREEN ; This section is used to place the character contained in VREGBC (C register part) at the ;screen location contained in VXYPOS. ; VPUTCHAR: ; LDA VREVFLAG ;SECTION DOES REVERSE VIDEO ENTRY MOV B,A LDA VREGBC ;GET CHARACTER TO BE PLACED ORA B ;PUT INgJgNNNNNNNNNNNNNNNNN4NNNNNNNNNNNNNNNNNNNNNN no action is taken and both characters ;are ignored and VDISPADDR is set back to VDISP0. ; A third table "VSPECTAB" is used by the routine VDISPATCH VDISP0 and VDISP1 which specifies ;special actions to be taken before the actual handler is invoked. Such as mapping instructions ;to VMAP and the special for the routine to do ignore special routines- as this routine may not be ;ignored. ; VDISP1: LDA VREGBC ;GET CHARACTER WHICH HAS BEEN INPUT LXI H,vdtab2 ;LOAD ADDRESS OF vdtab OFFSET TO SECOmBNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN! REVERSE VIDEO BIT lhld vmemadd MOV M,A ; ; This section is responsible for advancing the cursor position(VXYPOS). When the end ;of a line is reached the advance causes the cursor to move to the first column of the ;next line. If the next line is off the screen, the scroll routine is called. The ;routine is also responsible for storing the HL register pair into VXYPOS. ; VCURADVA: lhld vmemadd ;GET PRESENT CURSOR POSITION inx h ;to new position mvi a,7fh ana l ;jrnz vcuraex ;storeNNNNNNNNNNNNNNNN VNNNNNNNNNNNNNNNNNNNNNNND CHARACTER INTO HL FOR VSEARCH CALL VSEARCH ; VDISP1A: ;ENTRY FOR RETRY FOR DOUBLE MATCH ;jrnz vputchar ;junp to abort exit - no match when there should have been-just display character db 20h,0ffh and vputchar-$-1 ; lxi d,-(vnumtab+1) ;POINT TO LEADIN CHARACTER OF TWO CHARACTER SEQUENCE push h dad d LDA VDISPSAV ;GET CHARACTER FROM BEFORE CMP M ;WAS IT THE SAME pop h JZ VDPCHL ;NOW HAVE DISPATCHABLE ROUTINE TO EXECUTE (COULD BRANCH STRAIGHT THERE) ; CALL VSEARL1 ;CONTINUE SE NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN2Չ'yːm 9NNNNNNNNNNNNNNNNNNNNNNARCH ;jr vdisp1a ;go back and continue as if no previous match was found db 18h,0ffh and vdisp1a-$-1 ; ; ; ;ROUTINE VDISPX ; ; This routine is invoked when a character is input which is to be interpretted as the ;X-coordinate of the cursor addressing. Ordering is taken care of by ; VDISPX: lda vregbc ;get parameter lxi h,vxposoff ;subtract offset sub m ; so it is 0-origin ani 7fh ;just in case mov b,a mvi a,numcol-1 ;ie 80 column has numcol=80 cmp b ;jrnc vdispxsk db 30haNNNNNNNNNNNNNNNN lKNNNNNNNNNNNNNNNNNNNNN! ;HL now has proer offset for screen xchg lhld vmembase dad d mov a,m ANI 7FH ;SAVE FOR RETURN ROUTINES STA VREGPSW+1 ;STORE IN A REGISTER RETURN ; ; The next section is the exit section to be executed when the next character input ;is the Y-coordiate. This is dependent on the value in VXYROW. If the value is 0 the X-coordinate ;is the next character input after the two character leadin. If the value is non-zero, the ;Y-coordinate is the character after the two character leadin. IE NNNNNNNNNNNNNNNNN _zNNNNNNNNNNNNNNNNNNNNNN,0ffh and vdispxsk-$-1 mov b,a ;force to bottom line if was out of bounds vdispxsk: lhld vmemadd ;get current position mvi a,30h ;around the hole add b mov b,a mov a,l ani 80h ;top bit is part of row, not column so we preserve it ora b ;bring in the column mov l,a mov a,m ;pick up character at that location and return it to calling routine ani 7fh ;strip off reverse video bit sta vregpsw+1 ; ; The next section is the exit section to be executed when the next character inpNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN!this routine this routine ;will be exit code for the routine VDISP1 if the cursor addressing is done row, then column. ;It will be the exit code for VDISPX if the cursor addressing is done column, then row. ; shld vmemadd LDA VXYROW ;CHECK FOR RETURN CODE-HAS CURSOR ADDRESSING BEEN COMPLETED ORA A rz ;FINISHED CURSOR ADDRESSING - VOUT PLACES CURSOR pop d ;get rid of return to vdisp0ex LXI H,VDISPX JMP VDISPEX ;WAITING FOR THE X-COORDINATE ; ; ; ; ;ROUTINE VSEARCH ; ; This routs|NNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNput ;is the X-coordiate. This is dependent on the value in VXYROW. If the value is 0 the X-coordinate ;is the next character input after the two character leadin. If the value is non-zero, the ;Y-coordinate is the character after the two character leadin. IE this routine this routine ;will be exit code for the routine VDISP1 if the cursor addressing is done column, then row. ;It will be the exit code for VDISPY if the cursor addressing is done row, then column. ; shld vmemadd LDA VXYROW ;CHECHpNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNine is used by VDISP to search the DISPATCH table for matches with the ;character contained in the C register (this may be obtained by direct loading of ;the save locations used by VRESSTAT).The beginning of the table address is contained ;in the HL register pair. The table consists of two bytes per entry of which only ;one entry is looked at depending on whether or not the character being searched for is the ;first character of a sequence or the second. The decision of which character to look at ispNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNK FOR RETURN CODE-HAS CURSOR ADDRESSING BEEN COMPLETED ORA A rnz ;FINISHED CURSOR ADDRESSING - VOUT PLACES CURSOR pop d ;get rid of return to vdisp0ex LXI H,VDISPY JMP VDISPEX ;WAITING FOR THE Y-COORDINATE ; ;ROUTINE VDISPY ; ; This routine is invoked when a character is input which is to be interpretted as the ;Y-coordinate of the cursor addressing. Ordering is taken care of by ; VDISPY: lda vregbc ;get zero based index value lxi h,vyposoff sub m ; ; CHECK FOR 0-number of )eNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN! ;done by loading the dispatch address with different values. Note that the multi-sequence ;for cursor addressing is done in the same way. ; The table is terminated by a 0 entry (last word in the table is zero). The B register ;on return contains the entry number into the table origin 0. The maximum table length is ;255. ; When no match is found the zero flag is reset. ; VSEARCH: lxi b,vnumspec ;table length....??????check resulting number vsearl1: ;ccir db 0edh,0b1h RET ; ; ; ;RrBNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNlines ON A REGISTER- OR COULD GO NUTS ;ANI 1FH ;SO CHECK WILL NOT FAIL ON NEGATIVE NUMBERS ani 3fh ;bug fix - Aug 31/83 mov b,a ;save lda vnumlines cmp b ;jrnc vdispy1 db 30h,0ffh and vdispy1-$-1 mov b,a ; VDISPY1: lhld vmemadd ;generate offst from base of VDM mov a,l ani 7fh mov l,a ;slar l ;shift in the line(row) number ; bottom bit of line to msb of L register db 0cbh,20h+L ;srlr b ;upper 4 bits (1-4) in register B db 0cbh,38h+B ;rarr l db 0cbh,18h+L mov h,b pNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNOUTINE RCLESCRN ; ; This routine is part of the DISP routines called thru the dispatcher. It clears the screen and ;causes the cursor to move to the HOME position (0,0) ; RCLESCRN: lhld vmembase ;address of first line-includes 48 byte hole lxi d,48 ;want to ignore the hole dad d shld vmemadd ;jr vceos db 18h,0ffh and vceos-$-1 ; ;ROUTINE RCLEOL ; ; This routine performs the setup for CLEAR TO END OF LINE from present cursor position ; RCLEOL: xchg ;get vmemadd into hl jmp vceoEaNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN1Չ'yːn NNNNNNNNNNNNNNNNNNNNNNl ;goto and clear the rest of the line ; ;ROUTINE RCLEOP ; ; This routine clears the screen from the current cursor position to the end of the screen ;including the cursor position ; RCLEOP: xchg ;get vxypos into hl ; ;ROUTINE VCEOS ; ; This routine clears from the memory address passed in the HL register to the end of the screen. ; VCEOS: mvi a,80h ana l mov e,a mov d,h xchg ;save hl lxi b,48 ;start at beginning of line dad b xchg ;de now has beginning of current lineWrNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNthe cursor right. Will not go past the last ;column (in 64/128 [80/96]modes) ; RCURRI: xchg ;vmemadd to hl mov a,l ani 7fh cpi 7fh ;check for last column rz inr l ;jr rcurex db 18h,0ffh and rcurex-$-1 ; ; ; ;ROUTINE RDELLINE ; ; This routine will delete the line that the cursor is on, scrolls the screen upwards from that ;line and blanks the bottom line. The cursor will remain in the same spot. If the cursor is on the ;bottom line that line will be blanked and no scroll occurs (aNNNNNNNNNNNNNNNN ĦNNNNNNNNNNNNNNNNNNNNNN vceos1: push d call vceol pop h lxi d,128 ;moving down to next line dad d push h mov a,l ;check against exact match, we are in column 0 ani 80h ;note: this instruction also resets the carry flag mov l,a ;lded vmemend db 0edh,5bh dw vmemend ;dsbc d db 0edh,d*8+42h pop d mov h,d mov l,e ;jrnz vceos1 db 020h,0ffh and vceos1-$-1 ret ; ; ; ;ROUTINE RCURLEFT ; ; This routine performs the cursor left code. No execution if on first column of line. ; RCURLEFT: mov nHNNNNNNNNNNNNNNNNN ]1NNNNNNNNNNNNNNNNNNNNNNproperty of VSCROLLENTRY). ; RDELLINE: mov a,e ani 80h ori 30h ;beginning of line mov e,a lxi h,128 dad d jmp vscrollentry ; ;ROUTINE RINSLINE ; ; This routine will insert a blank line that the cursor is on after the lines are moved down. The ;bottom line is lost. The cursor does not move. If the line to be inserted was the bottom line, no ;lines are moved - the bottom line is just blanked. ; RINSLINE: ; ;MOVE LINES DOWN xchg dad h ;getting row number mov a,h ani 3fh NNNNNNNNNNNNNNNN nNNNNNNNNNNNNNNNNNNNNNNa,e ani 7fh cpi 30h ;column zero check rz mov h,d dcr e mov l,e ;jr rcurex db 18h,0ffh and rcurex-$-1 ; ;ROUTINE RCURHOME ; ; This routine sets the cursor home. ; RCURHOME: lxi d,30h lhld vmembase dad d ;jr rcurex db 18h,0ffh and rcurex-$-1 ; ;ROUTINE RCURDOWN ; ; This routine performs the code required to do the cursor down. If the cursor is on the bottom line ;the screen scrolls up one line and the cursor does not move off the bottom line. ; RCURDOWN: lxi h,128 dgNNNNNNNNNNNNNNNNN ;SNNNNNNNNNNNNNNNNNNNNNNmov b,a ;B register has current line number+offset lhld vmemend lxi d,-80 dad d ;gives us column 0 of last line mov d,h ;save last line address into de register mov e,l dad h ;getting last row number+offset mov a,h ani 3fh sub b ;number of lines to move ;jrz rinsll2 db 28h,0ffh and rinsll2-$-1 ; rinsll1: push psw ;save lines to move lxi h,-128 ;generate destination line address dad d push h call vmov pop d ;new destination was old source line pop psw ;counter aNNNNNNNNNNNNNNNN bNNNNNNNNNNNNNNNNNNNNNNad d push h ;hl has new address, check if past end of screen mov a,l ;check for past end of screen, next line past screen ani 80h ; by equal end mov l,a ;lded vmemend db 0edh,5bh dw vmemend ora a ;note that carry flag is reset ;dsbc d db 0edh,d*8+42h pop h jz vscroll ;do not fall thru-cursor position is the same RCUREX: SHLD vmemadd ret ;back to vdisp0ex ; ;ROUTINE RCURCR ; ; This routine performs the code for the cursor carraige return ; RCURCR: xchg mov a,l an0,gNNNNNNNNNNNNNNNNN \NNNNNNNNNNNNNNNNNNNNNNdcr a ;jrnz rinsll1 db 020h,0ffh and rinsll1-$-1 rinsll2: lhld vmemadd ;clear present line mov a,l ani 80h ori 30h mov l,a jmp vceol ; rmoddisp: ; lhld vdispend xchg lhld vdispbase lda vdispline ; ;jr vmod db 18h,0ffh and vmod-$-1 ; rmodnorm: ; lhld vnormend xchg lhld vnormbase ; lda vnormline ; ;jr vmod db 18h,0ffh and vmod-$-1 ; rmodstat: ; lhld vstatend xchg lhld vstatbase lda vstatline vmod: shld vmembase xchg shld vmemend sta vnumlinesNNNNNNNNNNNNNNNN +mNNNNNNNNNNNNNNNNNNNNNNi 80h ori 30h mov l,a ;jr rcurex db 18h,0ffh and rcurex-$-1 ; ;ROUTINE RCURUP ; ; This routine performs the code required for cursor up. Does nothing if on top line. ; RCURUP: lxi h,-128 dad d ;lded vmembase ;check to see if on the top line db 0edh,5bh dw vmembase ora a push h ;save the new address... it is required later ;dsbc d db 0edh,D*8+42h pop h rc ;would have put it off screen ;jr rcurex db 18h,0ffh and rcurex-$-1 ; ;ROUTINE RCURRI ; ; This routine performs 4NNNNNNNNNNNNNNNN ~>NNNNNNNNNNNNNNNNNNNNNN lxi h,48 ;generate new cursor position dad d ; at home for that screen shld vmemadd ret ; ; ;ROUTINE RREVON ; ; This routine turns the reverse video on. Note - only affects character output ;-not control codes although the cursor will be reversed on reverse video fields ; RREVON: MVI A,80H RREVEX: ;EXIT POINT FOR REVERSE VIDEO OFF/ON STA VREVFLAG ret ; ;ROUTINE RREVOFF ; ; This routine turns the reverse video off. See note on RREVON routine ; RREVOFF: XRA A sta vrevflagdNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN3։'yːo pNNNNNNNNNNNNNNNNNNNNN! ret ; ;ROUTINE RCURADD ; ; This routine is responsible for setting up the parameters for cursor addressing. ; RCURADD: ; LDA VXYROW ;CHECKING FOR ORDER ORA A LXI H,VDISPY ;PRESET pop d ;dont want to go to vdisp0ex JNZ vdispex ; JUMP IF Y (LINE) FIRST BEFORE X (COLUMN) ; LXI H,VDISPX jmp vdispex ; setup x before y ; ; ;ROUTINE RBELL ; ; This routine causes the bell to beep by pulsing a bit on a port. ; RBELL: if bellon ; ; generate a tone-same as parallel keyboard inpwpNNNNNNNNNNNNNNNNN #NNNNNNNNNNNNNNNNNNNNNNt line of vdm.(0f020h or vidmbase+20h) ; ldhsloop: ;inp a db 0edh,78h dcr e ;jrz lddoneload db 28h,(lddoneload-$-1) and 0ffh ; ;finish count down to complete 96 char count ; inr c ;set to point to next data byte nop nop nop mvi a,20 ldcntdwn: dcr a jnz ldcntdwn ;jr ldhsloop db 18H,(ldhsloop-$-1) and 0ffh lddoneload: ;interupt restored on termdrv exit ret ; ; ;Routine RLDTERM ; This routine loads a character via the terminal driver. The ; escape sequence is sent follo?&NNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN!ut ; ; variables are not defined lhld belcycle ;number of cycles to beep rbell1: in blport ;turn the bell bit high ori blbit out blport ; lda belhigh rbell2: dcr a jnz rbell2 ; in blport ;turn the bit low ani (not blbit) and 0ffh out blport lda bellow rbell3: dcr a jnz rbell3 ; dcx h mov a,l ora h jnz rbell1 endif ret ;back to vdisp0ex ; ;ROUTINE rcuron ; This routine makes the cursor turn on ; rcuron: xra a rcursex: sta vpcur ret ;back to vNNNNNNNNNNNNNNNN +NNNNNNNNNNNNNNNNNNNNN!wed by eight data bytes and then the ; character number to be loaded. Data bytes format is as in RLDMEM ; Nine byes must be sent after the escape sequence rldterm: mvi a,9 ;nine bytes to be loaded sta rldcnt lhld vidmbase ;data area for loading shld ldptr ; save in pointer form lxi h,vrldmem ;set up next routine to be executed pop d ;get rid of extra return jmp vdispex ;jump to exit code ; ;Routine VRLDMEM ; This routine called repeatedly to store data bytes vrldmem: lda vregbc FNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNdisp0ex ; ;ROUTINE rcuroff ; This routine makes the cursor turn off ; rcuroff: xra a cma ;jr rcursex db 18h,0ffh and rcursex-$-1 ; ;ROUTINE rnochon ; This routine turns the control code interpretation off ; rnochon: xra a cma rnochex: sta vnocheck ret ;back to vdisp0ex ; ;ROUTINE rnochoff ; This routine turns the graphics mode off - NORMAL mode only control code ;acknowledged when in graphics mode. ; rnochoff: xra a ;jr rnochex db 18h,0ffh and rnochex-$-1 ; ; ; ;Ro/NNNNNNNNNNNNNNNN MNNNNNNNNNNNNNNNNNNNNNN;data byte to store lhld ldptr ;where data to be stored mov m,a inx h shld ldptr lda rldcnt ;check for last byte received dcr a jz vchload sta rldcnt pop d ;extra return address lxi h,vrldmem ;set up next character execute address-same jmp vdispex ; ; ;ROUTINE VSCROLL ; ; This routine scrolls the screen up one line. Any routine which calls this one is responsible ;for setting VXYPOS itself, HL contains address of source line for vscrollentry, DE the destination ; VSCROLL: UNNNNNNNNNNNNNNNN ~NNNNNNNNNNNNNNNNNNNNN!utine VCHLOAD ; This routine actually loads the character font from vidmbase ;Interrupts are disabled in portions of this routine for up to ;16.7 milliseconds ; vchload: lhld vidmbase ;load base of crt screen mov b,h mov c,l ;lxi h,8 ;load up which character ;dad b mov d,m ;character to be loaded lxi h,20h ;set up the 16 bytes scanned but not displayed dad b mvi a,16 ldcontmov: mov m,d inx h dcr a ;jrnz ldcontmov db 20h,(ldcontmov-$-1) and 0ffh ; inx b ;reg BC points sNNNNNNNNNNNNNNNNN nNNNNNNNNNNNNNNNNNNNNNNlhld vmembase lxi d,30h dad d xchg lxi h,128 dad d vscrollentry: push d push h ;slar l ;checking line numbers db 0cbh, 20h + L ;ralr h db 0cbh, 10h + H lda vmemend ;slar a db 0cbh, 20h + A lda vmemend+1 ;ralr a db 0cbh, 10h + A cmp h ;jrz vscroex db 028h,0ffh and vscroex-$-1 pop h push h call vmov pop h pop d lxi b,128 dad b xchg dad b xchg ;jr vscrollentry db 018h,0ffh and vscrollentry-$-1 vscroex: pop h pop h jmp vceol ; ; ;ROUTINE VCEO\~aNNNNNNNNNNNNNNNN ]NNNNNNNNNNNNNNNNNNNNNNto the 8 binary ;representation data bytes. di ;interrupt must be disabled due to timing ; ldvsloop: ; ;********************************************************** ; CODE STARTING FROM HERE MUST BE PRECISELY TIMED ; ;clear any pending IRQA interrupts ; in piaport ; ;wait for Vertical Sync interrupt cycle ; ldwaitinterrupt: in piaport+1 ana a ;look for IRAQA interrupt jp ldwaitinterrupt ;12 t states ; mvi e,8 ;We should be at the horizontal retrace at the start of the ;firsQaNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNL ; Routine takes as a parameter the memory address of the first character ;to be blanked in the HL register ;Blank first character - saves confusion ; VCEOL: lxi d,(blank shl 8) or 7fh ;blank and end condition vceol1: mov m,d inx h mov a,l ana e ;jrnz vceol1 db 20h,0ffh and vceol1-$-1 ret ; ;ROUTINE VMOV ; ; Routine to move lines from line whose address is in the HL regisiter to line whose ;address is contained in the DE register. ; VMOV: lxi b,80 ;line length ;ldir db 0eNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN3׉){͐p ]NNNNNNNNNNNNNNNNNNNNNNdh,0b0h ret ; ;ROUTINE VCUROFF ; This routine is responsible for turning the cursor off when VOUT2 is entered ;from location specified by VXYPOS. ; vcuroff: ; same as cursor on routine-flipping top bit ; ;ROUTINE VCURON ; This routine is responsible for turning the cursor on when VOUT2 is exited ;from location specified by VXYPOS. ;if vpcur set does nothing ; vcuron: lda vpcur ;do nothing flag ora a rnz ; ;entry for flipping top bit vcurton: lhld vmemadd mov a,m xri 80h moNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNN ; terminal driver is first called - can be overwritten after the driver ; received the first character(whatever it may be) ; terminit: push b push psw ; ;make sure terminit is only done once ;move codes immediately below up 3 bytes ; lxi b,endonlyonce-onlyonce-3 lxi h,onlyonce+3 lxi d,onlyonce ;ldir db 0edh,0b0h ; ;setup video display memory addresses ; lda hz cpi clk50 mvi a,clk50 ;50hz lxi h,vdm50 jz loadparm ; mvi a,clk60 ;60hz lxi h,vdm60 ; ;initialize vPNNNNNNNNNNNNNNNNN ?NNNNNNNNNNNNNNNNNNNNNNv m,a ret ; ;* * * * * * * * * * ; ; Video variables - not in common ; vidmbase dw 0 ;video memory address - setup at terminit time vclkfrq db 0 ;clock frequency ; VDISPADDR: DW VDISP0 ;ADDRESS of next DISPATCH ADDRESS VDISPSAV: DB 0 ;LEADIN CHARACTER SAVE (VDISP0) VNOCHECK: DB 0 ;NON-ZERO CONTROL CODES IGNORED VREVFLAG: DB 0 ;80H=>REVERSE VIDEO, 00H=>NORMAL VIDEO vpcur: db 0 ;non zero for not turning cursor on when exiting ; ; on entering or exiting from vout VADDRTAB: ;ENTRIES MUNNNNNNNNNNNNNNNN zNNNNNNNNNNNNNNNNNNNNNNideo display memory parameters ; loadparm: sta vclkfrq shld vidmbase ;init base of video display momory ; lxi h,vidend ;set up alpha screen parameters shld vstatend lda vstatline call vidset shld vstatbase shld vnormend lda vnormline call vidset shld vnormbase shld vdispend lda vdispline call vidset shld vdispbase call rmodnorm ;use video routine to set up parameters ; pop psw pop b ; jmp onlyonce ; vidset: ;utility to help set up alpha video parms inr a ;)}|NNNNNNNNNNNNNNNN INNNNNNNNNNNNNNNNNNNNNNATCHING vdtab FOR ADDRESS OF ROUTINE ; TO BE EXECUTED ON MATCH ; ;NOTE: this table must correspond to the vdtab- but in reverse order dw retnull ;pixel pick - not implemented in the alph mode dw retnull ;pixel mode overwrite - not implemented in the ; alph mode - only here to standardize alpha ; terminal driver with the graphics. cY. dw rrevoff ;reverse video off dw rrevon ;reverse video on dw retnull ;delete character-NOT implemented dw retnull ;insert character-NOTpNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNbase 1 rz ;zero lines mov b,a lxi d,80h ;line length vids1: ora a ;reset carry ;dsbc de db 0edh,52h ;djnz vids1 dcr b jnz vids1 ret ; ; ;* * * * * * * * * * ; org vidparm ; ;these locations must match the vout,use6,use7,use8,use9 equates in the bios ; jmp evout ;terminal emulator entry - banked portion ; dw usr6 ;addresses of user configurable tables dw usr7 ; used by some Megatel utilites dw usr8 dw usr9 usr6: VxPOSOFF: DB 0 ;;OFFSET FOR CURSOR ADDRESShNNNNNNNNNNNNNNNN /NNNNNNNNNNNNNNNNNNNNNN implemented dw rldterm ;load character via terminal vnochentry equ ($-vaddrtab)/2 dw rnochoff ;no check mode off (semi-graphics off) dw rnochon ;no check mode on (graphics on) dw rcuron ;cursor on dw rcuroff ;cursor off dw rbell ;bell dw rmoddisp ;display mode-top dw rmodnorm ;normal mode dw rmodstat ;status mode-bottom dw rrevoff ;reverse video off dw rrevon ;reverse video on dw rcurhome ;cursor home dw rcurleft ;cursor left (backspace) dw rcurri ;cursor right dw rњaNNNNNNNNNNNNNNNN ?NNNNNNNNNNNNNNNNNNNNNNING for x coordinate VyPOSOFF: DB 0 ;;OFFSET FOR CURSOR ADDRESSING for y coordinate VXYROW: DB 0 ;;ZERO=> X,Y (COLUMN,ROW) CURSOR ADDRESSING ORDER VLEADIN: DB 1BH ;;LEADIN CHARACTER - REQUIRED ONLY IF LEADIN GREATER EQUAL ; ;; 20H or multiple leadins-only 1 allowed < 20h usr7: belcycle: dw blcycle ;;number of cycles for bell to produce belhigh: db blhigh and 0ffh ;;number of loops for high portion of cycle bellow: db bllow and 0ffh ;;number of loops for low portion of cycle ; if alphteNNNNNNNNNNNNNNNN  NNNNNNNNNNNNNNNNNNNNN!curup ;cursor up dw rinsline ;insert line dw rdelline ;delete line dw rcleop ;clear to end of page dw rcleol ;clear to end of line dw rcuradd ;cursor address leadin dw rclescrn ;clear screen and home dw rcurcr ;carriage return dw rcurdown ;cursor down (line feed) ds 10h ; ;data storage ; rldcnt: ds 1 ;counter for number of data bytes still to load ldptr: ds 2 ; and where to load them-in video screen ; ; ;terminal driver initialization - this section is required only when thehNNNNNNNNNNNNNNNN YNNNNNNNNNNNNNNNNNNNNNNrm vmemadd: dw 0 ;;cursor position initialized to start of screen vmembase: dw 0 ;;base of screen line - 48 bytes before displayed screen vnumlines: db 0 ;;number of lines on the screen vmemend: dw 0 ;;last cursor position+1 vdispbase: dw 0 ;;base of screen line - 48 bytes before displayed screen vdispline: db vdpline and 0ffh ;;number of lines on the screen vdispend: dw 0 ;;last cursor position+1 vnormbase: dw 0 ;;base of screen line - 48 bytes before displayed screen vnormline: db vnmline and YaNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN2ԉ&wȐl NNNNNNNNNNNNNNNNNNNNNN0ffh ;;number of lines on the screen vnormend: dw 0 ;;last cursor position+1 vstatbase: dw 0 ;;base of screen line - 48 bytes before displayed screen vstatline: db vstline and 0ffh ;;number of lines on the screen vstatend: dw 0 ;;last cursor position+1 endif ; if not alphterm ; ; alpha terminal emulator running under hardware graphics mode ; curscrn: ; vtopcrt dw tscrn2 ;top left of usable crt votopcrt dw tscrn2+col$off ;top left of used crt screen lines db line2 and 0ffh nbr1 db ((l`pNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNsplay mode-top screen invoked DB 07H ;;BELL db 1bh ;;cursor off db 1bh ;;cursor on DB 1bh ;;NO CHECK MODE ENTRY on (graphics on) db 1bh ;;no check off (graphics off) db 1bh ;;character load - terminal db 1bh ;;delete character - NOT implemented db 1bh ;;insert character - NOT implemented DB 1BH ;;REVERSE VIDEO ON DB 1BH ;;REVERSE VIDEO OFF db 1bh ;;cmode-see above db 1bh ;;cpix pixel pick if alphterm db 0 endif if not alphterm db 1bh ;;full screen = statLBNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNine2-1)*(chrhite/2)) and 0ffh nbr2 db (line2*(chrhite/2)) and 0ffh nbr3 dw (line2-1)*chrhite*lineleng-lineleng nbr4 dw chrhite*line2 - 1 endcurscrn: ; bytomove dw endcurscrn-curscrn ;number of bytes to move ; statscrn: ;bottom screen dw tscrn3 dw tscrn3+col$off db line3 and 0ffh db ((line3-1)*(chrhite/2)) and 0ffh db (line3*(chrhite/2)) and 0ffh dw (line3-1)*chrhite*lineleng-lineleng dw chrhite*line3 - 1 ; normscrn: dw tscrn2 ;top left of usable crt dw >NNNNNNNNNNNNNNNN  NNNNNNNNNNNNNNNNNNNNNN+disp+norm screen endif db 0,0,0,0,0 ;expansion ; usr9: ; ; following section is the second byte of the control sequences, 0ffh=> no second character ; NOTE: vdtab2 must immediately follow vdtab vdtab2: DB 0ffh ;CURSOR DOWN (LINE FEED) DB 0FFH ;CARRIAGE RETURN DB 0FFH ;CLEAR SCREEN DB 3DH ;CURSOR ADDRESS LEADIN DB 15H ;CLEAR TO END OF LINE DB 16H ;CLEAR TO END OF PAGE DB 14H ;DELETE LINE DB 13H ;INSERT LINE DB 0FFH ;CURSOR UP DB 0FFH ;CURSOR RIGHT DB 0FFH ;CURSOR ONNNNNNNNNNNNNNNN ?-NNNNNNNNNNNNNNNNNNNNNNtscrn2+col$off ;top left of used crt screen db line2 and 0ffh db ((line2-1)*(chrhite/2)) and 0ffh db (line2*(chrhite/2)) and 0ffh dw (line2-1)*chrhite*lineleng-lineleng dw chrhite*line2 - 1 ; dispscrn: dw tscrn1 ;top left of usable crt dw tscrn1+col$off ;top left of used crt screen db line1 and 0ffh db ((line1-1)*(chrhite/2)) and 0ffh db (line1*(chrhite/2)) and 0ffh dw (line1-1)*chrhite*lineleng-lineleng dNNNNNNNNNNNNNNNN j~NNNNNNNNNNNNNNNNNNNNNNLEFT (BACKSPACE) DB 0FFH ;CURSOR HOME DB 1FH ;REVERSE VIDEO ON DB 19H ;REVERSE VIDEO OFF DB 17H ;status mode-bottom screen invoked DB 18H ;normal mode-main screen db 1dh ;display mode-top screen invoked DB 0FFH ;BELL db 12h ;cursor off db 11h ;cursor on DB 10h ;NO CHECK MODE ENTRY on (graphics on) db 09h ;no check off (graphics off) db 01h ;character load - terminal db 03h ;delete character - NOT implemented db 04h ;insert character - NOT implemented DB 1FH ;REVE3NNNNNNNNNNNNNNNN YONNNNNNNNNNNNNNNNNNNNNNw chrhite*line1 - 1 ; fullscrn: dw tscrn1 dw tscrn1+col$off db totline and 0ffh db ((totline-1)*(chrhite/2)) and 0ffh db (totline*chrhite/2) and 0ffh dw (totline-1)*chrhite*lineleng-lineleng dw chrhite*totline - 1 endif ; usr8: ; ;Note: the vdtab AND THE vdtab2 MUST BE CONSECUTIVE ; vdtab: ;; ENTRIES - FIRST IS LEADIN, NEXT IS CHARACTER ;; 0 ENTRY TERMINATES LIST (WORD OF 0'S) ;; 0FFH ENTRY IN SECOND BYTE INDICATES FIRST CHARACTER IS ;; FULL INSTRUCTION ;last ENTRY IR'NNNNNNNNNNNNNNNNN IqNNNNNNNNNNNNNNNNNNNNNNRSE VIDEO ON DB 19H ;REVERSE VIDEO OFF db cmode ;mode for pixel overwrite db cpix ;pixel if alphterm db 0 endif if not alphterm db 1ch ;full screen endif db 0,0,0,0,0 ;expansion ; ;stack and register saves ; ds 50 ;video stack vregbc ds 2 vregde ds 2 vregpsw ds 2 vregsp ds 2 vstack equ $ vreghl dw 0 ; ; 'front/back end of terminal emulator module' evout: ; SHLD VREghl ;save sp and registers LXI H,0 DAD SP LXI SP,VSTACK MOV A,C ;for CP/M 1.4 compatibilityNNNNNNNNNNNNNNNN z@NNNNNNNNNNNNNNNNNNNNNNS TERMINATOR DB 0AH ;;CURSOR DOWN (LINE FEED) DB 0DH ;;CARRIAGE RETURN DB 1AH ;;CLEAR SCREEN DB 1BH ;;CURSOR ADDRESS LEADIN DB 1BH ;;CLEAR TO END OF LINE DB 1BH ;;CLEAR TO END OF page DB 1BH ;;DELETE LINe DB 1BH ;;INSERT LINE DB 0BH ;;CURSOR UP DB 0CH ;;CURSOR RIGHT DB 08H ;;CURSOR LEFT (BACKSPACE) DB 1EH ;;CURSOR HOME DB 1BH ;;REVERSE VIDEO ON DB 1BH ;;REVERSE VIDEO OFF DB 1Bh ;;status mode-bottom screen invoked DB 1BH ;;normal mode-main screen db 1bh ;;di^|NNNNNNNNNNNNNNNN /NNNNNNNNNNNNNNNNNNNNN! - do not remove push h ;stack is in common in the banked system push psw PUSH D PUSH B ; if banked call sinvdm ;switch in vdm bank call indvout ;call terminal emulator call soutvdm ;switch out vdm bank, switch in original bank endif if not banked call indvout ;the system independent terminal emulator endif POP B POP D POP PSW POP H ;OLD STACK POINTER SPHL LHLD VREghl ;RESTORE HL REGISTER jmp bnkinrp ;restore interrupt and return ; orgbank db 0 ;save bankt NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN2ԉ&xʐlh5NNNNNNNNNNNNNNNNNNNNNN ; end ;switch in vdm bank call indvout ;call terminal emulator call soutvdm ;switch out vdm bank, switch in original bank endif if not banked call indvout ;the system independent terminal emulator endif POP B POP D POP PSW POP H ;OLD STACK POINTER SPHL LHLD VREghl ;RESTORE HL REGISTER jmp bnkinrp ;restore interrupt and return ; orgbank db 0 ;save bankBNNNNNNNNNNNNNNNN=fNNNNNNNNNNNNNNNNNNNNNNWhen generating a sysgen image(see sysgen documentation), the boot strap ;has to be located to memory address from 900h to 97fh, the ccp and bdos from ;980h to 1f7fh, the bios to 1f80h, the relocator to the end of the bios (end is ;determined by the size of bios), and the cold system initiallization section ;to the end of the bios + 128. Other components located after the init section ;are the standalong terminal emulator, the memory management routine ;and the character font data set. By configuriaNNNNNNNNNNNNNNNNWNNNNNNNNNNNNNNNNNNNNNN:H:H"!6!4:_jYO jM*"S*" 3@bl*M1͓!""7 *M^͆ \͔!":͎H*#"ͧÝ/ :>͛9ͯ .*#":_!' !'6!36' :1/!aE*#">z?C9IͲÁ.!6> !ڇ*&' ~2 ʀ: y.*M!4Q>!қ:=2á:2:Ҭ\>!ҿ:=2K:2K!:!:K\: \!p+q͈*ȠBNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN!ng(patching according to doc) ;the system generating program(qsysgen.com), we are able to construct all these ;components in desired order before writing to the system tracks. ; ;So, starting at track 0 sector 1, the disk will contain the boot strap, ;the code relocation module, the system initialization, the standalong ;terminal, the memory management routine, the operating system ;(ccp, bdos, bios), and finally the character font data set, all in this order. ; ; false equ 0 true equ 0ffffh f((BNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNDM!  ::=H-\:N2O_og_{ozg^#V))) _{ozg^#V) d^#V|g}o n_{ozgO{ozgi`N#Fogo&og H ©=¨' !'6!36' :1/!aE*#">z?C9IͲÁ.!6> !ڇ*&' ~2 ʀ: y.*M!4Q>!қ:=2á:2:Ҭ\>!ҿ:=2K:2K!:!:K\: \!p+q͈*JUNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNalsee equ false ;names used in filling a 6 byte parameter trueee equ true ; so there is no typo ; ;* * * * * * * * * * ; ;bootstraping system from disk - 128 bytes ; ;* * * * * * * * * * ; doubside equ not FALSE ;|014| double sided drive secttrack equ 17 ;|015| physical sector per track rate equ 00 ;|016| step rate secsize equ 512 ;|017| physical sector size ;where to read in the entire system. not counting sector 1 read in by the prom loadaddr equ 80h+secsize ;total si)pNNNNNNNNNNNNNNNNN“NNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNҭNNNNNNNNNNNNNNNNNNNNN!ze of code to be booted from the system tracks not counting sector 1 ;syssize=sizeof(system init + term driver + move + ccp + bdos + bios + chr.dat) syssize equ 5000h-secsize ;4 tracks for now; calculation based on ; 5-1/4", 10 spt, 512 byte per sector numsects equ (syssize+secsize-1)/secsize ;nmber of 'secsize' sectors ; ccp equ 0ac00h ;where to put ccp and bdos bios equ ccp+1600h ;where bios will be runing biossize equ 1c00h ;total size of the bios module bootfail equ 0ff00h ;branch tBNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNN; BOOT STRAP FOR THE QUARK 100 - CP/M 2.24 r01 ; ; ; -Copyright (c) 1980 ; Digital Research ; Box 579, Pacific Grove ; California, 93950 ; -Copyright (c) 1985 ; Megatel Computer Technologies ; 150 Turbine Drive ; Weston, Ontario ; M9L 2S2 ; ; ;July/85 - modified for the 64k board. ;April/85 - complete rework of the boot sector, system load, and system ; initialization. cY. ; ;Source contains a 128-byte boot strap, a 128-byte code relocator, and ;a 1K cold system initiallization. ; ;NNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNN!o boot prom error routines ; stepinre equ 48h or rate ;used to restore the drive..so will not miss track 0 sensor stepinc equ 5ch or rate ;used in stepin routine to get to the next track restore equ 8 or rate readcmnd equ 88h ;read command ; dskcmnd equ 80h ;diskcommand port dskstat equ 80h ;disk status port dskdata equ 83h ;disk data port sectreg equ 82h ;disk sector register dskselport equ 76h ;pia peripheral register b sidebits equ 10h ;bit mask to select sides dskintrq equ 77h NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN1ԉ&wɐlNNNNNNNNNNNNNNNNNNNNNN ;intrq is on cb1 of 6821 intrq equ 7h ;bit number for intrq on dskintrq port(above) intmask equ 80h ;mask for intrq ; stack equ 080h ;stack just above this program retries equ 10h ;number of retries ; org 80h ; lxi sp,stack mvi c,retries+1 retry: dcr c jz bootfail in dskselport ;reset to side 0 ori sidebits out dskselport lxi h,retry ;set up retry address on the stack push h mvi b,4 ;number of steps to take in before restore..do not overshoot track 0 restin: mvi hNNNNNNNNNNNNNNNNKNNNNNNNNNNNNNNNNNNNNNN* * * * * ; vers equ 000022 ;version 2.2 bios versp2 equ 041h ;internal version number ; clk50 equ 50 ;;50 ticks per second - 50 hz clk60 equ 60 ;;60 ticks per second - 60 hz ; pprport equ 05fh ;;parallel printer port viaport equ 60h ;;VIA-6522 base address-16 ports piaport equ 74h ;;PIA-6821 base address-4 addresses aciaport equ 78h ;;ACIA-6850 base address- 2 addresses ; nserdata equ aciaport+1 ;;data port for hardware serial channel nserstat equ aciaport ;;status port for hardware BNNNNNNNNNNNNNNNNxNNNNNNNNNNNNNNNNNNNNN!a,stepinre call wfintr dcr b ;jrnz restin db 020h,(restin-$-1) and 0ffh ; mvi a,restore ;restore drive to track 0 call wfintr ani 98h rnz ;try again ; ;exx ;put loadaddr and port number into other bank db 0d9h lxi h,loadaddr mvi c,dskdata ;exx db 0d9h lxi d,200h or numsects ;d=sector, e=number of sectors to load ; readsect: mov a,d out sectreg ; ;section is not be required for single sided disks in dskselport ; only for double sided with FD1797 ...MaTed ani sidaNNNNNNNNNNNNNNNNtNNNNNNNNNNNNNNNNNNNNNNserial channel txrdy equ 1 ;;bit one is the transmitter data register empty-1=>ready rxrdy equ 0 ;;bit zero is the receiver data register full-1=>data ready blbit equ 000001 ;low bit..see vout ; piadra equ 74h ;;pia data reg A or pia data direction cntl reg piacra equ 75h ;;peripheral interface adapter control reg A piapb equ 76h blport equ viaport ;;on PB0 of 6522-initialization code change if modifying this ; init1 equ 00017h ;;master reset,8 bits+1 stop,rts=high,xmit interrupt disabl+rNNNNNNNNNNNNNNNNENNNNNNNNNNNNNNNNNNNNNNebits ;see what side we are on mvi a,0 ;preset for even side-do not kill flags ;jrnz readsid0 db 020h,(readsid0-$-1) and 0ffh mvi a,2 ;side 1 readsid0: ori readcmnd call wfintr ani 9ch rnz ;to error retry if not good ; dcr e ;decrement number of sectors to load jz sysinit ;if all sectors loaded, go initialize system ; inr d ;sector number mvi a,secttrack cmp d ;jrnc readsect db 030h,(readsect-$-1) and 0ffh ; ;must move to the next track mvi d,1 ;reset sector if #NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNed init2 equ 00015h ;;divide 16,8 bits+1 stop,rts=high,xmit interrupt disabled ; softrate equ 7 ;|005|initial rate for software serial channel hardrate equ 14 ;|006|initial rate for hardware serial channel ; ;Note the following printer strobe equates are setup to accommodate different ;hardware board layout. There is a revision number underneath the Z80B chip ;(on the underside of the board). Board revision 1.0 to 4.0 are marked as ;REV 1.0, REV 2.0, REV 3.0, and REV 4.0. Revision 5.0jNNNNNNNNNNNNNNNN'NNNNNNNNNNNNNNNNNNNNNNdoubside in dskselport xri sidebits ;just toggle the side bit out dskselport ; to select the other side ani sidebits ;if bit is a 1 we are on even side, and have to move to next track, ;even (=0) no move ;jrz readsect db 28h,(readsect-$-1) and 0ffh endif ; mvi a,stepinc ;move to the next track call wfintr ani 98h rnz ;jr readsect db 18h,(readsect-$-1) and 0ffh ; wfintr: ;routine for waiting for disk completion ; ;inputs the CB1 here to wait for completion out dskcmnd wfrNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN is marked as 05R00. ;Set the 'rev500' flag to true only if your board's revision number is ;05R00. ; prtack equ 0 ;printer acknowledge init value rev500 equ TRUE ;|001| hardware board revision number if rev500 prtstrobe equ 0eh ;normal endif if not rev500 prtstrobe equ 0ch ;signal is inverted before output endif pstrobe equ prtack or prtstrobe ; blcycle equ 000100 ;;number of cycles for bell to produce blhigh equ 000020 ;;number of loops for high portion of cycle bllow equ 000020 ;pNNNNNNNNNNNNNNNNN (NNNNNNNNNNNNNNNNNNNNNNintr1: in dskintrq ;port address of CB1 port ani intmask ;test the disk completion bit-interupt request ;jrz wfintr1 db 28h,(wfintr1-$-1) and 0ffh xthl ;delay for 1793 (disk controller) to set up return xthl ; code in dskselport ;make the disk completion interrupt go away in dskstat ;get status, in case needed ret ; stepin: ;routine to step in one track mvi a,stepinc call wfintr ani 98h ret ; ;* * * * * * * * * * ; ; cold system initiallization equates ; ;* * * * * NNNNNNNNNNNNNNNN {NNNNNNNNNNNNNNNNNNNNNN;number of loops for low portion of cycle ; ; absolute(fixed) origin of variables/routines in common memory ; these are the addresses we want the code to run at when system is up ; vidparm equ 0ea80h ;terminal emulator variables, and stack mvfix equ vidparm+100h ;start location of memory managment module ; ; linkage to memory management routines used by other O/S components ; ;bank/move routne jump table entry points - absolute address ; Ymove equ mvfix ;entry point for move routine Yxmove eaNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN5ى+}ϐ qNNNNNNNNNNNNNNNNNNNNNNqu mvfix+3h ;; xmove Ybank equ mvfix+06h ;; bank ;;for coldboot(for both the loader and bios) bankinit equ mvfix+09h ;; bank init ivdmbank equ mvfix+0ch ;; vdm init ;;for interrupt servicing svdmbank equ mvfix+0fh ;; select vdm bank from non mapped stpabank equ mvfix+12h ;; select tpa bank from non mapped ;;for terminal emulator servicing sinvdm equ mvfix+15h ;; select vdm bank from anywhere soutvdm equ mvfix+18h ;; restore original bank after sinvdm ; ;abosolute address in move/bank routinesNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNtes ;* * * * * * * * * * ; valpha equ trueee ; ;flag to tell alphanumeric video alphterm equ valpha ;;alpha-numeric terminal driver ; vidend equ 00000h ;end of screen + 1-system equate vdmend equ vidend ;;end of vdm - common to all vdm configurations vout equ vidparm ;front/bank end of indvout equ vouteaddr ;system independent portion of vout voutsz equ voutsize ;alpha numeric terminal emulator size(maximum) ; ;graphics primitives at - note that the entry point is rst 5 indgprim equ iaNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN! ; top16k equ mvfix+1bh ;;accessing hidden memory hz equ mvfix+1ch ;;clock pulse( value 50/60 for 50/60 hz) memsize equ mvfix+1dh ;;0 - 128k, 1 - 256k bnkinrp equ mvfix+1eh ;;ei/nop, ret curbnk equ mvfix+20h ;; = @cbnk banktab equ mvfix+21h ;;address of the bank select table used by ; ;; the bank routine ; ;size of the modules/data of the operating system ; Note that non resident code/data are overwritten when ccp, bdos, ; and bios are moved to their execution address. The idea is to ppNNNNNNNNNNNNNNNNN.=NNNNNNNNNNNNNNNNNNNNNNndvout+voutsz ;system independent primitive functions ; ;graphics video display memory starts gvdm50 equ vidend-7800h ;;start addr of vdm for 50hz gvdm60 equ vidend-6000h ;;for 60hz ; ;alpha video display memory starts vdm50 equ vidend-1400h ;;top of video display memory address - 50 hz vdm60 equ vidend-1000h ;; for 60 hz ; f6clr equ 0ff92h ;;clear F6 of the sam register ;;to move the bottom of vdm from 0ffffh to 8000h ; ;number of graphics displayable lines refline50 equ (vdmend-gvdm+|NNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNut ; as much initialization as possible in the non resident portion ; of the system to increase TPA size. ; voutsize equ 0b00h ;;alpha terminal emulator size - maximum fixsize equ 100h ;;emulator variables+stack+vout entry+table initsize equ 300h ;;system init section - non resident movesize equ 300h ;;move/bank routine size ossize equ 1600h+biossize ;max possible size of the OS itself is ; vidparm-ccp chrsize equ 0800h ;charactor font data size - non resident ; ;where the modules/datPNNNNNNNNNNNNNNNNNH_NNNNNNNNNNNNNNNNNNNNNN50)/96 ;;number of vertical pixels - 50hz refline60 equ (vdmend-gvdm60)/96 ;; of 60hz ; ;number of grphics displayed lines vdpline equ -1 + 1 ;|008| ;;number of lines on the screen minus 1 vnmline equ -1 + 27 ;|009| ;;number of lines on the screen minus 1 vstline equ -1 + 2 ;|010| ;;number of lines on the screen minus 1 refline equ vdpline+vnmline+vstline+3 ;;total number of lines cY. lines equ vdpline+vstline+vnmline+3 ; lf equ 0ah cr equ 0dh eot equ 04h ; ;* * * * * * * * * *IaNNNNNNNNNNNNNNNN{nNNNNNNNNNNNNNNNNNNNNN!a are initially loaded by the bootstrap ; initladdr equ 180h ;;system init voutladdr equ initladdr+initsize ;;terminal emulator fixladdr equ voutladdr+voutsize ;;emulator variables and entry moveladdr equ fixladdr+fixsize ;;memory management routine osladdr equ moveladdr+movesize ;operating system xchrset equ osladdr+ossize ;character font ; ;calculated location of ccp on disk, based on load address ; cpmsect equ secsize/128 ;number of cpm sectors in a physical sector totsect equ secttrack*[NNNNNNNNNNNNNNNNNkPNNNNNNNNNNNNNNNNNNNNNN ; ; move code to their execution addresses - init, bank, term driver etc ; ;* * * * * * * * * * ; org 100h ; sysinit: ; ; running in loader bank - interrupt must be disabled (presently di by prom) ; in piacra ;disable clock interrupt ani 0feh out piacra ; lxi h,gvdm50 ;clear 800h to 7fffh of vdm lxi d,gvdm50+1 lxi b,vdmend-gvdm50-1 xra a mov m,a ;ldir db 0edh,0b0h ; ;move codes from loader address(read in by bootstrap) ;to execution address ; lxi h,initladdr ;bank, @NNNNNNNNNNNNNNNN XaNNNNNNNNNNNNNNNNNNNNNNcpmsect ;total cpm sectors on a track toccp equ (osladdr-80h)/128 ;total cpm sectors before ccp ccptrack equ toccp/totsect ;track is base 0 ccpsect set (toccp mod totsect)+1 ;sector number is base 1 ; ;where the modules/data are to be move to for execution ; initeaddr equ 0a000h ;;system init vouteaddr equ 0e680h ;;terminal driver fixeaddr equ vidparm moveeaddr equ mvfix oseaddr equ ccp chrset equ initeaddr+initsize ;;character font data ; ;* * * * * * * * * * ;terminal emulator equakNNNNNNNNNNNNNNNN  2NNNNNNNNNNNNNNNNNNNNNNports and vdm initialization lxi d,initeaddr lxi b,initsize ;ldir db 0edh,0b0h lxi h,osladdr ;ccp, bdos, bios lxi d,oseaddr lxi b,ossize ;ldir db 0edh,0b0h ;copy terminal emulator (independent portion) to video bank lxi h,voutladdr ;from load address lxi d,vouteaddr ;to execution address lxi b,vout-indvout ;actual allowed size ;ldir db 0edh,0b0h lxi h,fixladdr ;fixed variables (for video/move/bank) lxi d,fixeaddr lxi b,fixsize ;ldir db 0edh,0b0h lxi h,moveladdr ;moveTwBNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN2։(y̐n|NNNNNNNNNNNNNNNNNNNNNN routine lxi d,moveeaddr lxi b,80h ;ldir db 0edh,0b0h ; jmp initeaddr ;execute stand along cold boot(one time only) ; ;go do bios cold boot ; gobios: mvi e,ccptrack and 0ffh ;track ccp is on mvi d,ccpsect and 0ffh ;starting sector ccp is on jmp bios ;go do bios cold boot ; ; ;* * * * * * * * * * ; ;initialize banking, terminal emulator, vdm, ports etc. ; this section will sit in common memory ; ;* * * * * * * * * * ; org initeaddr ; lxi h,xchrset ;copy character font dataYpNNNNNNNNNNNNNNNNN/NNNNNNNNNNNNNNNNNNNNN!hz cpi clk50 jz soft50 lxi h,softrate60 soft50: dad d mov a,m out viaport+8h ; mvi a,2 ;set memory size to 64k sta memsize ; ;*************************************************************************** ; ; VIDEO DISPLAY MEMORY INITIALIZATION ; ; RUN IN VIDEO BANK ; ; if not alphterm ; mvi a,0c9h ;stuff a ret instruction where the independent sta indgprim ; portion of the graphics primitives would be ; ; graphics ; ; set up character data in vdm holes mvi a,0 lxNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN lxi d,chrset lxi b,chrsize ;ldir db 0edh,0b0h ; mvi a,0 ;disable interrupt enabling from move/bank/video calls sta bnkinrp ; lxi sp,sysstack ;set up stack ; mvi a,0c9h ;store return at interrupt location sta 38h ; ;init I/O ports ; mvi a,init1 ;init simplex serial out nserstat xthl xthl mvi a,init2 out nserstat ; ;other hardware initialization mvi a,80h ori blbit ;setup for bell bit ;CHECK out viaport+2 ;ddrb ; mvi a,0d4h out viaport+0bh ;acr mvi a,0@NNNNNNNNNNNNNNNNNNXNNNNNNNNNNNNNNNNNNNNNNi d,gvdm60 lxi h,chrset setchar: lxi b,8 ;ldir db 0edh,0b0h push h lxi h,96-8 dad d xchg pop h dcr a jnz setchar ; ;set up vdm here ; ;Need to change video display memory address before the sam checks for the vdm ;address again. The check is done between the CA1 high-to-low to low-to high ;transition period, about 180 usec. ; ;wait for IRQA1 interrupt flag to be set - set by low-to-high transition of CA1 ; waitirqa: in piacra ana a jp waitirqa ; ;wait for trailing e BNNNNNNNNNNNNNNNNkNNNNNNNNNNNNNNNNNNNNNN out viaport+5 ;t1c-h mvi a,pstrobe and 0ffh out viaport+0ch ;pcr mvi a,4ch out viaport+8h ;t2c-l mvi a,0 out viaport+9h ;t2c-h mvi a,0ffh out viaport+0ah ;shift register ; in viaport+0bh ;disable shift register..Not sure if needed ani 0e3h out viaport+0bh ; xra a ;reset counters out viaport+9h ; in viaport+0bh ;turn shift register operation back on ori 14h out viaport+0bh xra a ;turn to marking condition cma out viaport+0ah ; ;QUARK Clock frequency check. CODiNNNNNNNNNNNNNNNNNN>NNNNNNNNNNNNNNNNNNNNNNdge of interrupt signal - about 8 usec ; waitclr: in piacra ana a jp setsam in piadra ;clear interrupt jmp waitclr ; setsam: ; ;setup the sam register - no affect until the next high-to-low transition ; lxi h,0ff91h ;f5 set call 0bh ; lda hz cpi clk50 jz clock50 lxi h,0ff8dh ;f3 set lxi b,0ff88h ;f1 clear jmp clockdone ;change to relative if space needed clock50: lxi h,0ff8ch ;f3 clear lxi b,0ff89h ;f1 set clockdone: push h push b ; in piapb ;set up for turn ";aNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNE STARTING FROM HERE are TIMED ; mvi h,0ffh ;60 hz with 32 lines ;clear any pending IRQA interrupts waitclear: in piacra ana a jp waitintrpt in piadra jmp waitclear ;wait for Vertical Sync interrupt cycle waitintrpt: in piacra ana a ;look for IRAQA interrupt jp waitintrpt ;12 t states nop nop in piadra ;clear interrupt ;We should be at the horizontal retrace at the start of the ;first line of video display memory scan wloop2: mvi l,23 ;96 chars per line wloop1: dcNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNon graphics mode bit ani 0bfh mov b,a ;save for later ; LXI H,0FF86H CALL 0Bh ; LXI H,0FF88H LXI H,0FF8AH CALL 0Bh ; LXI H,0FF8DH LXI H,0FF90H CALL 0Bh LXI H,0FF92H CALL 0Bh ; pop h ;f1 clear/set-for 50/60hertz CALL 0Bh pop h ;f3 set/clear-for 50/60 hertz CALL 0Bh ; ;change the active transition for setting interrupt flag from low-to-high ;to high-to-low ; in piacra ani 1111$1101b out piacra ; ;wait for flag set - generated by the high-to-low transition ; ghiQNNNNNNNNNNNNNNNN .NNNNNNNNNNNNNNNNNNNNNNr l jnz wloop1 dcr h jnz wloop2 ;check for iraqa interrupt. if interrupt, then it is a 60 hz board in piacra ana a ;look for IRAQA interrupt mvi a,50 jp lhz50 ;no interrupt ;60 hz mvi a,60 lhz50: sta hz ; mvi a,hardrate ;full duplex baud rate add a mov e,a mvi d,0 lxi h,hardrate50 lda hz cpi clk50 jz hard50 lxi h,hardrate60 hard50: dad d mov a,m out viaport+4 ;t1c-l ; mvi a,softrate ;simplex baud rate add a mov e,a mvi d,0 lxi h,softrate50 lda C|NNNNNNNNNNNNNNNN {NNNNNNNNNNNNNNNNNNNNNNtolow: in piacra ana a jp ghitolow ; xthl ;wait awhile xthl ; ; mov a,b ;to graphics mode out piapb ; LXI H,0FF85H ;V2 set for graphics mode CALL 0Bh ;setup has immediate affect ; endif ; ;put active CA1 transiton for setting interrupt flag back to low-to-high ; in piacra ;put clock interrupt to low-to-high ori 2 out piacra ; ;initialize video display memory starting address ; if alphterm lda hz cpi 60 lxi h,vdm60 jz initparm lxi h,vdm50 initparm: shld viMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN1Ӊ%vȐj