home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / atari / st / 13829 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  3.0 KB

  1. Xref: sparky comp.sys.atari.st:13829 comp.sys.atari.st.tech:4776
  2. Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech
  3. Path: sparky!uunet!mcsun!Germany.EU.net!rrz.uni-koeln.de!aeg03
  4. From: aeg03@rrz.uni-koeln.de (Jan T. Kim)
  5. Subject: GFA: Interrupt programming fails in TT-RAM
  6. Message-ID: <1992Sep15.203446.141116@rrz.uni-koeln.de>
  7. Reply-To: kim@vax.mpiz-koeln.mpg.dbp.de
  8. Organization: Regional Computing Center, University of Cologne, F. R. Germany
  9. Date: Tue, 15 Sep 92 20:34:46 GMT
  10. Lines: 81
  11.  
  12. Hi everyone,
  13.  
  14. I recently got a hold of the File-Info/Config CPX and used it  to
  15. set  the  TT-Ram bits of a program I wrote and compiled under GFA
  16. basic 3.6. The program contains a procedure that is called  every
  17. 1/5 seconds by the command "EVERY 40 GOSUB procedure". While this
  18. has worked fine with the TT-Ram (Prg) bit unset, it doesn't  work
  19. when this bit is set.
  20. To investigate this phenomenon, I wrote a test program  (included
  21. below). It basically consists of the EVERY command, followed by a
  22. loop that should then be interrupted by  interrupt  procedure  at
  23. regular  intervals.  With  this  test  program,  I  found out the
  24. following:
  25.  
  26. 1. If there are 4 PRINT commands between the EVERY  command   and
  27. the  loop   (let's call this program "TEST_A.PRG"), the interrupt
  28. works in ST Ram and doesn't work in TT Ram.
  29. 2. If there is just one PRINT command between the  EVERY  command
  30. and  the   loop  ("TEST_B.PRG"),  the  interrupt (now read this!)
  31. works in TT Ram and fails in ST Ram!
  32. 3. Lately, I installed the ARROWFIX.PRG in my auto folder.  Since
  33. then,  TEST_A.PRG  runs  properly with or without the TT-Ram bits
  34. set, and TEST_B.PRG fails with both TT-Ram bit settings.
  35.  
  36. Fortunately, my original program seems  to  belong  to  the  "A"-
  37. category,  so  it  is  magically fixed by ARROWFIX. However, I am
  38. severely confused. Any idea how these  *weird*  findings  can  be
  39. explained?
  40. In the GFA basic manual it is explained that the EVERY command is
  41. realized with the etv_timer vector ($400),  if  that  is  of  any
  42. significance.
  43.  
  44. Greetinx, Jan
  45.  
  46.  +- Jan Kim -- X.400:    S=kim;OU=vax;O=mpiz-koeln;P=mpg;A=dbp;C=de -+
  47.  |             Internet: kim@vax.mpiz-koeln.mpg.dbp.de               |
  48.  |                                                                   |
  49.  *----=<  hierarchical systems are for files, not for humans  >=-----*
  50.  
  51. P.S.: You may flame me for programming in GFA basic if you  must.
  52. But please include code for implementing equivalents of the EVERY
  53. command in your favorite language in this case. ;-)
  54.  
  55. Here's the code of the test program:
  56.  
  57. ' TEST_B.GFA
  58. $I+
  59. $U+
  60. ~TT?
  61. CLS
  62. ON BREAK CONT
  63. DIM mbuf&(7)
  64. EVERY 40 GOSUB show_interrupt
  65. PRINT "Every is now activated"
  66. '
  67. ' Un-comment either the three prints or the wave to obtain TEST_A.GFA
  68. ' PRINT
  69. ' PRINT
  70. ' PRINT
  71. ' WAVE 1,1,0,1000,20
  72. '
  73. t%=TIMER
  74. REPEAT
  75.   $U
  76.   IF TIMER-t%>200
  77.     PRINT "Hi there, the main loop has idled for another second..."
  78.     t%=TIMER
  79.   ENDIF
  80. UNTIL MOUSEK=2 OR INKEY$=CHR$(27)
  81. $U-
  82. $I-
  83. PRINT "see ya"
  84. ~INP(2)
  85. EDIT
  86. '
  87. PROCEDURE show_interrupt
  88.   EVERY STOP
  89.   PRINT "Hi, I'm the interrupt procedure."
  90.   EVERY  CONT
  91. RETURN
  92.  
  93.