Amgraph is a fully menu driven business graphics program for the Amstrad CPC464/664. Up to four sets of data with up to twelve items in each set can be entered and then displayed in any combination by bar, line, stacked bar and 3D bar graphs. A pie chart is also included and can be used to represent a set of data or a cross section of the data thereby comparing a particular item in each set. In each of these, percentages are given and a slice of the pie can be highlighted by pulling it away from the main pie. All input into the program is handled by routines which tightly contol the input so nonsense entries are not accepted and the screen is kept neatly formatted. So that the user does not lose track of what is being entered, the input is done on a green background and screen prompts are always given. Data, once entered, can be easily viewed and amended and there is also a save and load data option. The general format option allows labels for the graphs to be entered and a year option is included which labels the data by months from the starting month number. That is, entering 5 would label May to April. All scaling is done by the program but you can set the base line for the graphs to make the differences between the data more pronounced or to show variations from a particular number. The program includes approx. 700 bytes of machine code which draw the various bars and provide a mode 1 Epson compatible shaded screen dump. After entering the program, readers are advised to save it before running as, although the machine code data includes checksums, a crash will inevitably result in the loss of the program. Readers using the CPC664 should change line 40 of the program as shown as this will result in a more colourful pie chart and better dotted line drawing. When the program is running correctly and the inevitable typing errors have been traced, the wait for the machine code to be poked in can be avoided by breaking out of the program, changing line 60 to MEMORY 34999: LOAD"GRAPHMC.BIN", deleting lines 4000-4160 and saving the programs with: SAVE"AMGRAPH" SAVE"GRAPHMC",B,35059,691 To re-enter the program without losing the data type GOTO 190. The main variables used by the program are: - n number of data sets entered
- a$() array holding names of data sets
- d() array holding data
- e() array holding the length of the data sets
- month, month$ starting month and year string
- msc base line for graphs
- t$,s$,x$,y$ graph labels
- sc,s,s5 scale factor, power of 10 within which data lies and whether scaled data is <2.5,5 or 10 used to limit size of numbers on graph axis menu option heading and number
- k used to pick up variables for input routine
- d$,dl stringofinput and length
ACU #8509 |