delay.asm

来自「开放源码的编译器open watcom 1.6.0版的源代码」· 汇编 代码 · 共 36 行

ASM
36
字号
	include ..\cwlib.inc
	scode

;-------------------------------------------------------------------------
;
;Wait for a while.
;
;On Entry:
;
;ECX	- time to wait for.
;
Delay	proc	near
	pushm	eax,ebx,ecx,edx,esi
	mov	esi,ecx
	mov	ah,0
	int	1ah
	shl	ecx,16
	mov	cx,dx
	mov	ebx,ecx
l0:	mov	ah,0
	int	1ah
	shl	ecx,16
	mov	cx,dx
	sub	ecx,ebx
	cmp	ecx,esi
	jc	l0
	popm	eax,ebx,ecx,edx,esi
	ret
Delay	endp


	efile
	end


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?