home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
progjorn
/
pj_vga.arc
/
TESTIMER.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-06-14
|
691b
|
38 lines
;
; *** Listing 2 ***
;
; Program to measure performance of code that takes less than
; 54 ms to execute.
;
; Link with Listing 1.
;
stack segment para stack 'STACK'
db 512 dup(?)
stack ends
Code segment para public 'CODE'
assume cs:Code, ds:code
extrn TimerOn:near, TimerOff:near, TimerReport:near
Start proc near
; Start the timer.
call TimerOn
; ***** Code to be measured starts here *****
rept 1000
shr dx,1
shr dx,1
shr dx,1
add ax,dx
endm
; ***** Code to be measured ends here *****
;
; Stop the timer.
call TimerOff
; Display the results.
call TimerReport
; Terminate the program.
mov ah,4ch
int 21h
Start endp
Code ends
end Start