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

  1. ;
  2. ; *** Listing 9-1 ***
  3. ;
  4. ; An example of initializing multiple memory variables
  5. ; to the same value by placing the value in a register,
  6. ; then storing the register to each of the variables.
  7. ; This avoids the overhead that's incurred when using
  8. ; immediate operands.
  9. ;
  10.     jmp    Skip
  11. ;
  12. MemVar1    dw    ?
  13. MemVar2    dw    ?
  14. MemVar3    dw    ?
  15. ;
  16. Skip:
  17.     call    ZTimerOn
  18.     rept    1000
  19.     mov    ax,0ffffh    ;place the initial value in
  20.                 ; AX
  21.     mov    [MemVar1],ax    ;store AX to each memory
  22.     mov    [MemVar2],ax    ; variable to be initialized
  23.     mov    [MemVar3],ax
  24.     endm
  25.     call    ZTimerOff
  26.