Mnemonic: CSetCLnk

Hex Code:AJMRSSXX00YYHHLL   M=1-7, Compare register XX to register YY, indirect set
AJMRSSXXKKKKHHLL   M=9-F, Compare register XX to constant KKKK, indirect set
BJMRSSSSXXYYHHLL   M=1-7, Compare register XX to register YY, direct set
Action:The CSetCLnk command performs the compare operation, if the result is true then sets the destination register "R" (byte 1 lower nibble) to the result of the operation "J", listed below, and executes the link.
The indirect form uses GPRM or SPRM denoted by "SS" (byte 2) as the source, as allowed by the operation.
The direct form uses the constant "SSSS" (bytes 2&3) as the source value, if allowed by the operation.
Order:The compare operation is performed first, if false the command exits.
The set is performed, and then the link is executed.
Comments:It is possible to make this command unconditional by setting "M" to 0 or 8, but the Set command is better suited for performing a set and link as it allows the full range of link commands.
"LL" may be set to 0, changing the command into a conditional set operation.
While this command can perform a compare and link, it is limited to one constant for either the set or compare, and the command is limited to the link subset.
The related command Set allows the use of separate registers for set and compare, and also allows the full range of link commands, but cannot combine compare and link in the same command.
The related command SetCLnk allows the use of constants for both set and compare, but set and compare share a register, and is limited to the link subset.
The related command CSetLnk (conditionally set, unconditionally link) can combine compare and link, does not share registers but is limited to one constant for either set or compare, and is limited to the link subset.
Set operation codesSource may be
JMnemonicsOperationGPRMSPRMconstant
0 no set is performed, command becomes conditional link   
1=   movset destination GPRM to source value
2<->   swpswap destination GPRM with source GPRM  
3+=   addadd source value to destination GPRM 
4-=   subsubtract source value from destination GPRM 
5*=   mulmultiply destination GPRM by source value 
6/=   divdivide destination GPRM by source value 
7%=   modset destination GPRM to destination register modulo source value 
8?=   rndset destination GPRM to a random value between 1 and the source value 
9&=   andand destination GPRM with source value
A|=   oror destination GPRM with source value
B^=   xorxor destination GPRM with source value
Compare operation codes
register to registerregister to constantAlternate
mnemonic
Comments
MoperationMoperation
1RegR & RegY9RegR & KBCBitwise compare, the two operands are anded, if the result is non-zero the condition is true
2RegR == RegYARegR == KEQIf the two operands are equal the condition is true
3RegR != RegYBRegR != KNEIf the two operands are not equal the condition is true
4RegR >= RegYCRegR >= KGEIf RegX is greater than or equal to the right operand the condition is true
5RegR > RegYDRegR > KGTIf RegX is greater than the right operand the condition is true
6RegR <= RegYERegR <= KLEIf RegX is less than or equal to the right operand the condition is true
7RegR < RegYFRegR < KLTIf RegX is less than the right operand the condition is true
Optional Link Command details
LLLink CommandComment
00LinkNoLinkuse byte 6 as "HH" in these detailed pages, ignore all other values.
01LinkTopCell
02LinkNextCell
03LinkPrevCell
05LinkTopPG
06LinkNextPG
07LinkPrevPG
09LinkTopPGC
0ALinkNextPGC
0BLinkPrevPGC
0CLinkGoUpPGC
0DLinkTailPGC
10RSM
Register Codes
0x00 through 0x0FGeneral Purpose registers 0 to 15 (GPRM)
0x80 through 0x97System Parameter registers 0 to 23 (SPRM)
all othersdo not use
Numerically Alphabetically
Index
Alphabetically Numerically
DVD-Video info home Copyright © 2001 - 2024 MPUCoder, all rights reserved.