Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



8086 Assembly Language Delay Macro

Home   8086   8086 Assembly Language Delay Macro         


Code for beginner 

;---------------------------------------------------------------------
;Delay Macro:
;   Description:
;       Causes a Delay in terms of 1/60 of a second 
;---------------------------------------------------------------------
Delay macro Dela
  push ax
  mov ax,dela
  mov DelayTime,ax
  call DelayProc
  pop ax
endm

;---------------------------------------------------------------------
; Delayproc:
;   I/P :
;       Delay Value
;   Description : Cause a Delay in terms of 1/70 th of a second
;---------------------------------------------------------------------
DelayProc proc near
  mov cx,DelayTime
  mov dx,3dah
  loop11:
    push cx
    l1:
      in al,dx
      and al,08h
      jnz l1
    l2:
      in al,dx
      and al,08h
      jz l2
   pop cx
   loop loop11
   ret
endp
Generete Executable using Tasm / Tlink 
tasm filename.asm
tlink /t filename





  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam