Delay via Asm ? int 15h ?

Salute :)





in C++ u can hold the prgm with delay(time);



but how it works in asm ?



log002


Comments

  • : Salute :)

    :

    :

    : in C++ u can hold the prgm with delay(time);

    :

    : but how it works in asm ?

    :

    : log002

    :



    Well, I forgot what INT 15h is and don't feel like checking now, but you can get a delay by using a loop and checking the BIOS timer.



    The BIOS timer, at 40:6Ch, increments every 55ms, so it increments 18.2 times a second. So you can get a second timer with it. There are other timers to get better precision, this is just a quick simple way.



    If you want really kick-butt timing use the timestamp, but you need to know the clock speed of the processor you're using, though that isn't too hard to find out. Since the timestamp is incremented at every clock cycle, a 100 Mhz processor would give you precision to one one hundred millionth of a second.


  • thx !



    but what i have to do with 40:6Ch ?

    im not so good in asm... like a newbie :)






  • : thx !

    :

    : but what i have to do with 40:6Ch ?

    : im not so good in asm... like a newbie :)

    :



    it's automatically incremented by BIOS.



    all you do is read the value. Like the following



    mov ax, 40h

    mov es, ax

    mov ax, es:[6Ch]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories