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
/
MBUG
/
MBUG096.ARC
/
HINTS.WSF
< prev
next >
Wrap
Text File
|
1979-12-31
|
3KB
|
77 lines
-- Status lines --
by Simon Carter
Many of you may know that it is possible to obtain a 17th line on
the screen under BASIC, but have you ever seen two extra lines?
This is made possible by shifting the screen up so that the
18th line is in sight.
The following machine code program will set up the screen for 64 x
18 format
00100 DEFR 10 ;Regard all values decimal
00110 ORG 26000 ;Assemble at 26000 decimal
00120 LD A,6 ;Register 6 of 6545-
00130 OUT (12),A ;Total # vertical rows
00140 LD A,18 ;18 displayed rows
00150 OUT (13),A ;Tell 6545
00160 LD A,7 ;Register 7 of 6545-
00170 OUT (12),A ;Vertical sync position
00180 LD A,18 ;Move screen up
00190 OUT (13),A ;Tell 6545
00200 RET ;Return to BASIC
00210 END ;End of program
and this BASIC program will do the same.
00100 IN#0 OFF:OUT 12,6:OUT 13,18:OUT 12,7:OUT 13,18:IN#0
Once we have set up the 18th line, we need a subroutine to place
text on it. The following requires a GOSUB [String] 1000
statement to call it. If the first character of STRING is '0'
then STRING will be printed on the 17th line, otherwise it will be
printed on the 18th line. If an '@' character is encountered, the
rest of the line will be cleared.
For example :
GOSUB ["1@"] 1000 - Clears 18th line.
GOSUB ["0Used :"+STR(USED)] 1000 - Prints number of used PCG's
on 17th line.
GOSUB ["1Press Ctrl-C to return to the Shell....@"] 1000 - Prints
message on 18th line and clears rest of line.
01000 VAR(Z4$):IF Z4$(;1,1)="0":W=62463 ELSE LET W=62527
01010 Z4$=Z4$(;2,LEN(Z4$)):IF Z4$="@":Y=1:GOTO 1030
01020 FOR Y=1 TO LEN(Z4$)-1:POKE W+Y,ASC(Z4$(;Y,Y)):NEXT Y:Y=Y+1:
IF Z4$(;Y,Y)<>"@":POKE W+Y,ASC(Z4$(;Y,Y)):RETURN
01030 FOR Y=W+Y TO W+64:POKE Y,32:NEXT Y:RETURN
Note that by using <ESC><W> to move the screen up in BASIC the
screen will revert to 64 x 16 mode. (The 17th and 18th lines will
disappear from view)
It is possible to get a 19th line on the screen by moving it up
twice, but BASIC's top line is half obscured. However, by leaving
the screen in its normal position and programming the 6545 for 19
displayed lines, it is possible to place text on the 17th and
19th lines, which will be positioned above BASIC's screen.
layed lines, it is possible to place text on the 17th and
19th lines, which will be positioned above BASIC's screen.