Atari ST series Technical Reference Manual page 206

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Setcolor()
T h is f u n c t i o n a l l o w s y o u to c h a n g e t h e c o l o r in a s in g le h a r d w a r e c o l o r
r e g i s t e r .
C macro format
in t o l d c o l o r , r e g i s t e r , n e w c o l o r ;
o l d c o l o r =
S e t c o l o r ( r e g i s t e r , n e w c o l o r ) ;
Machine language format
m o v e . w
# n e w c o l o r , - (s p )
m o v e . w
# r e g i s t e r , - (s p )
m o v e . w
# 7 , - ( s p )
t r a p
# 1 4
a d d q .l
# 6 , s p
Inputs
n e w c o l o r
w o r d
r e g i s t e r
w o r d
Results
DO
o l d c o l o r
See also
S e t p a l e t t e ( )
198
Set Color Register
l o n g
T h e v a l u e c o n t a i n e d in th e c o l o r r e g i s t e r p r i o r to
t h e c a ll.
Setcolor
A 1 6 -b it w o r d i n d ic a ti n g t h e n e w c o l o r
f o r t h e r e g i s t e r . B its 0 - 3 a r e u s e d f o r th e
b l u e c o m p o n e n t , b i ts 4 - 7 f o r g r e e n , a n d
b its 8 - 1 1 f o r r e d . A n e g a t i v e v a l u e in d i­
c a t e s t h a t y o u d o n 't w i s h to c h a n g e th is
r e g i s t e r , b u t o n l y to r e a d its c u r r e n t c o n ­
t e n t s .
T h e n u m b e r o f th e h a r d w a r e c o l o r r e g i s ­
t e r to c h a n g e .
Opcode = 7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents