home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Amos / AmosCRAFT2Turbo.DMS / in.adf / demos / general / Starfield_Interrupt.AMOS / Starfield_Interrupt.amosSourceCode
Encoding:
AMOS Source Code  |  1994-01-29  |  921 b   |  37 lines

  1. Screen Open 0,320,256,2,Lowres
  2. Hide 
  3. Cls 0
  4. Colour 1,$FFF
  5. 'reserve memory for the 'STARS' and store the actual screen adress (screen 0)
  6.  Extension_12_03A2 300
  7. 'define the stars... 
  8. 'only X-speeds are used in the 'STARS INTERRUPT'...
  9. For I=1 To 300
  10.     Extension_12_03B6 I,Rnd(319)+1,I/1.5,Rnd(5)+1,0
  11. Next 
  12. Wait Vbl 
  13.  Extension_12_0016 
  14. 'enable the 'STARS' interrupt...no automatic clear mode. 
  15.  Extension_12_047E 0
  16. 'do something else 
  17. COUNT=0
  18. Repeat 
  19.    Inc COUNT
  20.    COUNT$=Str$(COUNT)
  21.    For Y=80 To 140 Step 20
  22.       Text 30,Y,COUNT$
  23.    Next 
  24.    Colour 1,COUNT
  25.    'try to use the Wait Vbl command...
  26.     Extension_12_00A6 201
  27.    'don't forget to clear the display every Vbl,
  28.    'because automatic clear mode is disabled !  
  29.     Extension_12_0380 1
  30. Until Extension_12_0392 
  31. 'disable the 'STARS' interrupt 
  32.  Extension_12_0492 
  33. 'return the memory used to the system  
  34.  Extension_12_03E4 
  35.  Extension_12_0006 
  36. 'voila...  
  37. End