Category : Files from Magazines
Archive   : PJ-VGA.ZIP
Filename : TESTIMER.ASM

 
Output of file : TESTIMER.ASM contained in archive : PJ-VGA.ZIP
;
; *** 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


  3 Responses to “Category : Files from Magazines
Archive   : PJ-VGA.ZIP
Filename : TESTIMER.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/