Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_50.ADF » U/CREATE

U/CREATE

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_50.ADF
Filename: U/CREATE
Read OK:
File size: 02A5 bytes
Load address: FFFF1D00
Exec address: FFFF8023
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM CREATE DATA FILE   
   20MODE6
   30DIM N$(4),NC(4),FS(4),F$(4):LE=0:NC(4)=10
   40E$=STRING$(80,"E"):S$=E$
   80NN=0:TC=0:CLS:INPUT''"FILE NAME? "N$    
   90N$=LEFT$(N$,7)
  100INPUT TAB(0,4)"NO. OF FIELDS? (1-4)"NA$  
  110N=VAL(NA$):IF N<1 OR N>4 THEN 80
  120FOR J=0 TO N-1
  130PRINTTAB(0,6+4*J)"NAME OF FIELD ";J+1;:INPUT "? "N$(J)     
  140INPUTTAB(0,8+4*J)"NO OF CHARACTERS? (MAX 80) "NC$ 
  150NC(J)=VAL(NC$):IF NC(J)<1 OR NC(J)>80 THEN 140
  160TC=TC+NC(J):NEXT
  170NR=INT(7000/TC)
  180PRINT"YOU CAN HAVE UP TO ";NR;" RECORDS."
  190TIME=0:REPEAT UNTIL TIME>300 
  210DIM D$(NR,N-1)
  220FOR J=1 TO NR:FOR K=0 TO N-1:D$(J,K)=STRING$(NC(K),"D"):NEXT:NEXT
  230X=OPENOUT N$
  240PRINT#X,N,NR,NN
  250FOR J=0 TO N-1
  260PRINT#X,N$(J),NC(J)
  270NEXT
  280FOR J=1 TO NR:FOR K=0 TO N-1:PRINT#X,D$(J,K):NEXT:NEXT
  290CLOSE#X
  330CLS:PRINT''"DATA FILE CREATED":END

� CREATE DATA FILE   
�6
+� N$(4),NC(4),FS(4),F$(4):LE=0:NC(4)=10
(E$=�80,"E"):S$=E$
P&NN=0:TC=0:�:�''"FILE NAME? "N$    
Z
N$=�N$,7)
d&� �0,4)"NO. OF FIELDS? (1-4)"NA$  
nN=�(NA$):� N<1 � N>4 � �DP@
x� J=0 � N-1
�4�0,6+4*J)"NAME OF FIELD ";J+1;:� "? "N$(J)     
�/�0,8+4*J)"NO OF CHARACTERS? (MAX 80) "NC$ 
�,NC(J)=�(NC$):� NC(J)<1 � NC(J)>80 � �tL@
�TC=TC+NC(J):�
�NR=�(7000/TC)
�)�"YOU CAN HAVE UP TO ";NR;" RECORDS."
��=0:� � �>300 
�� D$(NR,N-1)
�2� J=1 � NR:� K=0 � N-1:D$(J,K)=�NC(K),"D"):�:�
�
X=� N$
��#X,N,NR,NN
�� J=0 � N-1
�#X,N$(J),NC(J)
�
*� J=1 � NR:� K=0 � N-1:�#X,D$(J,K):�:�
"�#X
J�:�''"DATA FILE CREATED":�
�
00000000  0d 00 0a 19 f4 20 43 52  45 41 54 45 20 44 41 54  |..... CREATE DAT|
00000010  41 20 46 49 4c 45 20 20  20 0d 00 14 06 eb 36 0d  |A FILE   .....6.|
00000020  00 1e 2b de 20 4e 24 28  34 29 2c 4e 43 28 34 29  |..+. N$(4),NC(4)|
00000030  2c 46 53 28 34 29 2c 46  24 28 34 29 3a 4c 45 3d  |,FS(4),F$(4):LE=|
00000040  30 3a 4e 43 28 34 29 3d  31 30 0d 00 28 15 45 24  |0:NC(4)=10..(.E$|
00000050  3d c4 38 30 2c 22 45 22  29 3a 53 24 3d 45 24 0d  |=.80,"E"):S$=E$.|
00000060  00 50 26 4e 4e 3d 30 3a  54 43 3d 30 3a db 3a e8  |.P&NN=0:TC=0:.:.|
00000070  27 27 22 46 49 4c 45 20  4e 41 4d 45 3f 20 22 4e  |''"FILE NAME? "N|
00000080  24 20 20 20 20 0d 00 5a  0d 4e 24 3d c0 4e 24 2c  |$    ..Z.N$=.N$,|
00000090  37 29 0d 00 64 26 e8 20  8a 30 2c 34 29 22 4e 4f  |7)..d&. .0,4)"NO|
000000a0  2e 20 4f 46 20 46 49 45  4c 44 53 3f 20 28 31 2d  |. OF FIELDS? (1-|
000000b0  34 29 22 4e 41 24 20 20  0d 00 6e 1f 4e 3d bb 28  |4)"NA$  ..n.N=.(|
000000c0  4e 41 24 29 3a e7 20 4e  3c 31 20 84 20 4e 3e 34  |NA$):. N<1 . N>4|
000000d0  20 8c 20 8d 44 50 40 0d  00 78 0f e3 20 4a 3d 30  | . .DP@..x.. J=0|
000000e0  20 b8 20 4e 2d 31 0d 00  82 34 f1 8a 30 2c 36 2b  | . N-1...4..0,6+|
000000f0  34 2a 4a 29 22 4e 41 4d  45 20 4f 46 20 46 49 45  |4*J)"NAME OF FIE|
00000100  4c 44 20 22 3b 4a 2b 31  3b 3a e8 20 22 3f 20 22  |LD ";J+1;:. "? "|
00000110  4e 24 28 4a 29 20 20 20  20 20 0d 00 8c 2f e8 8a  |N$(J)     .../..|
00000120  30 2c 38 2b 34 2a 4a 29  22 4e 4f 20 4f 46 20 43  |0,8+4*J)"NO OF C|
00000130  48 41 52 41 43 54 45 52  53 3f 20 28 4d 41 58 20  |HARACTERS? (MAX |
00000140  38 30 29 20 22 4e 43 24  20 0d 00 96 2c 4e 43 28  |80) "NC$ ...,NC(|
00000150  4a 29 3d bb 28 4e 43 24  29 3a e7 20 4e 43 28 4a  |J)=.(NC$):. NC(J|
00000160  29 3c 31 20 84 20 4e 43  28 4a 29 3e 38 30 20 8c  |)<1 . NC(J)>80 .|
00000170  20 8d 74 4c 40 0d 00 a0  11 54 43 3d 54 43 2b 4e  | .tL@....TC=TC+N|
00000180  43 28 4a 29 3a ed 0d 00  aa 11 4e 52 3d a8 28 37  |C(J):.....NR=.(7|
00000190  30 30 30 2f 54 43 29 0d  00 b4 29 f1 22 59 4f 55  |000/TC)...)."YOU|
000001a0  20 43 41 4e 20 48 41 56  45 20 55 50 20 54 4f 20  | CAN HAVE UP TO |
000001b0  22 3b 4e 52 3b 22 20 52  45 43 4f 52 44 53 2e 22  |";NR;" RECORDS."|
000001c0  0d 00 be 12 d1 3d 30 3a  f5 20 fd 20 91 3e 33 30  |.....=0:. . .>30|
000001d0  30 20 0d 00 d2 10 de 20  44 24 28 4e 52 2c 4e 2d  |0 ..... D$(NR,N-|
000001e0  31 29 0d 00 dc 32 e3 20  4a 3d 31 20 b8 20 4e 52  |1)...2. J=1 . NR|
000001f0  3a e3 20 4b 3d 30 20 b8  20 4e 2d 31 3a 44 24 28  |:. K=0 . N-1:D$(|
00000200  4a 2c 4b 29 3d c4 4e 43  28 4b 29 2c 22 44 22 29  |J,K)=.NC(K),"D")|
00000210  3a ed 3a ed 0d 00 e6 0a  58 3d ae 20 4e 24 0d 00  |:.:.....X=. N$..|
00000220  f0 0f f1 23 58 2c 4e 2c  4e 52 2c 4e 4e 0d 00 fa  |...#X,N,NR,NN...|
00000230  0f e3 20 4a 3d 30 20 b8  20 4e 2d 31 0d 01 04 13  |.. J=0 . N-1....|
00000240  f1 23 58 2c 4e 24 28 4a  29 2c 4e 43 28 4a 29 0d  |.#X,N$(J),NC(J).|
00000250  01 0e 05 ed 0d 01 18 2a  e3 20 4a 3d 31 20 b8 20  |.......*. J=1 . |
00000260  4e 52 3a e3 20 4b 3d 30  20 b8 20 4e 2d 31 3a f1  |NR:. K=0 . N-1:.|
00000270  23 58 2c 44 24 28 4a 2c  4b 29 3a ed 3a ed 0d 01  |#X,D$(J,K):.:...|
00000280  22 07 d9 23 58 0d 01 4a  1e db 3a f1 27 27 22 44  |"..#X..J..:.''"D|
00000290  41 54 41 20 46 49 4c 45  20 43 52 45 41 54 45 44  |ATA FILE CREATED|
000002a0  22 3a e0 0d ff                                    |":...|
000002a5
U/CREATE.m0
U/CREATE.m1
U/CREATE.m2
U/CREATE.m4
U/CREATE.m5