You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
ORG EMC<br />
C5 T_ LOCATE R)SH BC<br />
reec CP SO<br />
>004 JR HC,T_L0CJ June ir A contains either • grarhle<br />
symbol or a VDG.<br />
tl«BJ«5C ID PC,(CHARS) point BC to Pixel*-Layout table In<br />
SOU, less OlOCb.<br />
ieoe JR 1JQCJ<br />
D6?0 T_ _LDC_1 SUB 90<br />
jeoo JR C,T_L0C_) • wp If A contains a graphic code.<br />
EWB7B5C LD PC.IUW) Point BC to Pixel-Layouts for Uper<br />
Defined Graphics. (Note; Range of<br />
A is now 00 to ?9h).<br />
T _wcJ LO L,A<br />
?too LO H,00 HLI» character code.<br />
ADD HL.HL<br />
ADD HL,KL<br />
2$ ADD HL.HL<br />
09 ADC HL,BC HL: paints to pixel layout of<br />
required character.<br />
Ct POP BC<br />
C9 RET<br />
47 T LD B,A Lev nibble of B Indicates which<br />
graphic synbnl Is required.<br />
CDJSOB CALL OB58,PO_3R_1 Construct graphic synbV; in "WBCT.<br />
J1925C LD HL.MEXBOT Point HL to this newly created<br />
pixel layout.<br />
CI FOP BC<br />
09 RI7<br />
again to get back to normal. In<br />
this manner, the keys 1 to 8 will<br />
produce block <strong>graphics</strong>, which<br />
may be inversed by the additional<br />
use of SHIFT. The letter<br />
keys will produce the User<br />
Defined Graphics. In this pro<br />
gram, five extra UOG's are<br />
allowed on keys V, W. Y and<br />
Z, To use them it is necessary toallow<br />
an extra forty bytes in the<br />
UDG are of RAM, and <strong>graphics</strong><br />
V. W, X, Y and Z may be defined<br />
in this area.<br />
To break with tradition,<br />
SPACE will print a space it will<br />
not escape from Text Mode.<br />
There are two ways to exit Texi<br />
Mode. One is lo press SPACE<br />
with CAPS SHIFT, and the other<br />
is to press ENTER<br />
Characters<br />
It's worth pointing out at this<br />
stage that the characters are no!<br />
necessarily printed on whole<br />
character squares. Depending<br />
upon the position of the cursor a<br />
character may overlap two or<br />
more character squares. You<br />
see when you hit TEXT MODE<br />
ORG EJ71<br />
F5 FR_XZ_DE PUSH A F Stack the zero flag.<br />
}EP0 LD A,"space*<br />
U1 RST 10 Print a space.<br />
n POP AP Restore the tero flag.<br />
2CC1 JR NZ,PR_SZ_1<br />
JCC LD A,*space"<br />
DT HST 10 Print a second spac*.<br />
JBO LD A,"space"<br />
07 RST 10 Print a third space.<br />
C9 R£T<br />
TA LD A,D<br />
07 RST 10 Print CHRS(D);<br />
7B LC A,E<br />
Vt RST 10 Print CHRt(E)[<br />
C9 RET<br />
CH0 KJM<br />
CJ T_00LCUR PUSH BC<br />
D5 FJSH DK<br />
e, PUSH HL Stack register*.<br />
CD0B0B CALL OBDe,PO_ATTR Colour appropriate attribute byte.<br />
It POP HL<br />
D1 POP DE<br />
CI POP BC Restore registers.<br />
?J OC HI KLt points to next byte In screen.<br />
jsoa LD A,oe A:» munter of pixels In this byte.<br />
C? RXT<br />
ZX COMPUTING DECEMBER/JANUARY 1985<br />
ZX CRAPHICS<br />
and you change from crosswire<br />
cursor to text cursor, the text<br />
cursor is printed as an outline,<br />
whose top left hand corner ex<br />
actly coincides wilh the position<br />
of the crosswire cursor to the<br />
exact pixel'<br />
You can print text with this<br />
facility in many different ways<br />
We've already seen the effect of<br />
CAPS LOCK and GRAPHICS,<br />
but what about the rest of the<br />
control keys ?<br />
TRUE VIDEO will switch between<br />
7 pixel wide, and 8 pixel<br />
ing 7 pixel wide bold characters<br />
if vou want to.<br />
You can also print characters in<br />
italics. SYMBOL SHIFT W will<br />
switch to half-slope italics (slop<br />
incj two pixels down for every<br />
one pixel across); SYMBOL<br />
SHIFT E will switch to full slope<br />
itttlies (sloping at forty-five<br />
degrees); and SYMBOL<br />
SHIFT Q will switch to fully<br />
upright characters (italics offl.<br />
Finally, you can change the<br />
size of characters. You are not<br />
restricted to printing characters<br />
the size of a standard character<br />
OflO E591<br />
JEM 7I_PRUT' LD A,CM"<br />
38 TIL00P_t U AF.AP' A" := Dumber If rows in pixel layout.<br />
JAOlEJ U> A,(HEIGHT)<br />
J2675C 10 (B_REQ),A (B REG) t- Ktimher of tixwa each row<br />
mat be duplicated.<br />
5A40DB TXL00P_? 14) A,(JJTJ10S)<br />
IETO XCR 10<br />
J24OD0 LD (J_fLAGS),A Coiaplenent CrS/EVBI RO* flag.<br />
05 P'St! BC &t*ck cursor coordinates.<br />
D5 FUSH DE Stack pixel layout pointer.<br />
E5 PUSH HL Stack add re- s of screen-byte<br />
containing cursor.<br />
19 IH A,C A:» oolurai mirther of cursor (in pixels).<br />
E607 AND 07<br />
4F LD C,A Cir position within acrcen-byt*<br />
of cursor.<br />
1A LD A,(Mi)<br />
57 LD D.A Di< current, row fron pixel layout.<br />
BOCBOOiE SIT 5,U_FUGS)<br />
?80J JR Z,TXF_1 Juicp -jnless usln)' BOLD tyrvrae*.<br />
87 ADD A,A »ift lert one bit. Hit 0 reset.<br />
re OR D Use r»ch hit twice, if set.<br />
57 LD D,A D: now ^lenended tnr BOLD typ»*.<br />
JA0JI5 TXP_1 LD A,(WIDTH)<br />
n LD B,A H:= niwber of ti»s eneh rl*«l<br />
eiust be duplicated.<br />
JEM LD A.08 A:- nunber of pixels in screeiwbyte.<br />
5P LD F.,A E:> nwiber or blti in pix»' layout row.<br />
OC ac c<br />
180J JH TIALUO©<br />
JO TOLircm DEC A A;n nunber of remaining pixels in (HL),<br />
C906 RLC (HL) More next pixel fro* screen Into bit 7,<br />
00 TXALLK*? DEC C<br />
?0FA JR KZ.TXAl L!»1 Pixel at cursor rosition w<br />
In bit 7 of (HL).<br />
C5 TIL0CP_J PUSH BC Stack character width. (8),<br />
F5 tVSH AF Stack screeo-byte pixel counter.<br />
CHOP KLC D Haee next pixel frnai pixel-layout<br />
into bit 0 of D.<br />
wide characters. 7-pixel wide<br />
characters are obtained by over<br />
printing the 8th column of pix<br />
els, which leaves less space between<br />
two consecutive<br />
characters. This will give you<br />
thirty six characters across the<br />
screen instead of thirty two. I<br />
personally think that this makes<br />
text look much better.<br />
INVERSE VIDEO will switch between<br />
standard and bold<br />
typeface. Bold type is produced<br />
by printing each INKEd pixel<br />
twice instead of once. Bold type<br />
looks very nice, and of course<br />
there's nothing to stop you us<br />
square — you can have double<br />
width, double-height, triple<br />
height, and so on. To achieve<br />
this press both shifts together<br />
(or the Extended Mode key on<br />
the Spectrum Plus). You can<br />
then alter the size of the cursor<br />
by pressing the cursor keys:<br />
RIGHT to increase ihe width,<br />
and LEFT to decrease the width;<br />
DOWN to increase the height,<br />
and UP to decrease the height.<br />
Spae will allow you to ESCAPE<br />
from Extended Mode and return<br />
the cursor keys to their normal<br />
functions. Any other key will be<br />
acted upon as normal, as well as<br />
escaping from E Mode.<br />
I L