September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,20 +1,24 @@
|
|||
100 I$ = "INPUT.TXT"
|
||||
110 O$ = "OUTPUT.TXT"
|
||||
120 D$ = CHR$(4)
|
||||
130 M$ = CHR$(13)
|
||||
120 M$ = CHR$(13)
|
||||
130 D$ = CHR$(4)
|
||||
140 PRINT D$"VERIFY"I$
|
||||
150 PRINT D$"OPEN"O$M$D$"CLOSE"O$M$D$"DELETE"O$
|
||||
160 PRINT D$"OPEN"O$M$D$"OPEN"I$;
|
||||
150 PRINT D$"OPEN"O$
|
||||
160 PRINT D$"DELETE"O$
|
||||
170 PRINT D$"OPEN"O$
|
||||
180 PRINT D$"OPEN"I$
|
||||
|
||||
170 PRINT M$D$"READ"I$
|
||||
180 ONERR GOTO 250
|
||||
190 GET C$
|
||||
200 POKE 216,0
|
||||
210 PRINT M$D$"WRITE"O$",B"B
|
||||
220 IF C$ <> M$ THEN PRINT C$;
|
||||
230 B = B + 1
|
||||
240 GOTO 170
|
||||
190 PRINT D$"READ"I$
|
||||
200 ONERR GOTO 280
|
||||
210 GET C$
|
||||
220 POKE 216,0
|
||||
230 PRINT M$D$"WRITE"O$",B"B
|
||||
240 B = B + 1
|
||||
250 P = 2 - (C$ <> M$)
|
||||
260 PRINT MID$(C$, P)
|
||||
270 GOTO 190
|
||||
|
||||
250 POKE 216,0
|
||||
260 IF PEEK(222) <> 5 THEN RESUME
|
||||
270 PRINT M$D$"CLOSE"I$M$D$"CLOSE"O$
|
||||
280 POKE 216,0
|
||||
290 EOF = PEEK(222) = 5
|
||||
300 IF NOT EOF THEN RESUME
|
||||
310 PRINT M$D$"CLOSE"
|
||||
|
|
|
|||
13
Task/File-input-output/BASIC/file-input-output-3.basic
Normal file
13
Task/File-input-output/BASIC/file-input-output-3.basic
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
10 print chr$(14) : rem switch to upper+lower case set
|
||||
20 print "read seq file input.txt and write to seq file output.txt"
|
||||
30 open 4,8,4,"input.txt,seq,read"
|
||||
40 open 8,8,8,"@:output.txt,seq,write" : rem '@'== new file
|
||||
50 for i=0 to 1 : rem while i==0
|
||||
60 input#4,a$
|
||||
70 i=64 and st : rem check bit 6=='end of file'
|
||||
80 print a$
|
||||
90 print#8,a$
|
||||
100 next : rem end while
|
||||
110 close 4
|
||||
120 close 8
|
||||
130 end
|
||||
Loading…
Add table
Add a link
Reference in a new issue