| cvs.gedasymbols.org/archives/browse.cgi | search |
| From: | "yogin" <yogin AT polbox DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <807mmm$13u$1 AT news DOT cc DOT ucf DOT edu> |
| Subject: | Re: winallegro and install_int() |
| Lines: | 36 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.00.2417.2000 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
| Message-ID: | <BTlW3.17131$jG2.366182@news.tpnet.pl> |
| Date: | Wed, 10 Nov 1999 21:57:53 GMT |
| NNTP-Posting-Host: | 212.160.50.171 |
| X-Complaints-To: | abuse AT tpsa DOT pl |
| X-Trace: | news.tpnet.pl 942271073 212.160.50.171 (Wed, 10 Nov 1999 22:57:53 MET) |
| NNTP-Posting-Date: | Wed, 10 Nov 1999 22:57:53 MET |
| Organization: | TPNET - http://www.tpnet.pl |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Użytkownik Ryan M Gumbs <rmg33058 AT pegasus DOT cc DOT ucf DOT edu> w wiadomo¶ci do grup
dyskusyjnych napisał:807mmm$13u$1 AT news DOT cc DOT ucf DOT edu...
> i've been using the most current allegro wip (all3927) and MSVC.
> my code has been crashing when i try to use install_int() to
> install my own custom clock.
> here is my code:
>
> void myclock() {
> globalclock++;
> }
>
> END_OF_FUNCTION(myclock)
>
> main routine() {
> allegro_init();
> install_timer();
> install_int(myclock, 1);
> LOCK_VARIABLE(globalclock)
> LOCK_FUNCTION(myclock)
> }
I can't test Allegro with Windows as I don't have the necessary software,
but I suppose your program crashes because you lock the function and
variable after you installed an interrupt. Try to lock them first. Windows
eats a lot of memory and even on a 64MB system it may try to write some
memory to disk causing your program to crash.
I hope this solves your problem.
yogin
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |