Logical Operations - Yamaha V9938 Programmer's Manual

Msx-video
Table of Contents

Advertisement

4.3. Logical operations

When executing logical commands LINE, PSET and LOGICAL MOVE, it is possible to
define logical operation to be done on the color of the pixels. The four bits identifying the
logical operation should be written in lower four bits of R#46 (command register) together
with the command code.
Name
Operation
IMP
DC=SC
AND
DC=SC&DC
OR
DC=SC|DC
XOR
DC=SC^DC
NOT
DC=!SC
Invalid
TIMP
If SC=0 then DC=DC else DC=SC
TAND
If SC=0 then DC=DC else DC=SC&DC
TOR
If SC=0 then DC=DC else DC=SC|DC
TXOR
If SC=0 then DC=DC else DC=SC^DC
TNOT
If SC=0 then DC=DC else DC=!SC
Invalid
*SC = source color code
*DC = destination color code
© 1985 ASCII CORP. / NIPPON GAKKI CO.
LO3
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Page 65 of 108
LO2
LO1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
© 2010-2015 Eugeny Brychkov
LO0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents