Hex Code: | 8J | MR | 00 | SS | 00 | YY | HH | LL |   M=1-7, Compare GPRM R to register YY, indirect set |
---|---|---|---|---|---|---|---|---|---|
8J | MR | 00 | SS | KK | KK | HH | LL |   M=9-F, Compare GPRM R to constant KKKK, indirect set | |
9J | MR | SS | SS | 00 | YY | HH | LL |   M=1-7, Compare GPRM R to register YY, direct set | |
9J | MR | SS | SS | KK | KK | HH | LL |   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 codes | Source may be | ||||
---|---|---|---|---|---|
J | Mnemonics | Operation | GPRM | SPRM | constant |
0 |   | no set is performed, command becomes conditional link |   |   |   |
1 | =   mov | set destination GPRM to source value | |||
2 | <->   swp | swap destination GPRM with source GPRM |   |   | |
3 | +=   add | add source value to destination GPRM |   | ||
4 | -=   sub | subtract source value from destination GPRM |   | ||
5 | *=   mul | multiply destination GPRM by source value |   | ||
6 | /=   div | divide destination GPRM by source value |   | ||
7 | %=   mod | set destination GPRM to destination register modulo source value |   | ||
8 | ?=   rnd | set destination GPRM to a random value between 1 and the source value |   | ||
9 | &=   and | and destination GPRM with source value | |||
A | |=   or | or destination GPRM with source value | |||
B | ^=   xor | xor destination GPRM with source value |
Compare operation codes | |||||
---|---|---|---|---|---|
register to register | register to constant | Alternate mnemonic | Comments | ||
M | operation | M | operation | ||
1 | RegR & RegY | 9 | RegR & K | BC | Bitwise compare, the two operands are anded, if the result is non-zero the condition is true |
2 | RegR == RegY | A | RegR == K | EQ | If the two operands are equal the condition is true |
3 | RegR != RegY | B | RegR != K | NE | If the two operands are not equal the condition is true |
4 | RegR >= RegY | C | RegR >= K | GE | If RegX is greater than or equal to the right operand the condition is true |
5 | RegR > RegY | D | RegR > K | GT | If RegX is greater than the right operand the condition is true |
6 | RegR <= RegY | E | RegR <= K | LE | If RegX is less than or equal to the right operand the condition is true |
7 | RegR < RegY | F | RegR < K | LT | If RegX is less than the right operand the condition is true |
Optional Link Command details | ||
---|---|---|
LL | Link Command | Comment |
00 | LinkNoLink | use byte 6 as "HH" in these detailed pages, ignore all other values. |
01 | LinkTopCell | |
02 | LinkNextCell | |
03 | LinkPrevCell | |
05 | LinkTopPG | |
06 | LinkNextPG | |
07 | LinkPrevPG | |
09 | LinkTopPGC | |
0A | LinkNextPGC | |
0B | LinkPrevPGC | |
0C | LinkGoUpPGC | |
0D | LinkTailPGC | |
10 | RSM |
Register Codes | |
---|---|
0x00 through 0x0F | General Purpose registers 0 to 15 (GPRM) |
0x80 through 0x97 | System Parameter registers 0 to 23 (SPRM) |
all others | do not use |
Numerically | Alphabetically | Index |
Alphabetically | Numerically |
DVD-Video info home | Copyright © 2001 - 2024 MPUCoder, all rights reserved. |