b : MBASIC VERSION TO CREATE A .DAT FILE FOR USE WITH dGRAPH Qb: FOR INTERACTIVE USE WITH dGRAPH, THE USE OF A SUBMIT FILE ISfb: SUGGESTED. b(: ********* SUBMIT FILE *********b2: MBASIC DGBAS.BAS ; LOAD MBASIC AND EXECUTE DGBAS.BAS c<: ; HAVING ESTABLISHED A .DGF FILE BYFcF: ; A COMMON NAME WITH ALL NECESSARYcP: ; OPTIONS SET, INVOKE DGRAPH FOR THEcZ: ; PROCESSING AND PRINTING OF THE DATAcd: ; IN GRAPH FORM.dn: DGRAPH X CHART,dx: ******************************6d :Cd BASE 1d LABEL$(4),VALUE#(4,): :Dimension arrays for label & valued IOSPEC$(),IOTTY$(): :Dim file layout and screen control7e FILNAM$(),TITLES$() ::Dim filname and graph titles arrays?e:Ge:e : :Initialize arrays.e ,: :Get control flow from userf H: :Put up screen.@f &: :Get user input.}f .: :Write to file.DATf : :Clear the screen.g: :End of program. (possibly chain.)g:g: g":Pg,: Get Control flow information from user.Xg6:bg@ OKgJ : :Clear screen.gT LIN  : COL  : 0: :Assign coords. and position cursor.!h^ ;"Enter Number of Values ( 1-4 ) ==> ",NBRVALKhh NBRVAL  NBRVAL  Tohr LIN  : COL  : 0h| ;"Enter Titles or use Defaults ( 1-Titles, 0-Default ) ==> ",TITLESh TITLES  TITLES  r6i LIN  : COL  : 0: :Assign coords. and position cursor.pi ;"Chain to dGRAPH ( 1-Yes, 0-No ) ==> ",DGRAPHi DGRAPH  DGRAPH  i LIN : COL  : 0: :Assign coords. and position cursor.8j ;"Enter Name of .DAT file to save ( 8 char. max ) ==> ";FILNAM$()j LIN : COL  : 0: :Assign coords. and position cursor.j ;"Do You Wish To Correct ( 1-Yes, 0-No ) ==> ";OKjj TITLES X : 4kFILNAM$() FILNAM$() ".DAT" ::Concat. file extension.pk : :Clear the screen.vk~k:k:k:k&: Get user inputk0:k:LIN : COL : 0: :Assign coords. and position cursor. lDINPUSR lNLINNBR _lX ( INPUSR MAXINPT ): :Set loop for max. labels.lb ( INPUSR );: :Display current record number.ll ;"> ";LABEL$(INPUSR): :Get a label.mv LABEL$( INPUSR ) ""  : :Exit condition.&m 4rm VALNBR : :Init. while loop for values.m );: :Position for first input.m ( VALNBR NBRVAL ) n LIN LINNBR : COL VALNBR $n 0:cn ;"",VALUE#( INPUSR,VALNBR ): :Get value.n LIN LINNBR : COL VALNBR n 0:n IOSPEC$();VALUE#( INPUSR,VALNBR );o VALNBR VALNBR o :o INPUSR INPUSR |o LINNBR  LINNBR LINNBR : : H:LINNBRo o o o*:o4:o>:oH: Put up screen.oR:o\ of " Labels ";opVALNBR pz ( VALNBR NBRVAL )9p ) TITLES$(VALNBR);Jp );hp VALNBR VALNBR np}pVALNBR pp " ------ ";p ( VALNBR NBRVAL )p "--------";p );q VALNBR VALNBR q"qLIN : COL : 0(q0q:8q:@q$:qq.: Write data inputted by user to the file.yq8:qB:qL qVLIN  :COL : 0q` "Saving File "FILNAM$();qj "O",#,FILNAM$()qt ASSIGN  MAXINPT%r~ #, IOSPEC$();LABEL$( ASSIGN );@r VALS  MAXVALor #, IOSPEC$();VALUE#(ASSIGN,VALS);r #,();r VALSr ASSIGNr : :WRITE OTHER INFO TO FILEr#+s : :Clear the screen.1s9s:As:Is:s: Write nbr entries, type of label info. and nbr. of values to .DAT file.s :s I Bs#,(); ::Position via nulls to correctCt(: Location in .DAT file.Kt2 It<#,(INPUSR ); ::Put to file nbr. of typed entries.tF#,(); ::Put to file type code for other.3uP#,(NBRVAL); ::Put to file number of values chosen.AuZ I ud#,(); ::Skip to next file position.un Iux I u #, IOSPEC$();TITLES$(I); ::Write out the titles to the .DATu #,();u Iv v:v:=v: Array Initialization Procedure.vIOSPEC$()"\ \" ::File layout for label$()vIOSPEC$()"##########.##" ::File layout for value#(,)wIOSPEC$()"\ \" ::For writing titles to file.fwIOSPEC$()"########.##": :Screen Image for re-display of valswIOSPEC$()"\\": :Null Byte image for file .DATw:xIOTTY$()() (*): :Clear screen sequence for TelevideoZx :Model 925. (substitute accordingly)xIOTTY$()() (=): :Position cursor sequence forx": Televideo model 925 (subst. accord)y, I  &y6 NULFILL$ NULFILL$ ().y@ IyJMAXVAL : :Maximum Number of points per labelyTMAXINPT 4 ::Maximum number of labelsz^NBRVAL : :User input for Number of Values.hzhVALNBR : :Loop variable to track values inputzrASSIGN : :Loop variable for write to file.{|VALS : :Loop variable for values write.U{INPUSR : :Loop variable for tracking input.{LINNBR : :Loop variable for screen display.{OFFSET  : :Televideo Model 925 offset for crtB|OK : :Boolean test for while loop.|LIN : :Used for positioning cursor.|COL : :Used for positioning cursor.+}DGRAPH : :Boolean test for chain to dGRAPH.s}LABLEN  :: MAX length of label inputy}}:}:}: Clear screen sequence ( substitute accordingly ).}:} IOTTY$(); }}:}&:1~0: Position cursor sequence ( substitute accordingly ).9~::r~D IOTTY$(); ( LIN OFFSET ); ( COL OFFSET );x~N~X: Get graph titles from user~b:~l:~v ~LIN  : COL : 0~ I NBRVAL  MSG$" Enter Title "(I)5 MSG$MSG$ " ( 8 char. max. )==> "V MSG$;: ;" ";TITLES$(I)vTITLES$(I)(TITLES$(I),)~  I ::: Set default graph titlesTITLES$()"VALUE 1" TITLES$()"VALUE 2"TITLES$()"VALUE 3"+ TITLES$()"VALUE 4"1*c4: Determine how many nulls to put to label$> HOWMUCH (LABEL$(INPUSR))H BALANCE HOWMUCH LABLENɀR BALANCE  p : \ LABEL$(INPUSR)LABEL$(INPUSR) ()f p: label$ > 8 8