IMD 1.16: 29/05/2007 18:21:12 FOGCPM.052 --FOGCPM052MAXLETTRDOCMAX12 NSLMAX13 NSL MAX14 NSL MAX15 NSL$MEMTEST COM MEMTEST DOCSETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL BAS(VFUZZ-SMDOC)WSKB COM*WSKB DOC+WSKB MAC,XFUNC ASM-./XFUNC DOC0ZCPR-MAXHEX*123456READZCPRDOC7ZCPR ASM89:;<=>?@ABCDEFGZCPR ASMHIJKLMNOPQRSTUVWZCPR ASMXYZ[\]^_`abcdefgZCPR ASMhij-06-00 86 -CPM052 DOCZCPR DOCklmnopqrstuvwxyzZCPR DOC{|}~ZCPR DOCbZCPR HLPsZCPR MSG0This is the disk name. MAXLETTR is a series of newsletters from MAXIMUL concerning MAX. All MAX owners should have access to these and any others which are written... I got them thru a bulletin board. Well I guess every body has MAXLETTER #5 from Lobo by now. I just talked with Dennis Wade, who is now running LOBO and he says Maxletter #6 is ready to mail, and may be shipped now. They are going to get a newsletter out every 2 to 4 weeks. Now if I could only get Maximul on a regular schedule. Well here is the LOBO story as I understand it . Dennis is running Lobo and he has been there for 8 to 10 weeks as the person responsible to the new financial backers. The group didn't bring money to LOBO as everyone was expecting, but instead assumed the liabilities. Then the group worked to get a private stock placement to raise the required funds. They hope to raise between 1 and 1 1/2 million, as Lobo's problems are all cash related. As to the long awaited and often rumored CPM Plus, a mid-December release looks likely. Again the problems are cash related. The licensing problems alluded to earlier were just that. Pay the money, and you can have the license. Only after the required payments are made to DRI could the official version be finished. And until that happens(ed) the manuals could not be fishished. Dennis tells me that at the moment there are 4 to 6 weeks of in house work needed before PLUS will be ready to ship. On other software, LOBO is making the PerfectSoft software available. These are the Perfect Writer, PerfectCalc, et al. There are other software packages being negotiated. The Max is doing well in foreign markets with a few distributors being set up overseas. Some Eureopean countries have 50 or more Maxes in use. As to this country, since Max was designed as mail order, there is just no way to sell at a price to a dealer and keep the mail order price the same, so LOBO has about 6 to 8 distributors, who are really systems integrators set up in this country. They make their profit on the software and integration and not on the machine. Now, how about the hard drive. The $995 hard drive is now using the Xebec control and is shipping in the next few weeks. However this is NOT the Max80 version. Delivery date of the new Max hard drives is not available at the moment. The hard drive that is avaiable is for non-Max systems. For those of you who havent seen the new LOBO ad in BYTE the headline reads "The computer Tandy should have built", and underneath is a picture of the Max. Beneath that is the phrase, "At the price Tandy should have charged. Hopefully things are back on course now and we will get more information, and accuarte information in a timely manner. Other computer mfrs. who have had problem in the past year arent around today. But let's hope this is a new beginning for a great machine. Bill Vermillion [70270,214] Maximul Box 19525 Orlando, FL, 32814 et's hope this is a new begireally systems integrators set up in this country. They make their profit on the software and integration and not on the machine. Now, how about the hard drive. The $995 hard drive is now using the Xebec control and is shipping in the next few weeks. HWell LOBO is getting ready to go to COMDEX in Las Vegas. One interesting thing they will be showing, but probably wont be operational, is a new half height 3 1/2 inch hard drive. That's right 3 and 1/2 inches, not 5 1/2. Dave says it is amazing to have 5 megs space in something so small. . On the subject of things you can buy now, or shortly, LOBO is packaging the Perfect series of software. They have also reached an agreement with Hayden software to sell their and they are getting that finalized right now. . Modems are the next thing they added to their line. After looking over several modems, LOBO has decided to offer the Signalman Mark 12 to their customers. This is a 1200 baud Hayes compatible modem. After testing all of the popular modems they feel this is the best value for their customers and will be selling it at $350. . Lobo will also be selling the Gorilla Monitor from Leading Edge. This will be in addtion to their Amdek monitors but will priced at $89. . CPM 3.0 does NOT have an official release date. It is still being worked on. The Max specific manuals are not finished as Greg is still putting the finishing touches on 3.0. Dave says he has added a lot of nice features. Getting all the money together is part of the problem. . In discussing this with Dave we figured out that just the 3.0 package, the manuals, binders, disks, license, etc is costing LOBO over $60 per package without counting the time and labor and writing the Max specific version. This is just raw, no labor costs. Getting the package for $30 is going to be a real bargain. . The Max CPM 3.0 format will be identical to the IBM-PC format. That is 512 byte sectors. It will give about 385k per DSDD 5 inch disk. Perhaps with the influence that IBM has had on the marketplace we are heading for a 5" standard. Let's hope so. I just saw a program the other day specifically for my now somewhat retired S-100 system. It does translations between about 50 different formats. But I digress. . LOBO will be at Comdex but since they made the decision late they will be sharing a booth. Nothing more to report for the Max at the moment, but one item they will be showing is a hard disk drive for the IBM-PC. No, they are not abandoning the Max, but they go a good deal on the Winchesters from Shugart and are going to make a competitively price drive for the PC. . All in all things are starging to happen now that they have the re-organization finished. And the ads that have just started appearing are starting to bring in sales, although not as much from the Tandy crowd as they had anticipated. . One growth area for Lobo is overseas distribution, both in Europe and South America. Dave says Tandy has pulled out of the South American market, and the Max being able to run the I/III software looks very attractive to them down there. . Well that's it for now. Probably not another newsletter until after Comdex. . Bill Vermillion [70270,214], or % SYSOP QSD/Powersoft Sig Maximul box 19525 Orlando,Fla, 32814 r until after Comdex. . Bill Vermillion [70270,214], or % SYSOP QSD/Powersoft Sig Maximul box 195 at the moment, but one item they will be showing is a hard disk drive for the IBM-PC. No, they are not abandoning the Max, but they go a good deal on the Winchesters from Shugart and are going to make a competitively price drive for the PC. . All in all things are starging to happen now that they have the re-organization finished. And the ads that have just started appearing are starting to bring in sales, although not as much from the Tandy crowd as they had anticipated. . One growth area for Lobo is overseas distribution, both in Europe and South America. Dave says Tandy has pulled out of the South American market, and the Max being able to run the I/III software looks very attractive to them down there. . Well that's it for now. Probably not another newsletter until after Comdex. . Bill Vermillion [70270,214], or % SYSOP QSD/Powersoft Sig Maximul box 195Comdex, Las Vegas, Lobo and cold weather. That's what I experienced last week. It was windy, with highs in the 50's and lows in the 30's and I'll tell you it was nice to step off the plane Sunday night at 11pm and find 75 degree weather. But this is about last week, Max-80 and Lobo, and not the weather. Lobo showed a couple of new products, as well as showing the operating CPM-plus. I was in Las Vegas for the show, and worked 2 to 3 hours per day in the LOBO booth. It was nice putting some faces with names, and I'm sorry I missed a few who stopped by. The item that caught most everyones eye in the Lobo display was the 3 1/2" 5meg hard disk. Shipping is probably in April. Price will be $1095. 10 meg version is not priced yet. Currentadd-on hard drives are shipping but th Max hard dive wont be ready until January. Five Meg 5 1/2 inch at $995. 10 meg version is not priced. Lobo will also be shipping hard disks for the Apple, and an IBM PC version ships in spring.  For OEM's LOBO is offering the board set from the Max for integration into custom installations. They are going after the OEM market to spread their base a bit, and hopefully keep a more even cash-flow. It was the first time I had a chance to talk to Dennis Waid, the new president of Lobo, for more than a few minutes on the phone, and I am impressed with the direction the company is heading. Things were tough last spring and summer, but now that the hurdles have been cleared I think we will see a lot of good things from the company. I expect to see CPM Plus shipping in January from what I saw happening, but LOBO is not giving any dates for release. That is probably for the good. Also as things now stand we wont be seeing LDOS 6.0 anytime but things have happened that wont make that as great a loss as we once thought. At the moment I have a BETA test copy of DOSPLUS IV, which is to say that it is DOSPLUS for the Model 4. It is media compatible with 6.0, and there should be no problems in writing software for the 4 on the Max and plugging it in and running with it. There are however a few problems, for most users minor, but should be noted. The software packages for the 4 run on Max but anything that uses inverse video gives graphics on the Max. The reason is the Max doesnt have an alternate character set. The solution is probably to use installable character sets or patch the programs. Since Max has software definable characters it may not be that bad. Inverse video can be had at the expense of graphics. Another problem is that while the 4 has a full 128k of RAM and video memory is outside that area, the Max is totally memory mapped, and therefore Max can act only as a 64K model 4. Only 1 serial port is supported. Max's hardware clock is supported, but I found a small bug in it's initialization routine earlier today. Hopefully within the next couple of weeks MSS can make their OS into as good an implementation that the hardware will allow. This is my first venture outside the 2.0-2.3 Trsdos, 3.0-3.0.1 thru 4.0 -4.0.2 VTOS, and the 5.x series of LDOS. There are many similarities between those and DOSPLUS, and I havent thoroughly digested the manual yet. Since it is TRSDOS 6.0 compatible and uses the standard SVC's there should be no problems. It has 8" support built in and the ability to define up to 16 logical drives. I will let you know how it progresses. The system features and enhanced Basic with the DU and DI commands that first appeared in Newdos. There is a global search and replace, sort for arrays. Also and OPTION parameter that allows conversions of Model III compressed basic when saved in ASCII and converted from a model III type disk. Mark, Larry, and all at MSS as well as the Lobo staff are quite excited about this. There is no final release date as yet, but I'll keep you posted. Bill Vermillion Maximul Box 19525 Orlando, FL, 32814-9525  is no final release date as yet, but IMAXIMUL Elctronic Newsletter #15. 1/4/84 . Well things are fairly busy around Lobo these days. Money problems arent over, but things are doing well and we can be sure they are going to stay in business now. That's more than I could have said about 6 months ago, however. . The good news for CPM fans, is that 3.0 is now being shipped. Not in great volume, but they are shipping it. So far about 10 have left this week. And I didnt ask, but I assume some of the machines that were recently shipped had 3.0 in it. . I assume that because it wasnt until some owners got their manuals that it was noticed that SRI didn't include chapter five in the manuals. It is the one on sysgening the system. It will be a couple of weeks before the missing chapter fives show up and get shipped to those that lack them. I guess that is one thing we can thank IBM for - the "new standard" in manuals, all three ring, small, and easily updateable. . The 5meg Winchesters, the small unit in a case, the "shoebox"  model goes into production the end of this month. That is the unit that sells for $995. The drives, using the Xebec controller, were on display and running CPM 3.0 at Comdex. The drivers for LDOS are not done yet, but again I stressed the importance of keeping the LDOS stuff up to date. This is even more important with the current thrust of their ads going to Tandy customers. . Maxes are available for shipment now, but almost everything else is on a backorder basis, including 8" drives, and LDOS from LSI. Sales are good, and there are prospects for some rather substantial orders. . Lobo is talking with another distributor to handle all the distribution on their hard drives for the Apple and IBM. Both of those units are production around April. This makes sense going to someone who know those computers better than the folks in Goleta. Along with manufacturing those hard drives, Lobo has entered into a contract to build several thousand floppies for another company. I guess their reputation for quality work has done well for them. . One of the reasons for the slowness in 3.0 and getting things "together", is that contrary to what was implied in one of Lobo's letters to we users earlier this year, the "venture capitalists" did not bring money to Lobo. In actuallity they took over the debts, and kept Lobo afloat, while looking for source of money, and a then restructured the company. . In many ways this is probably for the better, but I for one would have liked to have known a little more about it. The money problems were part of the reason for the 3.0 delay. . I guess it was the "optimism" of the staff that caused some of that, and expecting that things would go a lost faster with the new organization. I guess that is good in a way but it leads us to expect more sooner than they were able to deliver. . Along with that thought, since they have just started shipping 3.0, and in light of the fact that money is still tight, I dont think that they will hit their self-imposed" deadline of the end of the month to get all the 3.0 shipped. I do expect that they will have all the back-orders and be current with 3.0 by the end of February however. . My Max is approaching 15 months old now. ( My model I celebrated it's 6th year with me by logging in the 27,000th phone call the week after Christmas ). I also run an IBM PC and there is a permanent RS232 link between the two. There are many things the IBM can do with its large memory and extended addressing, but if I had to make a choice and have only one machine, the Max would win hands down. . When you have them side by side you can realize just how slow the PC's screen is. And the keyboard is "hideously" slow too! If you get in the least bit used to a Max and and then try the IBM you think that it takes forever to get the cursor to move across the screen. . Because of this in Basic the screen editing on the PC is slow, and I can get more done faster on the Max. If I didnt have a Max now, I think I'd have to go buy one. If anyone is reading this that isnt a Max owner, you owe it to yourself to check the machine out. . (End of non-sponsored commercial ) . P.S. I have a couple of pages on a newsletter done. I guess if they can get things shaped up in Goleta, I can do the same in Orlando. . Bill Vermillion Maximul (Max80 Independant Microcmputer Users League) Box 19525 Orlando, FL, 32814-9525 me in Orlando. . Bill Vermillion Maximul (Max80 Independant Microcmputer Users League) Box 1952 had to make a choice and have only one machine, the Max would win hands down. . When you have them side by side you can realize just how slow the PC's screen is. And the keyboard is "hideously" slow too! If you get in the least bit used to a Max and and then try the IBM you think that it takes forever to get the cursor to move across the screen. . Because of this in Basic the screen editing on the PC is slow, and I can get more done faster on the Max. If I didnt have a Max now, I think I'd ha!0!*." . " . "."ͱЄ !!n!n1 G͉!" " !"!+6-+~00>0<:860+w+~08:86->12>@2:<ʹ>22!>2: 2>12I>`2:<>22I>p2:<> 2I* #" +[RO@O*[ R#"DM* 6# y * 6͡* [ K~2H| } :/(2:# x *[ R#"DM* 6# y * 6͡* [ K~2<ʚ| } :(/23# x OOO2!>2!>2!2!>>2!>>2!>>2!>!>.>2!>.>2!>.>2!>.:92!>2>2>2:ҥ! 1!p:PROBLEM WITH VIDEO REFRESH RAM (UPPER 6116 CHIP)PROBLEM WITH PROGRAMMABLE CHARACTER RAM (LOWER 6116 CHIP)_:w# x _:#  x {20*[MAX-80 memory test 1.2]= XBank B: ........=!XBank A: ........=" Address range: XXXX-XXXX T Starting time: XX/XX/XX XXX XX:XX:XX XX Current time: $ Ouch! 1$!P͜( ͉!ͱЄ 8w#:/2:o!(@!:w06X6.#|s}|0:8$OͱЄͱЄͱ Є!!!ЄͱЄͱ Є!![ R#"DM* 6# y * 6͡* [ K~2<ʚ| } :(/23# x OOO2!>2!>2!2!>>2!>>2!>>2!>!>.>2!>.>2!>.>2!>.:92!>2>2>2:ҥ! 1!p:PROBLEM WITH VIDEO REFRESH RAM (UPPER 6116 CHIP)PROBLEM WITH PROGRAMMABLE CHARACTER RAM (LOWER 6116 CHIP)_:w# x _:#  x {20*[MAX-80 memory test 1.2]= XBank B: ........=!XBank A: ........=" Address range: XXXX-XXXX T Starting time: XX/XX/XX XXX XX:XX:MEMTEST.COM is the memory tester used by Lobo. MAX14 NSL MAX15 NSL$MEMTEST COM MEMTEST $$$C_:29:2>_ThBK>ͧ :DG:CO>ͧ:DG:CO>ͧ(* ʝzʇDMAʕaʕBʞbʞ:92:>2>2::'2>2:<(O:;<''2>2::'O:=(yy2>2:?'2>2:A(O:@<''2>2:?'O:B(yy20d~=wd~+:DG#Q:D=2DQ:D<2DQ>2CQ>2Cb(e!9y>(!>>22+>H#<2!~!J ^#VW>$ >>=~ #~ #O  nk SETIO 2.0 For the Lobo MAX-80 Control-C to abort, RETURN to install changes. A and B select port, up and down control cursor, right and left increment and decrement value.=(4Port A=(RPort B Baud Rate: Bits/Character: Stop Bits: Parity: Hardware Protocol:$*$)$($0$1$=7 Program aborted.$=7 Changes made.$$50 $75 $110 $134.5$150 $300 $600 $1200 $1800 $2000 $2400 $3600 $4800 $7200 $9600 $19200$$5$6$7$8$$1 $1.5$2 $$None$Odd $Even$$None $DTR/CTS$$150 $300 $600 $1200 $1800 $2000 $2400 $3600 $4800 $7200 $9600 $19200$$5$6$7$8$$DMAʕaʕBʞbʞ:92:>2>2::'2>2:<(O:;<''2>2::'O:=(yy2>2:?'2>2:A(O:@<''2>2:?'O:B(yy20d~=wd~+:DG#Q:D=2DQ:D<2DQ>2CQ>2Cb(e!9y>(!>>22+>H#<2!~!J ^#VW>$ >>=~ #~ #O  nk SETIO 2.0 For the Lobo MAX-80 Control-C to abort, RETURN to install changes. A and B select port, up and down control cursor, right and left increment and decrement value.=(4Port A=(RPort B Baud Rate: Bits/Character: Stop Bits: Parity: Hardware Protocol:$*$)$($0$1$=7 Program aborted.$=7 Changes made.$$50 $75 $110 $134.5$150 $300 $600 $1200 $1800 $2000 $2400 $3600 $4800 $7200 $9600 $19200$$5$6$7$8$$SETIO.ASM allows the user to set the serial ports (A and B) to any configuration that the MAX allows. It is an extremely good program which is helpful quite often. The program source is self-documented. SETIO COM SETIO $$$; SETIO 2.0 ; Routine to change MAX-80 serial I/O ports directly ; ; Written by Ken Kasmar on March 17, 1984 ; ; .Z80 ASEG ORG 100H ; ; Assorted addresses ; BRATEA EQU 0F7D0H ;Port A baud rate BRATEB EQU 0F7D4H ;Port B baud rate SIOCA EQU 0F7E5H ;Port A status port SIOCB EQU 0F7E7H ;Port B status port CONOUT EQU 0DC0CH ;print character to screen BDOS EQU 0005H ;entry vector WMSTRT EQU 0000H ;CP/M warmstart ; ; Misc. data ; INPUT EQU 06 ;Console input PRNT EQU 09 ;Print string ACOLMN EQU 20 ;column port A data will be in BCOLMN EQU 50 ;column port B data will be in TOPROW EQU 9 ;top row that all data will be in ESC EQU 27 ;ESCAPE DIMC EQU ')' ;dim character BRITEC EQU '(' ;bright character CR EQU 13 ;Carriage return LF EQU 10 ;Line feed EQUAL EQU '=' ;Position cursor CNTLC EQU 'C'-40H ;Control C UP EQU '\'-40H ;up arrow DOWN EQU ']'-40H ;down arrow RIGHT EQU '_'-40H ;right arrow LEFT EQU '^'-40H ;left arrow ; ; ; CALL LOAD ;load in initial values CALL INIT MAIN: CALL CURSOR CALL GETCMD ;get command from keyboard JR MAIN ; ; Load initial port values ; LOAD: LD A,(BRATEA) LD (BAUDA),A LD A,(BRATEB) LD (BAUDB),A RET ; ; Initialization routine ; INIT: LD DE,CLS ;Clear screen CALL PRINT LD DE,SIGNON ;Print signon message CALL PRINT LD DE,CUROFF ;turn cursor character off CALL PRINT LD E,0 ;do port A first STINIT: LD D,5 ;number of values per port INITLP: DEC D ;decrement counter LD B,D ;value number LD C,E ;port number LD A,0 ;set for DIM CALL DSPDTA ;print value for port XOR A OR D JR NZ,INITLP ;continue looping OR E ;done port B yet RET NZ ;yup, so return LD E,1 JR STINIT ; ; Make value at cursor position bright ; CURSOR: LD A,(CROW) LD B,A LD A,(CPORT) LD C,A LD A,1 CALL DSPDTA RET ; ; Make value at cursor position dim ; DIMIT: LD A,(CROW) LD B,A LD A,(CPORT) LD C,A LD A,0 CALL DSPDTA RET ; ; Get valid command from operator ; GETCMD: LD C,INPUT ;get input from keyboard LD E,0FFH CALL BDOS OR A JR Z,GETCMD CP CNTLC ;abort program JP Z,EXIT CP CR ;make changes and exit program JP Z,CHANGE CP UP ;move cursor up one row JP Z,DUP CP DOWN ;move cursor down one row JP Z,DDOWN CP LEFT ;decrement value under cursor JP Z,DLEFT CP RIGHT ;increment value under cursor JP Z,DRIGHT CP 'A' ;change to port A JP Z,GOA CP 'a' JP Z,GOA CP 'B' ;change to port B JP Z,GOB CP 'b' JP Z,GOB JR GETCMD ; ; Install changes made ; CHANGE: LD A,(BAUDA) LD (BRATEA),A LD A,(BAUDB) LD (BRATEB),A LD A,3 ;register 3 LD (SIOCA),A LD A,(BITSA) LD B,6 LP1: SLA A DJNZ LP1 LD (SIOCA),A LD A,4 LD (SIOCA),A LD C,0 LD A,(PRITYA) OR A JR Z,NOPRTY SET 0,C OR C LD C,A NOPRTY: LD A,(STOPA) INC A SLA A SLA A OR C LD (SIOCA),A LD A,5 LD (SIOCA),A LD A,(BITSA) LD B,5 LP2: SLA A DJNZ LP2 LD C,A LD A,(PROTOA) OR A JR Z,NOPRTO BIT 7,C NOPRTO: LD A,C LD (SIOCA),A ;stuff for port B LD A,3 ;register 3 LD (SIOCB),A LD A,(BITSB) LD B,6 LP3: SLA A DJNZ LP3 LD (SIOCB),A LD A,4 LD (SIOCB),A LD C,0 LD A,(PRITYB) OR A JR Z,NOPRTI SET 0,C OR C LD C,A NOPRTI: LD A,(STOPB) INC A SLA A SLA A OR C LD (SIOCB),A LD A,5 LD (SIOCB),A LD A,(BITSB) LD B,5 LP4: SLA A DJNZ LP4 LD C,A LD A,(PROTOB) OR A JR Z,NOPROT BIT 7,C NOPROT: LD A,C LD (SIOCB),A LD DE,NORMAL CALL PRINT JP BYE ;say bye bye ; ; Decrement value at cursor by one ; DLEFT: CALL GETDTA LD A,(HL) OR A RET Z ;value is already zero DEC A LD (HL),A ;store new value RET ; ; Increment value at cursor by one ; DRIGHT: CALL GETDTA LD A,(HL) INC A LD C,A PUSH HL LD HL,MAXS LD A,(CROW) LD E,A LD D,0 ADD HL,DE LD A,(HL) POP HL CP C RET Z LD (HL),C RET ; GETDTA: LD HL,BAUDA LD A,(CPORT) OR A ;port A or B JR Z,ITSA ;do port A LD HL,BAUDB ITSA: DEC HL LD A,(CROW) LD B,A INC B CONTLP: INC HL DJNZ CONTLP RET ; ; Move  cursor up one position ; DUP: CALL DIMIT LD A,(CROW) OR A ;already zero? RET Z DEC A ;decrement position LD (CROW),A RET ; ; Move cursor down one position ; DDOWN: CALL DIMIT LD A,(CROW) CP 4 ;lower than maximum? RET Z INC A ;increment position LD (CROW),A RET ; ; Change to port A ; GOA: CALL DIMIT LD A,0 LD (CPORT),A ;change current port to A RET ; ; Change to port B ; GOB: CALL DIMIT LD A,1 LD (CPORT),A ;change current port to B RET ; ; Display specified value in proper position ; Input parameters: ; A : 1=bright, 0=dim ; B : number of value to be displayed ; C : 0=port A, 1=port B ; DSPDTA: PUSH DE PUSH HL LD DE,DIM OR A ;bright or dim JR Z,ITDIM LD DE,BRITE ITDIM: CALL PRINT ;set intensity to proper mode LD HL,BAUDA LD A,C OR A ;port A or B LD A,ACOLMN JR Z,ITISA ;do port A LD HL,BAUDB LD A,BCOLMN ;change for port B ITISA: LD (PLCE+1),A DEC HL LD A,TOPROW-1 LD C,B INC B CNTLP: INC HL INC A DJNZ CNTLP  LD (PLCE),A SLA C ;multiply by 2 LD A,(HL) ;get number value LD HL,TXTTBL ADD HL,BC LD E,(HL) INC HL LD D,(HL) EX DE,HL LD D,A INC D FNDLP: LD A,'$' LD B,0FFH CPIR ;find correct message for value DEC D XOR A OR D JR NZ,FNDLP ;not done yet! EX DE,HL ;move address into DE PUSH DE CALL POSCUR PLCE: DB 0,0 ;data for cursor positioning POP DE CALL PRINT ;print value POP HL POP DE RET ; ; Position cursor on screen ; POSCUR: EXX ;hide registers away EX AF,AF' ;save acc and flags for a better day POP HL ;get address where data should be LD A,ESC CALL CONSOL LD A,EQUAL ;setup cursor position command CALL CONSOL ;tell cursor to get ready to move LD A,(HL) ;get new Y position ADD A,20H ;the screen driver wants Y+20H CALL CONSOL ;send it to screen INC HL ;next byte LD A,(HL) ;get new X position ADD A,20H ;the screen driver wants X+20H CALL CONSOL ;send it to screen INC HL ;correct return address PUSH HL ;put it back where it belongs EX AF,AF' ;recall forgotten information EXX ;search for those hidden registers RET ; ; Write ASCII character to screen ; CONSOL: EXX ;save registers LD C,A ;output byte to proper register CALL CONOUT ;actually write byte to console EXX ;restore registers RET ; ; Print a string of characters pointed to by DE ; PRINT: PUSH AF PUSH BC PUSH HL LD C,PRNT CALL BDOS POP HL POP BC POP AF RET ; ; Exit program and abort changes ; EXIT: LD DE,QUIT ;print exiting message CALL PRINT BYE: LD DE,CURON ;turn cursor back on CALL PRINT JP WMSTRT ;re-enter CP/M ; ; Asst. storage ; BAUDA: DB 0 ;current baud for port A BITSA: DB 3 ;8 bits/character for port A STOPA: DB 0 ;1 stop bits for port A PRITYA: DB 0 ;no parity for port A PROTOA: DB 0 ;no protocol for port A ; BAUDB: DB 0 ;current baud for port B BITSB: DB 3 ;8 bits/character for port B STOPB: DB 0 ;1 stop bit for port B PRITYB: DB 0 ;no parity for port B PROTOB: DB 1 ;DTR protocol for port B ; CPORT: DB 0 ;port cursor is on CROW: DB 0 ;row cursor is on ; ; Assorted data tables ; MAXS: DB 16,4,3,3,2 ;maximum settings TXTTBL: DW BAUDT,BITST,STOPT,PRTYT,PROTOT ;positions of text tables ; ; Messages to be printed out ; SIGNON: DB 'SETIO 2.0',CR,LF ;Sign on messages DB 'For the Lobo MAX-80',CR,LF,LF DB 'Control-C to abort, RETURN to install changes. ' DB 'A and B select port,',CR,LF DB 'up and down control cursor, right and left ' DB 'increment and decrement value.' DB ESC,EQUAL,28H,ACOLMN+20H DB 'Port A' DB ESC,EQUAL,28H,BCOLMN+20H DB 'Port B',CR,LF DB 'Baud Rate:',CR,LF DB 'Bits/Character:',CR,LF DB 'Stop Bits:',CR,LF DB 'Parity:',CR,LF DB 'Hardware Protocol:' DB '$' ; CLS: DB ESC,'*$' ;Clear screen DIM: DB ESC,DIMC,'$' ;set to dim mode BRITE: DB ESC,BRITEC,'$' ;set to brite mode CUROFF: DB ESC,'0$' ;turn cursor character off CURON: DB ESC,'1$' ;turn cursor character on ; QUIT: DB ESC,EQUAL,23+20H,20H,'Program aborted.$' ;Exit message NORMAL: DB ESC,EQUAL,23+20H,20H,'Changes made.$' ; BAUDT: DB '$' DB '50 $' ;Table of baud rates DB '75 $' DB '110 $' DB '134.5$' DB '150 $' DB '300 $' DB '600 $' DB '1200 $' DB '1800 $' DB '2000 $' DB '2400 $' DB '3600 $' DB '4800 $' DB '7200 $' DB '9600 $' DB '19200$' ; BITST: DB '$' DB '5$' ;Table of bits/character DB '6$' DB '7$' DB '8$' ; STOPT: DB '$' DB '1 $' ;Table of stop bits DB '1.5$' DB '2 $' ; PRTYT: DB '$' DB 'None$' ;Table of parity DB 'Odd $' DB 'Even$' ; PROTOT: DB '$' DB 'None $' ;Table of hardware protocol DB 'DTR/CTS$' ; END  ESC,'*$' ;Clear screen DIM: DB ESC,DIMC,'$' ;set to dim mode BRITE: DB ESC,BRITEC,'$' ;set to brite mode CUROFF: DB ESC,'0$' ;turn cursor character off CURON: DB ESC,'1$' ;turn cursor character on ; QUIT: DB ESC,EQUAL,23+20H,20H,'Program aborte :2H2N2Q2e2E2@!!5(4~}G~#_6# $!'›!*›u Done. $ String too long. $ Disk error! $6# $!'›!*›u Done. $SETIO COM SETIO DOCSETIO MACF !"TURNKEY $$$TURNKEY.COM (and .MAC) is a nice utility that allows you to specify a startup command for MAX; just type TURNKEY command and that command will happen whenever you cold boot. To remove the command, just type TURNKEY. Very useful!! TURNKEY $$$; ;TURNKEY utility October 31, 1982 ; .Z80 ASEG ORG 100H ; LENGTH EQU 16 ;ALLOWABLE STRING LENGTH IN CCP SECTOR ; BDOS EQU 5 STRING EQU 0080H ; LD A,(0002H) ;FIX BIOS JUMPS LD (X1+2),A LD (X2+2),A LD (X3+2),A LD (X4+2),A LD (X5+2),A LD (X6+2),A ; LD HL,STRING+2 LD DE,STRING+1 LD BC,LENGTH-1 LDIR ;EAT ONE SPACE ; LD HL,STRING ;GET INPUT STRING LENGTH DEC (HL) ;WE STRIPPED A SPACE JP P,DIDOK ;IF NON-ZERO INC (HL) ;OH NO WE DIDN'T! DIDOK: LD A,(HL) ;LENGTH OF STRING SUB LENGTH ;LEAVE ONE BYTE FOR ZERO JP NC,TOOLNG ;STRING TOO LONG TO FIT IN TURNKEY LD B,A ;-NUMBER OF CHARACTERS TO CLEAR LD A,(HL) INC HL ;FIRST BYTE OF STRING LD E,A LD D,0 ADD HL,DE ;PAST THE STRING FILLSP: LD (HL),0 ;FILL END OF STRING INC HL INC B JR NZ,FILLSP ; LD BC,BUFFER X6: CALL 0024H ;SETDMA LD C,0 X5: CALL 001BH ;SELECT, DRIVE A: X1: CALL 0018H ;HOME LD BC,2 X2: CALL 0021H ;SETSEC, SECTOR 2 X3: CALL 0027H ;READ AND A JP NZ,ERR ; LD HL,STRING LD DE,BUFFER+7 LD BC,LENGTH+1 ;STRING PLUS LENGTH BYTE LDIR LD C,1 X4: CALL 002AH ;WRITE AND A JP NZ,ERR ; LD DE,DUNM LD C,9 CALL BDOS JP 0 DUNM: DB 'Done.',0DH,0AH,'$' ; TOOLNG: LD DE,TOOLM LD C,9 CALL BDOS JP 0 TOOLM: DB 'String too long.',0DH,0AH,'$' ; ERR: LD DE,ERRM LD C,9 CALL BDOS JP 0 ERRM: DB 'Disk error!',0DH,0AH,'$' ; BUFFER EQU $ ; END  ;LENGTH OF STRING SUB LENGTH ;LEAVE ONE BYTE FOR ZERO JP NC,TOOLNG ;STRING TOO LONG TO FIT IN TURNKEY LD B,A ;-NUMBER OF CHARACTERS TO CLEAR LD A,(HL) INC HL ;FIRST BYTE OF STRING LD E,A LD D,0 ADD HL,DE ;PAST THE STRING FILLSP: LD (HL),0 ;FILL END OF STRING INC HL INC B JR NZ,FILLSP ; LD BC,BUFFER X6: CALL 0024H ;SETDMA LD C,0 X5: CALL 001BH ;SELECT, DRIVE A: X1: CALL 0018H ;HOME LD BC,2 X2: CALL 0021H ;SETSEC, SECTOR 2 X3: CALL 0027H ;READ AND A10 WIDTH 255 30 FOR X=0 TO 9:READ N:POKE &HF7E0,X:POKE &HF7E1,N:NEXT 40 DATA 119,80,97,6,27,10,25,26,1,8 50 REM 119,80,97,6,27,10,25,26,0,8 OR X=0 TO 9:READ N:POKE &HF7E0,X:POKE &HF7E1,N:NEXT 40 DATA 119,80,97,6,27,10,25,26,1,8 50 REM 119,80,97,6,SETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY $$$ 10 WIDTH 255 20 PRINT CHR$(27);"*"; 30 FOR X=0 TO 9:READ N:POKE &HF7E0,X:POKE &HF7E1,N:NEXT 40 DATA 119,80,97,6,24,10,13,23,3,9 50 REM 119,80,97,6,27,10,25,26,0,8 OR X=0 TO 9:READ N:POKE &HF7E0,X:POKE &HF7E1,N:NEXT 40 DATA 119,80,97,6,24,10,13,23,3SETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL $$$VFUZZY.BAS and VSMALL.BAS are two programs demonstrating the programmable character set of MAX. You have to see these to believe them... Don't adjust your monitor when you run these; the only way to remove them is to cold boot. Be prepared for a shock!! TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL BAS(VFUZZ/SM$$$![f0v PL 8MAX14 NSL MAX15 NSL$MEMTEST COM MEMTEST DOCSETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL BAS(VFUZZ/SMDOC)WSKB $$$WSKB.COM (and .MAC) is a utility which reconfigures your MAX arrow keys for WordStar (tm). Again, useful, but I did it with XCONFIG myself. You might try them for size... SETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL BAS(VFUZZ/SMDOC)WSKB COM*WSKB $$$; .Z80 ASEG ORG 100H ; LD HL,NEWKEY LD DE,(0001H) ;BIOS ADDRESS LD E,66H ;POINT TO CURSOR CONTROL KEY LIST LD BC,4 LDIR RET ; NEWKEY: DB 05H,18H,13H,04H ;CTRL/E, CTRL/X, CTRL/S, CTRL/D ; END SETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL BAS(VFUZZ/SMDOC)WSKB COM*WSKB DOC+WSKB $$$ ;******************************************************** ;* This program allows the Lobo Max-80 F3 and F4 keys ;* to be reprogrammed to anything the user likes. ;* ;* Ver 1.0 -- Tom Marazita 8/14/83 ;******************************************************** ; ;General equates ; BDOS EQU 0005 ;BDOS VECTOR CONIN EQU 01H ;CONSOLE INPUT FUNCTION DCONIN EQU 06H ;DIRECT CONSOLE INPUT FUNCTION CONOUT EQU 02H ;CONSOLE OUT FUNCTION F3 EQU 0DC6EH ;ADDRESS OF F3'S CHARACTER IN BIOS F4 EQU 0DC6FH ;ADDRESS OF F4'S CHARACTER IN BIOS CR EQU 0DH ;A CARRIAGE RETURN... LF EQU 0AH ;...AND A LINE FEED ; ;Program starts here, naturally. ; ORG 100H ;YES,ANOTHER PROGRAM THAT STARTS AT 100H START LXI D,SIGNON ;POINT TO SIGN ON MESSAGE CALL PUTMSG ;SAY HELLO TO USER... MVI C,CONIN CALL BDOS ;GET KEY CHOICE FROM USER CPI '1' ;IS IT KEY CHOICE 1? JZ ONE CPI '2' ;OR CHOICE TWO? JZ TWO LXI D,BADKEY ;NEITHER, PRINT BADKEY MESSAGE AND EXIT CALL PUTMSG RET ;RETURN TO CPM ONE LXI H,F3 ;POINT TO F3 ADDRESS JMP SKIP2 ;SKIP OVER KEY TWO STUFF TWO LXI H,F4 ;POINT TO F4 ADDRESS SKIP2 SHLD SAVEKEY ;SAVE IT FOR LATER, 'CAUSE BDOS MIGHT EAT IT. LXI D,QMSG ;POINT TO QUERY MESSAGE CALL PUTMSG WAIT MVI C,DCONIN ;GET NEW CHAR FROM USER MVI E,0FFH ;FF MEANS GET A CHAR. CALL BDOS ORA A JZ WAIT ;IF ZERO, THEN NO CHAR YET LHLD SAVEKEY ;RESTORE KEY ADDRESS MOV M,A ;OTHERWISE, STORE CHAR AT KEY ADDRESS CALL ECHO ;ECHO KEY TO CONSOLE LXI D,EMSG ;PRINT ENDING MSG CALL PUTMSG RET ;RETURN TO CPM ; ;Call this with a char in A and it will be printed. ; ECHO STA SAVECHR ;SAVE IT FOR LATER CPI 20H ;IF A CTRL CHAR, PRINT '^CHAR' CC CTRLCHR ;YES, A WAS LESS THAN 20 SO ITS A CTRL CHAR LDA SAVECHR ;GET NEW CHAR INTO E FOR BDOS MOV E,A MVI C,CONOUT ;ECHO NEW CHAR TO USER CALL BDOS RET CTRLCHR ADI '@' ;FOLD TO PRINTABLE CHAR STA SAVECHR ;SAVE NEW CHAR FOR LATER PRINTING MVI E,'^' ;PRINT THIS NEAT THING TO SHOW IT IS CTRL  MVI C,CONOUT CALL BDOS RET ; ;Enter here with DE pointing to a string to be printed ; PUTMSG MVI C,9 ;BDOS FUNCTION TO PRINT A STRING TO CON: CALL BDOS ;PRINT THE STRING RET ; ;Nothing but messages and storage past this point. ; SIGNON DB 'Which function key is it your desire to change:' DB CR,LF,LF DB ' (1) F3 or (2) F4' DB CR,LF,LF,'Hit 1 or 2, Oh soft one... $' QMSG DB CR,LF,'Now, hit the key corresponding to the new value: $' EMSG DB CR,LF,LF,'The key has been reprogrammed, soft one.$' BADKEY DB CR,LF,LF,'Illegal choice, program terminated.$' SAVEKEY DS 2 SAVECHR DS 1 END CHR ;SAVE IT FOR LATER CPI 20H ;IF A CTRL CHAR, PRINT '^CHAR' CC CTRLCHR ;YES, A WAS LESS THAN 20 SO ITS A CTRL CHAR LDA SAVECHR ;GET NEW CHAR INTO E FOR BDOS MOV E,A MVI C,CONOUT ;ECHO NEW CHAR TO USER CALL BDOS RET CTRLCHR ADI '@' ;FOLD TO PRINTABLE CHAR STA SAVECHR ;SAVE NEW CHAR FOR LATER PRINTING MVI E,'^' ;PRINT THIS NEAT THING TO SHOW IT IS CTRL XFUNC.ASM is a program which allows you to reprogram your F3 and F4 function keys. MAX14 NSL MAX15 NSL$MEMTEST COM MEMTEST DOCSETIO COM SETIO DOCSETIO MACF !"TURNKEY COM#TURNKEY DOC$TURNKEY MAC %&VFUZZY BAS'VSMALL BAS(VFUZZ/SMDOC)WSKB COM*WSKB DOC+WSKB MAC,XFUNC ASM-./XFUNC $$$:10C60000C305C7C301C750002020202020202020C0 :08C61000202020202020200042 :04C6590008C617C632 :10C67700434F4D01242424202020202053554200DD :01C6870000B2 :10C6BC001600004449522084CA4C4953545DCB5453 :10C6CC0059504561CB55534552C0CC44465520CAB0 :10C6DC00CC474F2020D7CC4552412035CB53415627 :10C6EC0045FACB52454E207CCC4745542081CD4A4F :10C6FC00554D50D2CCAF3207C63177C6C5791F1F06 :10C70C001F1FE60F5FCD48C8CD0BC8322AC7C179B1 :10C71C00E60F325CC82803CD10C8117AC63E00B7AC :10C72C002FC42AC82F322AC73A07C6B72029317717 :10C73C00C6CDAAC7CD00C8C641CDB1C7CD46C8B776 :10C74C002812FE0A3809D60AF53E31CDB1C7F1C61A :10C75C0030CDB1C7CD6AC8CDCBC8CD04C8CD00C8CB :10C76C00325CC8CDE3C9C4F2C8118BC7D53ADAC95B :10C77C00B7C2DCCCCD62CAC2DCCC7E23666FE9CDFD :10C78C00CFC9CDE3C93A9CC6D62021DAC9B6C2F2CC :10C79C00C8189BCDE8C74E6F2046696CE5C93E0DA5 :10C7AC00CDB1C73E0AC50E025FE5CD0500E1C1C99A :10C7BC000E01CDE1C7C361C8F53E00B72806F1C52F :10C7CC000E0518E4F1F5CDB1C7F1FE0ACAE1CBC9EB :10C7DC00119BC60E14C5CD0500C1B7C9F5CDAAC7AE :10C7EC00F1E3F 5CDF5C7F1E3C97ECDB1C77E23B733 :10C7FC00C8F818F50E1918091180000E1A18020E37 :10C80C000DC305005F0E0E18F8AF32BBC6119BC6E8 :10C81C000E0FCD05003CC90E1018F7119BC60E115A :10C82C0018F00E1218EC212AC77EB7C83600117A00 :10C83C00C60E1318CC3E005F18021EFF0E2018C146 :10C84C00CD46C887878787215CC8B6320400C93EAD :10C85C0000320400C9FE61D8FE7BD0E65FC93A2ADB :10C86C00C7B72845117AC6D5CD1CC8D1283B3A8903 :10C87C00C63D329AC6CDDFC7202F1107C6218000D6 :10C88C00015000EDB02188C636002335117AC6CD93 :10C89C0023C828153E24CDB1C72108C6CDF5C7CD78 :10C8AC00E1C8C8CD32C8C33AC7CD32C8CD4CC83E9A :10C8BC007DCDB1C70E0A1106C6CD0500C35BC821DC :10C8CC0007C64604237ECD61C87710F836002108D0 :10C8DC00C62259C6C9D50E0BCDE1C7C4BCC7D1C938 :10C8EC00CD3EC9FE10D8CDAAC72A5BC67EFE213824 :10C8FC0008E5CDB1C7E12318F3CDEDC7BFCD32C8E4 :10C90C00C33AC71AB7C8FE2038DCC8FE3DC8FE5F64 :10C91C00C8FE2EC8FE3AC8FE3BC8FE3CC8FE3EC947 :10C92C00ED5B59C61AB7C8FE20C01318F7856FD037 :10C93C0024C9CDE3C921A6C6060B7E2BFE202004FC :10C94C0010F81804FE48282B219CC60100117EFE0D :10C95C0020281823D630FE0A301357790707078191 :10C96C00380B8138088238054F10E379C9C3F2C8F7 :10C97C00CDE3C9219CC6110000060B7EFE20282D9C :10C98C00FE482829D63038E5FE0A3806D607FE10B0 :10C99C0030DB234F7A07070707E6F0577B070707BB :10C9AC00075FE60FB2577BE6F0B15F10CEEB7DC9A7 :10C9BC0021800081CD39C97EC9AF329BC6CDD9C982 :10C9CC00C81807CDD9C9C83A5CC8C310C83E00B74F :10C9DC00C83D215CC8BEC9219BC6AF32DAC9CD2C7B :10C9EC00C9ED535BC61AB7280ADE4047131AFE3A44 :10C9FC0028071B3A5CC87718067832DAC97013AF6F :10CA0C0032BEC60608CD33CA0603FE2E200613CD51 :10CA1C0033CA1803CD54CA060423360010FBED5359 :10CA2C0059C63ABEC6B7C9CD0FC9281C23FE2A2049 :10CA3C0007363FCD5ACA18077713FE3FCC5ACA1097 :10CA4C00E6CD0FC9C81318F923362010FBC93ABE1E :10CA5C00C63C32BEC6C921BFC60E0B119CC606040D :10CA6C001ABE200A132310F81AFE202004C9231022 :10CA7C00FD23230D20E50CC93E80F5CDE3C9CDC5C2 :10CA8C00C9219CC67EFE20CC2DCBCD2CC9060028FE :10CA9C0016FE412806FE53200E068013ED5359C690 :10CAAC00FE532803F1AFF5F1571E00D57832D4CAE6 :10CABC00CD27C8CC9FC728673D0F0F0FE6604F3EB0 :10CACC000ACDBCC9D1D5A2FE00204AD17B1CD5E62B :10CADC0003F52005CDAAC71808CDEDC720207C2072 :10CAEC00A0060178CDBCC9E67FFE202013F1F5FE2F :10CAFC0003200B3E09CDBCC9E67FFE2028163E2044 :10CB0C00CDB1C70478FE0C300BFE0920D63E2ECDDD :10CB1C00B1C718CFF1CDE1C82005CD2EC81897D1DB :10CB2C00C9060B363F2310FBC9CDE3C9FE0B2012FF :10CB3C00CDE8C7416C6CBFCDBCC7FE59C23AC7CD5E :10CB4C00AAC7CDC5C9AF47CDB4CA119BC6CD3DC888 :10CB5C00C93EFF1801AF32C6C7CDE3C9C2F2C8CD7A :10CB6C002CC932EBCB280513EB2259C6CDC5C9CD48 :10CB7C0015C8CADECBCDAAC73E1732BCC621BDC66E :10CB8C0036FF060021BDC67EFE803809E5CDDCC728 :10CB9C00E1203DAF7734218000CD39C97EE67FFEA0 :10CBAC001AC8FE0D280EFE0A280AFE09280DCDC44F :10CBBC00C7041812CDC4C70600180B3E20CDC4C73D :10CBCC000478E60720F5CDE1C828B9FE03C818B4EF :10CBDC003DC8C37BCDE521BCC635201036163E00C2 :10CBEC00FE502808CDBCC7FE03CA8BC7E1C9CD3E99 :10CBFC00C96F2600E5CD4DCC0E16CD1EC8E1283AE6 :10CC0C00AF32BBC6CD2CC913FE5328021B29ED53E2 :10CC1C0059C61100017CB528182BE521800019E5B7 :10CC2C00CD07C8119BC60E15CDE1C7D1E1200B185D :10CC3C00E4119BC6CD23C83C2003CDE1CDCD04C867 :10CC4C00C9CDE3C9C2F2C8CDC5C9CD27C8119BC691 :10CC5C00C8D5CDE8C744656C6574652046696C65BC :10CC6C00BFCDBCC7D1FE59C28BC7D5CD3DC8D1C92C :10CC7C00CD4DCC3ADAC9F5219BC611ABC6011000DB :10CC8C00EDB0CD2CC9FE3D2028EB232259C6CDE3B7 :10CC9C00C9201EF14721DAC97EB72804B8702011CB :10CCAC0070AF329BC6119BC60E17CD1EC8C0CD9F50 :10CCBC00C7C37BCDCDECC85FCD48C8C38EC7CDEC08 :10CCCC00C832A9CD18F5CD7CC9183C210001183704 :10CCDC003A9CC6FE2020143ADAC9B7CA8EC73D3238 :10CCEC005CC8CD5BC8CD10C8C38EC73AA4C6FE20A5 :10CCFC00C2F2C82177C611A4C6010300EDB0210011 :10CD0C0001E5CD8BCDE1C02269CDCDCFC9CDE3C935 :10CD1C0021DAC9E57E329BC621ABC6CDE6C9E17EE0 :10CD2C0032ABC6AF32BBC6115C00219BC6012100E1 :10CD3C00EDB02108C67EB72807FE2028032318F57E :10CD4C0006001181007E12B7280504231318F6780B :10CD5C00328000CDAAC7CD04C8CD4CC8CD0001CDC2 :10CD6C0004C8CD5BC8CD10C8C33AC7E1CD41C8CD0E :10CD7C00CFC9C3F2C8CD7CC9E5CDE3C9E120F3CD61 :10CD8C0094CDF5CD41C8F1C922C4CDCD46C83242AF :10CD9C00C832ABCDCDC5C9CD15C8201B3E00FE0099 :10CDAC00280932ABCD5FCD48C818E921DAC9AFB636 :10CDBC00C277CD360118DD2100013EC5BC3816E521 :10CDCC00EBCD07C8119BC6CDDFC7E1200611800053 :10CDDC001918E73DC8CDE8C746756CEC3E01B7C9DC :0000000000 0CD2CC9FE3D2028EB232259C6CDE3B7 :10CC9C00C9201EF14721DAC97EB72804B8702011CB :10CCAC0070AF329BC6119BC60E17CD1EC8C0CD9F50 :10CCBC00C7C37BCDCDECC85FCD48C8C38EC7CDEC08 :10CCCC00C832A9CD18F5CD7CC9183C210001183704 :10CCDC003A9CC6FE2020143ADAC9B7CA8EC73D3238 :10CCEC005CC8CD5BC8CD10C8C38EC73AA4C6FE20A5 :10CCFC00C2F2C82177C611A4C6010300EDB0210011 :10CD0C0001E5CD8BCDE1C02269CDCDCFC9CDE3C935 :10CD1C0021DAC9E57E329BC621ABC6CDE6C9E17EE0 :10CD2C0032ABC6AF32BBC6115C00219BC6012100E1 :10CD3C00EDB02108C67EB72807FE2028032318F57E :10CD4C0006001181007E12B7280504231318F6780B :10CD5C00328000CDAAC7CD04C8CD4CC8CD0001CDC2 :10CD6C0004C8CD5BC8CD10C8C33AC7E1CD41C8CD0E :10CD7C00CFC9C3F2C8CD7CC9E5CDE3C9E120F3CD61 :10CD8C0094CDF5CD41C8F1C922C4CDCD46C83242AF :10CD9C00C832ABTher i fil o thi dis calle ZCPR-MAX.HEX thi i wha yo nee t instal zcp int you operatin syste o th MAX- 80 Wit thi dis i driv an you SYSTE dis i driv A her i ho t g abou it: B>a:ddt a:cpm60.com <--- I yo hav alread XCONFIGe you DDT VERS 2.0CPM60.COM and saved it under a NEXT PCdifferent name, then use that file. 3480 0100 -izcpr-max.hex -r4480 NEXT PC 3480 0000 -^C B>save 52 cpmz.com B>a:xconfi cpmz.co <--- follo prompt t writ th fil to the system tracks on this disk. Afte yo finis wit th installatio o cpmz.co wit th xconfi progra above yo ma the boo th disk Yo wil kno tha th chang wa successfu whe yo see A a th signo prompt after booting. Enjoy! Jim Smith  TITLE 'ZCPR Version 1.0' ; ; CP/M Z80 Command Processor Replacement (CPR) Version 1.0 ; CCPZ CREATED AND CUSTOMIZED FOR ARIES-II BY RLC ; FURTHER MODIFIED BY RGF AS V2.0 ; FURTHER MODIFIED BY RLC AS V2.1 ; FURTHER MODIFIED BY KBP AS V2.2 ; FURTHER MODIFIED BY RLC AS V2.4 (V2.3 skipped) ; FURTHER MODIFIED BY RLC AS V2.5 ; FURTHER MODIFIED BY RLC AS V2.6 ; FURTHUR MODIFIED BY SBB AS V2.7 ; FURTHER MODIFIED BY RLC AS V2.8 ; FURTHER MODIFIED BY RLC AS V2.9 ; FURTHER MODIFIED BY RLC AS V3.0 ; FURTHER MODIFIED BY RLC AS V3.1 ; FURTHER MODIFIED BY RLC AS V4.0 ; ZCPR VERSION 1.0 CREATED FROM CCPZ VERSION 4.0 BY RLC IN ; A COORDINATED EFFORT WITH CCP-GROUP ; ; ZCPR is a group effort by CCP-GROUP, whose active membership involved ; in this project consists of the following: ; RLC - Richard Conn ; RGF - Ron Fowler ; KBP - Keith Peterson ; FJW - Frank Wancho ; The following individual also provided a contribution: ; SBB - Steve Bogolub ; ; ;******** Structure Notes ******** ; ; This CPR is divided into a number of major sections. The following ; is an outline of these sections and the names of the major routines ; located therein. ; ; Section Function/Routines ; ------- ----------------- ; ; -- Opening Comments, Equates, and Macro Definitions ; ; 0 JMP Table into CPR ; ; 1 Buffers ; ; 2 CPR Starting Modules ; CPR1 CPR RESTRT RSTCPR RCPRNL ; PRNNF ; ; 3 Utilities ; CRLF CONOUT CONIN LCOUT LSTOUT ; READF READ BDOSB PRINTC PRINT ; GETDRV DEFDMA DMASET RESET BDOSJP ; LOGIN OPENF OPEN GRBDOS CLOSE ; SEARF SEAR1 SEARN SUBKIL DELETE ; RESETUSR GETUSR SETUSR ; ; 4 CPR Utilities ; SETUD SETU0D UCASE REDBUF CNVBUF ; BREAK USRNUM ERROR SDELM ADVAN ; SBLANK ADDAH NUMBER NUMERR HEXNUM ; DIRPTR SLOGIN DLOGIN COMLOG SCANER ; CMDSER ; ; 5 CPR-Resident Commands and Functions ; 5A DIR DIRPR FILLQ ; 5B ERA ; 5C LIST ; 5D TYPE PAGER ; 5E SAVE ; 5F REN ; 5G USER ; 5H DFU ; 5I JUMP ; 5J GO ; 5K COM CALLPROG ERRLOG ERRJMP ; 5L GET MEMLOAD PRNLE ; ; FALSE EQU 0 TRUE EQU NOT FALSE ; ; CUSTOMIZATION EQUATES ; ; The following equates may be used to customize this CPR for the user's ; system and integration technique. The following constants are provided: ; ; REL - TRUE if integration is to be done via MOVCPM ; - FALSE if integration is to be done via DDT and SYSGEN ; ; BASE - Base Address of user's CP/M system (normally 0 for DR version) ; This equate allows easy modification by non-standard CP/M (eg,H89) ; ; CPRLOC - Base Page Address of CPR; this value can be obtained by running ; the BDOSLOC program on your system, or by setting the ; MSIZE and BIOSEX equates to the system memory size in ; K-bytes and the "extra" memory required by your BIOS ; in K-bytes. BIOSEX is zero if your BIOS is normal size, ; and can be negative if your BIOS is in PROM or in ; non-contiguous memory. ; ; RAS - Remote-Access System; setting this equate to TRUE disables ; certain CPR commands that are considered harmful in a Remote- ; Access environment; use under Remote-Access Systems (RBBS) for ; security purposes ; REL EQU FALSE ;SET TO TRUE FOR MOVCPM INTEGRATION ; BASE EQU 0 ;BASE OF CP/M SYSTEM (SET FOR STANDARD CP/M) ; IF REL CPRLOC EQU 0 ;MOVCPM IMAGE ELSE ; ; If REL is FALSE, the value of CPRLOC may be set in one ; of two ways. The first way is to set MSIZE and BIOSEX ; as described above using the following three lines: ; ;MSIZE EQU 56 ;SIZE OF MEM IN K-BYTES ;BIOSEX EQU 0 ;EXTRA # K-BYTES IN BIOS ;CPRLOC EQU 3400H+(MSIZE-20-BIOSEX)*1024 ;CPR ORIGIN ; ; The second way is to obtain the origin of your current ; CPR using BDSLOC or its equivalent, then merely set CPRLOC ; to that value as as in the following line: ; CPRLOC EQU 0C600H ;MAX-80 (FILL IN WITH BDOSLOC SUPPLIED VALUE) ; ; Note that you should only use one method or the other. ; Do NOT define CPRLOC twice! ; ; The following gives the required offset to load the CPR into the ; CP/M SYSGEN Image through DDT (the Roffset command); Note that this ; value conforms with the standard value presented in the CP/M reference ; manuals, but it may not necessarily conform with the location of the ; CPR in YOUR CP/M system; several systems (Morrow Designs, P&T, Heath ; Org-0 to name a few) have the CPR located at a non-standard address in ; the SYSGEN Image ; ;CPRR EQU 0980H-CPRLOC ;DDT LOAD OFFSET CPRR EQU 0A80H-CPRLOC ;DDT LOAD OFFSET FOR MAX-80 ENDIF ; RAS EQU FALSE ;SET TO TRUE IF CPR IS FOR A REMOTE-ACCESS SYSTEM ; ; The following is presented as an option, but is not generally user-customiz- ; able. A basic design choice had to be made in the design of ZCPR concerning ; the execution of SUBMIT files. The original CCP had a problem in this sense ; in that it ALWAYS looked for the SUBMIT file from drive A: and the SUBMIT ; program itself (SUBMIT.COM) would place the $$$.SUB file on the currently ; logged-in drive, so when the user was logged into B: and he issued a SUBMIT ; command, the $$$.SUB was placed on B: and did not execute because the CCP ; looked for it on A: and never found it. ; After much debate it was decided to have ZCPR perform the same type of ; function as CCP (look for the $$$.SUB file on A:), but the problem with ; SUBMIT.COM still exists. Hence, RGF designed SuperSUB and RLC took his ; SuperSUB and designed SUB from it; both programs are set up to allow the ; selection at assembly time of creating the $$$.SUB on the logged-in drive ; or on drive A:. ; A final definition of the Indirect Command File ($$$.SUB or SUBMIT ; File) is presented as follows: ; "An Indirect Command File is one which contains ; a series of commands exactly as they would be ; entered from a CP/M Console. The SUBMIT Command ; (or SUB Command) reads this files and transforms ; it for processing by the ZCPR (the $$$.SUB File). ; ZCPR will then execute the commands indicated ; EXACTLY as if they were typed at the Console." ; Hence, to permit this to happen, the $$$.SUB file must always ; be present on a specific drive, and A: is the choice for said drive. ; With this facility engaged as such, Indirect Command Files like: ; DIR ; A: ; DIR ; can be executed, even though the currently logged-in drive is changed ; during execution. If the $$$.SUB file was present on the currently ; logged-in drive, the above series of commands would not work since the ; ZCPR would be looking for $$$.SUB on the logged-in drive, and switching ; logged-in drives without moving the $$$.SUB file as well would cause ; processing to abort. ; SUBA equ TRUE ; Set to TRUE to have $$$.SUB always on A: ; Set to FALSE to have $$$.SUB on the logged-in drive ; ; The following flag enables extended processing for user-program supplied ; command lines. This is for Command Level 3 of ZCPR. Under the CCPZ Version ; 4.0 philosophy, three command levels exist: ; (1) that command issued by the user from his console at the '>' prompt ; (2) that command issued by a $$$.SUB file at the '$' prompt ; (3) that command issued by a user program by placing the command into ; CIBUFF and setting the character count in CBUFF ; Setting CLEVEL3 to TRUE enables extended processing of the third level of ; ZCPR command. All the user program need do is to store the command line and ; set the character count; ZCPR will initialize the pointers properly, store ; the ending zero properly, and capitalize the command line for processing. ; Once the command line is properly stored, the user executes the command line ; by reentering the ZCPR through CPRLOC [NOTE: The C register MUST contain ; a valid User/Disk Flag (see location 4) at this time.] ; CLEVEL3 equ TRUE ;ENABLE COMMAND LEVEL 3 PROCESSING ; ; ;*** TERMINAL AND 'TYPE' CUSTOMIZATION EQUATES ; NLINES EQU 24 ;NUMBER OF LINES ON CRT SCREEN WIDE EQU TRUE ;TRUE IF WIDE DIR DISPLAY FENCE EQU '|' ;SEP CHAR BETWEEN DIR FILES ; PGDFLT EQU TRUE ;SET TO FALSE TO DISABLE PAGING BY DEFAULT PGDFLG EQU 'P' ;FOR TYPE COMMAND: PAGE OR NOT (DEP ON PGDFLT) ; THIS FLAG REVERSES THE DEFAULT EFFECT ; MAXUSR EQU 15 ;MAXIMUM USER NUMBER ACCESSABLE ; SYSFLG EQU 'A' ;FOR DIR COMMAND: LIST $SYS AND $DIR ; SOFLG EQU 'S' ;FOR DIR COMMAND: LIST $SYS FILES ONLY ; SUPRES EQU TRUE ;SUPRESSES USER # REPORT FOR USER 0 ; DEFUSR EQU 0 ;DEFAULT USER NUMBER FOR COM FILES ; SPRMPT EQU '$' ;CPR PROMPT INDICATING SUBMIT COMMAND CPRMPT EQU '}' ;CPR PROMPT INDICATING USER COMMAND ; NUMBASE EQU 'H' ;CHARACTER USED TO SWITCH FROM DEFAULT ; NUMBER BASE ; SECTFLG EQU 'S' ;OPTION CHAR FOR SAVE COMMAND TO SAVE SECTORS ; ; END OF CUSTOMIZATION SECTION ; CR EQU 0DH LF EQU 0AH TAB EQU 09H ; WBOOT EQU BASE+0000H ;CP/M WARM BOOT ADDRESS UDFLAG EQU BASE+0004H ;USER NUM IN HIGH NYBBLE, DISK IN LOW BDOS EQU BASE+0005H ;BDOS FUNCTION CALL ENTRY PT TFCB EQU BASE+005CH ;DEFAULT FCB BUFFER TBUFF EQU BASE+0080H ;DEFAULT DISK I/O BUFFER TPA EQU BASE+0100H ;BASE OF TPA ; ; ; MACROS TO PROVIDE Z80 EXTENSIONS ; MACROS INCLUDE: ; $-MACRO ;FIRST TURN OFF THE EXPANSIONS ; ; JR - JUMP RELATIVE ; JRC - JUMP RELATIVE IF CARRY ; JRNC - JUMP RELATIVE IF NO CARRY ; JRZ - JUMP RELATIVE IF ZERO ; JRNZ - JUMP RELATIVE IF NO ZERO ; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO ; LDIR - MOV @HL TO @DE FOR COUNT IN BC ; LXXD - LOAD DOUBLE REG DIRECT ; SXXD - STORE DOUBLE REG DIRECT ; ; ; ; @GENDD MACRO USED FOR CHECKING AND GENERATING ; 8-BIT JUMP RELATIVE DISPLACEMENTS ; @GENDD MACRO ?DD ;;USED FOR CHECKING RANGE OF 8-BIT DISPLACEMENTS IF (?DD GT 7FH) AND (?DD LT 0FF80H) DB 100H ;Displacement Range Error on Jump Relative ELSE DB ?DD ENDIF ENDM ; ; ; Z80 MACRO EXTENSIONS ; JR MACRO ?N ;;JUMP RELATIVE DB 18H @GENDD ?N-$-1 ENDM ; JRC MACRO ?N ;;JUMP RELATIVE ON CARRY DB 38H @GENDD ?N-$-1 ENDM ; JRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY DB 30H @GENDD ?N-$-1 ENDM ; JRZ MACRO ?N ;;JUMP RELATIVE ON ZERO DB 28H @GENDD ?N-$-1 ENDM ; JRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO DB 20H @GENDD ?N-$-1 ENDM ; DJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO DB 10H @GENDD ?N-$-1 ENDM ; LDIR MACRO ;;LDIR DB 0EDH,0B0H ENDM ; LDED MACRO ?N ;;LOAD DE DIRECT DB 0EDH,05BH DW ?N ENDM ; LBCD MACRO ?N ;;LOAD BC DIRECT DB 0EDH,4BH DW ?N ENDM ; SDED MACRO ?N ;;STORE DE DIRECT DB 0EDH,53H DW ?N ENDM ; SBCD MACRO ?N ;;STORE BC DIRECT DB 0EDH,43H DW ?N ENDM ; ; END OF Z80 MACRO EXTENSIONS ; ; ;**** Section 0 **** ; ORG CPRLOC ; ; ENTRY POINTS INTO ZCPR ; If the ZCPR is entered at location CPRLOC (at the JMP to CPR), then ; the default command in CIBUFF will be processed. If the ZCPR is entered ; at location CPRLOC+3 (at the JMP to CPR1), then the default command in ; CIBUFF will NOT be processed. ; NOTE: Entry into ZCPR in this way is permitted under ZCPR Version 4.0, ; but in order for this to work, CIBUFF and CBUFF MUST be initialized properly ; AND the C register MUST contain a valid User/Disk Flag (see Location 4: the ; most significant nybble contains the User Number and the least significant ; nybble contains the Disk Number). ; Some user programs (such as SYNONYM3) attempt to use the default ; command facility. Under the original CPR, it was necessary to initialize ; the pointer after the reserved space for the command buffer to point to ; the first byte of the command buffer. Under Version 4.x of ZCPR, this is ; no longer the case. The CIBPTR (Command Input Buffer PoinTeR) is located ; to be compatable with such programs (provided they determine the buffer ; length from the byte at MBUFF [CPRLOC + 6]), but under Version 4.x of ZCPR ; this is no longer necessary. ZCPR Version 4.x automatically initializes ; this buffer pointer in all cases. ; ENTRY: JMP CPR ; Process potential default command JMP CPR1 ; Do NOT process potential default command ; ;**** Section 1 **** ; BUFFERS ET AL ; ; INPUT COMMAND LINE AND DEFAULT COMMAND ; The command line to be executed is stored here. This command line ; is generated in one of three ways: ; (1) by the user entering it through the BDOS READLN function at ; the du> prompt [user input from keyboard] ; (2) by the SUBMIT File Facility placing it there from a $$$.SUB ; file ; (3) by an external program or user placing the required command ; into this buffer ; In all cases, the command line is placed into the buffer starting at ; CIBUFF. This command line is terminated by the last character (NOT Carriage ; Return), and a character count of all characters in the command line ; up to and including the last character is placed into location CBUFF ; (immediately before the command line at CIBUFF). The placed command line ; is then parsed, interpreted, and the indicated command is executed. ; If CLEVEL3 is permitted, a terminating zero is placed after the command ; (otherwise the user program has to place this zero) and the CIBPTR is ; properly initialized (otherwise the user program has to init this ptr). ; If the command is placed by a user program, entering at CPRLOC is enough ; to have the command processed. Again, under CCPZ Version 4.0, it is not ; necessary to store the pointer to CIBUFF in CIBPTR; ZCPR will do this for ; the calling program if CLEVEL3 is made TRUE. ; WARNING: The command line must NOT exceed BUFLEN characters in length. ; For user programs which load this command, the value of BUFLEN can be ; obtained by examining the byte at MBUFF (CPRLOC + 6). ; BUFLEN EQU 80 ;MAXIMUM BUFFER LENGTH MBUFF: DB BUFLEN ;MAXIMUM BUFFER LENGTH CBUFF: DB 0 ;NUMBER OF VALID CHARS IN COMMAND LINE CIBUFF: DB ' ' ;DEFAULT (COLD BOOT) COMMAND CIBUF: DB 0 ;COMMAND STRING TERMINATOR DS BUFLEN-($-CIBUFF)+1 ;TOTAL IS 'BUFLEN' BYTES ; CIBPTR: DW CIBUFF ;POINTER TO COMMAND INPUT BUFFER CIPTR: DW CIBUF ;CURRENT POINTER ; DS 26 ;STACK AREA STACK EQU $ ;TOP OF STACK ; ; FILE TYPE FOR COMMAND ;  COMMSG: DB 'COM' ; ; SUBMIT FILE CONTROL BLOCK ; SUBFCB: IF SUBA ;IF $$$.SUB ON A: DB 1 ;DISK NAME SET TO DEFAULT TO DRIVE A: ENDIF ; IF NOT SUBA ;IF $$$.SUB ON CURRENT DRIVE DB 0 ;DISK NAME SET TO DEFAULT TO CURRENT DRIVE ENDIF ; DB '$$$' ;FILE NAME DB ' ' DB 'SUB' ;FILE TYPE DB 0 ;EXTENT NUMBER DB 0 ;S1 SUBFS2: DS 1 ;S2 SUBFRC: DS 1 ;RECORD COUNT DS 16 ;DISK GROUP MAP SUBFCR: DS 1 ;CURRENT RECORD NUMBER ; ; COMMAND FILE CONTROL BLOCK ; FCBDN: DS 1 ;DISK NAME FCBFN: DS 8 ;FILE NAME FCBFT: DS 3 ;FILE TYPE DS 1 ;EXTENT NUMBER DS 2 ;S1 AND S2 DS 1 ;RECORD COUNT FCBDM: DS 16 ;DISK GROUP MAP FCBCR: DS 1 ;CURRENT RECORD NUMBER ; ; OTHER BUFFERS ; PAGCNT: DB NLINES-2 ;LINES LEFT ON PAGE CHRCNT: DB 0 ;CHAR COUNT FOR TYPE QMCNT: DB 0 ;QUESTION MARK COUNT FOR FCB TOKEN SCANNER ; ; CPR BUILT-IN COMMAND TABLE ; NCHARS EQU 4 ;NUMBER OF CHARS/COMMAND ; ; CPR COMMAND NAME TABLE ; EACH TABLE ENTRY IS COMPOSED OF THE 4-BYTE COMMAND AND 2-BYTE ADDRESS ; CMDTBL: DB 'DIR ' DW DIR DB 'LIST' DW LIST DB 'TYPE' DW TYPE DB 'USER' DW USER DB 'DFU ' DW DFU ; IF NOT RAS ;FOR NON-RAS DB 'GO ' DW GO DB 'ERA ' DW ERA DB 'SAVE' DW SAVE DB 'REN ' DW REN DB 'GET ' DW GET DB 'JUMP' DW JUMP ENDIF ; NCMNDS EQU ($-CMDTBL)/(NCHARS+2) ; ; ;**** Section 2 **** ; CPR STARTING POINTS ; ; START CPR AND DON'T PROCESS DEFAULT COMMAND STORED ; CPR1: XRA A ;SET NO DEFAULT COMMAND STA CBUFF ; ; START CPR AND POSSIBLY PROCESS DEFAULT COMMAND ; ; NOTE ON MODIFICATION BY RGF: BDOS RETURNS 0FFH IN ; ACCUMULATOR WHENEVER IT LOGS IN A DIRECTORY, IF ANY ; FILE NAME CONTAINS A '$' IN IT. THIS IS NOW USED AS ; A CLUE TO DETERMINE WHETHER OR NOT TO DO A SEARCH ; FOR SUBMIT FILE, IN ORDER TO ELIMINATE WASTEFUL SEARCHES. ; CPR: LXI SP,STACK ;RESET STACK PUSH B MOV A,C ;C=USER/DISK NUMBER (SEE LOC 4) RAR ;EXTRACT USER NUMBER RAR RAR RAR ANI 0FH MOV E,A ;SET USER NUMBER CALL SETUSR CALL RESET ;RESET DISK SYSTEM STA RNGSUB ;SAVE SUBMIT CLUE FROM DRIVE A: POP B MOV A,C ;C=USER/DISK NUMBER (SEE LOC 4) ANI 0FH ;EXTRACT DEFAULT DISK DRIVE STA TDRIVE ;SET IT JRZ NOLOG ;SKIP IF 0...ALREADY LOGGED CALL LOGIN ;LOG IN DEFAULT DISK ; IF NOT SUBA ;IF $$$.SUB IS ON CURRENT DRIVE STA RNGSUB ;BDOS '$' CLUE ENDIF ; NOLOG: LXI D,SUBFCB ;CHECK FOR $$$.SUB ON CURRENT DISK RNGSUB EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS THE RNGSUB FLAG ORA A ;SET FLAGS ON CLUE CMA ;PREPARE FOR COMING 'CMA' CNZ SEAR1 CMA ;0FFH IS RETURNED IF NO $$$.SUB, SO COMPLEMENT STA RNGSUB ;SET FLAG (0=NO $$$.SUB) LDA CBUFF ;EXECUTE DEFAULT COMMAND? ORA A ;0=NO JRNZ RS1 ; ; PROMPT USER AND INPUT COMMAND LINE FROM HIM ; RESTRT: LXI SP,STACK ;RESET STACK ; ; PRINT PROMPT (DU>) ; CALL CRLF ;PRINT PROMPT CALL GETDRV ;CURRENT DRIVE IS PART OF PROMPT ADI 'A' ;CONVERT TO ASCII A-P CALL CONOUT CALL GETUSR ;GET USER NUMBER ; IF SUPRES ;IF SUPPRESSING USR # REPORT FOR USR 0 ORA A JRZ RS000 ENDIF ; CPI 10 ;USER < 10? JRC RS00 SUI 10 ;SUBTRACT 10 FROM IT PUSH PSW ;SAVE IT MVI A,'1' ;OUTPUT 10'S DIGIT CALL CONOUT POP PSW RS00: ADI '0' ;OUTPUT 1'S DIGIT (CONVERT TO ASCII) CALL CONOUT ; ; READ INPUT LINE FROM USER OR $$$.SUB ; RS000: CALL REDBUF ;INPUT COMMAND LINE FROM USER (OR $$$.SUB) ; ; PROCESS INPUT LINE ; RS1: ; IF CLEVEL3 ;IF THIRD COMMAND LEVEL IS PERMITTED CALL CNVBUF ;CAPITALIZE COMMAND LINE, PLACE ENDING 0, ; AND SET CIBPTR VALUE ENDIF ; CALL DEFDMA ;SET TBUFF TO DMA ADDRESS CALL GETDRV ;GET DEFAULT DRIVE NUMBER STA TDRIVE ;SET IT CALL SCANER ;PARSE COMMAND NAME FROM COMMAND LINE CNZ ERROR ;ERROR IF COMMAND NAME CONTAINS A '?' LXI D,RSTCPR ;PUT RETURN ADDRESS OF COMMAND PUSH D ;ON THE STACK LDA TEMPDR ;IS COMMAND OF FORM 'D:COMMAND'? ORA A ;NZ=YES JNZ COM ; IMMEDIATELY CALL CMDSER ;SCAN FOR CPR-RESIDENT COMMAND JNZ COM ;NOT CPR-RESIDENT MOV A,M ;FOUND IT: GET LOW-ORDER PART INX H ;GET HIGH-ORDER PART MOV H,M ;STORE HIGH MOV L,A ;STORE LOW PCHL ;EXECUTE CPR ROUTINE ; ; ENTRY POINT FOR RESTARTING CPR AND LOGGING IN DEFAULT DRIVE ; RSTCPR: CALL DLOGIN ;LOG IN DEFAULT DRIVE ; ; ENTRY POINT FOR RESTARTING CPR WITHOUT LOGGING IN DEFAULT DRIVE ; RCPRNL: CALL SCANER ;EXTRACT NEXT TOKEN FROM COMMAND LINE LDA FCBFN ;GET FIRST CHAR OF TOKEN SUI ' ' ;ANY CHAR? LXI H,TEMPDR ORA M JNZ ERROR JR RESTRT ; ; No File Error Message ; PRNNF: CALL PRINTC ;NO FILE MESSAGE DB 'No Fil','e'+80H RET ; ;**** Section 3 **** ; I/O UTILITIES ; ; OUTPUT CHAR IN REG A TO CONSOLE AND DON'T CHANGE BC ; ; ; OUTPUT ; CRLF: MVI A,CR CALL CONOUT MVI A,LF ;FALL THRU TO CONOUT ; CONOUT: PUSH B MVI C,02H OUTPUT: MOV E,A PUSH H CALL BDOS POP H POP B RET ; CONIN: MVI C,01H ;GET CHAR FROM CON: WITH ECHO CALL BDOSB JMP UCASE ;CAPITALIZE ; LCOUT: PUSH PSW ;OUTPUT CHAR TO CON: OR LST: DEP ON PRFLG PRFLG EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS THE PRINT FLAG ORA A ;0=TYPE JRZ LC1 POP PSW ;GET CHAR ; ; OUTPUT CHAR IN REG A TO LIST DEVICE ; LSTOUT: PUSH B MVI C,05H JR OUTPUT LC1: POP PSW ;GET CHAR PUSH PSW CALL CONOUT ;OUTPUT TO CON: POP PSW CPI LF ;CHECK FOR PAGING JZ PAGER RET ; READF: LXI D,FCBDN ;FALL THRU TO READ READ: MVI C,14H ;FALL THRU TO BDOSB ; ; CALL BDOS AND SAVE BC ; BDOSB: PUSH B CALL BDOS POP B ORA A RET ; ; PRINT STRING (ENDING IN 0) PTED TO BY RET ADR;START WITH ; PRINTC: PUSH PSW ;SAVE FLAGS CALL CRLF ;NEW LINE POP PSW ; PRINT: XTHL ;GET PTR TO STRING PUSH PSW ;SAVE FLAGS CALL PRIN1 ;PRINT STRING POP PSW ;GET FLAGS XTHL ;RESTORE HL AND RET ADR RET ; ; PRINT STRING (ENDING IN 0) PTED TO BY HL ; PRIN1: MOV A,M ;GET NEXT BYTE CALL CONOUT ;PRINT CHAR MOV A,M ;GET NEXT BYTE AGAIN FOR TEST  INX H ;PT TO NEXT BYTE ORA A ;SET FLAGS RZ ;DONE IF ZERO RM ;DONE IF MSB SET JR PRIN1 ; ; BDOS FUNCTION ROUTINES ; ; ; RETURN NUMBER OF CURRENT DISK IN A ; GETDRV: MVI C,19H JR BDOSJP ; ; SET 80H AS DMA ADDRESS ; DEFDMA: LXI D,TBUFF ;80H=TBUFF DMASET: MVI C,1AH JR BDOSJP ; RESET: MVI C,0DH BDOSJP: JMP BDOS ; LOGIN: MOV E,A MVI C,0EH JR BDOSJP ;SAVE SOME CODE SPACE ; OPENF: XRA A STA FCBCR LXI D,FCBDN ;FALL THRU TO OPEN ; OPEN: MVI C,0FH ;FALL THRU TO GRBDOS ; GRBDOS: CALL BDOS INR A ;SET ZERO FLAG FOR ERROR RETURN RET ; CLOSE: MVI C,10H JR GRBDOS ; SEARF: LXI D,FCBDN ;SPECIFY FCB SEAR1: MVI C,11H JR GRBDOS ; SEARN: MVI C,12H JR GRBDOS ; ; CHECK FOR SUBMIT FILE IN EXECUTION AND ABORT IT IF SO ; SUBKIL: LXI H,RNGSUB ;CHECK FOR SUBMIT FILE IN EXECUTION MOV A,M ORA A ;0=NO RZ MVI M,0 ;ABORT SUBMIT FILE LXI D,SUBFCB ;DELETE $$$.SUB ; DELETE: MVI C,13H JR BDOSJP ;SAVE MORE SPACE ; ; RESET USER NUMBER IF CHANGED ; RESETUSR: TMPUSR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS TMPUSR MOV E,A ;PLACE IN E JR SETUSR ;THEN GO SET USER GETUSR: MVI E,0FFH ;GET CURRENT USER NUMBER SETUSR: MVI C,20H ;SET USER NUMBER TO VALUE IN E (GET IF E=FFH) JR BDOSJP ;MORE SPACE SAVING ; ; END OF BDOS FUNCTIONS ; ; ;**** Section 4 **** ; CPR UTILITIES ; ; SET USER/DISK FLAG TO CURRENT USER AND DEFAULT DISK ; SETUD: CALL GETUSR ;GET NUMBER OF CURRENT USER ADD A ;PLACE IT IN HIGH NYBBLE ADD A ADD A ADD A LXI H,TDRIVE ;MASK IN DEFAULT DRIVE NUMBER (LOW NYBBLE) ORA M ;MASK IN STA UDFLAG ;SET USER/DISK NUMBER RET ; ; SET USER/DISK FLAG TO USER 0 AND DEFAULT DISK ; SETU0D: TDRIVE EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS TDRIVE STA UDFLAG ;SET USER/DISK NUMBER RET ; ; CONVERT CHAR IN A TO UPPER CASE ; UCASE: CPI 61H ;LOWER-CASE A RC CPI 7BH ;GREATER THAN LOWER-CASE Z? RNC ANI 5FH ;CAPITALIZE RET ; ; INPUT NEXT COMMAND TO CPR ; This routine determines if a SUBMIT file is being processed ; and extracts the command line from it if so or from the user's console ; REDBUF: LDA RNGSUB ;SUBMIT FILE CURRENTLY IN EXECUTION? ORA A ;0=NO JRZ RB1 ;GET LINE FROM CONSOLE IF NOT LXI D,SUBFCB ;OPEN $$$.SUB PUSH D ;SAVE DE CALL OPEN POP D ;RESTORE DE JRZ RB1 ;ERASE $$$.SUB IF END OF FILE AND GET CMND LDA SUBFRC ;GET VALUE OF LAST RECORD IN FILE DCR A ;PT TO NEXT TO LAST RECORD STA SUBFCR ;SAVE NEW VALUE OF LAST RECORD IN $$$.SUB CALL READ ;DE=SUBFCB JRNZ RB1 ;ABORT $$$.SUB IF ERROR IN READING LAST REC LXI D,CBUFF ;COPY LAST RECORD (NEXT SUBMIT CMND) TO CBUFF LXI H,TBUFF ; FROM TBUFF LXI B,BUFLEN ;NUMBER OF BYTES LDIR LXI H,SUBFS2 ;PT TO S2 OF $$$.SUB FCB MVI M,0 ;SET S2 TO ZERO INX H ;PT TO RECORD COUNT DCR M ;DECREMENT RECORD COUNT OF $$$.SUB LXI D,SUBFCB ;CLOSE $$$.SUB CALL CLOSE JRZ RB1 ;ABORT $$$.SUB IF ERROR MVI A,SPRMPT ;PRINT SUBMIT PROMPT CALL CONOUT LXI H,CIBUFF ;PRINT COMMAND LINE FROM $$$.SUB CALL PRIN1 CALL BREAK ;CHECK FOR ABORT (ANY CHAR) ; IF CLEVEL3 ;IF THIRD COMMAND LEVEL IS PERMITTED RZ ;IF (NO ABORT), RETURN TO CALLER AND RUN ENDIF ; IF NOT CLEVEL3 ;IF THIRD COMMAND LEVEL IS NOT PERMITTED JRZ CNVBUF ;IF (NO ABORT), CAPITALIZE COMMAND ENDIF ; CALL SUBKIL ;KILL $$$.SUB IF ABORT JMP RESTRT ;RESTART CPR ; ; INPUT COMMAND LINE FROM USER CONSOLE ; RB1: CALL SUBKIL ;ERASE $$$.SUB IF PRESENT CALL SETUD ;SET USER AND DISK MVI A,CPRMPT ;PRINT PROMPT CALL CONOUT MVI C,0AH ;READ COMMAND LINE FROM USER LXI D,MBUFF CALL BDOS ; IF CLEVEL3 ;IF THIRD COMMAND LEVEL IS PERMITTED JMP SETU0D ;SET CURRENT DISK NUMBER IN LOWER PARAMS ENDIF ; IF NOT CLEVEL3 ;IF THIRD COMMAND LEVEL IS NOT PERMITTED CALL SETU0D ;SET CURRENT DISK NUMBER IF LOWER PARAMS ; AND FALL THRU TO CNVBUF ENDIF ; ; CAPITALIZE STRING (ENDING IN 0) IN CBUFF AND SET PTR FOR PARSING ; CNVBUF: LXI H,CBUFF ;PT TO USER'S COMMAND MOV B,M ;CHAR COUNT IN B INR B ;ADD 1 IN CASE OF ZERO CB1: INX H ;PT TO 1ST VALID CHAR MOV A,M ;CAPITALIZE COMMAND CHAR CALL UCASE MOV M,A DJNZ CB1 ;CONTINUE TO END OF COMMAND LINE CB2: MVI M,0 ;STORE ENDING LXI H,CIBUFF ;SET COMMAND LINE PTR TO 1ST CHAR SHLD CIBPTR RET ; ; CHECK FOR ANY CHAR FROM USER CONSOLE;RET W/ZERO SET IF NONE ; BREAK: PUSH D ;SAVE DE MVI C,11 ;CSTS CHECK CALL BDOSB CNZ CONIN ;GET INPUT CHAR BRKBK: POP D RET ; ; GET THE REQUESTED USER NUMBER FROM THE COMMAND LINE AND VALIDATE IT. ; USRNUM: CALL NUMBER CPI MAXUSR+1 RC ; ; INVALID COMMAND -- PRINT IT ; ERROR: CALL CRLF ;NEW LINE LHLD CIPTR ;PT TO BEGINNING OF COMMAND LINE ERR2: MOV A,M ;GET CHAR CPI ' '+1 ;SIMPLE '?' IF OR LESS JRC ERR1 PUSH H ;SAVE PTR TO ERROR COMMAND CHAR CALL CONOUT ;PRINT COMMAND CHAR POP H ;GET PTR INX H ;PT TO NEXT JR ERR2 ;CONTINUE ERR1: CALL PRINT ;PRINT '?' DB '?'+80H CALL SUBKIL ;TERMINATE ACTIVE $$$.SUB IF ANY JMP RESTRT ;RESTART CPR ; ; CHECK TO SEE IF DE PTS TO DELIMITER; IF SO, RET W/ZERO FLAG SET ; SDELM: LDAX D ORA A ;0=DELIMITER RZ CPI ' ' ;ERROR IF < JRC ERROR RZ ;=DELIMITER CPI '=' ;'='=DELIMITER RZ CPI 5FH ;UNDERSCORE=DELIMITER RZ CPI '.' ;'.'=DELIMITER RZ CPI ':' ;':'=DELIMITER RZ CPI ';' ;';'=DELIMITER RZ CPI '<' ;'<'=DELIMITER RZ CPI '>' ;'>'=DELIMITER RET ; ; ADVANCE INPUT PTR TO FIRST NON-BLANK AND FALL THROUGH TO SBLANK ; ADVAN: LDED CIBPTR ; ; SKIP STRING PTED TO BY DE (STRING ENDS IN 0) UNTIL END OF STRING ; OR NON-BLANK ENCOUNTERED (BEGINNING OF TOKEN) ; SBLANK: LDAX D ORA A RZ CPI ' ' RNZ INX D JR SBLANK ; ; ADD A TO HL (HL=HL+A) ; ADDAH: ADD L MOV L,A RNC INR H RET ; ; EXTRACT DECIMAL NUMBER FROM COMMAND LINE ; RETURN WITH VALUE IN REG A;ALL REGISTERS MAY BE AFFECTED ; NUMBER: CALL SCANER ;PARSE NUMBER AND PLACE IN FCBFN LXI H,FCBFN+10 ;PT TO END OF TOKEN FOR CONVERSION MVI B,11 ;11 CHARS MAX ; ; CHECK FOR SUFFIX FOR HEXADECIMAL NUMBER ; NUMS: MOV A,M ;GET CHARS FROM END, SEARCHING FOR SUFFIX DCX H ;BACK UP CPI ' ' ;SPACE? JRNZ NUMS1 ;CHECK FOR SUFFIX DJNZ NUMS ;COUNT DOWN JR NUM0 ;BY DEFAULT, PROCESS NUMS1: CPI NUMBASE ;CHECK AGAINST BASE SWITCH FLAG JRZ HNUM0 ; ; PROCESS DECIMAL NUMBER ; NUM0: LXI H,FCBFN ;PT TO BEGINNING OF TOKEN LXI B,1100H ;C=ACCUMULATED VALUE, B=CHAR COUNT ; (C=0, B=11) NUM1: MOV A,M ;GET CHAR CPI ' ' ;DONE IF JRZ NUM2 INX H ;PT TO NEXT CHAR SUI '0' ;CONVERT TO BINARY (ASCII 0-9 TO BINARY) CPI 10 ;ERROR IF >= 10 JRNC NUMERR MOV D,A ;DIGIT IN D MOV A,C ;NEW VALUE = OLD VALUE * 10 RLC RLC RLC ADD C ;CHECK FOR RANGE ERROR JRC NUMERR ADD C ;CHECK FOR RANGE ERROR JRC NUMERR ADD D ;NEW VALUE = OLD VALUE * 10 + DIGIT JRC NUMERR ;CHECK FOR RANGE ERROR MOV C,A ;SET NEW VALUE DJNZ NUM1  ;COUNT DOWN ; ; RETURN FROM NUMBER ; NUM2: MOV A,C ;GET ACCUMULATED VALUE RET ; ; NUMBER ERROR ROUTINE FOR SPACE CONSERVATION ; NUMERR: JMP ERROR ;USE ERROR ROUTINE - THIS IS RELATIVE PT ; ; EXTRACT HEXADECIMAL NUMBER FROM COMMAND LINE ; RETURN WITH VALUE IN REG A; ALL REGISTERS MAY BE AFFECTED ; HEXNUM: CALL SCANER ;PARSE NUMBER AND PLACE IN FCBFN HNUM0: LXI H,FCBFN ;PT TO TOKEN FOR CONVERSION LXI D,0 ;DE=ACCUMULATED VALUE MVI B,11 ;B=CHAR COUNT HNUM1: MOV A,M ;GET CHAR CPI ' ' ;DONE? JRZ HNUM3 ;RETURN IF SO CPI NUMBASE ;DONE IF NUMBASE SUFFIX JRZ HNUM3 SUI '0' ;CONVERT TO BINARY JRC NUMERR ;RETURN AND DONE IF ERROR CPI 10 ;0-9? JRC HNUM2 SUI 7 ;A-F? CPI 10H ;ERROR? JRNC NUMERR HNUM2: INX H ;PT TO NEXT CHAR MOV C,A ;DIGIT IN C MOV A,D ;GET ACCUMULATED VALUE RLC ;EXCHANGE NYBBLES RLC RLC RLC ANI 0F0H ;MASK OUT LOW NYBBLE MOV D,A MOV A,E ;SWITCH LOW-ORDER NYBBLES RLC RLC RLC RLC MOV E,A ;HIGH NYBBLE OF E=NEW HIGH OF E, ; LOW NYBBLE OF E=NEW LOW OF D ANI 0FH ;GET NEW LOW OF D ORA D ;MASK IN HIGH OF D MOV D,A ;NEW HIGH BYTE IN D MOV A,E ANI 0F0H ;MASK OUT LOW OF E ORA C ;MASK IN NEW LOW MOV E,A ;NEW LOW BYTE IN E DJNZ HNUM1 ;COUNT DOWN ; ; RETURN FROM HEXNUM ; HNUM3: XCHG ;RETURNED VALUE IN HL MOV A,L ;LOW-ORDER BYTE IN A RET ; ; PT TO DIRECTORY ENTRY IN TBUFF WHOSE OFFSET IS SPECIFIED BY A AND C ; DIRPTR: LXI H,TBUFF ;PT TO TEMP BUFFER ADD C ;PT TO 1ST BYTE OF DIR ENTRY CALL ADDAH ;PT TO DESIRED BYTE IN DIR ENTRY MOV A,M ;GET DESIRED BYTE RET ; ; CHECK FOR SPECIFIED DRIVE AND LOG IT IN IF NOT DEFAULT ; SLOGIN: XRA A ;SET FCBDN FOR DEFAULT DRIVE STA FCBDN CALL COMLOG ;CHECK DRIVE RZ JR DLOG5 ;DO LOGIN OTHERWISE ; ; CHECK FOR SPECIFIED DRIVE AND LOG IN DEFAULT DRIVE IF SPECIFIED<>DEFAULT ; DLOGIN: CALL COMLOG ;CHECK DRIVE RZ ;ABORT IF SAME LDA TDRIVE ;LOG IN DEFAULT DRIVE ; DLOG5: JMP LOGIN ; ; ROUTINE COMMON TO BOTH LOGIN ROUTINES; ON EXIT, Z SET MEANS ABORT ; COMLOG: TEMPDR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS TEMPDR ORA A ;0=NO RZ DCR A ;COMPARE IT AGAINST DEFAULT LXI H,TDRIVE CMP M RET ;ABORT IF SAME ; ; EXTRACT TOKEN FROM COMMAND LINE AND PLACE IT INTO FCBDN; ; FORMAT FCBDN FCB IF TOKEN RESEMBLES FILE NAME AND TYPE (FILENAME.TYP); ; ON INPUT, CIBPTR PTS TO CHAR AT WHICH TO START SCAN; ; ON OUTPUT, CIBPTR PTS TO CHAR AT WHICH TO CONTINUE AND ZERO FLAG IS RESET ; IF '?' IS IN TOKEN ; ; ENTRY POINTS: ; SCANER - LOAD TOKEN INTO FIRST FCB ; SCANX - LOAD TOKEN INTO FCB PTED TO BY HL ; SCANER: LXI H,FCBDN ;POINT TO FCBDN SCANX: XRA A ;SET TEMPORARY DRIVE NUMBER TO DEFAULT STA TEMPDR CALL ADVAN ;SKIP TO NON-BLANK OR END OF LINE SDED CIPTR ;SET PTR TO NON-BLANK OR END OF LINE LDAX D ;END OF LINE? ORA A ;0=YES JRZ SCAN2 SBI 'A'-1 ;CONVERT POSSIBLE DRIVE SPEC TO NUMBER MOV B,A ;STORE NUMBER (A:=0, B:=1, ETC) IN B INX D ;PT TO NEXT CHAR LDAX D ;SEE IF IT IS A COLON (:) CPI ':' JRZ SCAN3 ;YES, WE HAVE A DRIVE SPEC DCX D ;NO, BACK UP PTR TO FIRST NON-BLANK CHAR SCAN2: LDA TDRIVE ;SET 1ST BYTE OF FCBDN AS DEFAULT DRIVE MOV M,A JR SCAN4 SCAN3: MOV A,B ;WE HAVE A DRIVE SPEC STA TEMPDR ;SET TEMPORARY DRIVE MOV M,B ;SET 1ST BYTE OF FCBDN AS SPECIFIED DRIVE INX D ;PT TO BYTE AFTER ':' ; ; EXTRACT FILENAME FROM POSSIBLE FILENAME.TYP ; SCAN4: XRA A ;A=0 STA QMCNT ;INIT COUNT OF NUMBER OF QUESTION MARKS IN FCB MVI B,8 ;MAX OF 8 CHARS IN FILE NAME CALL SCANF ;FILL FCB FILE NAME ; ; EXTRACT FILE TYPE FROM POSSIBLE FILENAME.TYP ; MVI B,3 ;PREPARE TO EXTRACT TYPE CPI '.' ;IF (DE) DELIMITER IS A '.', WE HAVE A TYPE JRNZ SCAN15 ;FILL FILE TYPE BYTES WITH INX D ;PT TO CHAR IN COMMAND LINE AFTER '.' CALL SCANF ;FILL FCB FILE TYPE JR SCAN16 ;SKIP TO NEXT PROCESSING SCAN15: CALL SCANF4 ;SPACE FILL ; ; FILL IN EX, S1, S2, AND RC WITH ZEROES ; SCAN16:  MVI B,4 ;4 BYTES SCAN17: INX H ;PT TO NEXT BYTE IN FCBDN MVI M,0 DJNZ SCAN17 ; ; SCAN COMPLETE -- DE PTS TO DELIMITER BYTE AFTER TOKEN ; SDED CIBPTR ; ; SET ZERO FLAG TO INDICATE PRESENCE OF '?' IN FILENAME.TYP ; LDA QMCNT ;GET NUMBER OF QUESTION MARKS ORA A ;SET ZERO FLAG TO INDICATE ANY '?' RET ; ; SCANF -- SCAN TOKEN PTED TO BY DE FOR A MAX OF B BYTES; PLACE IT INTO ; FILE NAME FIELD PTED TO BY HL; EXPAND AND INTERPRET WILD CARDS OF ; '*' AND '?'; ON EXIT, DE PTS TO TERMINATING DELIMITER ; SCANF: CALL SDELM ;DONE IF DELIMITER ENCOUNTERED - FILL JRZ SCANF4 INX H ;PT TO NEXT BYTE IN FCBDN CPI '*' ;IS (DE) A WILD CARD? JRNZ SCANF1 ;CONTINUE IF NOT MVI M,'?' ;PLACE '?' IN FCBDN AND DON'T ADVANCE DE IF SO CALL SCQ ;SCANNER COUNT QUESTION MARKS JR SCANF2 SCANF1: MOV M,A ;STORE FILENAME CHAR IN FCBDN INX D ;PT TO NEXT CHAR IN COMMAND LINE CPI '?' ;CHECK FOR QUESTION MARK (WILD) CZ SCQ ;SCANNER COUNT QUESTION MARKS SCANF2: DJNZ SCANF ;DECREMENT CHAR COUNT UNTIL 8 ELAPSED SCANF3: CALL SDELM ;8 CHARS OR MORE - SKIP UNTIL DELIMITER RZ ;ZERO FLAG SET IF DELIMITER FOUND INX D ;PT TO NEXT CHAR IN COMMAND LINE JR SCANF3 ; ; FILL MEMORY POINTED TO BY HL WITH SPACES FOR B BYTES ; SCANF4: INX H ;PT TO NEXT BYTE IN FCBDN MVI M,' ' ;FILL FILENAME PART WITH DJNZ SCANF4 RET ; ; INCREMENT QUESTION MARK COUNT FOR SCANNER ; THIS ROUTINE INCREMENTS THE COUNT OF THE NUMBER OF QUESTION MARKS IN ; THE CURRENT FCB ENTRY ; SCQ: LDA QMCNT ;GET COUNT INR A ;INCREMENT STA QMCNT ;PUT COUNT RET ; ; CMDTBL (COMMAND TABLE) SCANNER ; ON RETURN, HL PTS TO ADDRESS OF COMMAND IF CPR-RESIDENT ; ON RETURN, ZERO FLAG SET MEANS CPR-RESIDENT COMMAND ; CMDSER: LXI H,CMDTBL ;PT TO COMMAND TABLE MVI C,NCMNDS ;SET COMMAND COUNTER CMS1: LXI D,FCBFN ;PT TO STORED COMMAND NAME MVI B,NCHARS ;NUMBER OF CHARS/COMMAND (8 MAX) CMS2: LDAX D ;COMPARE AGAINST TABLE ENTRY CMP M JRNZ CMS3 ;NO MATCH INX D ;PT TO NEXT CHAR INX H DJNZ CMS2 ;COUNT DOWN LDAX D ;NEXT CHAR IN INPUT COMMAND MUST BE CPI ' ' JRNZ CMS4 RET ;COMMAND IS CPR-RESIDENT (ZERO FLAG SET) CMS3: INX H ;SKIP TO NEXT COMMAND TABLE ENTRY DJNZ CMS3 CMS4: INX H ;SKIP ADDRESS INX H DCR C ;DECREMENT TABLE ENTRY NUMBER JRNZ CMS1 INR C ;CLEAR ZERO FLAG RET ;COMMAND IS DISK-RESIDENT (ZERO FLAG CLEAR) ; ;**** Section 5 **** ; CPR-Resident Commands ; ; ;Section 5A ;Command: DIR ;Function: To display a directory of the files on disk ;Forms: ; DIR Displays the DIR files ; DIR S Displays the SYS files ; DIR A Display both DIR and SYS files ; DIR: MVI A,80H ;SET SYSTEM BIT EXAMINATION PUSH PSW CALL SCANER ;EXTRACT POSSIBLE D:FILENAME.TYP TOKEN CALL SLOGIN ;LOG IN DRIVE IF NECESSARY LXI H,FCBFN ;MAKE FCB WILD (ALL '?') IF NO FILENAME.TYP MOV A,M ;GET FIRST CHAR OF FILENAME.TYP CPI ' ' ;IF , ALL WILD CZ FILLQ CALL ADVAN ;LOOK AT NEXT INPUT CHAR MVI B,0 ;SYS TOKEN DEFAULT JRZ DIR2 ;JUMP; THERE ISN'T ONE CPI SYSFLG ;SYSTEM FLAG SPECIFIER? JRZ GOTSYS ;GOT SYSTEM SPECIFIER CPI SOFLG ;SYS ONLY? JRNZ DIR2 MVI B,80H ;FLAG SYS ONLY GOTSYS: INX D SDED CIBPTR CPI SOFLG ;SYS ONLY SPEC? JRZ DIR2 ;THEN LEAVE BIT SPEC UNCHAGNED POP PSW ;GET FLAG XRA A ;SET NO SYSTEM BIT EXAMINATION PUSH PSW DIR2: POP PSW ;GET FLAG DIR2A: ;DROP INTO DIRPR TO PRINT DIRECTORY ; THEN RESTART CPR ; ; DIRECTORY PRINT ROUTINE; ON ENTRY, MSB OF A IS 1 (80H) IF SYSTEM FILES EXCL ; DIRPR: MOV D,A ;STORE SYSTEM FLAG IN D MVI E,0 ;SET COLUMN COUNTER TO ZERO PUSH D ;SAVE COLUMN COUNTER (E) AND SYSTEM FLAG (D) MOV A,B ;SYS ONLY SPECIFIER STA SYSTST CALL SEARF ;SEARCH FOR SPECIFIED FILE (FIRST OCCURRANCE) CZ PRNNF ;PRINT NO FILE MSG;REG A NOT CHANGED ; ; ENTRY SELECTION LOOP; ON ENTRY, A=OFFSET FROM SEARF OR SEARN ; DIR3: JRZ DIR11 ;DONE IF ZERO FLAG SET DCR A ;ADJUST TO RETURNED VALUE RRC ;CONVERT NUMBER TO OFFSET INTO TBUFF RRC RRC ANI 60H MOV C,A ;OFFSET INTO TBUFF IN C (C=OFFSET TO ENTRY) MVI A,10 ;ADD 10 TO PT TO SYSTEM FILE ATTRIBUTE BIT CALL DIRPTR POP D ;GET SYSTEM BIT MASK FROM D PUSH D ANA D ;MASK FOR SYSTEM BIT SYSTST EQU $+1 ;POINTER TO IN-THE-CODE BUFFER SYSTST CPI 0 JRNZ DIR10 POP D ;GET ENTRY COUNT (= COUNTER) MOV A,E ;ADD 1 TO IT INR E PUSH D ;SAVE IT ANI 03H ;OUTPUT IF 4 ENTRIES PRINTED IN LINE PUSH PSW JRNZ DIR4 CALL CRLF ;NEW LINE JR DIR5 DIR4: CALL PRINT ; IF WIDE DB ' ' ;2 SPACES DB FENCE ;THEN FENCE CHAR DB ' ',' '+80H ;THEN 2 MORE SPACES ENDIF ; IF NOT WIDE DB ' ' ;SPACE DB FENCE ;THEN FENCE CHAR DB ' '+80H ;THEN SPACE ENDIF ; DIR5: MVI B,01H ;PT TO 1ST BYTE OF FILE NAME DIR6: MOV A,B ;A=OFFSET CALL DIRPTR ;HL NOW PTS TO 1ST BYTE OF FILE NAME ANI 7FH ;MASK OUT MSB CPI ' ' ;NO FILE NAME? JRNZ DIR8 ;PRINT FILE NAME IF PRESENT POP PSW PUSH PSW CPI 03H JRNZ DIR7 MVI A,09H ;PT TO 1ST BYTE OF FILE TYPE CALL DIRPTR ;HL NOW PTS TO 1ST BYTE OF FILE TYPE ANI 7FH ;MASK OUT MSB CPI ' ' ;NO FILE TYPE? JRZ DIR9 ;CONTINUE IF SO DIR7: MVI A,' ' ;OUTPUT DIR8: CALL CONOUT ;PRINT CHAR INR B ;INCR CHAR COUNT MOV A,B CPI 12 ;END OF FILENAME.TYP? JRNC DIR9 ;CONTINUE IF SO CPI 09H ;END IF FILENAME ONLY? JRNZ DIR6 ;PRINT TYP IF SO MVI A,'.' ;PRINT DOT BETWEEN FILE NAME AND TYPE CALL CONOUT JR DIR6 DIR9: POP PSW DIR10: CALL BREAK ;CHECK FOR ABORT JRNZ DIR11 CALL SEARN ;SEARCH FOR NEXT FILE JR DIR3 ;CONTINUE DIR11: POP D ;RESTORE STACK RET ; ; FILL FCB @HL WITH '?' ; FILLQ: MVI B,11 ;NUMBER OF CHARS IN FN & FT FQLP: MVI M,'?' ;STORE '?' INX H DJNZ FQLP RET ; ;Section 5B ;Command: ERA ;Function: Erase files ;Forms: ; ERA Erase Specified files and print their names ; IF NOT RAS ;NOT FOR REMOTE-ACCESS SYSTEM ; ERA: CALL SCANER ;PARSE FILE SPECIFICATION CPI 11 ;ALL WILD (ALL FILES = 11 '?')? JRNZ ERA1 ;IF NOT, THEN DO ERASES CALL PRINTC DB 'All','?'+80H CALL CONIN ;GET REPLY CPI 'Y' ;YES? JNZ RESTRT ;RESTART CPR IF NOT CALL CRLF ;NEW LINE ERA1: CALL SLOGIN ;LOG IN SELECTED DISK IF ANY XRA A ;PRINT ALL FILES (EXAMINE SYSTEM BIT) MOV B,A ;NO SYS-ONLY OPT TO DIRPR CALL DIRPR ;PRINT DIRECTORY OF ERASED FILES LXI D,FCBDN ;DELETE FILE SPECIFIED CALL DELETE RET ;REENTER CPR ; ENDIF ;RAS ; ;Section 5C ;Command: LIST ;Function: Print out specified file on the LST: Device ;Forms: ; LIST Print file (NO Paging) ; LIST: MVI A,0FFH ;TURN ON PRINTER FLAG JR TYPE0 ; ;Section 5D ;Command: TYPE ;Function: Print out specified file on the CON: Device ;Forms: ; TYPE Print file ; TYPE P Print file with paging flag ; TYPE: XRA A ;TURN OFF PRINTER FLAG ; ; ENTRY POINT FOR CPR LIST FUNCTION (LIST) ; TYPE0: STA PRFLG ;SET FLAG CALL SCANER ;EXTRACT FILENAME.TYP TOKEN JNZ ERROR ;ERROR IF ANY QUESTION MARKS CALL ADVAN ;GET PGDFLG IF IT'S THERE STA PGFLG ;SAVE IT AS A FLAG JRZ NOSLAS ;JUMP IF INPUT ENDED INX D ;PUT NEW BUF POINTER XCHG SHLD CIBPTR NOSLAS: CALL SLOGIN ;LOG IN SELECTED DISK IF ANY CALL OPENF ;OPEN SELECTED FILE JZ TYPE4 ;ABORT IF ERROR CALL CRLF ;NEW LINE MVI A,NLINES-1 ;SET LINE COUNT STA PAGCNT LXI H,CHRCNT ;SET CHAR POSITION/COUNT MVI M,0FFH ;EMPTY LINE MVI B,0 ;SET TAB CHAR COUNTER TYPE1: LXI H,CHRCNT ;PT TO CHAR POSITION/COUNT MOV A,M ;END OF BUFFER? CPI 80H JRC TYPE2 PUSH H ;READ NEXT BLOCK CALL READF POP H JRNZ TYPE3 ;ERROR? XRA A ;RESET COUNT MOV M,A TYPE2: INR M ;INCREMENT CHAR COUNT LXI H,TBUFF ;PT TO BUFFER CALL ADDAH ;COMPUTE ADDRESS OF NEXT CHAR FROM OFFSET MOV A,M ;GET NEXT CHAR ANI 7FH ;MASK OUT MSB CPI 1AH ;END OF FILE (^Z)? RZ ;RESTART CPR IF SO ; ; OUTPUT CHAR TO CON: OR LST: DEVICE WITH TABULATION ; CPI CR ;RESET TAB COUNT? JRZ TABRST CPI LF ;RESET TAB COUNT? JRZ TABRST CPI TAB ;TAB? JRZ LTAB  CALL LCOUT ;OUTPUT CHAR INR B ;INCREMENT CHAR COUNT JR TYPE2L TABRST: CALL LCOUT ;OUTPUT OR MVI B,0 ;RESET TAB COUNTER JR TYPE2L LTAB: MVI A,' ' ; CALL LCOUT INR B ;INCR POS COUNT MOV A,B ANI 7 JRNZ LTAB ; ; CONTINUE PROCESSING ; TYPE2L: CALL BREAK ;CHECK FOR ABORT JRZ TYPE1 ;CONTINUE IF NO CHAR CPI 'C'-'@' ;^C? RZ ;RESTART IF SO JR TYPE1 TYPE3: DCR A ;NO ERROR? RZ ;RESTART CPR TYPE4: JMP ERRLOG ; ; PAGING ROUTINES ; PAGER COUNTS DOWN LINES AND PAUSES FOR INPUT (DIRECT) IF COUNT EXPIRES ; PAGSET SETS LINES/PAGE COUNT ; PAGER: PUSH H LXI H,PAGCNT ;COUNT DOWN DCR M JRNZ PGBAK ;JUMP IF NOT END OF PAGE MVI M,NLINES-2 ;REFILL COUNTER ; PGFLG EQU $+1 ;POINTER TO IN-THE-CODE BUFFER PGFLG MVI A,0 ;0 MAY BE CHANGED BY PGFLG EQUATE CPI PGDFLG ;PAGE DEFAULT OVERRIDE OPTION WANTED? ; IF PGDFLT ;IF PAGING IS DEFAULT JRZ PGBAK ; PGDFLG MEANS NO PAGING, PLEASE ELSE ;IF PAGING NOT DEFAULT JRNZ PGBAK ; PGDFLG MEANS PLEASE PAGINATE ENDIF ; CALL CONIN ;GET CHAR TO CONTINUE CPI 'C'-'@' ;^C JZ RSTCPR ;RESTART CPR PGBAK: POP H ;RESTORE HL RET ; ;Section 5E ;Command: SAVE ;Function: To save the contents of the TPA onto disk as a file ;Forms: ; SAVE ; Save specified number of pages (start at 100H) ; from TPA into specified file; is in DEC ; SAVE S ; Like SAVE above, but numeric argument specifies ; number of sectors rather than pages ; IF NOT RAS ;NOT FOR REMOTE-ACCESS SYSTEM ; SAVE: CALL NUMBER ;EXTRACT NUMBER FROM COMMAND LINE MOV L,A ;HL=PAGE COUNT MVI H,0 PUSH H ;SAVE PAGE COUNT CALL EXTEST ;TEST FOR EXISTENCE OF FILE AND ABORT IF SO MVI C,16H ;BDOS MAKE FILE CALL GRBDOS POP H ;GET PAGE COUNT JRZ SAVE3 ;ERROR? XRA A ;SET RECORD COUNT FIELD OF NEW FILE'S FCB STA FCBCR CALL ADVAN ;LOOK FOR 'S' FOR SECTOR OPTION INX D ;PT TO AFTER 'S' TOKEN CPI SECTFLG JRZ SAVE0 DCX D ;NO 'S' TOKEN, SO BACK UP DAD H ;DOUBLE IT FOR HL=SECTOR (128 BYTES) COUNT SAVE0: SDED CIBPTR ;SET PTR TO BAD TOKEN OR AFTER GOOD TOKEN LXI D,TPA ;PT TO START OF SAVE AREA (TPA) SAVE1: MOV A,H ;DONE WITH SAVE? ORA L ;HL=0 IF SO JRZ SAVE2 DCX H ;COUNT DOWN ON SECTORS PUSH H ;SAVE PTR TO BLOCK TO SAVE LXI H,128 ;128 BYTES PER SECTOR DAD D ;PT TO NEXT SECTOR PUSH H ;SAVE ON STACK CALL DMASET ;SET DMA ADDRESS FOR WRITE (ADDRESS IN DE) LXI D,FCBDN ;WRITE SECTOR MVI C,15H ;BDOS WRITE SECTOR CALL BDOSB ;SAVE BC POP D ;GET PTR TO NEXT SECTOR IN DE POP H ;GET SECTOR COUNT JRNZ SAVE3 ;WRITE ERROR? JR SAVE1 ;CONTINUE SAVE2: LXI D,FCBDN ;CLOSE SAVED FILE CALL CLOSE INR A ;ERROR? JRNZ SAVE4 SAVE3: CALL PRNLE ;PRINT 'NO SPACE' ERROR SAVE4: CALL DEFDMA ;SET DMA TO 0080 RET ;RESTART CPR ; ; Test File in FCB for existence, ask user to delete if so, and abort if he ; choses not to ; EXTEST: CALL SCANER ;EXTRACT FILE NAME JNZ ERROR ;'?' IS NOT PERMITTED CALL SLOGIN ;LOG IN SELECTED DISK CALL SEARF ;LOOK FOR SPECIFIED FILE LXI D,FCBDN ;PT TO FILE FCB RZ ;OK IF NOT FOUND PUSH D ;SAVE PTR TO FCB CALL PRINTC DB 'Delete File','?'+80H CALL CONIN ;GET RESPONSE POP D ;GET PTR TO FCB CPI 'Y' ;KEY ON YES JNZ RSTCPR ;RESTART IF NO PUSH D ;SAVE PTR TO FCB CALL DELETE ;DELETE FILE POP D ;GET PTR TO FCB RET ; ENDIF ;RAS ; ;Section 5F ;Command: REN ;Function: To change the name of an existing file ;Forms: ; REN = Perform function ; IF NOT RAS ;NOT FOR REMOTE-ACCESS SYSTEM ; REN: CALL EXTEST ;TEST FOR FILE EXISTENCE AND RETURN ; IF FILE DOESN'T EXIST; ABORT IF IT DOES LDA TEMPDR ;SAVE CURRENT DEFAULT DISK PUSH PSW ;SAVE ON STACK REN0: LXI H,FCBDN ;SAVE NEW FILE NAME LXI D,FCBDM LXI B,16 ;16 BYTES LDIR CALL ADVAN ;ADVANCE CIBPTR CPI '=' ;'=' OK JRNZ REN4 REN1: XCHG ;PT TO CHAR AFTER '=' IN HL INX H SHLD CIBPTR ;SAVE PTR TO OLD FILE NAME CALL SCANER ;EXTRACT FILENAME.TYP TOKEN JRNZ REN4 ;ERROR IF ANY '?' POP PSW ;GET OLD DEFAULT DRIVE MOV B,A ;SAVE IT LXI H,TEMPDR ;COMPARE IT AGAINST CURRENT DEFAULT DRIVE MOV A,M ;MATCH? ORA A JRZ REN2 CMP B ;CHECK FOR DRIVE ERROR MOV M,B JRNZ REN4 REN2: MOV M,B XRA A STA FCBDN ;SET DEFAULT DRIVE LXI D,FCBDN ;RENAME FILE MVI C,17H ;BDOS RENAME FCT CALL GRBDOS RNZ REN3: CALL PRNNF ;PRINT NO FILE MSG REN4: JMP ERRLOG ; ENDIF ;RAS ; ;Section 5G ;Command: USER ;Function: Change current USER number ;Forms: ; USER Select specified user number; is in DEC ; USER: CALL USRNUM ;EXTRACT USER NUMBER FROM COMMAND LINE MOV E,A ;PLACE USER NUMBER IN E CALL SETUSR ;SET SPECIFIED USER RSTJMP: JMP RCPRNL ;RESTART CPR ; ;Section 5H ;Command: DFU ;Function: Set the Default User Number for the command/file scanner ; (MEMLOAD) ;Forms: ; DFU Select Default User Number; is in DEC ; DFU: CALL USRNUM ;GET USER NUMBER STA DFUSR ;PUT IT AWAY JR RSTJMP ;RESTART CPR (NO DEFAULT LOGIN) ; ;Section 5I ;Command: JUMP ;Function: To Call the program (subroutine) at the specified address ; without loading from disk ;Forms: ; JUMP Call at ; is in HEX ; IF NOT RAS ;NOT FOR REMOTE-ACCESS SYSTEM ; JUMP: CALL HEXNUM ;GET LOAD ADDRESS IN HL JR CALLPROG ;PERFORM CALL ; ENDIF ;RAS ; ;Section 5J ;Command: GO ;Function: To Call the program in the TPA without loading ; loading from disk. Same as JUMP 100H, but much ; more convenient, especially when used with ; parameters for programs like STAT. Also can be ; allowed on remote-access systems with no problems. ; ;Form: ; GO ; IF NOT RAS ;ONLY IF RAS ; GO: LXI H,TPA ;Always to TPA JR CALLPROG ;Perform call ; ENDIF ;END OF GO FOR RAS ; ;Section 5K ;Command: COM file processing ;Function: To load the specified COM file from disk and execute it ;Forms: ; ; COM: LDA FCBFN ;ANY COMMAND? CPI ' ' ;' ' MEANS COMMAND WAS 'D:' TO SWITCH JRNZ COM1 ;NOT , SO MUST BE TRANSIENT OR ERROR LDA TEMPDR ;LOOK FOR DRIVE SPEC ORA A ;IF ZERO, JUST BLANK JZ RCPRNL DCR A ;ADJUST FOR LOG IN STA TDRIVE ;SET DEFAULT DRIVE CALL SETU0D ;SET DRIVE WITH USER 0 CALL LOGIN ;LOG IN DRIVE JMP RCPRNL ;RESTART CPR COM1: LDA FCBFT ;FILE TYPE MUST BE BLANK CPI ' ' JNZ ERROR LXI H,COMMSG ;PLACE DEFAULT FILE TYPE (COM) INTO FCB LXI D,FCBFT ;COPY INTO FILE TYPE LXI B,3 ;3 BYTES LDIR LXI H,TPA ;SET EXECUTION/LOAD ADDRESS PUSH H ;SAVE FOR EXECUTION CALL MEMLOAD ;LOAD MEMORY WITH FILE SPECIFIED IN CMD LINE POP H ;GET EXECUTION ADDRESS RNZ ;RETURN (ABORT) IF LOAD ERROR ; ; CALLPROG IS THE ENTRY POINT FOR THE EXECUTION OF THE LOADED ; PROGRAM;ON ENTRY TO THIS ROUTINE, HL MUST CONTAIN THE EXECUTION ; ADDRESS OF THE PROGRAM (SUBROUTINE) TO EXECUTE ; CALLPROG: SHLD EXECADR ;PERFORM IN-LINE CODE MODIFICATION CALL DLOGIN ;LOG IN DEFAULT DRIVE CALL SCANER ;SEARCH COMMAND LINE FOR NEXT TOKEN LXI H,TEMPDR ;SAVE PTR TO DRIVE SPEC PUSH H MOV A,M ;SET DRIVE SPEC STA FCBDN LXI H,FCBDN+10H ;PT TO 2ND FILE NAME CALL SCANX ;SCAN FOR IT AND LOAD IT INTO FCBDN+16 POP H ;SET UP DRIVE SPECS MOV A,M STA FCBDM XRA A STA FCBCR LXI D,TFCB ;COPY TO DEFAULT FCB LXI H,FCBDN ;FROM FCBDN LXI B,33 ;SET UP DEFAULT FCB LDIR LXI H,CIBUFF COM4: MOV A,M ;SKIP TO END OF 2ND FILE NAME ORA A ;END OF LINE? JRZ COM5 CPI ' ' ;END OF TOKEN? JRZ COM5 INX H JR COM4 ; ; LOAD COMMAND LINE INTO TBUFF ; COM5: MVI B,0 ;SET CHAR COUNT LXI D,TBUFF+1 ;PT TO CHAR POS COM6: MOV A,M ;COPY COMMAND LINE TO TBUFF STAX D ORA A ;DONE IF ZERO JRZ COM7 INR B ;INCR CHAR COUNT INX H ;PT TO NEXT INX D JR COM6 ; ; RUN LOADED TRANSIENT PROGRAM ; COM7: MOV A,B ;SAVE CHAR COUNT STA TBUFF CALL CRLF ;NEW LINE CALL DEFDMA ;SET DMA TO 0080 CALL SETUD ;SET USER/DISK ; ; EXECUTION (CALL) OF PROGRAM (SUBROUTINE) OCCURS HERE ; EXECADR EQU $+1 ;CHANGE ADDRESS FOR IN-LINE CODE MODIFICATION CALL TPA ;CALL TRANSIENT CALL DEFDMA ;SET DMA TO 0080, IN CASE ;PROG CHANGED IT ON US CALL SETU0D ;SET USER 0/DISK CALL LOGIN ;LOGIN DISK JMP RESTRT ;RESTART CPR ; ; TRANSIENT LOAD ERROR ; COM8: POP H ;CLEAR RETURN ADDRESS CALL RESETUSR ;RESET CURRENT USER NUMBER ; RESET MUST BE DONE BEFORE LOGIN ERRLOG: CALL DLOGIN ;LOG IN DEFAULT DISK ERRJMP: JMP ERROR ; ;Section 5L ;Command: GET ;Function: To load the specified file from disk to the specified address ;Forms: ; GET Load the specified file at the specified page; ; is in HEX ; IF NOT RAS ;NOT FOR REMOTE-ACCESS SYSTEM ; GET: CALL HEXNUM ;GET LOAD ADDRESS IN HL PUSH H ;SAVE ADDRESS CALL SCANER ;GET FILE NAME POP H ;RESTORE ADDRESS JRNZ ERRJMP ;MUST BE UNAMBIGUOUS ; ; FALL THRU TO MEMLOAD ; ENDIF ;RAS ; ; LOAD MEMORY WITH THE FILE WHOSE NAME IS SPECIFIED IN THE COMMAND LINE ; ON INPUT, HL CONTAINS STARTING ADDRESS TO LOAD ; MEMLOAD: CALL MLOAD ;USER MEMORY LOAD SUBROUTINE PUSH PSW ;SAVE RETURN STATUS CALL RESETUSR ;RESET USER NUMBER POP PSW ;GET RETURN STATUS RET ; ; MEMORY LOAD SUBROUTINE ; EXIT POINTS ARE A SIMPLE RETURN WITH THE ZERO FLAG SET IF NO ERROR, ; A SIMPLE RETURN WITH THE ZERO FLAG RESET (NZ) IF MEMORY FULL, OR A JMP TO ; COM8 IF COM FILE NOT FOUND ; MLOAD: SHLD LOADADR ;SET LOAD ADDRESS CALL GETUSR ;GET CURRENT USER NUMBER STA TMPUSR ;SAVE IT FOR LATER STA TSELUSR ;TEMP USER TO SELECT ; ; MLA is a reentry point for a non-standard CP/M Modification ; This is the return point for when the .COM (or GET) file is not found the ; first time, Drive A: is selected for a second attempt ; MLA: CALL SLOGIN ;LOG IN SPECIFIED DRIVE IF ANY CALL OPENF ;OPEN COMMAND.COM FILE JRNZ MLA1 ;FILE FOUND - LOAD IT ; ; ERROR ROUTINE TO SELECT USER 0 IF ALL ELSE FAILS ; DFUSR EQU $+1 ;MARK IN-THE-CODE VARIABLE MVI A,DEFUSR ;GET DEFAULT USER TSELUSR EQU $+1 ;MARK IN-THE-CODE VARIABLE CPI DEFUSR ;SAME? JRZ MLA0 ;JUMP IF STA TSELUSR ;ELSE PUT DOWN NEW ONE MOV E,A CALL SETUSR ;GO SET NEW USER NUMBER JR MLA ;AND TRY AGAIN ; ; ERROR ROUTINE TO SELECT DRIVE A: IF DEFAULT WAS ORIGINALLY SELECTED ; MLA0: LXI H,TEMPDR ;GET DRIVE FROM CURRENT COMMAND XRA A ;A=0 ORA M JNZ COM8 ;ERROR IF ALREADY DISK A: MVI M,1 ;SELECT DRIVE A: JR MLA ; ; FILE FOUND -- PROCEED WITH LOAD ; MLA1: LOADADR EQU $+1 ;MEMORY LOAD ADDRESS (IN-LINE CODE MOD) LXI H,TPA ;SET START ADDRESS OF MEMORY LOAD ML2: MVI A,ENTRY/256-1 ;GET HIGH-ORDER ADR OF JUST BELOW CPR CMP H ;ARE WE GOING TO OVERWRITE THE CPR? JRC PRNLE ;ERROR IF SO PUSH H ;SAVE ADDRESS OF NEXT SECTOR XCHG ;... IN DE CALL DMASET ;SET DMA ADDRESS FOR LOAD LXI D,FCBDN ;READ NEXT SECTOR CALL READ POP H ;GET ADDRESS OF NEXT SECTOR JRNZ ML3 ;READ ERROR OR EOF? LXI D,128 ;MOVE 128 BYTES PER SECTOR DAD D  ;PT TO NEXT SECTOR IN HL JR ML2 ; ML3: DCR A ;LOAD COMPLETE RZ ;OK IF ZERO, ELSE FALL THRU TO PRNLE ; ; LOAD ERROR ; PRNLE: CALL PRINTC DB 'Ful','l'+80H MVI A,1 ;SET NON-ZERO TO INDICATE ERROR ORA A ;SET FLAG RET ; END R ROUTINE TO SELECT DRIVE A: IF DEFAULT WAS ORIGINALLY SELECTED ; MLA0: LXI H,TEMPDR ;GET DRIVE FROM CURRENT COMMAND XRA A ;A=0 ORA M JNZ COM8 ;ERROR IF ALREADY DISK A: MVI M,1 ;SELECT DRIVE A: JR MLA ; ; FILE FOUND -- PROCEED WITH LOAD ; MLA1: LOADADR EQU $+1 ;MEMORY LOAD ADDRESS (IN-LINE CODE MOD) LXI H,TPA ;SET START ADDRESS OF MEMORY LOAD ML2: MVI A,ENTRY/256-1 ;GET HIGH-ORDER ADR OF JUST BELOW CPR CMP H ;ARE WE GOING TO OVERWRITE THE CPR? JRC PRNLE ;ERROR IF SO PUSH H ;SAVE ADDRESS OF NEXT SECTOR XCHG ;... IN DE CALL DMASET ;SET DMA ADDRESS FOR LOAD LXI D,FCBDN ;READ NEXT SECTOR CALL READ POP H ;GET ADDRESS OF NEXT SECTOR JRNZ ML3 ;READ ERROR OR EOF? LXI D,128 ;MOVE 128 BYTES PER SECTOR DAD D  ZCPR - A Z80 Replacement for the CP/M CCP Documentation on ZCPR - A Z80 Replacement for the CP/M CCP ZCPR is a Group Project By the CCP-GROUP: RLC - Richard Conn FJW - Frank Wancho KBP - Keith Peterson RGF - Ron Fowler ZCPR Documentation By RLC Table of Contents ----- -- -------- Introduction 2 Part A: Installation Instructions 4 ZCPR Integration Example 5 Setting the ZCPR Inline Options 8 REL, BASE, CPRLOC, RAS, SUBA, CLEVEL3 8 Customization Symbols 8 NLINES, WIDE, PGDFLT 8 PGDFLG, MAXUSR, SYSFLG, SOFLG, SUPRES, DEFUSR, SPRMPT, CPRMPT, NUMBASE, 9  SECTFLG, FENCE 10 Patching SUBMIT.COM 10 Part B: Usage Instructions and Explanation of Commands 11 The ZCPR Command Hierarchy Search 11 The ZCPR-Resident Commands 14 DIR, ERA 14 LIST, TYPE, SAVE 15 REN, USER, DFU 16 JUMP, GO, GET 17 ZCPR Error Messages 18 Part C: ZCPR Command Levels and How to Use Them 19 Page 1 ZCPR - A Z80 Replacement for the CP/M CCP Documentation on ZCPR - A Z80 Replacement for the CP/M CCP ZCPR i replacemen fo th CP/ Consol Comman Processo (CCP whic i designe t ru a par o CP/͠ o Z80-base microcomputers I mos case i i upward-compatible wit th origina CP/ Versio 2. CCP. ZCPR however provide man extension t th CP/͠ CCP Include i thes extension ar th followin features: Th TYP functio ca b mad t pag o no pag it outpu a th user' discretion LIS functio i availabl whic send it outpu t th CP/ LST Devic an doe NO page Th DI comman ha bee extende t allo th dis- pla o th syste file o al files Th ER comman no print ou th name o th file i i erasing Th curren use numbe ma b include a par o th comman prompt i th use i unde numbe othe tha 0 th promp i o th for 'du> (lik 'A2> o 'B10>') and i th use i unde 0 th promp ma b 'd> o 'd0> a pe hi choice  Th SUBMI facilit ha bee change i tw basi ways: - th promp change t 'du$ o 'd$ whe th SUBMI comman i printed - th $$$.SU i execute fro driv A (not tha th origina SUBMIԠ proble no exists bu th ne SUB.CO facilit correct it) th CCP-GROU definitio o a Indirec Comman Fil no applies an thi definitio i tha an sequenc o command whic ma b issue fro th consol i als vali sequenc o command fo executio fro a Indirec Command File; hence, the sequence: DIR B: DIR A: ma b issue fro eithe th consol o a Indirec Comman File an th result o th executio o thi sequenc ar th same Basically thi say tha Indirec Comman File ar upward-compatibl t th consol inpu (bu no necessaril tha  th content o a Indirec Comman Fil ma b issue a th consol withou modification). Page 2 ZCPR - A Z80 Replacement for the CP/M CCP command-searc hierarch i no implemente whic i execute roughl a follows: - th user' comman i checke agains th CPR- residen command an execute immediatel i matc i found - failin that th curren use numbe o th curren dis i scanne fo th CO file th CO fil i loade an execute i found - failin that defaul use numbe (initiall bu ca b rese wit th DF CPR-residen command o th cur- ren dis i scanne fo th CO file th CO fil i loade an execute i found - finally failin that th defaul use numbe o dis A i scanne fo th CO file th CO fil i loade an execute i foun o a erro messag (COMMAND? whe COMMAN wa th user' comman name i printed Th numeri argumen fo th SAV comman ca b specifie i hexadecima s tha th use ma emplo th value presented by tools such as DDT exactly as they are given GEԠ comman whic load fil a specifie memor addres an JUM comman whic "calls th subroutin a specifie memor addres hav bee added G comman whic "calls th subroutin a 100 (subse o th JUMР capability has also been added Thi documen provide th use o ZCPR wit th followin information: Part A: Installation Instructions Part B: Usage Instructions and Explanation of Commands Part C: ZCPR Command Levels and How to Use Them Page 3 ZCPR - A Z80 Replacement for the CP/M CCP Part A Installation Instructions I orde t instal ZCPR o targe microcompute (mus b currently running CP/M 2.2), the user must know two basic things: 1) Where his CCP is currently running in memory 2 Wher hi CC i locate i th SYSGEΠ image or fo system whic don' suppor SYSGE (suc a P& CP/ 2. fo th TRS-8 Mode II) wher hi CC i locate o dis an ho t place the new ZCPR on top of it Th firs questio i answere relativel easily pro- gram know a eithe BDOSLO o BDLO (fo BDOӠ Locator) i provide wit ZCPR Yo shoul assembl thi progra fo you particula compute (chang th bas OR i yo ar runnin non- ORG- CP/M an execut it Upo execution i wil provid yo wit th bas addres o (1 th BDO an (2 th CCР fo you particula system BDOSLO ha worke correctl fo al system teste s far bu ther i alway chanc tha i ma NO wor fo som non-teste system Fo th tim being assum tha i work correctl an recor th startin bas pag addres o you CCP. Th secon questio i no answere nearl s easily I yo hav th abilit t SYSGE you system i i muc easie (commonly tha i yo d not Yo must afte assemblin th ZCPR properly integrat i int th sysge (o disk imag o CP/M Thi ca b don b obtainin SYSGE imag o you system scannin i vi debugge suc a DD t fin th offse fo th CCP readin th ne CPR i o to o th ol one an finall runnin SYSGE agai t plac th resultan syste o disk I yo D NO hav SYSGE capability Dis Utilit progra i require t locat th CC o dis an the writ th ne ZCPR o to o th ol one Th ne resul o thi integratio i th placemen o th ne ZCPR ont dis i th prope plac s tha i wil b loade wit th res o CP/͠ o col boo an execute properly. T fin th origina CCP yo typicall hav t locat i b it appearance I i probabl store contiguousl o disk so onc i i found sequentia overwrit i al tha i required Probabilit i extremel hig tha i i store contiguousl i th SYSGE image Th CC start wit tw (2 an ONL TW jum instruction followe b buffe are (possibl containin a initia comman and/o th Digita Researc copyrigh notice) Th Digita Researc manual sho th CC t resid a addres 980Ƞ i th SYSGE image bu thi ma var wit system T fin thi image us DD o som othe suc debugger loa th SYSGE imag yo ca ge vi SYSGEN an examin memor startin a aroun 900 fo th tw (an ONL two jump describe above I yo fin a are wit mor tha tw jump ( grou o them) yo ar probabl lookin a th BIO an shoul g lowe fo th CCP Th CC wil probabl star o a eve pag o half-pag address (like 900H, 980H, 1100H, etc). Page 4 ZCPR - A Z80 Replacement for the CP/M CCP No tha th locatio o th CC ha bee found recor thi addres fo later Yo ar no read fo th integratio o ZCPR int you system T d this perfor th followin step usin th informatio o th pag addres o th CCР (obtaine fro BDOSLOà an calle CPRLO withi ZCPR an th SYSGEΠ imag address of the CCP (called IMAGE for reference in this document). 1 Edi ZCPҠ an se th CPRLO equat t th valu obtaine fro above Als se an flag an value a yo desir (se th sectio o ZCP Customizatio below) Whe satisfied en th edi session. 2 Assembl ZCPR wit MAà (o equivalent) Thi assemble i require becaus o th MACRO used Onl th resultant HEX file is required. 3 Assumin tha yo ca us SYSGEN obtai SYSGE image of your current CP/M system and save it on disk. 4 Loa th SYSGE imag int memor wit DDԠ (o equivalent) Onc loaded verif tha th origina CC i a th IMAGŠ addres foun abov an comput th integratio offse using the DDT H command: H, Th secon numbe displaye give yo th OFFSE valu require for step 5. 5 Integrat ZCPR int you SYSGE imag vi DDT' an ROFFSE commands Us IZCPR.HE (o th nam o you versio o ZCPR t loa th FC an ROFFSE (wher OFFSE wa compute i ste 4 t loa th ZCPR.HE fil int memor a th prope location Chec t se tha ZCPR i indee properl loade b examining the SYSGEN IMAGE area. 6 Plac th ne syste o dis b runnin SYSGE an NOT loading the system from disk (use the memory image). Fo furthe clarificatio o th abov process th followin i sampl termina sessio whic outline th step taken. ZCPR Integration Example B>; Sample terminal session for integrating ZCPR B>sysgen SYSGEN VER 2.2 SOURCE DRIVE NAME (OR RETURN TO SKIP)b SOURCE ON B, THEN TYPE RETURN <-- I hit the RETURN key here FUNCTION COMPLETE / DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <-- and here B>save 44 cpm56.com <-- We now have a SYSGEN image of CP/M to work with Page 5 ZCPR - A Z80 Replacement for the CP/M CCP B>xdir XDIR Version 2.6 User Number: 0, Double Density File Attributes: Non-System Filename.Typ Size K Filename.Typ Size K Filename.Typ Size K -------- --- ------ -------- --- ------ -------- --- ------ !TEXTWRK.-12 0 CPR .DOC 8 EE687 .TXT 4 CPR .AQM 34 TFS .HLP 6 EE687PRE.TXT 4 CPR .ASM 50 CONTENTS.T01 6 SW1 .TXT 10 CPR .BAK 4 CONTENTS.T02 4 SW2 .TXT 2 CPM56 .COM 12 CONTENTS.T03 4 B: 30 Entries & 22 Files -- 338K Bytes Remaining File Data: 14 Files -- 154K Bytes Displayed B>bdosloc <-- Now to locate the CCP's address The Base Page Address of this system's BDOS is C5 The Base Page Address of this system's CCP is BD <-- This is it B>ddt cpm56.com <-- Now to find the CCP in the SYSGEN image DDT VERS 2.0 NEXT PC 2D00 0100 -d900,90f <-- Start looking around here 0900 31 80 E7 3E 06 3C 3C FE 1B CA 00 C2 DA 11 E7 D6 1..>.<<......... -da00,a0f 0A00 31 00 01 01 01 0C C5 CD 0F E4 21 00 BE 11 00 04 1.........!..... -db00,b0f 0B00 31 00 01 01 01 11 C5 CD 0F E4 21 00 C0 11 00 02 1.........!..... -db80,b8f 0B80 31 00 01 01 09 01 CD A8 00 21 00 D2 11 00 C2 0E 1........!...... -- Detail Left Out -- -d1100 <-- I found it at 1100H; note the 2 JMP's 1100 C3 FF BD C3 FB BD 50 10 20 20 20 20 20 20 20 20 ......P. 1110 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........ 1120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -- Detail Left Out -- -^ <-- Retur t CP/M kno tha CPRLO wil be BD00H and the IMAGE offset is 1100H B>e cpr.as {edi ZCPR her an plac CPRLOC=BD00H}# -- Detail Left Out -- B>mac cpr $pz sz <-- Now to assemble the CPR CP/M MACRO ASSEM 2.0 C4F0 <-- Note that CPR MUST end before BDOS begins! 014H USE FACTOR END OF ASSEMBLY  Page 6 ZCPR - A Z80 Replacement for the CP/M CCP B>ddt cpm56.com <-- Now to integrate! DDT VERS 2.0 NEXT PC 2D00 0100 -h1100,bd00 <-- Compute offset for new CPR CE00 5400 <-- Offset is 5400H -icpr.hex <-- Init FCB -r5400 <-- Read in new CPR with offset NEXT PC 2D00 0000 -^C <-- Done! B>sysgen <-- Now to SYSGEN onto disk SYSGEN VER 2.2 SOURCE DRIVE NAME (OR RETURN TO SKIP) <-- Use memory image DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b <-- onto B: DESTINATION ON B, THEN TYPE RETURN FUNCTION COMPLETE DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <-- Done for now B> Page 7 ZCPR - A Z80 Replacement for the CP/M CCP  Setting the ZCPR Inline Options Th followin ar th fou basi option availabl t th user under ZCPR for customization of his package. Option Name Function REL Configures CPRLOC (CPRLOC equ 0) for integration via MOVCPM rather than the DDT/SYSGEN technique outlined above; set to TRUE for MOVCPM integra- tion or FALSE for DDT/SYSGEN integration BASE Base address of your CP/M system; standard CP/M has a base of 0, but some CP/M systems (such as for the TRS-80 Model I and Heath/Zenith H89/Z89) start physical RAM memory at a higher address; equate BASE to the starting RAM memory address of your system CPRLOC This is the starting address of ZCPR; set the second CPRLOC equate to the address you obtain from BDOSLOC RAS This is an equate which masks out selected ZCPR command functions for security purposes on Remote Access Systems such as Bulletin Boards; the masked out functions currently include SAVE, ERA, REN, JUMP, GO, and GET; set RAS to TRUE to mask these out or FALSE to leave them in SUBA This is an equate which determines the drive onto which ZCPR will look for an executing Indirect Command File. If the basic philosophy of the Indirect Command File described above is to be maintained, this symbol should be set to TRUE (look on drive A: for the $$$.SUB file); if not, this symbol should be set to FALSE (look on the default drive from the $$$.SUB file). To review, the basic philosophy of the Indirect Command File is that any sequence of commands which may be issued from the console (within reason, which means NOT to erase a $$$.SUB file) may also be issued from within an Indirect Command File, and the resultant execution should be identical (same functions performed). CLEVEL3 This equate enables or disables extended Command Leve Processing I se t TRUE extended Command Level 3 Processing is enabled and the user command line is automatically capitalized, the terminatin zer i place a th en o th buffer, and the internal CIBPTR is set correctly (see later for more information). Page 8 ZCPR - A Z80 Replacement for the CP/M CCP Customization Symbols Th followin symbol ar provide fo furthe customizatio of ZCPR to a user's particular tastes and hardware facilities. Option Name Function NLINES Number of lines on the user's CRT for paging WIDE This equate is used to select a narrow or wide display under the DIR command; if WIDE is equated to TRUE, each file name is separated by two spaces, a FENCE, and two more spaces; if WIDE is equated to FALSE, each file name is separated by one space, a FENCE, and one more space PGDFLT This is the Paging Default flag for the TYPE command; if PGDFLT is set to TRUE, the TYPE command will page its output by default and the P option on the TYPE command (see below) will prohibit paging; if PGDFLT is set to FALSE, the TYPE command will NOT page its output by default and the P option will enable paging PGDFLG This sets the option character in the command line for the TYPE command (the 'P' mentioned above); if the user wishes to change this option character, he need only change this equate MAXUSR This is the largest user number recognized by the USER command; if the user wishes to protect the higher user areas, he may set this symbol to the highest area normally accessable; 15 is the largest permitted value for MAXUSR SYSFLG This is the option character for the DIR command line which is used to specify that DIR search All Files (both $SYS and $DIR) for its display; the distributed default for this is 'A' SOFLG This is the option character for the DIR command line which is used to specify that DIR search ONLY the $SYS files for its display; the distri- buted default for this is 'S' SUPRES Set SUPRES to TRUE to suppress printing the user number when the user is under User Number 0 or set SUPRES to FALSE to ALWAYS display the User Number with the CPR prompt; with SUPRES set to TRUE, a user on B: in user 0 sees 'B>' as the prompt, but with SUPRES set to FALSE, a user on B: in user 0 sees 'B0>' as the prompt Page 9 ZCPR - A Z80 Replacement for the CP/M CCP DEFUSR This is the CPR-default user number which is searched in the command hierarchy for the COM files (distributed as 0); the DFU changes this temporarily until a Warm Boot or Cold Boot is done, at which time the search reverts to this value SPRMPT This is the CPR prompt character which indicates that a SUBMIT file is in execution; by default it is set to '$', so prompts like 'A$' appear during SUBMIT file execution CPRMPT This is the CPR prompt character which indicates that the CPR is awaiting a user console command; by default it is set to '>', so prompts like 'A>' appear during user input to the CPR NUMBAS Thi i th escap characte use b thos commands which require a DECIMAL number as an argument; placing this character after the number argument switches the base to HEXADECIMAL; for example, 'SAVE 15 MYFILE' can be expressed as 'SAVE FH MYFILE' if NUMBASE is set to 'H' (the default) SECTFLG This character constant is the suffix option for the SAVE command which specifies that sectors, as opposed to pages, are to be saved; the default value is 'S' FENCE This is the character printed to separate entries in a directory listing; it's default value is '|' Patching SUBMIT.COM SUBMIT.CO͠ ma b patche t ru wit ZCP b th followin procedur (thi i recommende i th use doe no hav SUB.COM) Thi patc simpl make i alway plac th $$$.SU fil o Driv A: Illustrative termina sessio follows: A>ddt b:submit.com DDT VERS 2.0 NEXT PC 0600 0100 -s5bb <-- Patch is at 5BB Hex 05BB 00 1 <-- Change 0 (default drive) to 1 (drive A:) 05BC 24 . <-- That's it! -d5b0 5cf <-- See change 05B0 00 00 00 00 00 00 30 30 31 20 24 01 24 24 24 20 ......001 $.$$$ 05C0 20 20 20 20 53 55 42 00 00 00 1A 1A 1A 1A 1A 1A SUB......... -^C <-- Done A>save 5 newsubmt.com <-- Save new SUBMIT.COM file Page 10 ZCPR - A Z80 Replacement for the CP/M CCP Part B Usage Instructions and Explanation of Commands Th followin instruction ar writte wit th assumptio tha th reade i quit familia wit ho t us CP/ 2. an it CCP ZCPR i writte a logica extensio o th CP/ 2. CC philosoph an shoul b addresse a such. The ZCPR Command Hierarchy Search Th first an mos basi thing t lear abou ZCPR i th orde i whic i searche fo CO fil fo executio o fil specifie b th GE command Unde th CP/ 2. CCP i th specifie CO fil comman wa no foun o th curren driv i th curren use area th CC aborte wit a erro message ZCPR however continue searchin fro thi poin maximu o tw mor levels Thi comman hierarch searc wa outline abov an i describe her i furthe detail. 1 I th comman i o th for 'COMMAND an NO 'd:COMMAND' th CPR-residen comman lis i searche fo match I th matc i found th CPR-residen comman i immediatel processed I th matc i no foun o th comman i o th for 'd:COMMAND' th nex ste i taken Not tha th 'd:COMMAND for i goo fo executin comman CO͠ fil whic ha th sam nam a CPR-residen comman (suc a SAV or DIR). 2 I th comman i o th for 'd:COMMAND' dis driv 'd: i temporaril logge i fo th purpos o th comman search Otherwise th currentl logged-i driv i used. 3 No th fil name COMMAND.CO i searche for I found i i loade int memor startin a 100 an executed If not, proceed to step 4. 4 No tha th firs searc fo COMMAND.CO͠ ha failed th CPR check t se i th use i unde th curren Defaul Use Number Th Defaul Use Numbe ma b tha se b th DEFUS equat i th CPR o tha se b th use vi th DF command DEFUSҠ i i effec i DF ha no bee issue sinc th las War o Col Boot an DF i i effec i i wa issue sinc th las War o Col Boot I th use i NO unde th curren Defaul Use Number ZCPR temporaril log hi int i an searche th directory I COMMAND.CO i found i i loade a describe abov an executed I not ZCPR proceed t the next step. Page 11 ZCPR - A Z80 Replacement for the CP/M CCP 5 Th use i no i th Defaul Use Number an a thi point ZCPR check t se i th use i o dis driv A: I not i temporaril log int A an searche th defaul use numbe o A fo COMMAND.COM I found i i loade a describe abov an executed I not ZCPR print th comman nam a a erro messag an return t comman inpu mode aborting the SUBMIT file if COMMAND came from it. I al case o th searc above i COMMAND.CO i found afte i i loade int memory ZCPR reset th use t hi origina dis driv an use number Hence th file reference by the user by default are obtained from this environment. T illustrat thi comman hierarch search conside th following examples: Example 1: DEFUSR equ 0 {default user number is 0} B10> <-- User is on Drive B:, User Number 10 B10>ASM TEST.BBZ <-- User wishes to assemble TEST.ASM in Drive B:, User 10 <-- At this point, ZCPR looks on B:/10 for ASM.COM, fails, looks on B:/0, fails, and finally looks on A:/0; it finds ASM.COM here and goes back to B:/10 for the file Example 2: DEFUSR equ 0 and DFU issued B10> <-- User is on Drive B:, User Number 10 B10>DFU 5 <-- User Selects User 5 as default B10>ASM TEST.BBZ <-- As above <-- At this point, ZCPR looks on B:/10 for ASM.COM, fails, look on B:/5, fails, and finally looks on A:/5; it fails here also and prints ASM? as an error message Example 3: DEFUSR equ 0 B> <-- User is on Drive B:, User Number 0 B>ASM TEST.BBZ <-- As above <-- At this point, ZCPR looks on B:/0 for ASM.COM, fails, looks on A:/0, fails, and prints error message Example 4: DEFUSR equ 0 A10> <-- User is on Drive A:, User Number 10 A10>ASM TEST.AAZ <-- As above, but file on A: <-- At this point, ZCPR looks on A:/10 for ASM.COM, fails, looks on A:/0, fails, and prints error message Page 12 ZCPR - A Z80 Replacement for the CP/M CCP  Another Example: Fo example i th use i logge int Driv B i Use Are 10 th Defaul Use Numbe i 0 an th followin CO file ar presen a indicate -- WM.COM on Drive A: in User 0 MBASIC.COM on Drive A: in User 0 and on Drive B: in User 0 TEST.COM on Drive B: in User 10 and Drive B: in User 0 the th followin happen whe th followin command ar issued from the console (or Indirect Command File): B10>WM TEST2.TXT \ \ \__ File to be edited \ \__ Invoke the WM.COM file (Word Master editor) \__ User is on Drive B: in User Area 10 Results: ZCPR searche B Use 10 B Use 0 an A Use fo WM.COM i find WM.CO i A Use 0 load it log th use back into B: User 10, and executes it. B10>MBASIC \ \__ Invoke the MBASIC.COM file (MBASIC Interpreter) \__ User is on Drive B: in User Area 10 Results: ZCPR searche B Use 1 an B Use fo MBASIC.COM i find MBASIC.CO i B Use 0 s i doesn' bothe t loo o A Use 0 MBASIC.CO i the loade an execute a describe in the previous example. B10>TEST \ \__ Invoke the TEST.COM file (TEST program) \__ User is on Drive B: in User Area 10 Results: ZCPR searche B Use 1 fo TEST.COM i find TEST.CO i B Use 0 s i doesn' bothe t loo furthe (i i had i woul hav foun TEST.CO i B Use 0) TEST.CO i then loaded and executed as described above. B10>TEST2 \ \__ Invoke the TEST2.COM file (TEST2 program) \__ User is on Drive B: in User Area 10 Results: ZCPR searche B Use 10 B Use 0 an A Use fo TEST2.COM i doesn' fin it s i issue th erro messag 'TEST2?', which says it couldn't find TEST2.COM.  Page 13 ZCPR - A Z80 Replacement for the CP/M CCP The ZCPR-Resident Commands Th followin page describ th ZCPR-Residen Commands Thes ar command locate withi ZCPR itsel whic ar execute fro withi ZCPR Th phrase <-- Displays $DIR files DIR S <-- Displays $SYS files DIR A <-- Displays both $DIR and $SYS files Customization Variables: WIDE SYSFLG SOFLG FENCE Examples: DIR *.ASM <-- All $DIR .ASM files DIR *.COM S <-- All $SYS .COM files DIR *.COM A <-- All .COM files Notes: I fil i scanne fo an n suc nam exist o disk th 'N Files messag wil appear However i fil i scanne fo an th nam exist a $SY fil an $DI file ar bein scanne for n fil nam i displaye bu th 'N Files messag doe NO appear Fo example i TEST.CO i $SY fil an 'DIҠ TEST.COM i issued n messag appears I 'DI TEXT.COM i issue an TEXT.CO doe no exis o disk th 'N Files' message is displayed. Command: ERA Function: To Erase the specified $R/W files from disk Forms: ERA <-- Erase both $DIR and $SYS files Customization Variables: WIDE FENCE Examples: ERA *.ASM <-- Erase all .ASM files ERA *.* <-- Erase all files Notes: I $R/ fil i encountered BDO erro messag wil b displaye an th procedur i stopped Th use i unsur a thi tim a t whic file hav bee erase an whic hav no an shoul check Sorr fo thi problem Th ERAS comman (t b give t SIG/ b RL i th nea future i solutio t this problem. Page 14 ZCPR - A Z80 Replacement for the CP/M CCP Command: LIST Function: To Print the specified file on the CP/M LST: device Forms: LIST <-- Print the file (no paging) Customization Variables: -None- Examples: LIST TEST.TXT <-- Print TEST.TXT on LST: Notes: I th fil ha $SY attribute i wil b foun a wel as those with $DIR attributes. Command: TYPE Function: To Print the specified file on the CP/M CON: device Forms: TYP P <-- Print the file with the paging deflt negated Customization Variables: NLINES PGDFLT PGDFLG Examples: TYPE TEST.TXT TYPE TEST.TXT P Notes: Whe th displa pause durin paging typ an cha t continue or ^C to abort. ^S also works. Command: SAVE Function: To Copy the TPA starting at 100H to disk Forms: SAVE <-- in DEC SAVE H <-- in HEX SAVE S <-- Number of sectors SAVE H S <-- Number of sectors Customization Variables: NUMBASE RAS Examples: SAVE 15 MYFILE.TXT <-- 15 pages saved SAVE FH MYFILE.TXT <-- 15 pages saved SAVE 10H MYFILE.TXT S <-- 16 sectors (8 pages) saved Notes: I th fil nam t b save alread exists the SAV wil exi wit th messag 'Delete File?' i th use REALL want t sav unde thi name h ma the typ o an th curren fil wil b delete an the recreate containin th specifie part of the TPA. Page 15 ZCPR - A Z80 Replacement for the CP/M CCP Command: REN Function: To Change the name of a disk file Forms: REN = Customization Variables: RAS Examples: REN NEWFILE.TXT=OLDFILE.TXT Notes: I . Command: USER Function: To Change the current user number Forms: USER <-- in DEC USER H <-- in HEX Customization Variables: -None- Examples: USER 15 USER FH USER 0 USER <-- Same as USER 0 Notes: -None- Command: DFU Function: To Temporarily Change the default user number for the  command hierarchy search Forms: DFU <-- in DEC DFU H <-- in HEX Customization Variables: -None- Examples: DFU 15 DFU FH DFU 0 DFU <-- Same as DFU 0 Notes: See above for explanation. Page 16 ZCPR - A Z80 Replacement for the CP/M CCP Command: JUMP Function: To "call" the subroutine at the specified page address Forms: JUMP
<--
in HEX Customization Variables: NUMBASE RAS Examples: JUMP E000 or JUMP E000H <-- Jump to E000H JUMP <-- Jump to 000H JUMP 0 <-- Jump to 000H Notes: JUM perform subroutin "call" s th calle routin ma return to the ZCPR by either a RET or a Warm Boot. Command: GO  Function: To "call" the subroutine starting at 100H Forms: GO <-- Execute reentrant at 100H Customization Variables: RAS Examples: GO *.ASM <-- Assuming XDIR is loaded, gives directory of *.ASM Notes: Thi comman i identica i functio t JUMР 100H JUMP however leave th addres a th firs entr i CP/ BAS 80 (the input line buffer), while GO has no such address. Command: GET Function: To load a file from disk into memory starting at the specified page Forms: GET
<--
in HEX Customization Variables: NUMBASE RAS Examples: GET 8000 TEST.80 <-- Load TEST.80 starting at 8000H GE 10 TEST.8 o GE 100 TEST.8 <-- Loa TEST.8 starting at 100H GE TEST.8 <-- Loa TEST.8 startin a 000H Notes: GEԠ searche fo th specifie fil accordin t th sam comman hierarch searc employe b th ZCPR comman scanner Hence i th use i o B:/1 an th fil i o A:/ wit th curren defaul use numbe a 0 GE wil searc fro B:/1 t B:/0 to A:/0 in looking for the file. Page 17 ZCPR - A Z80 Replacement for the CP/M CCP ZCPR Error Messages Th followin ar th erro message issue b ZCPR an their meanings. Message Meaning ? Printed after a command or an argument means that such was invalid No File From DIR, this means that DIR did not locate any files Also from ERA with the same meaning All? Issued in response ERA *.*, asks the user is he really wants to erase all the files. Unlike under the original CP/M 2.2 CCP, single charac ter input is required (Y or y for yes and anything else for no) with NO to end the line Full From SAVE, means that there is not enough space on disk From GET or command load by CPR, means that there is not enough space in memory Delete File? Fro RE o SAVE mean tha th fil specifie alread exist o dis an th use ma typ o t delet it and proceed with the REN or SAVE function Page 18 ZCPR - A Z80 Replacement for the CP/M CCP Part C ZCPR Command Levels and How to Use Them ZCPR Versio 1. an beyon support thre distinc comman level i it implementation Eac leve constitute differen way to issue a command for ZCPR to process. Comman Level an ar commo t al implementation o CP/͠ an CP/Z fro CP/ Versio 1.4 Comman Leve i tha comman leve i whic th comman i issue b th use fro hi consol terminal Th promp 'd> o 'du> appear o th terminal an th use i allowe t ente th comman wit editin fro th terminal Comman Leve i tha comman leve in which the command is entered from an executing $$$.SUB file. I bot cases th comman i store i th interna ZCPR buffe calle CIBUF (Comman Inpu BUFFer) Unde bot Comman Level an 2 th comman i place int thi buffer th character o th comman lin ar capitalized characte coun whic indicate th numbe o character i th comman lin i store i CBUF (th byt befor CIBUFF) a endin binar i place afte th las characte i th comman line an th interna pointe CIBPT (Comman Inpu Buffe PoinTeR i se t point to CIBUFF (the first character of the command line). Comman Leve i a extende concep t Comman Level an whic i specificall supporte b ZCP Versio 1. an beyond Thi comman leve allow transien progra t plac comman lin int CIBUF an th characte coun int CBUFƠ an hav thi comman lin execute b ZCPR Onc contro i trans- ferre t ZCP t execut th comman line th transien progra whic place th comman lin lose contro an th comman i execute exactl a thoug i ha bee type b th use a hi consol terminal. I orde fo transien progra t utiliz th Comman Leve facility thi progra MUS d th following: 1 Locat th ZCPR Sinc th ZCP i ALWAY 2 byte i siz an locate directl unde th BDOS th transien ca locat th ZCPҠ b examinin th BDO entr pag addres a locatio an subtractin fro thi numbe ( page 2 bytes) Th resultin numbe i th bas pag addres o ZCPR. 2 Stor th comman lin i CIBUF an th characte coun i CBUFF Knowin th bas pag addres o ZCPR th following information is useful in doing this: Page 19 ZCPR - A Z80 Replacement for the CP/M CCP ORG CPRLOC ;Base Address of ZCPR JMP CPR ;Enter ZCPR and Execute Default Cmd JMP CPR1 ;Enter ZCPR and Don't Execute MBUFF: DB BUFLEN ;Size of CIBUFF in bytes CBUFF: DS 1 ;Number of Bytes in Command Line CIBUFF: DS BUFLEN ;Buffer for Command Line DS 1 ;Buffer for Ending 0 (set by ZCPR) CIBPTR: DS 2 ;Address of CIBUFF (set by ZCPR) 3 Obtai th User/Dis Flag Locatio contain  thi number bu th use ma selec fla o hi choice Thi fla i on byt long an th high-orde nybbl ( bits contain th use numbe an th low-orde nybbl contain th dis numbe t proces th comman from Th User/Dis Fla i to be passed to ZCPR in the C Register. 4 Whe ready transfe contro t ZCPR t proces th comman b JMPin t th bas addres o ZCPR Th firs JM i th JM Tabl give abov i a thi address A thi time ZCPR wil lo i th use an dis i th User/Dis Fla an proces the Command Level 3 Command Line. Page 20 ZCPR - A Z80 Replacement for the CP/M CCP Th followin i sampl progra whic illustrate th steps outlined above: ; ; Demonstration of Command Level 3 Facility by RLC ; udflag equ 4 ! ;Address of User/Disk Flag bdos equ 5 ;Address of BDOS Entry Point org 100h lxi d,prmpt ;Print User Prompt mvi c,9 ;PRINT function call bdos lhld bdos+1 ;Get address of BDOS mov a,h ;High-Order Address in A sui 8 ;A=High-Order Address of CPR mov h,a ;HL=Address of CPR mvi l,0 shld cpr ;Save address in buffer lxi d,6 ;Point to command line buffer dad d ;HL points to command line buffer xchg ;DE points to command line buffer mvi c,10 ;READLN into this buffer call bdos lhld cpr ;Get Address of CPR lda udflag ;Get User/Disk Flag mov c,a ; ... in C pchl ;Run Command Line cpr: ds 2 ;CPR Address buffer prmpt: db 'User Command? $' Enjoy using ZCPR! -- RLC Page 21 ;Get address of BDOS mov a,h ;High-Order Address in A sui 8 ;A=High-Order Address of CPR mov h,a ;HL=Address of CPR mvi l,0 shld cpr ;Save address in buffer lxi d,6 ;Point to command line buffer dad d ;HL points to command line buffer xchg ;DE points to command line buffer mvi c,10 ;READLN into this buffer call bdos lhld cpr ;Get Address of CPR lda udflag ;Get User/Disk Flag mov c,a ; ... in C pchl ;Run Command Line cpr: ds 2 ;CPR Address buffer prmpt: db 'User Command? Summary of the New Features of ZCPR The ZCPR Command Hierarchy Search ZCPR-Resident Command DIR ZCPR-Resident Command ERA ZCPR-Resident Command LIST ZCPR-Resident Command TYPE ZCPR-Resident Command SAVE ZCPR-Resident Command REN ZCPR-Resident Command USER ZCPR-Resident Command DFU ZCPR-Resident Command JUMP ZCPR-Resident Command GO ZCPR-Resident Command GET ZCPR Error Messages :Summary of the New Features of ZCPR ZCPR (Z80 Command Processor Replacement) is a replacement of the CP/M CCP which is designed to run as part of CP/M on Z80- based microcomputers. In most cases it is upward-compatible to the original CP/M Version 2.2 CCP. ZCPR, however, provides many extensions over the CP/M CCP. Included in these extensions are: . The TYPE function can be made to page or not page its output at the user's discretion . A LIST function is available which sends its output to the CP/M LST: Device and does NOT page . The DIR command has been extended to allow the dis- play of the system files or all files . The ERA command now prints out the names of the files it is erasing . The current user number may be included as part of the command prompt; if the user is under a number other than 0, the prompt is of the form 'du>' (like 'A2>' or 'B10>'), and, if the user is under 0, the prompt may be 'd>' or 'd0>' as per his choice . The SUBMIT facility has been changed in two basic ways: - the prompt changes to 'du$' or 'd$' when the SUBMIT command is printed - the $$$.SUB is executed from drive A: only (note that the original SUBMIT problem now exists, but the new SUB.COM facility corrects it); Indirect Command Files now perform according to the basic philosophy that any command sequence that can be input from the console may be used in an Indirect Command File as well; the ZCPR.DOC file also gives details as to how to patch SUBMIT.COM if SUB.COM is not available . A command-search hierarchy is now implemented which is executed as follows: - the user's command is checked against the CPR- resident commands and executed immediately if a match is found - failing that, the current user number on the current disk is scanned for the COM file; the COM file is loaded and executed if found - failing that, a default user number (initially 0 but can be reset with the DFU CPR-resident command) on the cur- rent disk is scanned for the COM file; the COM file is loaded and executed if found - finally, failing that, the default user number on disk A: is scanned for the COM file; the COM file is loaded and executed if found or an error message (COMMAND?, when COMMAND was the user's command name) is printed . The numeric argument for the SAVE CPR-resident com- mand (viz the number of 256-byte pages to save)" can be input in HEX rather than decimal . A GET command which loads a file at a specified memory address and a JUMP command which "calls" the subroutine at a specified memory address have been added; a GO command which "calls" the subroutine starting at 100H is also added (this is redundant with JUMP 100H) :The ZCPR Command Hierarchy Search The first, and most basic thing, to learn about ZCPR is the order in which it searches for a COM file for execution or a file specified by the GET command. Under the CP/M 2.2 CCP, if the specified COM file command was not found on the current drive in the current user area, the CCP aborted with an error message. ZCPR, however, continues searching from this point a maximum of two more levels. This command hierarchy search was outlined above and is described here in further detail. 1. If the command is of the form 'COMMAND' and NOT 'd:COMMAND', the CPR-resident command list is searched for a match. If the match is found, the CPR-resident command is immediately processed. If the match is not found or the command is of the form 'd:COMMAND', the next step is taken. Note that the 'd:COMMAND' form is good for executing a COM file which has the same name as a CPR-resident command (such as SAVE or DIR). 2. If the command is of the form 'd:COMMAND', disk drive 'd:' is temporarily logged in for the purpose of the command search. Otherwise, the currently logged-in drive is used. 3. Now the file named COMMAND.COM is searched for. If found, it is loaded into memory starting at 100H and executed. If not, proceed to step 4. 4. Now that the first search for COMMAND.COM has failed, the CPR checks to see if the user is under the current Default User Number. The Default User Number may be that set by the DEFUSR equate in the CPR or that set by the user via the DFU command. DEFUSR is in effect if DFU has not been issued since the last Warm or Cold Boot, and DFU is in effect if it was issued since the last Warm or Cold Boot. If the user is NOT under the current Default User Number, ZCPR temporarily logs him into it and searches the directory. If COMMAND.COM is found, it is loaded as described above and executed. If not, ZCPR proceeds to the next step. 5. The user is now in the Default User Number, and at this point, ZCPR checks to see if the user is on disk drive A:. If not, it temporarily logs into A: and searches the default user number of A: for COMMAND.COM. If found, it is loaded as described above and executed. If not, ZCPR prints the command name as an error message and returns to command input mode, aborting the SUBMIT file if COMMAND came from it. In all cases of the search above, if COMMAND.COM is found, after it is loaded into memory, ZCPR resets the user to his original disk drive and user number. Hence, the files referenced by the user by default are obtained from this environment. To illustrate this command hierarchy search, consider the following examples: Example 1: DEFUSR equ 0 {default user number is 0} B10> <-- User is on Drive B:, User Number 10 B10>ASM TEST.BBZ <-- User wishes to assemble TEST.ASM in Drive B:, User 10 <-- At this point, ZCPR looks on B:/10 for ASM.COM, fails, looks on B:/0, fails, and finally looks on A:/0; it finds ASM.COM here and goes back to B:/10 for the file Example 2: DEFUSR equ 0 and DFU issued B10> <-- User is on Drive B:, User Number 10 B10>DFU 5 <-- User Selects User 5 as default B10>ASM TEST.BBZ <-- As above <-- At this point, ZCPR looks on B:/10 for ASM.COM, fails, look on B:/5, fails, and finally looks on A:/5; it fails here also and prints ASM? as an error message Example 3: DEFUSR equ 0 B> <-- User is on Drive B:, User Number 0 B>ASM TEST.BBZ <-- As above <-- At this point, ZCPR looks on B:/0 for ASM.COM, fails, looks on A:/0, fails, and prints error message Example 4: DEFUSR equ 0 A10> <-- User is on Drive A:, User Number 10 A10>ASM TEST.AAZ <-- As above, but file on A: <-- At this point, ZCPR looks on A:/10 for ASM.COM, fails, looks on A:/0, fails, and prints error message :ZCPR-Resident Command DIR Command: DIR Function: To Display a listing of the names of the files on disk Forms: DIR <-- Displays $DIR files DIR S <-- Displays $SYS files DIR A <-- Displays both $DIR and $SYS files Examples: DIR *.ASM <-- All $DIR .ASM files DIR *.COM S <-- All $SYS .COM files DIR *.COM A <-- All .COM files Notes: If a file is scanned for and no such name exists on disk, the 'No Files'# message will appear. However, if a file is scanned for and the name exists as a $SYS file and $DIR files are being scanned for, no file name is displayed but the 'No Files' message does NOT appear. For example, if TEST.COM is a $SYS file and 'DIR TEST.COM' is issued, no message appears. If 'DIR TEXT.COM' is issued and TEXT.COM does not exist on disk, the 'No Files' message is displayed. :ZCPR-Resident Command ERA Command: ERA Function: To Erase the specified $R/W files from disk Forms: ERA <-- Erase both $DIR and $SYS files Examples: ERA *.ASM <-- Erase all .ASM files ERA *.* <-- Erase all files Notes: If a $R/O file is encountered, a BDOS error message will be displayed and the procedure is stopped. The user is unsure at this time as to which files have been erased and which have not and should check. Sorry for this problem! The ERASE command (to be given to SIG/M by RLC in the near future) is a solution to this problem. :ZCPR-Resident Command LIST Command: LIST Function: To Print the specified file on the CP/M LST: device Forms: LIST <-- Print the file (no paging) Examples: LIST TEST.TXT <-- Print TEST.TXT on LST: Notes: If the file has a $SYS attribute, it will be found as well as those with $DIR attributes. :ZCPR-Resident Command TYPE Command: TYPE Function: To Print the specified file on the CP/M CON: device Forms: TYPE <-- Print the file with the paging deflt TYPE P <-- Print the file with the paging deflt negated Examples: TYPE TEST.TXT TYPE TEST.TXT P Notes: When the display pauses during paging, type any char to continue or ^C to abort. ^S also works. :ZCPR-Resident Command SAVE Command: SAVE Function: To Copy the TPA starting at 100H to disk Forms: SAVE <-- in DEC SAVE H <-- in HEX SAVE S <-- in DEC SAVE H S <-- in HEX Examples: SAVE FH MYFILE.TXT <-- 15 pages saved SAVE 15 MYFILE.TXT <-- 15 pages saved SAVE 10H MYFILE.TXT S <-- 16 sectors (8 pages) saved Notes: The error message 'Delete File?' is printed if already exists. To go ahead and SAVE, type Y or y to erase the file and proceed with the SAVE. :ZCPR-Resident Command REN Command: REN Function: To Change the name of a disk file Forms: REN = Examples: REN NEWFILE.TXT=OLDFILE.TXT Notes: The error message 'Delete File?' is printed if the already exists. To go ahead and complete the REN, type Y or y to erase the current file and then will be renamed to . :ZCPR-Resident Command USER Command: USER Function: To Change the current user number Forms: USER <-- in DEC USER H <-- in HEX Examples: USER 15 USER FH USER 0 USER <-- Same as USER 0 Notes: -None- :ZCPR-Resident Command DFU Command: DFU Function: To Temporarily Change the default user number for the command hierarchy search Forms: DFU <-- in DEC DFU H <-- in HEX Examples: DFU 15 DFU 0 DFU FH DFU <-- Same as DFU 0 Notes: -None- :ZCPR-Resident Command JUMP Command: JUMP Function: To "call" the subroutine at the specified page address Forms: JUMP
<--
in HEX Examples: JUMP E000 or JUMP E000H <-- Jump to E000H JUMP 100 <-- Jump to 100H JUMP 0 <-- Jump to 000H  JUMP <-- Same as JUMP 0 Notes: JUMP performs a subroutine "call", so the called routine may return to the ZCPR by either a RET or a Warm Boot. :ZCPR-Resident Command GO Command: GO Function: To "call" the subroutine at address 100H Forms: GO <-- Routine at 100H Examples: GO *.ASM <-- Execute TPA-resident prog with *.ASM passed Notes: This is identical in function to JUMP 100H. :ZCPR-Resident Command GET Command: GET Function: To load a file from disk into memory starting at the specified page Forms: GET
<--
in HEX Examples: GET 8000 TEST.80 <-- Load TEST.80 starting at 8000H GET 100 TEST.80 or GET 100H TEST.80 <-- Load TEST.80 start- ing at 100H GET 0 TEST.80 <-- Load TEST.80 starting at 000H Notes: GET searches for the specified file according to $ the same command hierarchy search employed by the ZCPR command scanner. Hence, if the user is on B:/10 and the file is on A:/0 with the current default user number at 0, GET will search from B:/10 to B:/0 to A:/0 in looking for the file. :ZCPR Error Messages The following are the error messages issued by ZCPR and their meanings. Message Meaning ? Printed after a command or an argument means that such was invalid No File From DIR, this means that DIR did not locate any files Also from ERA with the same meaning All? Issued in response ERA *.*, asks the user is he really wants to erase all the files. Unlike under the original CP/M 2.2 CCP, single character input is required (Y or y for yes and anything else for no) with NO to end the line Message Meaning Full From SAVE, means that there is not enough space on disk From GET or command load by CPR, means that there is not enough space in memory Delete File? From REN or SAVE, means that the file specified already exists on disk and the user may type Y or y to erase it and continue with the procedure or any other character to abort  ? Printed after a command or an argument means that such was invalid No File From DIR, this means that DIR did not locate any files Also from ERA with the same meaning All? Issued in response ERA *.*, asks the user is he really wants to erase all the files. Unlike under the original CP/M 2.2 CCP, single character input is required (Y or y for yes and anything else for no) with NO to end the line Message Meaning Full From SAVE, means that there is not enough space on disk From GET or comman ZCPR Version 1.0 Release Notice Greetings, Everyone, ɠ a ver please t announc (appropriatel a Christma time s Merr Christmas th forma releas o ZCP -- Z80- base Comman Processo Replacement Thi progra replace th CP/M CCP and greatly extends its capabilities. Som o yo ma hav hear o CCP an MCP durin variou discussions Fo thos wh hav hear o thes programs ZCP i th Baselin Syste t b release int th publi domain I wa derive fro CCP Versio 4.0 an i a enhancemen o this I contain man interna difference whic ar no readil noticabl t th CCP user an som ne ke huma engineerin desig change ove CCP Versio 4. (specificall i th SAV an RE commands) Fo thos o yo wh hav bee considerin desig changes includin th unsanctione Versio 4. an numerou Versio 4. implementation (thes fel ou o th contro o CCP-GROUP) ZCP Versio 1. i th release baselin whic CCP-GROU ha decide upo fo publi release Ther ar severa interna "problems wit CCP Versio 4. whic hav bee resolve t th satisfactio o th recen workin majorit o CCP-GROUP Hence ɠ (an believ th majorit o th above- name CCP-GROUР subset strongl recommen backin u t ZCP Versio 1. an implementin you modification fro that. Now gettin bac t everyon i general ZCP i th resul o Grou Effor b CCP-GROUP somewha closely-ni grou o individuals Fo th individua credits the ar liste i th AS an DO files an sincerel apologiz i omitte anyone I did th correction wil b issue later. ZCPҠ i th resul o severa month o rathe diligen an fascinatin work I completel replace th Consol Comman Processo o栠 CP/͠ an wil onl ru o Z80-base䠠 CP/ microcompute systems CP/͠ i require i orde t ru it sinc "heart o CP/M th BDOS i NO provide wit ZCPR Th MA Assemble i require t assembl it S far base upo bot use feedbac an ou ow experiences w fee tha ZCP i significan contributio t th Publi Domain an everyon wh has used it greatly prefers it over standard CP/M. ZCPҠ i bein release fo Publi Distributio throug th SIG/ User' Grou o th Amateu Compute Grou o NJ I th spiri o Publi Domai software ZCP i b n mean panacea bu i I ver nic steppin stone an yo ar encourage t fee fre t modif i t pleas yourselves Futur release o ZCP ar quit possible bu sai release fro CCP-GROU shoul no happe fo som time ZCP ha bee extensivel tested and althoug n softwar ca b claime t b perfec unles i i absolutel trivial CCP-GR%OU know o n functiona error i ZCP Versio 1.0. Page 1 ZCPR Version 1.0 Release Notice Fo thos intereste i pursuin acquisitio o ZCP further ɠ recommen reviewin th HEL Fil (ZCPR.HLР i th SIG/͠ Release) Th openin Informatio Sectio give fai descriptio o some bu no all o th interestin feature supporte b ZCP an NO foun i th CP/ CCP I i roughl 16 lon an shoul no tak to lon t prin out. Th nex pag o thi messag present severa display an som informatio o wha file compos th ZCP system CCP-GROU hope yo enjo usin ZCPR. Richard Conn Page 2 ZCPR Version 1.0 Release Notice XDIR2 Listing of All Relevant Files ZCPR FILES ... ET AL XDIR II Version 4.8, Vertical Listing by File Type User Number: 0, File Attributes: Non-System Filename.Typ Size K Filename.Typ Size K Filename.Typ Size K -------- --- ------ -------- --- ------ -------- --- ------ 0 MAC .COM 12 ZCPR .MSG 6 BDOSLOC .ASM 2 SYSGEN .COM 2 ZCPR .WS 40 ZCPR .ASM 52 ZCPR .DOC 46 ZCPRMSG .WS 6 CPM .BIN 12 ZCPR .HLP 16 B: 34 Entries & 14 Files - 172K Bytes Remaining File Data: 11 Files - 194K Bytes Displayed CRCK Values for Key Files File: ZCPR .WS CRC = A2 C2 File: ZCPR .DOC CRC = 94 B7 File: ZCPR .HLP CRC = 26 9D File: ZCPR .ASM CRC = 7A 46 File: BDOSLOC .ASM CRC = EB D4  Explanation of Files ZCPR.AS͠ -- Sourc t ZCPR mus b assemble b MAà an customized by user for his particular system ZCPR.HLР -- HEL Fil fo ZCPR ca b rea b HEL Versio 2. o simpl TYPE out rea thi t se fai summary of what ZCPR can do ZCPR.DOà -- Ful젠 Documentatio o ZCPR thi include installatio notes customizatio notes an detai whic expands upon the ZCPR.HLP File ZCPR.W -- WordSta Fil fro whic ZCPR.DO wa created ZCPR.MSG -- Introductory message on ZCPR ZCPRMSG.WS -- WordStar File from which ZCPR.MSG was created BDOSLOC.AS -- BDO an CC Locator thi progra i hand durin initia installatio o ZCPҠ an it us i documented in ZCPR.DOC Page 3  This is the release date of the disk. MAX12 NSL  MAX13 NSL  MAX14 NSL MAX15 NSL MEMTEST COM MEMTEST DOC SETIO COM SETIO DOC SETIO MAC #TURNKEY COM #TURNKEY DOC $TURNKEY MAC %VFUZZY BAS 'VSMALL BAS (SETIO .MAC D5 95 8960 70 TURNKEY .COM 5D 28 256 2 TURNKEY .DOC 86 91 384 3 TURNKEY .MAC C7 F7 1536 12 VFUZZY .BAS 5B F6 256 2 VSMALL .BAS 0A 0B 256 2 VFUZZ/SM.DOC 49 4F 384 3 WSKB .COM 98 3A 128 1 WSKB .DOC 95 FB 256 2 WSKB .MAC 11 BA 256 2 XFUNC .ASM 82 65 2688 21 XFUNC .DOC DC 66 128 1 ZCPR-MAX Fog Library Disk FOG-CPM.052 Copyright (1986) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. Lobo Max-80 programs. Filename Description -06-00 .86 This is the release date of the disk. -CPM052 .DOC &This is the description of the disk contents. MAXLETTR.DOC 3CC0 1K [MAXIMUL Electronic 1 of 5] Newsletters for Lobo Max-80 users. MAX12 .NSL 012C 3K [MAXIMUL Electronic 2 of 5] MAX13 .NSL 3CB2 4K [MAXIMUL Electronic 3 of 5] MAX14 .NSL EEF0 4K [MAXIMUL Electronic 4 of 5] MAX15 .NSL F1B0 5K [MAXIMUL Electronic 5 of 5] MEMTEST .COM 21C7 2K [Memory tester 1 of 2] For the Lobo Max-80 computer. MEMTEST .DOC 39F8 1K [Memory tester 2 of 2] SETIO .COM C57F 2K ver. 2.0 [SETIO 1 of 3] Set Lobo Max-80 serial port A & B configuration. MAC source is included. SETIO .DOC BDAF 1K ver. 2.0 [SETIO 2 of 3] SETIO .MAC D595 9K ver. 2.0 [SETIO 3 of 3] TURNKEY .COM 5D28 1K [TURNKEY 1 of 3] Allows Lobo Max-80 user to specify a startup command. MAC source coded is included. TURNKEY .DOC 8691 1K [TURNKEY 2 of 3] TURNKEY .MAC C7F7 2K [TURNKEY 3 of 3] VFUZZY .BAS 5BF6 1K [VFUZZY/VSMALL 1 of 3] MBasic programs to demonstrate the Lobo Max-80 programmable character set. Rebooting is the only way out of these. VSMALL .BAS 0A0B 1K [VFUZZY/VSMALL 2 of 3] VFUZZ-SM.DOC 494F 1K [VFUZZY/VSMALL 3 of 3] WSKB .COM 983A 1K [WSKB 1 of 3] Configure Lobo Max-80 arrow keys for WordStar. MAC source code is included. WSKB .DOC 95FB 1K [WSKB 2 of 3] WSKB .MAC 11BA 1K [WSKB 3 of 3] XFUNC .ASM 8265 3K ver. 1.0 [XFUNC 1 of 2] ASseMbler source for a program which allows Lobo Max-80 users to configure the and keys. XFUNC .DOC DC66 1K ver. 1.0 [XFUNC 2 of 2] ZCPR-MAX.HEX 6684 6K [ZCPR1 1 of 6] ZCPR1 for the Lobo Max-80 with on-line help (designed to work with HELP) and installation instructions. READZCPR.DOC 019C 1K [ZCPR1 2 of 6] ZCPR .ASM B20D 51K [ZCPR1 3 of 6] ZCPR .DOC 0D2D 45K [ZCPR1 4 of 6] ZCPR .HLP FF8E 15K [ZCPR1 5 of 6] ZCPR .MSG 8FFE 6K [ZCPR1 6 of 6]  [MAXIMUL Electronic 4 of 5] MAX15 .NSL F1B0 5K [MAXIMUL Electronic 5 of 5] MEMTEST .COM 21C7 2K [Memory tester 1 of 2] For the Lobo Max-8'