home *** CD-ROM | disk | FTP | other *** search
/ Graphics Programming Black Book (Special Edition) / BlackBook.bin / disk1 / source / chapter3-p2 / testcode < prev   
Encoding:
Text File  |  1997-06-18  |  527 b   |  27 lines

  1. ; Measures the performance of 20000 loads of AL from
  2. ; memory. (Use by renaming to TESYCODE, which is
  3. ; included by LZTEST.ASM (Listing 3.6). LZTIME.BAT
  4. ; (Listing 3.7) does this, along with all assembly
  5. ; and linking.)
  6. ;
  7. ; Note: takes about 10 minutes to assemble on a slow PC
  8. ;    if you are using MASM
  9. ;
  10.      jmp  Skip ;jump around defined data
  11. ;
  12. MemVar   db   ?
  13. ;
  14. Skip:
  15. ;
  16. ; Start timing.
  17. ;
  18.      call ZTimerOn
  19. ;
  20.      rept 20000
  21.      mov al,[MemVar]
  22.      endm
  23. ;
  24. ; Stop timing.
  25. ;
  26.      call ZTimerOff
  27.