BBS: Inland Empire Archive Date: 10-24-93 (13:19) Number: 220 From: RAYMOND PAQUIN Refer#: NONE To: JASON SHARPEE Recvd: NO Subj: QB DELAY Conf: (2) Quik_Bas
JS> I need a way to pause my program for a 'n'
JS> number of milliseconds. I have found a routine
JS> that will do an 18th of a second, but this is too
JS> long of a delay yet. Any help would be appreciated!
DEFINT A-Z
SUB WaitMillisec (Millisecs)
DIM Regs AS RegType
MS& = Millisecs * 977& 'MicroSeconds
Regs..ax = &H8600
Regs.cx = Millisecs \ 67 'cx& = MS& \ &h10000
.
dx& = MS& AND &HFFFF 'dx& = MS& MOD &H10000
IF dx& > &H7FFF THEN
Regs.dx = &H10000 - dx&
ELSE
Regs.dx = dx&
END IF
.
CALL Interrupt(&H15, Regs, Regs)
END SUB
Hope this helps.
$$37
--- Maximus 2.01wb
* Origin: Ned's Opus * Northern FDN Connection * (1:243/15)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET