IMD 1.16: 8/06/2007 19:25:34                    ULTRAPLTBASWKDAY BASWIPE ASMGOTO11 ASMe SECTION ASMTSIZE COMZ80ASM MSGZ80ASM COMDZ80ASM DOCSORBAS01COMSORBAS01DOC( !RESOURCEDOCL"#$%&'()*+,-.RESOURCECOM-/01REZ COM62345REZ DOCO6789:;<=>?@ABREZ Z80CDEFGHIJKLMNOPQR10 CLEAR 500 20 DIM A$(61),X(100),Y(100) 30 PRINT "HERE ARE THE PATTERNS AVAILABLE AT THIS TIME:" 40 PRINT "(1) FLOWER":PRINT "(2) HEART":PRINT "(3) STEEP MOUNTAIN" 50 PRINT "(4) FOUR - POINT STAR":INPUT "WHICH NUMBER";N:IF N<1 OR N>4 THEN PRINT "?WHAT?":GOTO 50 60 ON N GOTO 70,80,90,100 70 DEF FNA(X)=SIN(2*X)+COS(X): DEF FNB(X)=COS(2*X)+SIN(X): L=0:U=6.2:GOTO 110 80 DEF FNA(X)=COS(X)-.5*COS(2*X)-.5: DEF FNB(X)=SIN(X)-.5*SIN(2*X): L=0:U=6.2:GOTO 110 90 DEF FNA(X)=X: DEFREZ Z80STLIST SYSUSD SYSVWTAG ASM'XYZZPIP SYS"[\]BELL SYS^CRCK SYS _DEVAL COM`aDSTAT SYS bD DOC cD COMde FNB(X)=1/6.28318*EXP(-A^2/2): L=-4.9:U=5:GOTO 110 100 DEF FNA(X)=COS(X)^3: DEF FNB(X)=SIN(X)^3: U=0:U=6.2 110 M=0 120 J=36 130 FOR A=L TO U STEP .1 140 M=M+1 150 X(M)=FNA(A) 160 Y(M)=FNB(A) 170 REM FIND MINIMUM AND MAXIMUM 180 IF M<>1 THEN 240 190 X9=X(1) 200 X1=X(1) 210 Y9=Y(1) 220 Y1=Y(1) 230 GOTO 320 240 IF X9>=X(M) THEN 260 250 X9=X(M) 260 IF X1=Y(M) THEN 300 290 Y9=Y(M) 300 IF Y1A2 THEN 620 600 A$(I)="I" 610 GOTO 630 620 A$(I)=" " 6 920 IF E<-2 THEN 950 930 PRINT INT(V*10^(2-E)+.5)/10^(2-E); 940 GOTO 960 950 PRINT INT(V*10^(1-E)+.5)/10;"E";E; 960 RETURN 970 END 2 THEN 950 930 PRINT INT(V*10^(2-E)+.5)/10^(2-E); 940 GOTO 960 950 PRINT INT(V*10^(1-E)+.5)/10;"E";E; 960 RETURN B(10);"I"; 780 FOR I=1 TO 61 790 PRINT A$(I); 800 NEXT I 810 PRINT 820 J=J-1 830 IF J>=0 THEN 580 840 PRINT B$ 850 GOTO 970 860 REM SUBROUTINE 870 IF V<>0 THEN 900 880 PRINT V; 890 GOTO 960 900 E=INT(LOG(ABS(V))/2.303+.5) 910 IF E>2 THEN 950 10 DIM A(12), M$(12) 20 M$(7)="ERROR" 30 FOR I = 1 TO 12:READ A(I):NEXT I 40 DATA 1,32,60,91,121,152,182,213,244,274,305,335 50 FOR I = 0 TO 6:READ M$(I):NEXT I 60 DATA SUN,MON,TUE,WED,THU,FRI,SAT 70 PRINT"ENTER START DATE (MM,DD,YY)"; 80 INPUT M1,D1,Y1 90 PRINT"ENTER END DATE (MM,DD,YY)"; 100 INPUT M,D,Y 110 T=INT(D+365.25*Y+A(M)+.01*M-.03) 120 TB=INT(D1+365.25*Y1+A(M1)+.01*M1-.03) 130 X=T-TB 140 RB=TB-1-INT((TB-1)/7)*7 150 R=T-1-INT((T-1)/7)*7 160 PRINT "START ";M$(RB);" END ";M$(R);" D30 NEXT I 640 IF J<>A1 THEN 690 650 FOR I=1 TO 60 660 A$(I)="-" 670 NEXT I 680 A$(A2)="+" 690 FOR I=1 TO M 700 IF Y(I)<=(J-.5)/S2 THEN 740 710 K=INT(X(I)*S1+1.5) 720 A$(K)="*" 730 Y(I)=-Y(I) 740 NEXT I 750 V=Y1+J/S2 760 GOSUB 860 770 PRINT TAB(10);"I"; 780 FOR I=1 TO 61 790 PRINT A$(I); 800 NEXT I 810 PRINT 820 J=J-1 830 IF J>=0 THEN 580 840 PRINT B$ 850 GOTO 970 860 REM SUBROUTINE 870 IF V<>0 THEN 900 880 PRINT V; 890 GOTO 960 900 E=INT(LOG(ABS(V))/2.303+.5) 910 IF E>2 THEN 950 AYS BETWEEN";X 170 GOTO 70 RB=TB-1-INT((TB-1)/7)*7 150 R=T-1-INT((T-1)/7)*7 160 PRINT "START ";M$(RB);" END ";M$(R);" D 50 FOR I = 0 TO 6:READ M$(I):NEXT I 60 DATA SUN,MON,TUE,WED,THU,FRI,SAT 70 PRINT"ENTER START DATE (MM,DD,YY)"; 80 INPUT M1,D1,Y1 90 PRINT"ENTER END DATE (MM,DD,YY)"; 100 INPUT M,D,Y 110 T=INT(D+365.25*Y+A(M)+.01*M-.03) 120 TB=INT(D1+365.25*Y1+A(M1)+.01*M1-.03) 130 X=T-TB 140 RB=TB-1-INT((TB-1)/7)*7 150 R=T-1-INT((T-1)/7)*7 160 PRINT "START ";M$(RB);" END ";M$(R);" D   ; Title: Wipe.asm (c) ; Erase ALL (*.PRN, *.HEX, *.SYM, *.REL and *.BAK) on current drive ; Author: Steven D. Rudnik ; Date: 8/9/83 ; ********************** ; * Copyright 1983 Sdr * ; ********************** ; ; ************************************************************************* ; Notes: ; If there are any users of ASM, MAC, CB80, or any other assemblers ; or compilers, this program is for you. Programmers who have only ; limited****************** ; ; This software may be used in the PUBLIC DOMAIN for non-commercial ; use only. Any comments or suggestions may be referred to: ; ; Steven D. Rudnik ; 201-993-2000 Ext. 4172 ; (12:00 Noon to 4:30 PM EST) ; ; ************************************************************************* ; ; Some equates... ; cpm equ 0 ; cpm base bdos equ cpm+5 ; bdos entry point print equ 09h ; string out kill equ 13h ; delete file curdisk equ 19h ; return current disk  ext1 ; place char into output string cpi endstr ; check for end of table... jz cpm ; true =: done mov a,m ; repeat for char 2... inx h sta ext2 mov a,m ; repeat for char 3... inx h sta ext3 inloop: mvi c,kill ; kill file(s) specified in fcb lxi d,fcb ; our own FCB address push h ; preserve because BDOS doth clobber... call bdos pop h ; recall pointer... cpi 0ffh ; check return flag 0ffh := none found jz loop ; if none found then wrap up jmp inloop ; ; Modi; ***************** ; * * ; * GOTO.ASM * ; * v1.1 * ; * * ; ***************** ; ; 08/01/83 Mods by Dave Crane, Dallas RCP/M. ; Added LOMEM equate to check callers access level for ; systems using NZCPR and ZCPR2 option for MAXUSR and MAXDRV. ; This version works only for user areas less than 10. ; Based on SECTION 1.0. Renamed GOTO 1.1. ; ; 06/27/82 by Ron Fowler, Westland, Michigan ; ; This program is intended for RCPM systems where ; files are grouped into drive/user area by their  disk storage space often find during development the need ; to remove resultant files, i.e. BAK, SYM, etc..., from your disks ; in order to make room for further development. Why always type ; those familiar ERA *.BAK, ERA *.PRN, etc...? There is a saying ; that reads: ; A good programmer does things only once, then has the ; computer do them, from then on... ; SOUNDS REASONABLE! ; *******************************************************setdma equ 1ah ; set DMA clsrn equ 1ah ; clearscreen cr equ 0dh ; return lf equ 0ah ; line feed endstr equ '$' ; marker for string out ; org 100h ; let's start here... ; main: mvi c,curdisk ; find which disk we're on call bdos adi 41h ; add 65 to make char sta disk ; place char in output string ; erase: mvi c,print ; print sign on message lxi d,signon call bdos ; lxi h,table ; load HL with table address loop: mov a,m ; get char 1 of type inx h ; bump pointer... stafy table here, each entry must be three bytes (PRN, etc) and ; end with 'endstr'. ; table: db 'PRNBAKSYMRELHEXSYM' db endstr ; fcb: db 0 db '????????' ext1: db ' ' ext2: db ' ' ext3: db ' ' ds 21 ; signon: db cr,lf db 'Wipe Version 1.0',cr,lf db '-----------------',cr,lf,lf db 'Erasing *.PRN, *.HEX, *.SYM, *.REL and *.BAK from Drive ' disk: db 0 db ':',cr,lf,endstr ; done: end  ; classification. This program implements a naming ; convention, whereby a caller can move into another ; USER area by typing its name, rather than the random ; or total searching formerly needed. ; ; Syntax is: GOTO [] ; ; If area-name is omitted, a short list of ; available areas is printed. The special ; form "GOTO ?" prints the detailed description ; of each area. ; ; You have to fill in the areas table ; (located near the end of this program) for your ; particular system. ;    ;----< Examples of use: >----- ; ; A0>GOTO REF ;changes drive/user to reference area ; B4>GOTO IBM ;changes drive/user to IBM/PC area ; A6>GOTO ;prints short list of areas available ; A9>GOTO ? ;prints the detailed list ; false equ 0 ;define truth and falsehood true equ not false ; ; the following equates may be ; customized to your preference ; descol equ 15 ;column # where description begins ;(in detailed list) (should be greater ;than longest area name) (but small ;enuf so  user/drive storage loc bdos equ cpbase+5 ;system entry point dfcb equ cpbase+5CH ;default file control block dbuf equ cpbase+80H ;default buffer tpa equ cpbase+100H ;base of transient program area coninf equ 1 ;system call, get console char conotf equ 2 ;system call, console output printf equ 9 ;system call, print cons string cstsf equ 11 ;system call, get console status setdrv equ 14 ;system call, set/drive system call getdrv equ 25 ;system call, get drive # system call gsuser equ 32 ;syy logged drive mov b,a ;save for comparison pop psw ;get old logged drive cmp b ;did logged drive change? jnz cpbase ;then relog with warm boot endif ; lhld spsave ;else restore stack sphl ret ;to system... ; ; scan cmd line...if an arg exists, attempt to ; match it in the table. If no arg, dump a list ; of available areas. ; area: lda dfcb+1 ;is there a cmd-line arg? cpi ' ' jz prnqk ;then go print areas out cpi '?' ;wants detailed list? jz prntbl ;then go do it  eloop ; ; here when an entry didn't match ; nomat: ldax d ora a ;entry terminator? inx d jnz nomat ;scan through it pop h ;restore cmd line arg pntr inx d ;end of entry, skip over user # inx d ;and drive ldax d ;end of table? ora a ;(terminated by 0) jnz loop ;go scan another if not ; ; here when no match can be found ; lxi d,matmsg ;print out no-match message mvi c,printf call bdos jmp prnqk ;go give short list ; ; here when a match is found HLSAVE DS 2 DESAVEM JM NG ;failed JMP OK NG: LHLD DESAVE ;RESTORE XCHG LHLD HLSAVE JMP NOMAT ;never mind! OK: ENDIF ;LOMEM ; push d ;save user # push h ;and pointer mvi c,gsuser ;set user number call bdos pop h ;restore pointer to drive mov a,m ;fetch drive sui 'A' ;subtract ascii bias sta newdrv ;set new logged drive pop d ;restore user number in e mov d,a ;save drive # mov a,e ;fetch user number rlc ;rotate to high nybble rlc rlc rlc ora d ;"or" in the drive stadisplay is not too long) perlin equ 4 ;names printed per line in short list tabpos equ 10 ;tab stops (set mod tabpos) ;should be at least one greater than ;longest area name. turbo equ false ;set TRUE if you'er running TurboDOS LOMEM equ TRUE ;set true for MAXDRV, MAXUSR in use ; ; o/s conventions ; LOCDRV equ 3Dh ;location of MAXDRV (0=A, 5=F, etc) LOCUSR equ 3Fh ;location of MAXUSR+1 (16 = user 15) cpbase equ 0 ;set to 4200H for Heath, 0 for std systems ccpdrv equ cpbase+4 ;ccpstem call, get/set user number ; ; character definitions ; cr equ 13 ;carriage-return code lf equ 10 ;linefeed code ; ; code begins.... ; org tpa ; ; pbase: lxi h,0 ;save system stack dad sp shld spsave lxi sp,stack ;load local stack ; if not turbo ;cp/m, get drive # mvi c,getdrv ;get current drive # call bdos push psw ;save it sta newdrv ;two ways endif ; call area ;perform the main function ; if not turbo ;turbodos doesn't need this stuff lda newdrv ;get newl lxi h,dbuf ;something there, scan to it scanbk: inx h ; ignoring blanks mov a,m cpi ' ' jz scanbk lxi d,table ;point de to the AREA table loop: push h ;save cmd line arg pointer eloop: ldax d ;test entry against table cpi 1 ;end of entry marker? jnz noend ;jump if not mov a,m ;yes, did user cmd terminate also? ora a jz match ;then declare a match jmp nomat ;else declare a mismatch noend: cmp m jnz nomat ;skip if no match inx h ;continue with comparison inx d jmp DS 2 ; match: SHLD HLSAVE ;Need to restore if LOMEM test fails xchg ;hl==> user # SHLD DESAVE ;Needed if LOMEM test fails scmat: inx h ;scan past description mov a,m ;looking for terminating null ora a jnz scmat inx h ;skip over terminator mov a,m ;fetch user # sui '0' ;subtract ascii bias mov e,a inx h ;point hl to drive # ; IF LOMEM LDA LOCUSR ;Look for USER authorization SUI 1 CMP E ;compare to DE JM NG ;failed LDA LOCDRV ACI 'A' ;add ASCII bias CMP  ccpdrv ;save for ccp use ; if turbo ;if turbodos... mvi c,setdrv ;...have to set drive explicitly mov e,d ;get drive in e call bdos ;set the drive endif ; pop h ;clear garbage from stack ret ;all done ; ; message printed when match failed ; matmsg: db cr,lf,'++ Entry not found ++' db cr,lf,cr,lf,'$' matms2: db cr,lf,'Type "GOTO ?" for detailed list' db cr,lf,' of available areas.',cr,lf db cr,lf,'Type "GOTO " to log' db cr,lf,' into a particular area   .' db cr,lf,'$' ; ; print "quick list" ; prnqk: lxi d,tblmsg mvi c,printf call bdos lxi h,table ;print abbreviated list qloop: mvi b,perlin ;get names-per-line counter qloop2: mov a,m ;end of table? ora a jz qkend ;then go print end msg ; IF LOMEM ;see if we want to print this entry SHLD HLSAVE ;park it ZSCAN: MOV A,M ;assume this is end of string INX H ;point to next location CPI 0 ;was it really end of string? JNZ ZSCAN ;loop until found LDA LOCUSR ;HL points to ver user # inx h ;and drive # dcr b ;count down line entry counter jnz qtab ;go tab if line not full call crlf ;else turn up new line jmp qloop ;and continue ; ; tab between entry names ; qtab: mvi a,' ' ;seperate names with tabs call type lda column ;get column # qsub: sui tabpos ;test tab position jz qloop2 ;continue if at a tab position jnc qsub ;convert mod tabpos jmp qtab ;keep tabbing ; qkend: call crlf ;do newline lxi d,matms2 ;print ending message mvi c,priSR ;HL points to user/drive ACI 30H-1 ;add ASCII bias less 1 CMP M ;compare to MAXUSR INX H ;point to drive JM QX2 ; failed LDA LOCDRV ;get MAXDRV ACI 'A' ;ASCII BIAS CMP M ;compare to MAXDRV QX2: INX H ;point to next parameter field JM PRLOOP ; failed OKPQ2: LHLD HLSAVE ;restore pointer - passed both tests ENDIF ;LOMEM ; call prathl ;print the name tab: mvi a,'.' ;tab over with leader call type lda column ;get column cpi descol ;at description column yet? jc td push b mvi c,cstsf ;get console sts request call bdos ora a ;anything waiting? jz brback ;exit if not mvi c,coninf ;there, is, get it call bdos cpi 'S'-64 ;got pause request? mvi c,coninf cz bdos ;then wait for another character cpi 'C'-64 ;got abort request? jz quit ;then go abort brback: pop b ;else restore and return pop d pop h ret ; ; request from console to abort ; quit: lxi d,qmesg ;tell of quit mvi c,printf call bdos lhld spsave ;get stack pointer jz nochg inr m cpi cr ;carriage-return zeroes it jnz nochg ;skip if not cr mvi m,0 ;is, zero column nochg: pop b ;restore & return pop d pop h ret ; ; dump heading message ; tblmsg: db cr,lf,'Available areas are:',cr,lf,'$' ; ; variables ; spsave: dw 0 ;stack-pointer save column: db 0 ;current column # newdrv: db 0 ;new drive # to log ds 20 ;the stack ; stack equ $ ;define it ; ; SECTIONS TABLE (located at end for easy patching with DDT) ; ; This is the table tuser/drive ACI 30H-1 ;add ASCII bias less 1 CMP M ;compare to MAXUSR INX H ;point to drive JM QX ; failed LDA LOCDRV ;get MAXDRV ACI 'A' ;ASCII BIAS CMP M ;compare to MAXDRV QX: INX H ;point to next parameter field JM QLOOP2 ; failed OKPQ: LHLD HLSAVE ;restore pointer - passed both tests ENDIF ;LOMEM ; call prathl ;else print the name qscan: mov a,m ;scan to description terminator inx h ;(this effectively ignores ora a ; the description) jnz qscan inx h ;skip ontf call bdos call crlf ret ; ; here to print out a list of available area numbers ; prntbl: lxi d,tblmsg ;print heading message mvi c,printf call bdos call crlf ;turn up new line lxi h,table prloop: mov a,m ;end-of-table? ora a rz ;then all done ; IF LOMEM ;see if we want to print this entry SHLD HLSAVE ;park it ZSCAN2: MOV A,M ;assume this is end of string INX H ;point to next location CPI 0 ;was it really end of string? JNZ ZSCAN2 ;loop until found LDA LOCUab ;then keep tabbing call prathl ;print description inx h ;skip over user # inx h ;and drive number call crlf ;turn up new line jmp prloop ;and continue ; ; print message @hl until null or 01 binary ; prathl: mov a,m ;fetch char inx h ;point past it ora a ;null? rz ;then done cpi 1 ;1 also terminates rz call type ;nope, print it call break ;check for console abort jmp prathl ; ; test for request from console to stop (^C) ; break: push h ;save 'em all push  sphl ret ; qmesg: db cr,lf,'++ Aborted ++',cr,lf,'$' ; ; turn up a new line on display ; crlf: mvi a,cr ;print a return call type mvi a,lf ;get lf, fall into type ; ; Routine to print char in A on console, ; while maintaining column number. ; type: push h ;save everybody push d push b mov e,a ;align char for printing push psw ;save char mvi c,conotf call bdos ;print it pop psw ;restore char lxi h,column ;bump column counter cpi lf ;linefeed doesn't chang columnhat defines the areas. Entry format is: ; ; ,sep,,null,user,drive ; ; where is the area name ; sep is a binary 1 used to terminate the match test ; is a one-line-or-less comment printed when ; the list is dumped. Match testing terminates ; before this field. ; null is a binary 0 used to terminate the description ; user is the user number (0-15) of the area (ascii) ; drive is the drive (A-P) number of the    area (ascii) ; ; the table ends with a of zero (binary). ; ; Note: be sure to make area names ALL-CAPS, because the ; CCP converts command-line arguments to capitals. The ; description may be in lower case, since it has nothing ; to do with the matching process. ; Also: although the drive and user # is in ascii (for convenience ; in setting up the table), be sure to use caps for the ; drive designation. No error checking is done on the values. ; table: db 'CPM80',1,'C2: Miscellaneous ',0 db '3C' ;user 3, drive C ; db 'MODEM',1,'C1: Modem/communications programs',0 db '1C' ;user 1, drive C ; db 'OTHERSYS',1,'A3: Telephone numbers of other systems',0 db '3A' ;user 3, drive A ; db 'REF',1,'A2: Catalogs, pgm descriptions, references, etc.',0 db '2A' ;user 2, drive A ; db 'SYSTEM',1,'A0: System programs, information and NEWS',0 db '0A' ;user 0, drive A ; db '16BIT',1,'B3: 68000, 8086/8088 Assembler and CP/M-86',0 db '3B' ;user 3, drive B ; db 0 ;<<== end of tab; ; ; ***************** ; * * ; * SECTION.ASM * ; * v1.0 * ; * * ; ***************** ; ; 06/27/82 by Ron Fowler, Westland, Michigan ; ; ; This program is intended for RCPM systems where ; files are grouped into drive/user area by their ; classification. This program implements a naming ; convention, whereby a caller can move into a ; section by typing its name, rather than the random ; searching formerly needed. ; ; Syntax is: SECTION [] ; ; If section-name is omidefine truth and falsehood true equ not false ; ; the following equates may be ; customized to your preference ; descol equ 15 ;column # where description begins ;(in detailed list) (should be greater ;than longest section name) (but small ;enuf so display is not too long) perlin equ 4 ;names printed per line in short list tabpos equ 8 ;tab stops (set mod tabpos) ;should be at least one greater than ;longest section name. turbo equ false ;set TRUE if you'er running TurbCP/M-80 programs',0 db '2C' ;user 2, drive C ; db 'ENGG',1,'B0: Programs for Engineers',0 db '0B' ;user 0, drive B ; db 'GEN',1,'C0: Business programs, calculators, etc.',0 db '0C' ;user 0, drive C ; db 'GEOL',1,'B1: Programs for Geologists',0 db '1B' ;user 1, drive B ; db 'IBM',1,'B2: Programs related to the IBM Personal Computer',0 db '2B' ;user 2, drive B ; db 'KITS',1,'A1: Starter Kits for new callers',0 db '1A' ;user 1, drive A ; db 'MISC',1,'C3: Miscellaneous unclassifiedle ; ; -----< end of SECTIONS table>----- ; end pbase ;that's all.  db '3B' ;user 3, drive B ; db 0 ;<<== end of tabSYS',1,'A3: Telephone numbers of other systems',0 db '3A' ;user 3, drive A ; db 'REF',1,'A2: Catalogs, pgm descriptions, references, etc.',0 db '2A' ;user 2, drive A ; db 'SYSTEM',1,'A0: System programs, information and NEWS',0 db '0A' ;user 0, drive A ; db '16BIT',1,'B3: 68000, 8086/8088 Assembler and CP/M-86',0 db '3B' ;user 3, drive B ; db 0 ;<<== end of tabtted, a short list of ; available sections is printed. The special ; form "SECTION ?" prints the detailed description ; of each section. ; ; You have to fill in the sections table ; (located near the end of this program) for your ; particular system. ; ;----< Examples of use: >----- ; ; A0>SECTION ATARI ;changes drive/user to atari area ; B4>SECTION MBASIC ;changes drive/user to mbasic area ; A6>SECTION ;prints short list of sections ; A9>SECTION ? ;prints the detailed list ; false equ 0 ;oDOS ; ; o/s conventions ; cpbase equ 0 ;set to 4200H for Heath ccpdrv equ cpbase+4 ;ccp user/drive storage loc bdos equ cpbase+5 ;system entry point dfcb equ cpbase+5CH ;default file control block dbuf equ cpbase+80H ;default buffer tpa equ cpbase+100H ;base of transient program area coninf equ 1 ;system call, get console char conotf equ 2 ;system call, console output printf equ 9 ;system call, print cons string cstsf equ 11 ;system call, get console status setdrv equ 14 ;system call, s   et/drive system call getdrv equ 25 ;system call, get drive # system call gsuser equ 32 ;system call, get/set user number ; ; character definitions ; cr equ 13 ;carriage-return code lf equ 10 ;linefeed code ; ; code begins.... ; org tpa ; ; pbase: lxi h,0 ;save system stack dad sp shld spsave lxi sp,stack ;load local stack ; if not turbo ;cp/m, get drive # mvi c,getdrv ;get current drive # call bdos push psw ;save it sta newdrv ;two ways endif ; call sect ;perform jz prnqk ;then go print sections out cpi '?' ;wants detailed list? jz prntbl ;then go do it lxi h,dbuf ;something there, scan to it scanbk: inx h ; ignoring blanks mov a,m cpi ' ' jz scanbk lxi d,table ;point de to the section table loop: push h ;save cmd line arg pointer eloop: ldax d ;test entry against table cpi 1 ;end of entry marker? jnz noend ;jump if not mov a,m ;yes, did user cmd terminate also? ora a jz match ;then declare a match jmp nomat ;else declar,printf call bdos jmp prnqk ;go give short list ; ; here when a match is found ; match: xchg ;hl==> user # scmat: inx h ;scan past description mov a,m ;looking for terminating null ora a jnz scmat inx h ;skip over terminator mov a,m ;fetch user # sui '0' ;subtract ascii bias mov e,a inx h ;point hl to drive # push d ;save user # push h ;and pointer mvi c,gsuser ;set user number call bdos pop h ;restore pointer to drive mov a,m ;fetch drive sui 'A' ;subtraEntry not found ++' db cr,lf,cr,lf,'$' matms2: db cr,lf,'Type "SECTION ?" for detailed list' db cr,lf,' of available sections.',cr,lf db cr,lf,'Type "SECTION " to log' db cr,lf,' into a particular section.' db cr,lf,'$' ; ; print "quick list" ; prnqk: lxi d,tblmsg mvi c,printf call bdos lxi h,table ;print abbreviated list qloop: mvi b,perlin ;get names-per-line counter qloop2: mov a,m ;end of table? ora a jz qkend ;then go print end msg call prathl ;ef at a tab position jnc qsub ;convert mod tabpos jmp qtab ;keep tabbing ; qkend: call crlf ;do newline lxi d,matms2 ;print ending message mvi c,printf call bdos call crlf ret ; ; here to print out a list of available section numbers ; prntbl: lxi d,tblmsg ;print heading message mvi c,printf call bdos call crlf ;turn up new line lxi h,table prloop: mov a,m ;end-of-table? ora a rz ;then all done call prathl ;print the name tab: mvi a,'.' ;tab over with leader cal the section function ; if not turbo ;turbodos doesn't need this stuff lda newdrv ;get newly logged drive mov b,a ;save for comparison pop psw ;get old logged drive cmp b ;did logged drive change? jnz cpbase ;then relog with warm boot endif ; lhld spsave ;else restore stack sphl ret ;to system... ; ; scan cmd line...if an arg exists, attempt to ; match it in the table. If no arg, dump a list ; of available sections. ; sect: lda dfcb+1 ;is there a cmd-line arg? cpi ' 'e a mismatch noend: cmp m jnz nomat ;skip if no match inx h ;continue with comparison inx d jmp eloop ; ; here when an entry didn't match ; nomat: ldax d ora a ;entry terminator? inx d jnz nomat ;scan through it pop h ;restore cmd line arg pntr inx d ;end of entry, skip over user # inx d ;and drive ldax d ;end of table? ora a ;(terminated by 0) jnz loop ;go scan another if not ; ; here when no match can be found ; lxi d,matmsg ;print out no-match message mvi cct ascii bias sta newdrv ;set new logged drive pop d ;restore user number in e mov d,a ;save drive # mov a,e ;fetch user number rlc ;rotate to high nybble rlc rlc rlc ora d ;"or" in the drive sta ccpdrv ;save for ccp use ; if turbo ;if turbodos... mvi c,setdrv ;...have to set drive explicitly mov e,d ;get drive in e call bdos ;set the drive endif ; pop h ;clear garbage from stack ret ;all done ; ; message printed when match failed ; matmsg: db cr,lf,'++ lse print the name qscan: mov a,m ;scan to description terminator inx h ;(this effectively ignores ora a ; the description) jnz qscan inx h ;skip over user # inx h ;and drive # dcr b ;count down line entry counter jnz qtab ;go tab if line not full call crlf ;else turn up new line jmp qloop ;and continue ; ; tab between entry names ; qtab: mvi a,' ' ;seperate names with tabs call type lda column ;get column # qsub: sui tabpos ;test tab position jz qloop2 ;continue il type lda column ;get column cpi descol ;at description column yet? jc tab ;then keep tabbing call prathl ;print description inx h ;skip over user # inx h ;and drive number call crlf ;turn up new line jmp prloop ;and continue ; ; print message @hl until null or 01 binary ; prathl: mov a,m ;fetch char inx h ;point past it ora a ;null? rz ;then done cpi 1 ;1 also terminates rz call type ;nope, print it call break ;check for console abort jmp prathl ; ; te   st for request from console to stop (^C) ; break: push h ;save 'em all push d push b mvi c,cstsf ;get console sts request call bdos ora a ;anything waiting? jz brback ;exit if not mvi c,coninf ;there, is, get it call bdos cpi 'S'-64 ;got pause request? mvi c,coninf cz bdos ;then wait for another character cpi 'C'-64 ;got abort request? jz quit ;then go abort brback: pop b ;else restore and return pop d pop h ret ; ; request from console to abort ; quit: lxi d,char lxi h,column ;bump column counter cpi lf ;linefeed doesn't chang column jz nochg inr m cpi cr ;carriage-return zeroes it jnz nochg ;skip if not cr mvi m,0 ;is, zero column nochg: pop b ;restore & return pop d pop h ret ; ; dump heading message ; tblmsg: db cr,lf,'Available sections are:',cr,lf,'$' ; ; ; variables ; spsave: dw 0 ;stack-pointer save column: db 0 ;current column # newdrv: db 0 ;new drive # to log ds 20 ;the stack ; stack equ $ ;define it ;  is the user number (0-15) of the section (ascii) ; drive is the drive (A-P) number of the section (ascii) ; ; the table ends with a of zero (binary). ; ; Note: be sure to make section names ALL-CAPS, because the ; CCP converts command-line arguments to capitals. The ; description may be in lower case, since it has nothing ; to do with the matching process. ; Also: although the drive and user # is in ascii (for convenience ; in setting up the table), be sure to use caps for the '3B' ;user 3, drive B ; db 'C',1,'"C" Language programs',0 db '4B' ;user 4, drive B ; db 'DOC',1,'Various documentation files',0 db '5B' ;user 5, drive B ; db 'SQ',1,'Source & object for the SQUEEZE pkg',0 db '6B' ;user 6, drive B ; db 'CPMUG',1,'Catalogs from CPM users group',0 db '7B' ;user 7, drive B ; db 0 ;<<== end of table ; ; -----< end of SECTIONS table>----- ; end pbase ;that's all.  db '7B' ;user 7, drive B ; db 0 ;<<== end of table ; ; -----< end of SECTIONSqmesg ;tell of quit mvi c,printf call bdos lhld spsave ;get stack pointer sphl ret ; qmesg: db cr,lf,'++ Aborted ++',cr,lf,'$' ; ; turn up a new line on display ; crlf: mvi a,cr ;print a return call type mvi a,lf ;get lf, fall into type ; ; Routine to print char in A on console, ; while maintaining column number. ; type: push h ;save everybody push d push b mov e,a ;align char for printing push psw ;save char mvi c,conotf call bdos ;print it pop psw ;restore  ; ; ; ; SECTIONS TABLE (located at end for easy patching with DDT) ; ; This is the table that defines the sections. Entry format is: ; ; ,sep,,null,user,drive ; ; where is the section name ; sep is a binary 1 used to terminate the match test ; is a one-line-or-less comment printed when ; the list is dumped. Match testing terminates ; before this field. ; null is a binary 0 used to terminate the description ; user  ; drive designation. No error checking is done on the values. ; table: db 'ATARI',1,'Programs related to the ATARI computer',0 db '0A' ;user 0, drive A ; db 'MBASIC',1,'Microsoft BASIC programs',0 db '1A' ;user 1, drive A ; db 'RBBS',1,'Remote CP/M-related programs',0 db '0B' ;user 0, drive B ; db 'CAT',1,'Disk catalog-related programs',0 db '1B' ;user 1, drive B ; db 'UTILITY',1,'Utility programs',0 db '2B' ;user 2, drive B ; db 'MODEM',1,'Modem/communications programs',0 db   !9"1Tq* !6q  !6q  !6q  *& !6à  !6 FILE LENGTH: $K$NO SUCH FILE$\ʱ:kG:h<2h:ksT xͼbôd   Ҿ:{ļ_ The only problem with running CP/M on a Z-80 machine is that lots of your programs are written in Z-80 assembly language, while DIGITAL RESEARCH only supplies an 8080 assembler and disassembler. Many times this presents a terrible problem! Finally, here is half of the answer: a free Z-80 assembler that supports all of the standard ZILOG mnemonics! Assembly language programmers will need no explanations as to how this package is used, and the rest of you Ö$*1LT\dltzÇîÙô,Ï10 !~=W!xe~#Xbxʇ {z~#o}o҃ JbýÂ<"!Y , <    *$A!6 # T!w $r# *`: 0 *A*! ~ ʰxkb))))_y‘BK{ͅ*!66!"80*{#z+++ #are invited to peruse the ZILOG manuals as well as the Z80ASM.DOC file on this disk. Have fun! guage, while DIGITAL RESEARCH only supplies an 8080 assembler and disassembler. Many times this presents a terrible problem! Finally, here is half of the answer: a free Z-80 assembler that supports all of the standard ZILOG mnemonics! Assembly language programmers will need no explanations as to how this package is used, and the rest of you # A*!u* yA*!* y)*)*=!w# ] *w!e* yUͅ* w#"  UD*!Z±È !͈ͶÉ!͈͉ͅxÉ!G@É! yG!'' É!+C͉ͶÉ!CiyVG?͉!G„Ͷ*É!S¤ ˜ÚHÉ:J´zþCz͉y͉xÉR*UÉ** {z*~#" <   AOGƐ'@'OxƐ'@'ON#( z86O!W N#N 6SP6* |} !9"ͽ:ʧ!"<§<2*  U!~ʽ5UkW!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INPAGEMACLIBPUBLIC7 PF FPA A A* A A A(#&&#&2#/?&#' '( v'( %:P!@" Z 8 0 A S M ZILOG/MOSTEK Z80-CPU ASSEMBLY LANGUAGE PROCESSOR (C) COPYRIGHT 1977 LCS ALL RIGHTS RESERVED LATEST REVISION: 21-JULY-1977  Z 8 0 A S M Z80ASM IS AN ASSEMBLER FOR THE ZILOG/MOSTEK Z80-CPU MICROPROCESSOR. IT IS DESIGNED TO RUN UNDER THE CP/M OPERATING SYSTEM FROM DIGITAL RESEARCH. CP/M WILL RUN ON EITHER AN 8080A SYSTEM OR A Z80 SYSTEM. Z80ASM WILL RUN IN THE CP/M MINIMUM (16K) SYSTEM BUT WILL UTILI ͝ , r*W ~#"W r,*~ w#"~ : <2 g͝ ,a axOgx*~ w#"~ ͠ VAn G:Y %: ʅ>U2} 2 :} ™:{ N:} 2 > 2 !  !:q * ! z9{9# : G9 ! *r ! z9{9! : %G * "~ *~ X*~ #"~ * : O *m " :v }:Y /2Y }!H6< !\6!"~2v !" >2>82l "}:| Nʮ: ʏʹ!K ~6#”>6Ÿ]* ! z9{9* !)z9{9. LAST ADDRESS USED IN THIS ASS!0^*K0"V0*M0{z"K0!N"O1#w#w*V0!NN*O N#Fr+sq#p0U>G=#w#wY*M0!0n& {ozg"V0!K0{#z$"!EXXLDILDIRLDDLDDRCPICPIRCPDCPDRDAA'CPL/NEG@CCF?SCF7NOPHALTvDIEIIM0FIM1VIM2^RLCARLARRCARRARETIMRETNEINIINIRINDINDROUTIOTIROUTDOTDRLDRLCRLRRCRRSLA SRA(SRL8RLDoRRDgPUSH POP EX ADD ADCJSBCBSUBAND ZE MORE MEMORY FOR SYMBOL TABLE STORAGE IN LARGER (UP TO 64K) CP/M SYSTEMS. Z80ASM READS A SOURCE (ASM) FILE PRODUCED BY THE CP/M 'ED' TEXT EDITOR PROGRAM AND PRODUCES AN OPTIONAL LISTING (ON THE LST: DEVICE) AND AN OPTIONAL OBJECT CODE (HEX) FILE IN INTEL FORMAT HEX. THE 'HEX' FILE CAN BE LOADED FOR EXECUTION USING 'DDT' OR 'LOAD' COMMANDS OF CP/M OR IT CAN BE PUNCHED ON PAPER TAPE USING THE 'PIP' PROGRAM. INPUT STATEMENTS ARE FREE FORMAT (I.E. NOT COLUMN ORIENTED). BETWEEN FI   ELDS ANY NUMBER OF BLANK OR TAB CHARACTERS MAY BE PRESENT BUT WITHIN A FIELD THERE MAY BE NO BLANK OR TAB CHARACTERS. HOWEVER, STATEMENTS LABELS MUST BE IN THE FIRST POSITION OF THE LINE. STATEMENT LABELS MAY HAVE A COLON FOLLOWING THEM BUT THE COLON IS NOT REQUIRED. COMMENTS ARE PRECEEDED BY A SEMICOLON AND MAY APPEAR BY THEMSELVES OR FOLLOWING ALL OF THE FIELDS ON A SOURCE LINE. ALL THE ZILOG/MOSTEK MNEMONICS ARE SUPPORTED WITH THE FOLLOWING EXCEPTIONS: 1. THE Z80CPU TECHNICAL AILABLE IN Z80ASM AND THEIR ARGUMENT FORMATS: