home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1989
/
06
/
freq.bas
< prev
next >
Wrap
BASIC Source File
|
1988-12-08
|
2KB
|
35 lines
100 REM - BASIC PROGRAM TO CREATE FREQ.COM
110 CLS:PRINT "Creating FREQ.COM ": OPEN "FREQ.COM " AS #1 LEN = 1
120 FIELD #1, 1 AS A$: CHECKSUM#=0
130 FOR I = 1 TO 16
140 LINESUM#=0: LOCATE 2,3: PRINT "Countdown: " 16 - I ;
150 FOR J = 1 TO 16: READ BYTE$: BYTE = VAL("&H" + BYTE$)
160 CHECKSUM# = CHECKSUM# + BYTE: LINESUM# = LINESUM# + BYTE
170 IF (BYTE < 256) THEN LSET A$=CHR$(BYTE): PUT #1
180 NEXT J
190 READ LINETOT$: LINECHECK# = VAL("&H"+LINETOT$)
200 IF LINECHECK# = LINESUM# THEN GOTO 220
210 LOCATE 4,2: PRINT "Error in line #" ; 260 + 10 * I: GOTO 260
220 NEXT I
230 CLOSE: READ FILETOT$ : FILECHECK# = VAL(FILETOT$)
240 IF CHECKSUM# <> FILECHECK# THEN GOTO 260
250 PRINT: PRINT "FREQ.COM created successfully": SYSTEM
260 PRINT: PRINT "FREQ.COM is not valid!": END
270 DATA EB, 7B, 90, 46, 52, 45, 51, 20, 31, 2E, 30, 20, 31, 39, 38, 38, 4CD
280 DATA 20, 28, 63, 29, 20, 5A, 69, 66, 66, 20, 43, 6F, 6D, 6D, 75, 6E, 512
290 DATA 69, 63, 61, 74, 69, 6F, 6E, 73, 20, 43, 6F, 2E, D, A, 50, 43, 504
300 DATA 20, 4D, 61, 67, 61, 7A, 69, 6E, 65, 20, FE, 20, 52, 6F, 62, 65, 612
310 DATA 72, 74, 20, 4C, 2E, 20, 48, 75, 6D, 6D, 65, 6C, D, A, 24, 1A, 45D
320 DATA 55, 73, 61, 67, 65, 3A, 20, 46, 52, 45, 51, 20, 74, 65, 78, 74, 562
330 DATA D, A, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3B
340 DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, BA, 3, 1, BE
350 DATA B4, 9, CD, 21, 32, ED, 8A, E, 80, 0, A, C9, 75, C, BA, 50, 640
360 DATA 1, B4, 9, CD, 21, B8, 1, 4C, CD, 21, BE, 81, 0, 32, FF, AC, 6BB
370 DATA C, 20, 2C, 61, 3C, 19, 77, 6, 8A, D8, FE, 87, 63, 1, E2, EF, 6A7
380 DATA BE, 63, 1, B9, 1A, 0, 32, DB, B4, 2, B2, D, CD, 21, B4, 2, 61B
390 DATA B2, A, CD, 21, 8A, D3, FE, C3, 80, C2, 41, B4, 2, CD, 21, B4, 8A3
400 DATA 2, B2, 20, CD, 21, AC, E8, 7, 0, E2, DD, B8, 0, 4C, CD, 21, 70E
410 DATA 32, E4, D4, A, D, 30, 30, 50, 8A, D4, B4, 2, CD, 21, 58, 8A, 695
420 DATA D0, B4, 2, CD, 21, C3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 337
430 DATA 21223