j (Conditional)

j expr [cmds-if-true][;cmds-if-false]
 

The j command executes selected commands based on whether the specified expression is TRUE or FALSE. The j command is useful in breakpoint commands to conditionally break execution when an expression becomes TRUE.

expr
Evaluates to a Boolean TRUE or FALSE.
cmds-if-true
Specifies a list of debugger commands to be executed when expr is TRUE. More than one command can be given, but the commands must be separated by semicolons and the complete list must be enclosed in single or double quotation marks.
cmds-if-false
Specifies a list of debugger commands to be executed when expr is FALSE. The preceding semicolon is required. More than one command can be given, but the commands must be separated by semicolons and the complete list must be enclosed in single or double quotation marks.

The following example causes execution to continue if EAX equals zero when the breakpoint is reached:

bp 167:1454 "J EAX == 0 G"

The following example displays the registers and continues execution when the byte pointed to by DS:SI +3 is equal to 40h; otherwise, it displays the descriptor table:

bp 167:1462 "J BY (DS:SI+3) == 40 'R;G';DG DS"