home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.atari.st:13829 comp.sys.atari.st.tech:4776
- Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech
- Path: sparky!uunet!mcsun!Germany.EU.net!rrz.uni-koeln.de!aeg03
- From: aeg03@rrz.uni-koeln.de (Jan T. Kim)
- Subject: GFA: Interrupt programming fails in TT-RAM
- Message-ID: <1992Sep15.203446.141116@rrz.uni-koeln.de>
- Reply-To: kim@vax.mpiz-koeln.mpg.dbp.de
- Organization: Regional Computing Center, University of Cologne, F. R. Germany
- Date: Tue, 15 Sep 92 20:34:46 GMT
- Lines: 81
-
- Hi everyone,
-
- I recently got a hold of the File-Info/Config CPX and used it to
- set the TT-Ram bits of a program I wrote and compiled under GFA
- basic 3.6. The program contains a procedure that is called every
- 1/5 seconds by the command "EVERY 40 GOSUB procedure". While this
- has worked fine with the TT-Ram (Prg) bit unset, it doesn't work
- when this bit is set.
- To investigate this phenomenon, I wrote a test program (included
- below). It basically consists of the EVERY command, followed by a
- loop that should then be interrupted by interrupt procedure at
- regular intervals. With this test program, I found out the
- following:
-
- 1. If there are 4 PRINT commands between the EVERY command and
- the loop (let's call this program "TEST_A.PRG"), the interrupt
- works in ST Ram and doesn't work in TT Ram.
- 2. If there is just one PRINT command between the EVERY command
- and the loop ("TEST_B.PRG"), the interrupt (now read this!)
- works in TT Ram and fails in ST Ram!
- 3. Lately, I installed the ARROWFIX.PRG in my auto folder. Since
- then, TEST_A.PRG runs properly with or without the TT-Ram bits
- set, and TEST_B.PRG fails with both TT-Ram bit settings.
-
- Fortunately, my original program seems to belong to the "A"-
- category, so it is magically fixed by ARROWFIX. However, I am
- severely confused. Any idea how these *weird* findings can be
- explained?
- In the GFA basic manual it is explained that the EVERY command is
- realized with the etv_timer vector ($400), if that is of any
- significance.
-
- Greetinx, Jan
-
- +- Jan Kim -- X.400: S=kim;OU=vax;O=mpiz-koeln;P=mpg;A=dbp;C=de -+
- | Internet: kim@vax.mpiz-koeln.mpg.dbp.de |
- | |
- *----=< hierarchical systems are for files, not for humans >=-----*
-
- P.S.: You may flame me for programming in GFA basic if you must.
- But please include code for implementing equivalents of the EVERY
- command in your favorite language in this case. ;-)
-
- Here's the code of the test program:
-
- ' TEST_B.GFA
- $I+
- $U+
- ~TT?
- CLS
- ON BREAK CONT
- DIM mbuf&(7)
- EVERY 40 GOSUB show_interrupt
- PRINT "Every is now activated"
- '
- ' Un-comment either the three prints or the wave to obtain TEST_A.GFA
- ' PRINT
- ' PRINT
- ' PRINT
- ' WAVE 1,1,0,1000,20
- '
- t%=TIMER
- REPEAT
- $U
- IF TIMER-t%>200
- PRINT "Hi there, the main loop has idled for another second..."
- t%=TIMER
- ENDIF
- UNTIL MOUSEK=2 OR INKEY$=CHR$(27)
- $U-
- $I-
- PRINT "see ya"
- ~INP(2)
- EDIT
- '
- PROCEDURE show_interrupt
- EVERY STOP
- PRINT "Hi, I'm the interrupt procedure."
- EVERY CONT
- RETURN
-
-