Except the C compiler is never ready when they ship first silicon. We had no choice but to use assembler in those days.Never coded x86 in asm! I save that for PIC. PC stuff I do C and C++.
Except the C compiler is never ready when they ship first silicon. We had no choice but to use assembler in those days.Never coded x86 in asm! I save that for PIC. PC stuff I do C and C++.
its running in simulation mode...So you are using masm on a PC?
Is the masm actually executing the code on a chip or is it running in simulation mode?
How do you determine how long is the actual delay?
i read that 'loop' instruction itself decrements cx and repeats the process until cx is zeroWhere are the decrement and test for zero instruction(s)?
i dont think that was the mistake... because i came to know that 8086 masm assembler is case insensitiveJust checked my microprocessor textbook (we did intel), CX in 8086 is 16 bits so the largest value you can load in CX is FFFFH.
I think your error is the low case h. I think your code should be:
MOV CX, 0FFFFH
If you knew the clock frequency, could you calculate the delay? Add up the required clock cycle times of all instructions in the loop. Using the frequency, calculate the total time in your loop for one cycle. Divide the total desired delay time by this one cycle time, and that will be the number of times your code must loop. If it's greater than 65536, you will need nested loops.its running in simulation mode...
i am not determining the delay...and i don't even know how to do that, because i don't know the clock frequency...
what all i wanted is.,
my program should pause its execution for a notable time and again start it...
but how can i know my clock frequency in a masm assembler..?If you knew the clock frequency, could you calculate the delay? .
MASM is Microsoft Assembler. It did not have a simulator when I last used it some decades ago. Maybe it has been updated.I am assuming that masm is a simulator. The clock frequency is a parameter. Anyone more familiar with masm???
by Duane Benson
by Jake Hertz
by Jake Hertz
by Jake Hertz