home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / zenlib / lst9_4.asm < prev    next >
Assembly Source File  |  1990-02-15  |  312b  |  15 lines

  1. ;
  2. ; *** Listing 9-4 ***
  3. ;
  4. ; An example of using CMP reg,0 to test for the
  5. ; zero/non-zero status of a register.
  6. ;
  7.     sub    dx,dx    ;set DX to 0, so we don't jump
  8.     call    ZTimerOn
  9.     rept    1000
  10.     cmp    dx,0    ;is DX 0?
  11.     jnz    $+2    ;just jumps to the next line if
  12.             ; Z is not set (never jumps)
  13.     endm
  14.     call    ZTimerOff
  15.