home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG025.ARK
/
FRAGMENT.DOC
< prev
next >
Wrap
Text File
|
1984-04-29
|
4KB
|
123 lines
TWO VDM CBIOS FRAGMENTS
R.C. Minnick
Box 306
Ouray, CO 81427
There are a couple features in my CBIOS which I find very
useful, and which might be of interest to others in the CPMUG.
Rather than bore you with a complete CBIOS listing (it occupies
5K of EPROM plus the standard RAM), the two interesting parts
are shown below as code fragments.
The first is a VDM paging function which is added to the
standard VDM software driver. In the code below, bit 0 of
IOCVDM stores the paging flag. If it is on, the VDM will
display 16 lines and then pause until a CON: input. If the
input is any character BUT a 'P', the process of stopping every
16 lines continues; if a 'P' is entered, the paging flag is
turned off. The code below does not show the TOGPG function,
since it is certain that you will do the job differently than I
have.
; SCROLL SCREEN UP
SCRL: LXI H,BOTL ;BEGINNING OF TEXT LINE
PUSH H
LDA IOCVDM
ANI 1 ;0=PAG OFF
XRI 1 ;0=PAG ON
ORA M ;0= " & BOTL=0
JNZ $+6
CALL CHAR ;ANY BUT P RESTARTS
CPI 'P'
PUSH D
CZ TOGPG ;P REMOVES PAGING
POP D
MOV A,M
INR M
SUB M
LXI B,0
CALL CLNA
LXI B,2040H ;B=SPACE, C=CTR=64
SCRL2: MOV M,B ;CLEAR BOTTOM LINE
INR L
DCR C
JNZ SCRL2
POP H
MOV A,M
ANI 0FH
MOV M,A
; SET BOSL & BOTL IN SCROLL REGISTER
VDMOT: LDA BOSL
RLC
RLC
RLC
RLC
LXI H,BOTL
ORA M
OUT VDMDEV ;SCROLL REGISTER PORT
RET
In the second code fragment, a hard copy is produced of
the information on the VDM screen. That is, the current CON:
display is sent to LST: without any disturbance (except the
appearance of the prompt character--which is later erased) to
CON:. This fragment is actually an addition to code published
by Dan S. Parker in DDJ [V2 N4 P10, April 1977]. The cited
code has been improved by the suppresion of blanks to the right
of non-blank text on each line. My code below is not very
elegant, but it works. Furthermore, I find the feature useful
to have.
;
; HARD COPY OF VIDEO SCREEN TO DURA
;
HCOPY: LDA BOTL ;VDM BEG. OF TEXT LINE
LXI H,VDMBASE ;BOTTOM VDM RAM
LXI D,40H ;CHAR/LINE (16-BIT)
HCOPY1:DAD D
DCR A
JNZ HCOPY1 ;HL NOT AT START OF TEXT
MVI E,11H ;E=1+LINES/SCREEN
NXTLN: MVI C,CR
CALL LIST ;DO CRET
MOV A,H
CPI 0D0H ;STILL WITHIN VDM RAM?
JNZ $+6 ;YES
LXI H,VDMBASE ;WRAP-AROUND
DCR E ;LINE COUNT
JNZ HCOPY3 ;NOT DONE
RET
HCOPY3:MVI D,40H ;RESET CHAR COUNT
MVI C,3FH ;LOCAL CTR
PUSH H ;SAVE BEG. OF LINE PTR.
MOV A,L
ADD C
MOV L,A ;HL POINTS TO END OF LINE
HCOPY5:MOV A,M
CPI 20H ;SPACE?
JNZ HCOPY4 ;NO, EXIT THIS CALC.
DCR D
DCX H
DCR C ;TO KEEP ON THIS LINE
JNZ HCOPY5 ;CONTINUE REMOVING SPACES
HCOPY4:POP H ;RESTORE BEG. OF LINE PTR.
HCOPY2:PUSH H ;SAVE BEG. OF LINE
MOV C,M ;DATUM
CALL LIST ;PRINT IT
INX H
DCR D ;CHAR COUNT
JNZ HCOPY2+1 ;CONTINUE
POP H ;BEG. OF THIS LINE
LXI B,40H
DAD B ;HL NOT POINTS TO NEXT LINE
JMP NXTLN