IF/SELECT: Difference between revisions

206 bytes added ,  5 years ago
no edit summary
No edit summary
No edit summary
Line 1:
'''IF''' statements are the primary conditional instructions. They evaluate whether a condition is true, and execute a [[JMP/LBL|Jump]] or [[CALL|Call]] if it is.
[[File:Inst-if orig.gif|thumb|How to add an "IF" instruction. ]]
If it is not true, the instruction will occur as if the line were blank.
Line 23:
| ON
| JMP
| LBL2LBL[2]
|}
Additionally, when selecting the action field, another condition can be added with the '''AND''' or '''OR''' selection. When wanting to make a large list of possible conditions for each variable, you'll likely want to use the '''SELECT''' option.
{| class="wikitable"
! IF
! Variable
! Math
! Variable
! Modifier
! Variable
!Math
!Variable
!Action
!Destination
|-
| IF
| R[1]
| =
| 1
| AND
| R[2]
|>
|AI[10]
|JMP
|LBL[2]
|}
When wanting to make a large list of possible conditions for a single variable, you'll likely want to use the '''SELECT''' option.
{| class="wikitable"
! SELECT