home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TCE Demo 2
/
TCE_DEMO_CD2.iso
/
demo_cd_.2
/
mags
/
stosser
/
stoser05.arj
/
stoser05.msa
/
A
/
5.PNE
< prev
next >
Wrap
Text File
|
1987-04-22
|
2KB
|
90 lines
STOS BITS 'N PIECES
by
Martin Cubitt July 1993
The AUTOBACK command.
Do you turn AUTOBACK off in your pro-
grams which do not use sprites? Stephen
Hill wrote an article in the STOS News-
letter issues 5 and 6 which showed the
inefficiency of the command when it is
on.
As you will probably be aware AUTOBACK,
when on, copies the graphics drawn on
the physical screen to the background
one.
I wrote a test program:
10 mode 0
20 key off
30 hide
40 curs off
50 flash off
60 wait vbl
70 timer=0
80 for LOOP=0 to 100
90 for C=0 to 15
100 ink C
110 draw 0,0 to 319,199
120 rbar 0,0 to 319,199
130 ink 15-C
140 draw 0,0 to 45,199
150 ink C
160 paint 0,0
170 next C
180 next LOOP
190 T=timer
200 default
210 print T
The result was 17,382. So then I added
the line
55 auto copy off
(surely, you mean autoback? - Ed.)
and rerun it.
The result was 12,883. So it was quite
a lot faster.
To simulate the autoback function I
then added the line
165 screen copy physic to back
(yes I could have used fastcopy!)
The result this time was 14,718. So
even if you do plan on using sprites
(just do not move them during the screen
copy command) you can replace the auto-
back function with a screen copy. Speedy
processing!
However, the example given was a bit
excessive as far as graphical functions
go. If you are only drawing, say, ten
lines then the autoback command is
actually faster.
So depending on the extent of the
graphics you are producing you may or
may not choose to use autoback!
Take care as CLS and MODE automatically
set autoback on.
CUBITTM/STOS0006/190793