Hi, I wanna ask.. I want to make a procedure of 1 second delay for 8088

so far here what I have

debounce:
PROC NEAR
PUSH CX

delay:
MOV CX, 6000H ;24576 in decimal

L1:
LOOP L1 ;

POP CX
RET

debounce ENDP

so, can someone please help me..I don't think the code is working properly

Two immediate questions:
1. Why do you think it should work properly?
2. What makes you think it doesn't?

First question implies the environment (true 8088 vs emulation; where 6000h came from; interrupt state, clock frequency). The second implies, how do you measure the actual delay.

when i tried to compile it's not error...but i'm not yet tested it on the microprocesor just got the feeling that it wont work...that's why i want to ask first if my code seems ok or not.. I'm not sure because of the loop... I dont really know how to count the delays and cycle

> just got the feeling
Then just try it. It wouldn't blow anything up.

> I dont really know how to count the delays and cycle
Back to my question 1.

PS: no matter if it works or not, it is a Very Bad Way to implement delays. Nevertheless, make it work, then we'll figure out something better.

cause i havent built my circuit yet..so how do i know????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.