title HOWBIG is the system (85/01/05) ; This utility gives a quick report on CPM2.2 system size. ; Useful where RSX's, and other systems, have been installed. ; It also reports the effect of non-standard bios sizes. ; The sizes reported are those visible to an application ; program, which may not be the original configured size. ; ; by C.B. Falconer (85/Jan/05) ; 85/11/09 Corrected 64k display. ; bdosz equ 0e00h; CPM 2.2 allocation biosz equ 0600h; DR std allocation @bdos equ 5; std DOS call link ; cr equ 13 lf equ 10 ; ; Dos call values @CON equ 2; console output, one char. @MSG equ 9; string to console ; org 0100h; CPM standard ; lxi h,0 dad sp lxi sp,stack push h call howbig pop h sphl ret ; ; Show system sizes howbig: lxi d,msg1; info, TPA size=.. call tstr lhld @bdos+1; Where is DOS? ora a; clear any carry, cant be 64k call prtk; show TPA size in K lxi d,msg2 call tstr; CPM size=.. lxi d,bdosz+biosz lhld @bdos+1 dad d; Carry if 64K or more ; " " ; Print (hl) as number of K, possible /n offset ; Input carry is high order bit (for 64k and over) prtk: mov a,h rar ani 0FEh; clear carry and low order bit rar call wrtdec mov a,h ani 3; is there any excess? rz; no mvi a,'/' call couta mov a,h ani 3 adi '0' ; " " ; output (a) to console ; a,f couta: push d mov e,a mvi a,@CON call dos pop d ret ; ; put string (de) to console, '$' terminator ; a,f tstr: mvi a,@MSG ; " " ; DOS call (a), preserve registers ; a,f dos: push h push d push b mov c,a call @bdos pop b pop d pop h ret ; ; write (a) in decimal (2 digits max) to console ; a,f,c wrtdec: mvi c,'0'-1 wdec1: inr c sui 10 jnc wdec1 adi 10+'0'; make lo order ascii push psw mov a,c call couta pop psw jmp couta ; msg1: db cr,lf,'Current effective sizes in K ' db '("/n" indicates n extra 256 byte pages)' db cr,lf,'TPA size = $' msg2: db ' CPM size = $' ; ds 64; min. stack size stack: ds 0; top of stack end