þþ=/dEInX;------------------------xX;‚X;A Simple Text EditorŒX;–X;By: Bryan Schappel X;ªX;Written for: DEEP BLUE C´X;¾X;------------------------ȇEOLCHAR`;;return charÒ…TCOMS;;# of commands-1Ü …ILEGSæ†TXTENDŸðX;ú„PASS„PASS „PASS>ŒD:SYSEQU.M65",X;6X;PRINT macro@X;J †PRINT T Q>4 ^ %>5 h ‡LNPRINTr|X;†X;BUMP macroX;š …BUMP ¤# ® H„@BMP¸ # „@BMPÌÖX;àX;---------------êX;Zero Page UsageôX;---------------þX;€„CURX;;cursor Xpos„CURY;;cursor Ypos& „TEMP0 †BOTSCR: †MEMPNTD …TEXTPN …CLOCKX†CURMEM;;cur pos in memb…FILE?;;file flagl †MEMMAXv…MEMST;;memory start€„OLDC;;keycodeŠ…OLDAC;;ascii convert”„INVS;;inverse flagž„CAPS;;caps flag¨…SAVXI;;X save²…DLIDX;;DLI index¼…TOPLN;;upper lft scrƃSCR;;screen adrЄWLEN;;word lengthÚ…LINES;;# linesä‚LO;;Work Variablesî‚HI;;for INTEGER toø…WORKL;;BCD conversion …WORKH  ƒBCD ƒLO1  ƒHI1*„HNUM;;hex buffer4†PAUSE?;;VB pause>„CEND;;input lengthH„IPUT;;input flagR…IODIR;;i/o direction\ˆCHARUNDR;;char savef‡INSMODEp †INSLENz „FROM„ „DESTŽ‡MOVELEN˜ †ENDPOS¢ …INFLG¬ „CBAS¶ †GOBLENÀ‡CONFLAGÊ †SAVCURÔ„SLEN;;srch lengthÞ „FPOSè‡PAGENUMò …LPLENü „COLSI †ENDZPG EI$X;----------------.X;Start of Program8X;----------------BX;L …SCMEM¼VX;`ýŸ;;start of codej†PSTART ;;save addr.tX;~ !„INITˆ>‹D:TEXT2.M65’X;------------œX;Display List¦X;------------°X;º…DLIST p=p=p=BÄ …SCMEMÎ ====Ø ====â ====ì ====°ö  …MYMEM  ===A …DLISTX;----------------(X;My Screen Memory2X;----------------<X;F5…MYMEM A¨ COL: 02 ROW: 00 FREE: 00000 AP3ƒLN1 A¨ AZ3ƒLN2 A¨ Ad…COMLNƒLN1 nX;xX;Special Key Codes‚X;Œ„KEYS ÿ=þ=ý=Ÿ=ž– =œ=›==~  }====ª ´X;¾X;Convert TablesÈX;ÒƒA2I @== =`܃I2A  =@==`æX;ðX;DLI ColorsúX;…DLICL =X;X;Text and Misc. Data"X;,…LOADM AŠLOAD FILE:A=ƒEOL6…SAVEM AŠSAVE FILE:A=ƒEOL@…PRNTM AŠPRINT DEV:A=ƒEOLJ…FINDM AŠFIND WHAT?A=ƒEOLT…REPLW AŠREP. WITH:A=ƒEOL^2…DIRMS A DIRECTORY FOR DRIVE [1-2-3-4-8]?A=ƒEOLh0…DIRPS AžDIRECTORY PAUSED - PRESS A KEYA=ƒEOLr2…DIRFN A DIRECTORY FINISHED - PRESS A KEYA=ƒEOL|!…DIRER ADIRECTORY ERRORA=ƒEOL†'…REPLM A•REPLACE STRING - Y/N?A=ƒEOL…QTEXT A‹QUIT EDITORA=ƒEOLš…ERASE AŒERASE MEMORYA=ƒEOL¤…PTEXT AŠPRINT TEXTA=ƒEOL® …SAVER AŽSAVE I/O ERRORA=ƒEOL¸ …LOADR AŽLOAD I/O ERRORA=ƒEOLÂ…PRTER APRINTER ERRORA=ƒEOLÌ…PAGEN AŠPage # A=ƒEOLÖ …SURE? A“ARE YOU SURE - Y/N?Aà%‡WORDTXT A‘WORD COUNT: 00000A=ƒEOLê„EADR A‚E:A=ƒEOLô„PDEV A‚P:A=ƒEOLþ‡DIRNUMS A…12348A…D1TXT AƒD1:A†DIRTXT A†D1:*.*A=ƒEOLX;&X;Intro Text0X;:„ITXT =ATA==A„EDITAD A‘ - a Program TextAN A‡ EditorAX ÿ=ÿ=b A‹Written By:Al ÿ=ÿ= v A‘Bryan P. SchappelA€ ÿ=ÿ=Š A‰(c) 1986 A” A†ANALOGAž AŠ ComputingA¨ ÿ=ÿ= ² A- Press a Key -A¼ ý;;end of textÆX;ÐX;Illegal charsÚX;ä…ILLEG =`={=}îX;øX;Command TextX; †CMDTXT  ===== ==  ~====* þ=ÿ====4 ==== =œ> == === HX;RX;Command Addresses\X;f†COMADR „LOAD;;^Lp „SAVE;;^Sz ƒTOP;;^T„ †BOTTOM;;^BŽ „UPSC;;^U˜ „DNSC;;^D¢ …CLEAR;;^C¬ …PRINT;;^P¶ „QUIT;;^QÀ †CHRDEL;;DEL-BSÊ „UPLN;;^-Ô „DNLN;;^=Þ †GOLEFT;;^*è ‡GORIGHT;;^+ò ‡CTRLDEL;;^DEL-BSü ‡INSCHAR;;^INS  …BLINE;;^A  †UPWORD;;^W  …ENDLN;;^Z$  ‡REVERSE;;^R.  †ADD255;;SH-INS8  †ADDTAB;;TABB  …PARSE;;^OL „HOME;;^HV  …IMODE;;^I`  †DEL2CR;;SH-DELj  †KSPACE;;^Et „FIND;;^F~  ‡CONVERT;;^K or ^CAPSˆ  …DODIR;;^X’  ‡CNTWORD;;^Nœ  †MANUAL;;^M¦ X;° X;--------------------º X;Start of SubroutinesÄ X;--------------------Î X;Ø X;Clear Main Text Screenâ X;ì †CLRSCR%>ö C „CLR1P…SCMEM8 P…SCMEM8 P…SCMEM8 3( H„CLR12 %>< „CLR2P…SCMEM8F 1P I„CLR2Z :d X;n X;Clear Entry Windowx X;‚ †CLRWIN%>OŒ ƒCLWQ>– „CLRWPƒLN18  1ª I„CLRW´ :¾ X;È X;Clear Other LineÒ X;Ü …CLRW1%>'æ HƒCLWð X;ú X;Clear Qline X; …CLRW2%>' Q>" ƒCL2PƒLN28, 16 IƒCL2@ :J X;T X;Print line routine^ X;h ‡LNPRINTPƒLNLr 'ƒLNL| …CLRW1† %> ƒLNLQÿÿ8š R>ƒEOL¤ F„LNLV® †ASC2IC¸ PƒLN18 3Ì HƒLNLÖ „LNLV:à X;ê X;Get Key Routineô X;þ †GETKEYQ‚CH R>ÿ F†GETKEY ‡GETKEY1$>ÿ& &‚CH0 P„OLDC: $>~D 5N …CLKIT&†CONSOLX Q†VCOUNTb …CLKWTR†VCOUNTl F…CLKWTv 0€ 0Š I…CLKIT” 7ž ‚K0?¨ )>À² D‚K1¼ %>šÆ ‚K1Q@†KEYDEF7Ð P…OLDACÚ R>€ä F†GETKEYî R>ø H‚K2 Q„INVS N>€ P„INVS !†GETKEY* ‚K2R>‚4 H‚K3> Q„CAPSH N>@R P„CAPS\ !†GETKEYf ‚K3R>ƒp H‚K4z Q>@„ P„CAPSŽ H†GETKEY˜ ‚K4R>„¢ H‚K5¬ Q> ¶ P…OLDACÀ :Ê ‚K5R>…Ô F†GETKEYÞ Q„OLDCè R>@ò E‚K6ü Q…OLDACR>aD‚K6R>{$E‚K6. Q„CAPS8F‚K6B L„OLDCL!‚K0V ‚K6$>` ‚K7Q„KEYS9j R…OLDACtF‚K8~0ˆI‚K7’ ‚K8F‚K9œ Q…OLDAC¦ N„INVS° ‚K9P…OLDACº:ÄX;Î"X;Vertical Blank Cursor HandlerØX;Deferred ModeâX;ì‡VBLANK1%„CURXö3'‚LO  †CALCNM Q„NBUF P…MYMEM ( Q„NBUF2 P…MYMEM < Q„CURYFP‚LOP †CALCNMZ Q„NBUFd P…MYMEMn Q„NBUFx P…MYMEM‚…VB1.X!†XITVBVŒX;–X;Display List Interrupt X;ªƒDLI5´A¾5È $…DLIDXÒ H…GDLICÜ Q‡INSMODEæ F…GDLICðQ>Bú H…DLIAD…GDLICQ…DLICL9…DLIADP…WSYNC P†COLPF2" #…DLIDX,76>@7J9TX;^X;Immediate Mode VBLANKhX;r‡VBLANK2Q>| P…DLIDX†%>†VBL2.1Q†COLOR08š P†COLPF08¤1® I†VBL2.1¸ Q†PAUSE? H†VBL2.XÌ #…CLOCKÖ Q…CLOCKàR>ê H†VBI2.2ôQ†CURCHRþN>ÿP†CURCHRQ> P…CLOCK&†VBI2.2Q„IPUT0 F†VBL2.X: %„CENDDQ>?N P…COMLN8X†VBL2.X!†SYSVBVbX;lX;Erase FilevX;€…CLEARQ…FILE?ŠFƒCLL”†PRINT …ERASEž …YESNO¨ D†CLEAR2²ƒCLL:¼†CLEAR2%>Æ '…FILE?Ð '…MEMSTÚ3ä '„CURYî '„CURXø †CLRSCRX;  %…MEMLO3  '…MEMST*X;4 ˆERASEMEM>X;H !†CLRWINRX;\ X;YES/NOfX;p…YESNO …CLRW2z%>„ƒYN1Q…SURE?8Ž PƒLN28˜1¢IƒYN1¬ƒYN2 †GETKEY¶M>ÀR> [ÊDƒUPCÔ;ÞS> è ƒUPCR> Yò F„GOTYü †CLRWIN;:„GOTY †CLRWIN$,.:8X;BX;Quit EditorLX;V„QUIT†PRINT …QTEXT` …YESNOj D†DOQUITt !†CLRWIN~ †DOQUIT7ˆ7’Q>œ %>4†XITVBV¦ $>5†XITVBV° †SETVBVºQ>Ä %>4†SYSVBVÎ $>5†SYSVBVØ †SETVBVâQ>@ì P…NMIENö$>Q>  P…ICCOM „CIOV$>(Q>2 P…ICCOM<Q> F P„AUX1P &„AUX2Z Q>4„EADRd P…ICBALn Q>5„EADRx P…ICBAH‚ „CIOVŒ !@†DOSVEC:–X; X;Go To TOP of textªX;´ƒTOPQ…MEMST¾ P†CURMEMÈ P…TOPLNÒ Q…MEMSTÜP†CURMEMæ P…TOPLNð !‡SCRDRAWúX;#X;******************************X;INCLUDE SubroutinesX;">‹D:TEXT3.M65,>‹D:TEXT4.M656X;@X;JX;Convert ATASCII to ICODETX;^†ASC2IC …BITERh LƒA2I9r $…SAVXI|:†X;X;Convert ICODE to ATASCIIšX;¤†IC2ASC …BITER® LƒI2A9¸ $…SAVXIÂ:ÌX;ÖX;Ready CharacteràX;ê …BITER5ôU?þU?U?U?M>& &…SAVXI0>:7DM>ŸN:XX;b"X;#############################l"X;Program Execution Starts Herev"X;#############################€X;Š „INIT-”Q>ž P…CLOCK¨ P‡INSMODE² P„INVS¼ P†PAUSE?Æ P„IPUTÐ P„CAPSÚQ>"ä P†SDMCTLîQ>ø%>4‡VBLANK1$>5‡VBLANK1  †SETVBVQ> %>4‡VBLANK2*$>5‡VBLANK24 †SETVBV> Q>4ƒDLIH P†VDSLSTR Q>5ƒDLI\P†VDSLSTfQ>Àp P…NMIENzQ>„ P†COLOR2Ž Q>4…DLIST˜ P†SDLSTL¢ Q>5…DLIST¬P†SDLSTL¶ †CLEAR2À Q†KEYDEFÊL†KEYDEFÔ H…INSETÞQ>þè P†KEYDEFòP†KEYDEFüX;…INSETQ>5…MYSET P…CHBAS…GOINT …INTRO;;call intro$X;. „MAIN%>8 '…INFLGB Q@†CURMEM7L PˆCHARUNDRVIƒBLN` "…INFLGj ƒBLNM>t P„CBAS~ '„CBASˆ T„CBAS’ U„CBASœ T„CBAS¦ U„CBAS° T„CBASº U„CBASÄ Q„CBASÎ,Ø O>5…MYSETâ P„CBASì%>ö…CCHRMQ@„CBAS7 N…INFLG  P†CURCHR81 I…CCHRM(…MAIN2 ‡SHOFREE2%><Q>F P@†CURMEM7P ‡SCRDRAWZ …WAITMQ‚CHdR>ÿn F…MAIN2xX;‚†HAVKEY ‡GETKEY1Œ>;;SAVE KEY–%>  '…INFLGª QˆCHARUNDR´ P@†CURMEM7¾A;;RESTORE KEYÈ%>Ò '†CONSOLÜ %†CONSOLæ)>ð H…HAVK1úA I†CTRAND%>€ '…INFLG"†CTRANDM>,R> a6 D…CHKRN@ R> zJ E…CHKRNT;^S> h …CHKRNR> Ar D…HAVK1| R> Z† E…HAVK1;šS>@¤ N…INFLG® !†NOTEOL¸…HAVK1%>…TCOMS;;# COMMANDSÂAÌM>ÖR>à D…CMDCKêAô…CMDCKR†CMDTXT8þ F†GOTCOM1 I…CMDCK G‡JUSTCHR& †GOTCOMC0T?:?D Q†COMADR8NP†CMDJSRXQ†COMADR8bP†CMDJSRl†CMDJSR ÿÿvQ>€ P„IPUTŠ †CLRWIN” ‡SCRDRAWž !„MAIN¨X;²‡JUSTCHRQ…FILE?¼ H…JCHARÆ #…FILE?Ð…JCHARQ…OLDACÚ R>ƒEOLä F„JCH2îM>ø %>…ILEGS„JCHTR…ILLEG8  F„JCHI1  I„JCHT* G†JCHTST4„JCHI!„MAIN>†JCHTSTR> H D„JCHIR„JCH2Q…OLDAC\ R>ƒEOLf H†NOTEOLp Q>‡EOLCHARz †NOTEOL5„%>Ž Q@†CURMEM7˜ R>‡EOLCHAR¢ F…DOINS¬ Q‡INSMODE¶ F†NOTINSÀ…DOINS ‡INSCHARÊ †NOTINS7Ô †ASC2ICÞ%>è P@†CURMEM7ò ‡SCRDRAWü; Q†CURMEM S†MEMPNT P„TEMP$Q†CURMEM.S†MEMPNT8 L„TEMPB D†INCCURL Q†CURMEMVO>` P†MEMPNTjQ†CURMEMtO>~P†MEMPNTˆX;’†INCCUR…BUMP †CURMEMœ ˆCHECKMEM¦ !„MAIN°X;ºX;Check Memory RoutineÄX;ΈCHECKMEM ‡CHECKM2Ø;â Q†CURMEMì S…TOPLNöQ†CURMEM S…TOPLN EƒOK1; Q…TOPLN( S…MEMST2 P„TEMP< S…MEMSTF L„TEMPPFƒOK1Z Q†CURMEMd P…TOPLNnQ†CURMEMx P…TOPLN‚ ‡SCRDRAWŒƒOK1;– Q†BOTSCR  S†CURMEMª P…TEXTP´Q†BOTSCR¾S†CURMEMÈ P…TEXTPÒ L…TEXTPÜFƒEQAæEƒOK2ðƒEQA,ú Q…TOPLN OˆLENTABLE P…TOPLN Q…TOPLN"O>, P…TOPLN6ƒREF ‡SCRDRAW@!ƒOK1JƒOK2:T ‡CHECKM2;^ Q†MEMPNTh S>4†TXTENDr P„TEMP|Q†MEMPNT† S>5†TXTEND L„TEMPšDƒCK3¤ Q>4†TXTEND® P†MEMPNT¸ Q>5†TXTENDÂP†MEMPNT̃CK3;Ö Q†CURMEMà S…MEMSTê P„TEMPôQ†CURMEMþ S…MEMST L„TEMP E‡INRANGE Q…MEMST& P†CURMEM0 Q…MEMST: P†CURMEMD :N ‡INRANGE;X Q†CURMEMb S†MEMPNTl P„TEMPv Q†CURMEM€ S†MEMPNTŠ L„TEMP” EˆOUTRANGEž :¨ ˆOUTRANGEQ†MEMPNT² P†CURMEM¼ Q†MEMPNTÆ P†CURMEMÐ :Ú X;ä X;Erase Bufferî X;ø †ERMYBF%>T!Q> !„ERMBP…MYBUF8!1 ! I„ERMB*!:4!X;>!X;2 BYTE BINARY INTEGER TO AH! X;4 BYTE BINARY CODED DECIMALR! X;NUMBER.\!X;f!†INT2FPQƒLO1p! P…WORKLz!QƒHI1„! P…WORKHŽ!Q>˜!PƒBCD¢! PƒBCD¬! PƒBCD¶! PƒBCDÀ!<Ê!%>Ô!„IFP1T…WORKLÞ! U…WORKHè!$>ò!„IFP2QƒBCD9ü! OƒBCD9" PƒBCD9"0" H„IFP2$"1." H„IFP18"-B":L"X;V"!X;Convert BCD to Internal Code`"X;j"†CONBCD †INT2FPt"%>~"$>ˆ"„CONBQƒBCD8’" ‡BIN2HEXœ" Q„HNUM¦" P„ABUF9°" Q„HNUMº" P„ABUF9Ä"2Î"2Ø"3â")>ì" H„CONBö"%>#…CONB3Q„ABUF8 #,#O># P„ABUF8(#12# I…CONB3<#:F#X;P#!X;Convert BCD to 2 byte numberZ#X;d# ‡BIN2HEX5n#M>x# P„HNUM‚#7Œ#V?–#V? #V?ª#V?´# P„HNUM¾#:È#X;Ò#!X;Convert 1 byte binary numberÜ#X;to internal codeæ#X;ð#†CALCNMQ‚LOú#%>$'‚HI$ '„NBUF$R>È"$ D†TRY100,$%>6$ P„NBUF@$;J$S>ÈT$ !„CLC1^$†TRY100R>dh$ D„CLC1r$%>|$ '„NBUF†$;$S>dš$ „CLC1R> ¤$ D…CLCDN®$;¸$S> Â$#‚HIÌ$ H„CLC1Ö$ …CLCDN,à$O>ê$ P„NBUFô$Q‚HIþ$,%O>% P„NBUF% Q„NBUF&%,0%O>:% P„NBUFD%:N%X;X%X;Introductionb%X;l% …INTRO$>v%Q>ê;;a NOP€%†INTRO1P…GOINT9Š%0”% I†INTRO1ž%Q>4…SCMEM( ¨%PƒSCR²%Q>5…SCMEM( ¼% PƒSCRÆ% …PTITL2Ð% Q„ITXT9Ú%?ä%R>ÿî% F†IADD40ø%‚P22& Q„ITXT9 &R>ÿ& F†IADD40 &R>ý*& F„IPDN4& P@ƒSCR7>&3H&H‚P2R&†IADD40QƒSCR\&,f&O>(p&PƒSCRz& QƒSCR„&O>Ž& PƒSCR˜& H…PTITL¢&„IPDN!†GETKEY¬&X;¶&"X;This routine shows the numberÀ&X;of free bytes left in textÊ&#X;memory, it puts the # of bytesÔ&X;on the MYMEM+30 line.Þ&X;è&‡SHOFREEQ>4†TXTENDò&;ü& S†MEMPNT'PƒLO1' Q>5†TXTEND'S†MEMPNT$'PƒHI1.' †CONBCD8'%>B'ˆSHOFREE1Q„ABUF8L'P…MYMEM8V'1`' IˆSHOFREE1j':t'X;~'X;Work Buffersˆ'X;’'Iœ'ˆLENTABLE¦' …MYBUFU°' „ABUFº' „NBUFÄ' „SBUF-Î' †FILNAMØ'‡ENDMYPG â'EIì'X;ö'X;Set Run Address(X; ( …RUNAD( †PSTART(