7.6 Medium Level Control Structures: JT and JF


7.6 "Medium Level" Control Structures: JT and JF

HLA provides two special conditional jump instructions: jt (jump if true) and jf(jump if false). These instructions take the following syntax:

 jt( boolean_expression ) target_label; jf( boolean_expression ) target_label; 

The boolean_expression is the standard HLA boolean expression allowed by if..endif and other HLA high level language statements. These instructions evaluate the boolean expression and jump to the specified label if the expression evaluates true (jt) or false (jf).

These are not real 80x86 instructions. HLA compiles them into a sequence of one or more 80x86 machine instructions that achieve the same result. In general, you should not use these two instructions in your main code; they offer few benefits over using an if..endif statement and they are no more readable than the pure assembly language sequences they compile into. HLA provides these "medium-level" instructions so that you may create your own high level control structures using macros (see the chapter on macros and the HLA Reference Manual for more details).




The Art of Assembly Language
The Art of Assembly Language
ISBN: 1593272073
EAN: 2147483647
Year: 2005
Pages: 246
Authors: Randall Hyde

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net