PSN-L Email List Message
Subject: Re: Basic Programming Help desired?
From: "Geoff" gmvoeth@...........
Date: Mon, 5 May 2008 17:44:00 -0700
Canie, And Others of PSN Many thanks for your input;
Here is what I have found and will use this routine
within my main recording program.
If I run this on my desktop which is a pc3200 ram
and 3GHz pentium4 Prescott device CPU and ATA100
Hard drives I get a time of 0.164 seconds a wonderful
time. But if i run this on the laptop I use to
record seismic events I get a time 17 times slower
or 2.856 seconds ( Toshiba Satellite 205CDS Laptop )
It appears I shall loose about 4 to 5 seconds
or record time between file saves with all the delays.
The drive on the laptop is normally off and must rev
up prior to saving the file but thats only a second or so
of time. Below is the Routine I will install at the
end of my program you all are free to have and
to hold it until death you part. It will love honor
and obey you, I hope.
*******************************************
' FILENAME TEST.BAS
' POWERBASIC For DOS 3.5 SOURCE CODE
$LIB COM ON
$LIB FULLFLOAT ON
$LIB VGA ON
$ERROR BOUNDS ON
$ERROR NUMERIC ON
$ERROR OVERFLOW ON
$ERROR STACK ON
$CPU 80386
$COM 1024
$STRING 32
$STACK 2048
$SOUND 256
$DYNAMIC
$COMPILE EXE "TEST.EXE"
$FLOAT NPX
$OPTIMIZE SPEED
$EVENT
$OPTION CNTLBREAK ON
DIM VIRTUAL DATA_1?(0:32780)
FOR a = 0 to 32780 : DATA_1?(a) = ( 65 + a MOD 58 ) : NEXT a
FILE1$ = "c:\data\test.dat"
START1 = TIMER
OPEN FILE1$ FOR BINARY AS #1
FOR ka = 0 to 7
tmpz1$ = ""
kc = ( ka * 4096 )
SEEK #1,kc
FOR kb = 0 to 4095
kd = ( kc + kb )
tmpz1$ = tmpz1$ + chr$(DATA_1?(kd))
NEXT kb
PUT$ #1,tmpz1$
NEXT ka
tmpz1$ = ""
SEEK #1,32768
FOR ka = 32768 to 32769
tmpz1$ = tmpz1$ + chr$(DATA_1?(ka))
NEXT ka
PUT$ #1,tmpz1$
CLOSE #1
tmpz1$ = ""
STOP1 = TIMER
IF START1 > STOP1 THEN START1 = START1 + 86400
PRINT "FILE CREATION RUNTIME :"; ROUND(( STOP1 - START1 ) , 3 )
SLEEP 10
END
****************************************************8
I will bother you no more with this unless someone
has more to say.
Best regards;
geoff
__________________________________________________________
Public Seismic Network Mailing List (PSN-L)
[ Top ]
[ Back ]
[ Home Page ]