creator.b 1.5 KB

1234567891011121314151617181920212223242526272829
  1. 10 rem The Creator
  2. 20 rem 80 micro jan 1983
  3. 80 print"This is the Creator. It will allow you to generate"
  4. 90 print"a progam which will create and access a data file."
  5. 100 print"For later use. Please type the proposed program name."
  6. 110 print"You are limited to 8 alphabetic characters."
  7. 120 print" program name=";:lineinputpn$
  8. 130 fori=1tolen(pn$):a$=mid$(pn$,i,1):ifa$>"z"ora$<"A"thenprint"alpha characters only!":goto 120
  9. 140 nexti
  10. 150 iflen(pn$)>8thenprint"too long":goto 120
  11. 160 print"when the proposed program is run, which drive contains the"
  12. 170 print"data file(0-3)?";
  13. 180 an$=inkey$:ifan$="" then 180 elseif(an$>"3"oran$<"0")then170
  14. 190 printan$
  15. 200 print"which drive do you want the program written on? (0-3)";
  16. 210 dn$=inkey$:ifdn$="" then 210 elseif(dn$>"3"ordn$<"0")then200
  17. 240 print#1," 1 rem*******Program name:";pn$;"*******"
  18. 250 print#1," 2 rem*******Data File name:";df$;"*****"
  19. 260 print#1," 3 rem*******Data File is on drive";ans$;"******"
  20. 270 input"What is the maximum data file size, in # of records";ms
  21. 280 input"What is the record length(1-255)";rr:ifrr<0orrr>255then280 else r%=256/rr
  22. 290 ifms*256/r%>85760thenprint"not enough room on a single disk for this.":goto 270
  23. 300 print#1,"4 rem ******maximum file size is";ms;"records******"
  24. 310 print#1,"5 rem****** record length is";rr;"packed";r%;"per sector"
  25. 320 q$=chr$(34)
  26. 330 print"please type in a title for your generated program.":lineinputti$
  27. 340 ln=ln+10:print#1,ln;"rem change disks reinitialize here"
  28. 350 ln=ln+10