home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Programming Black Book (Special Edition)
/
BlackBook.bin
/
disk1
/
zenasmlg
/
zen_list.exe
/
LST13-7.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-02-15
|
751b
|
28 lines
;
; *** Listing 13-7 ***
;
; Measures the time needed to set AL, based on the contents
; of DL, with preload code (a branch is required in only one
; of the two possible cases).
;
;----------------------------------------------------------
; Macro to perform the test of DL and setting of AL.
; It's necessary to use a macro because the LOCAL directive
; doesn't work properly inside REPT blocks with MASM.
;
TEST_DL_AND_SET_AL macro
local DLCheckDone
sub al,al ;assume DL <= 10
cmp dl,10 ;is DL greater than 10?
jbe DLCheckDone ;no, so AL is already set
mov al,1 ;DL is greater than 10
DLCheckDone:
endm
;
mov dl,10 ;AL will always be set to 0
call ZTimerOn
rept 1000
TEST_DL_AND_SET_AL
endm
call ZTimerOff