Herunterladen Inhalt Inhalt Diese Seite drucken

F A R B R E G U L I E R U N G Beim Vc20; H I N T E R G R U N D F A R B E - Commodore Computer Volkscomputer Vc-20 Programmierhandbuch

Inhaltsverzeichnis
T I $ , T I
FRE
ST
USR

2.6 F a r b r e g u l i e r u n g beim VC20

Die
Farbwiedergabe d e s F e r n s e h s c h i r m s
dem VC20 auf u n t e r s c h i e d l i c h e Weise g e s t e u e r t werden. Entweder w i r d
d i e H i n t e r g r u n d f a r b e des B i l d s c h i r m s a l s e i n e e i n z e l n e V a r i a b l e be-
h a n d e l t , i n d e r dann d i e F a r b i n f o r m a t i o n e n
a l s auch f u e r d a s B i l d f e n s t e r zusammengefasst s i n d oder d i e Rahmen-
und
B i l d f e n s t e r - F a r b e werden
folgenden A b s c h n i t t e d i s k u t i e r e n d i e s e M o e g l i c h k e i t e n u n t e r Verwen-
dung der PRINT- und POKE-Anweisungen
2.6.1

H i n t e r g r u n d f a r b e

Die
H i n t e r g r u n d f a r b e
I n h a l t e s d e r S p e i c h e r z e l l e m i t d e r Adresse
g e s t e u e r t . I n d i e s e Z e l l e kann e i n e Zahl z w i s c h e n
Verwendung d e r POKE-Anweisung
den. Durch
j e d e
B i l d s c h i r m und Rahmenfarbe f e s t g e l e g t . Im folgenden B e i s p i e l 1 w i r d
d i e H i n t e r g r u n d f a r b e
rend
d i e F a r b e ,
unveraendert
b l e i b t . E i n i g e
S p e i c h e r z e l l e
a u f
D a r s t e l l u n g :
B e i s p i e l 1:
B e i s p i e l 2 z e i g t , wie d i e e i n z e l n e n B i t s d e r Z a h l , d i e d e r V a r i a b -
l e n
R zugewiesen w i r d , g e s t e u e r t werden koennen, um entweder d i e
B i l d s c h i r m - oder d i e Rahmenfarbe z u v e r a e n d e r n . I n diesem B e i s p i e l
i s t X e i n e Zahl z w i s c h e n
e i n e Zahl z w i s c h e n 0 und 7, d i e d i e Rahmenfarbe f e s t l e g t . Dabei i s t
zu b e r u e c k s i c h t i g e n , dass d i e hoeherwertigen
z e l l e m i t d e r A d r e s s e d e z i m a l 36879 d i e I n f o r m a t i o n f u e r d i e B i l d -
s c h i r m f a r b e und d i e n i e d e r w e r t i g e n 4 B i t s d i e I n f o r m a t i o n f u e r d i e
Rahmenfarbe b i l d e n .
L i e f e r n d i e durch e i n e Systemuhr e r z e u g t
L i e f e r t d i e Anzahl noch u n g e n u t z t e r B y t e s im Pro-
grammspeicher. Das Argument
muss jedoch angegeben werden ( z . B . F R E f O ) ) .
L i e f e r t
nach e i n e r
System g e s e t z t e S t a t u s b y t e .
Uebergibt
d i e Programmsteuerung an e i n U n t e r p r o -
gramm i n Maschinensprache.
g e t r e n n t
des B i l d s c h i r m s w i r d
( s . Abschn. 3.3.23) g e s p e i c h e r t wer-
d i e s e r
Zahlen
m i t Z u f a l l s z a h l e n b e l i e b i g
i n d e r d i e e i n z e l n e n Zeichen
Zahlen
1
g e s e t z t
i s t ) l i e f e r n
10 R=INT(RND(1)*255)+1
20 C=36879
30 POKE C,R
40 FOR 1=1 TO 200:NEXT:GOTO 10
1 und 15, d i e d i e B i l d s c h i r m f a r b e , und Y
i s t ohne
Ein/Ausgabeoperation
oder Farbmonitors
sowohl f u e r den Rahmen
voneinander
d e t a i l l i e r t .
durch
$900F ( d e z i m a l 36879)
w i r d
e i n e bestimmte
( d i e , b e i denen d a s 4 . B i t d e r
Zeichen
4 B i t s
27
Z e i t .
Bedeutung,
das vom
kann m i t
g e r e g e l t . D i e
Veraendern d e s
1 und 255 u n t e r
Mischung a u s
v e r a e n d e r t , waeh-
a b g e b i l d e t werden,
i n
i n v e r s e r
d e r S p e i c h e r -
Inhaltsverzeichnis
loading

Verwandte Produkte für Commodore Computer VolksComputer VC-20

Inhaltsverzeichnis