| delorie.com/archives/browse.cgi | search |
| From: | buers AT gmx DOT de (Dieter Buerssner) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: I need to advice on timing... |
| Date: | 31 Jan 2000 20:05:40 GMT |
| Lines: | 23 |
| Message-ID: | <874puj$3d1nd$1@fu-berlin.de> |
| References: | <F77915E7F086D31197F4009027CC81C921A6A0 AT probe-2 DOT as-london DOT acclaim DOT com> |
| NNTP-Posting-Host: | dialup-212.162.12.108.frankfurt1.mik.net (212.162.12.108) |
| Mime-Version: | 1.0 |
| X-Trace: | fu-berlin.de 949349140 3573485 212.162.12.108 (16 [17104]) |
| X-Posting-Agent: | Hamster/1.3.8.0 |
| User-Agent: | Xnews/2.11.08 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
djgpp AT delorie DOT com (Shawn Hargreaves) wrote in
<F77915E7F086D31197F4009027CC81C921A6A0 AT probe-2 DOT as-london DOT acclaim DOT com>:
>[linux delay loop for almost exact fast timing]
>[...] hence the forced jump instructions at the start
Could you please explain, why you need these jump instructions.
I donīt get it.
> void __delay(unsigned long loops)
> {
> int d0;
> __asm__ __volatile__(
> "\tjmp 1f\n"
> ".align 16\n"
> "1:\tjmp 2f\n"
> ".align 16\n"
> "2:\tdecl %0\n\tjns 2b"
> :"=&a" (d0)
> :"0" (loops));
> }
Dieter
| webmaster | delorie software privacy |
| Copyright Đ 2019 by DJ Delorie | Updated Jul 2019 |