MODEL MEDIUM,BASIC
.STACK 20H
.386
.CODE

;SUB RELDELAY(BYVAL MSEC%)
;STACK
;MSEC           =6
;QB RETURN SEG  =4
;QB RETURN OFF  =2
;BP             =0
;CX:DX = NUM OF MICROSECONDS TO ELAPSE
;WE MUL IT BY 1000 TO GET MILLISECONDS
;INT=15,86  (AH=86)  INTEL SPECIFIC :(

PUBLIC RELDELAY
RELDELAY PROC

PUSH BP
MOV BP,SP
MOV DX,[BP+6]           ;STORE OUR MSEC
MOV AX,1000             ;WE WILL MUL IT WITH 1000 TO GET MILLISECS
MUL DX                  ;AX:DX=MSECS
MOV CX,DX
MOV DX,AX               ;PUT THE VALUES TO CX:DX SINCE IT'S WHAT INTEL WANTS :)
SUB AL,AL
MOV AH,86H              ;INTERRUPT 15,86
INT 15H                 ;DO IT
POP BP

RET 2
RELDELAY ENDP

END

