Need help understanding Assembly time delay
Hi, 1) below is an assembly question with the answers in red. I am trying to find out where the numbers 3, 4, 16/4, and 16 came from. I understand they are from intel for the IA32 chipset. But I can't find any table that shows where to get these numbers. Anyone know?
2) Is the CLKS formula in the answers something standard? How do I know to use 4, 28, 16 and 16 in the formula? I have 15 assembly books that do not have this in it, and I can't find anything on the internet.
Help is appreciated
Problem: For the following software time delay routine:
Time1 WORD 3000h
mov dx, Time1 4
dec dx 3
jnz dly1 16/4
... Perform the following operations:
(1) Write the # CLKS equation.
(2) For a clock frequency = 10 MHz, calculate the time delay for the entire PROC at the given DX value.
(3) What values of DX would provide the minimum and maximum time delays, and what times would they correspond to at the 10 MHz frequency?
(1) # CLKS = 4 + 28(DX-1) + 16 + 16
= 28(DX-1) + 36 = 28DX + 8
(2) TE = 100ns * [28(12288) + 8]
= 100ns *  = 34.4 milliseconds
(3) For minimum time, DX = 1 corresponding to one pass through the instructions without any loops.
TE = 100ns *  = 3.6 microseconds
For maximum time, DX = 0 which corresponds to a count of 65, 536.
TE = 100ns * [28(65,536) + 8] = 183.5 milliseconds
|All times are GMT +5.5. The time now is 09:38.|