home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 10: Diskmags
/
nf_archive_10.iso
/
MAGS
/
ST_USER
/
1990
/
USERNV90.MSA
/
TEXT_SCREENFL.DOC
< prev
next >
Wrap
Text File
|
1990-05-24
|
5KB
|
99 lines
MEMORY MISER
++++++++++++++++++++++++++++++++++++++++++
Screenfull is an exciting challenge for programmers - to write a program (or
even just a subroutine) that will fit on one standard monitor or TV screen.
That's about 22 lines. The program can be a game, utility, graphic designer,
music and MIDI editor or even a business program, the choice is yours. You can
also use any programming language such as Basic, C, Pascal, STOS or 68000
machine code, but remember, the whole of the source code must fit onto one
screen. Send your submissions in to the Disk Editor.
+++++++++++++++++++++++++++++++++++++++++++
C. Warren of Bury St. Edmunds, Suffolk, supplies the first of our two
Screenfull submissions and it's a useful GFA BASIC routine to switch the
blitter on or off: "I recently bought a 520STE and immediately became annoyed
that the blitter option could only be toggled from the Menu Bar. After scanning
through my GFA BASIC 3.00 manual, I discovered XBIOS 64 - this controls and
interrogates the blitter (if it exists).
"The code is incorporated into a Desk Accessory so that you can toggle the
blitter on and off from within any GEM application. Select the desk accessory
and an alert Box pops up giving you two choices: turn the blitter on, or turn
it off. Make your choice and the accessory disappears.
==============================================================================
' GFA BASIC Blitter Switcher 2.00 by C. Warren
$m2500
d%=1
ap_id&=APPL_INIT()
me_id&=MENU_REGISTER(ap_id&," Blit Switch")
DO
~EVNT_MESAG(0)
IF MENU(1)=40
ALERT 2,"Blitter Switch",d%," On | Off ",a%
SELECT a%
CASE 1
r%=XBIOS(64,-1) AND 2 !r%=non zero if blitter attached
IF r%
~XBIOS(64,1)
d%=2
ELSE
ALERT 1,"Sorry, no blitter",1,"Shame!",dummy%
ENDIF
CASE 2
~XBIOS(64,0)
d%=1
ENDSELECT
ENDIF
LOOP
==============================================================================
Paul J. Dixon provides the second of this month's Screenfull submissions
and it's an interesting game called Bouncy Bouncy written in STOS. "This awe
inspiring STOS Basic game is mind blowingly addictive in its simplicity. You
must navigate your Mk II Bouncy Quasar Neutron Blaster (errm, a dot) through
the ultrachromatic hyper-defence shields (some vertical lines) of the planet
Hemmer. If you fail, those nasty Hemmeroids will destroy Mankind!
"The trouble is that your Bouncy Blaster was badly damaged when you were
ambushed by piles of Hemmeroid fighters. The only thing left working is your
longitudinal retro thruster, which in effect means you can only control whether
you go up or down!
"So that's the scenario! How do you play it? Press D to select the
difficulty level (the density of the defence shields), and S to select the
speed. Press Space, a mouse key, or the joystick fire button to play. Your
Bouncy Blaster will start bouncing all over the place - pressing Space, a mouse
key or fire will reverse your up/down direction. To reverse your left right
direction you must bounce off something! You'll soon develop the technique (try
holding down a mouse button to travel horizontally). When you finish your time
will be displayed.
"Here's the listing then! A little unreadable, but not bad for one
screenful!"
==============================================================================
10 DATA $700,$750,$770,$570,$75,$570,$770,$750
20 FOR c=3 TO 10 : READ rgb : COLOUR c,rgb : NEXT c
30 VOLUME 16 : CLICK OFF : CURS OFF : HIDE : KEY OFF : MODE 0 : REPEAT : GOSUB
140 : PEN 7 : PRINT STRING$(CHR$(206),39); : PEN 15 : CENTRE " Bouncy Bouncy!
"
40 s=(3-diff)*30 : FOR x=8 TO 312 STEP 5 : INK ((x/5) MOD 8)+3 : DRAW x,9 TO
x,199 : INK 0 : y=RND(190-s)+9 : DRAW x,y TO x,y+s : NEXT x
50 INK 13 : BOX 0,9 TO 319,199 : BOX 1,10 TO 318,198
60 x=6 : y=190 : xs=1 : ys=-1 : ox=x : oy=y
70 REPEAT : i=0 : a=ox : b=oy : GOSUB 130 : i=1 : a=x : b=y : GOSUB 130
80 IF POINT(x,y-1)<>0 OR POINT(x,y+2)<>0 THEN ys=-ys : NOISE 1,15
90 IF POINT(x-1,y)<>0 OR POINT(x+2,y)<>0 THEN xs=-xs : NOISE 1,15
100 IF INKEY$=" " OR FIRE OR MOUSE KEY THEN ys=-ys
110 FOR ps=1 TO (2-sp)*150 : NEXT ps
120 ox=x : oy=y : x=x+xs : y=y+ys : UNTIL x>313 : UNTIL FALSE
130 PLOT a,b,i : PLOT a+1,b,i : PLOT a,b+1,i : PLOT a+1,b+1,i : RETURN
140 PEN 7 : WINDOPEN 1,0,0,40,25,6 : PEN 15 : CURS OFF : TITLE " Bouncy Bouncy!
" : LOCATE 0,4 : CENTRE "You took"+STR$(TIMER/50)+" seconds"
150 REPEAT : PEN 10 : LOCATE 10,13 : PRINT "D/ Difficulty :";diff+1; : LOCATE
10,15 : PRINT "S/ Speed :";sp+1
160 i$=UPPER$(INKEY$) : IF i$="D" THEN diff=diff+1 : diff=diff MOD 3
170 IF i$="S" THEN sp=sp+1 : sp=sp MOD 3
180 UNTIL i$=" " OR FIRE OR MOUSE KEY : CLS : TIMER=0 : RETURN
==============================================================================