Mnemonic: Set

Hex Code:6J0000RR00SS0000   unconditional, indirect set
6JM0XXRR00SS00YY   M=1-7, Compare register XX to register YY, indirect set
6JM0XXRR00SSKKKK   M=9-F, Compare register XX to constant KKKK, indirect set
6J0K00RR00SSHHLL   unconditional, indirect set, K=1,4-7 Set then Link
7J0000RRSSSS0000   unconditional, direct set
7JM0XXRRSSSS00YY   M=1-7, Compare register XX to register YY, direct set
7JM0XXRRSSSSKKKK   M=9-F, Compare register XX to constant KKKK, direct set
7J0K00RRSSSSHHLL   unconditional, direct set, K=1,4-7 Set then Link
Action:The Set command sets the destination register "RR" (byte 3) to the result of the operation "J", listed below.
The indirect form uses GPRM or SPRM denoted by "SS" (byte 5) as the source, as allowed by the operation.
The direct form uses the constant "SSSS" (bytes 4&5) as the source value, if allowed by the operation.
If "K" is 1, 4, 5, 6, or 7 the Set is followed by a link command.
Order:If a compare is specified, it is performed first. If the conditions are met the Set is executed.
Comments:While this command allows the use of seperate registers and constants for set and compare, and also allows the full range of link commands, it can not combine compare and link in the same command.
The related command SetCLnk (set and conditionally link) can combine compare and link, but shares a register in common with set and compare, and is limited to the link subset.
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
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
1RegX & RegY9RegX & KBCBitwise compare, the two operands are anded, if the result is non-zero the condition is true
2RegX == RegYARegX == KEQIf the two operands are equal the condition is true
3RegX != RegYBRegX != KNEIf the two operands are not equal the condition is true
4RegX >= RegYCRegX >= KGEIf RegX is greater than or equal to the right operand the condition is true
5RegX > RegYDRegX > KGTIf RegX is greater than the right operand the condition is true
6RegX <= RegYERegX <= KLEIf RegX is less than or equal to the right operand the condition is true
7RegX < RegYFRegX < KLTIf RegX is less than the right operand the condition is true
Optional Link Command details
KLLLink CommandComment
100LinkNoLinkuse byte 6 as "HH" in these detailed pages, ignore all other values.
101LinkTopCell
102LinkNextCell
103LinkPrevCell
105LinkTopPG
106LinkNextPG
107LinkPrevPG
109LinkTopPGC
10ALinkNextPGC
10BLinkPrevPGC
10CLinkGoUpPGC
10DLinkTailPGC
110RSM
4--LinkPGCNuse bytes 6 and 7 as "NNNN" in this detailed page, ignore all other values.
5--LinkPTTNuse bytes 6 and 7 as "HTTT" in this detailed page, ignore all other values.
6--LinkPGNuse bytes 6 and 7 as "HHPP" in this detailed page, ignore all other values.
7--LinkCNuse bytes 6 and 7 as "HHNN" in this detailed page, ignore all other values.
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 - 2022 STN Software, all rights reserved.