0

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

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by cupcake33
0

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.

Edited by nezachem: n/a

0

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

0

> 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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.