Mnemonic: SetCLnk

Hex Code:8JMR00SS00YYHHLL   M=1-7, Compare GPRM R to register YY, indirect set
8JMR00SSKKKKHHLL   M=9-F, Compare GPRM R to constant KKKK, indirect set
9JMRSSSS00YYHHLL   M=1-7, Compare GPRM R to register YY, direct set
9JMRSSSSKKKKHHLL   M=9-F, Compare GPRM R to constant KKKK, direct set
Action:The SetCLnk command sets the destination register "R" (byte 1 lower nibble) to the result of the operation "J", listed below. A compare is then performed, and the link executed if the result of the compare is true.
The indirect form uses GPRM or SPRM denoted by "SS" (byte 3) 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 set operation is performed first.
The compare is then performed, and if the conditions are met 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.
While this command can perform a compare and link, the set and compare share a register, 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.
Related commands CSetCLnk (conditionally set and link) and CSetLnk (conditionally set, unconditionally link) can combine compare and link, do not share registers but are limited to one constant for either set or compare, and are 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.