IMD 1.18: 22/01/1996 5:13:11 micro cornucopia kaypro user group disk 5 mx-80 graphics     CRC COMGRAF COM GRAF COM !"#$%&GRAF COMp'()*+,-./01234GRAFPLOTC 56GRAFLINEC 78GRAFINVTC 9GRAFCIRCC :;GRAFFILEC <=DEMO COM>?@ABCDEFGHIJKLMDEMO COMNOPQRSTUVWXYZ[\]DEMO COMA^_`abcdefGRAF DOCghijklmnopqrstuvGRAF DOC!wxyz{DEMO C +|}~GRAF C ?#CRC.COM 5.0 6/18/82CRCKFILE???!9" 1 M @ CRC Ver 5.0 CTL-S pauses, CTL-C aborts :] O@ ++Searching for CRCKLIST file++@ Now searching for "CRCKFILE" file++ !  1 .) F!  ͡]͸! ͔0CRCKLIST???CRCKFILE???!9" M à*,*.}|ډ!".*,{z{** u*.".G*.",!".***,}>*.#".ɯ22)! ",". <  NO FILECRC FILE$!   >. @ Checking wiGRAFUTILC TITLE GRF;SMALL GRFMEDIUM GRFHUGH GRFZBAR1 GRF BAR2 GRF CIRCLE GRF;LINE GRFSTAR GRF?CRCKLISTCRCD COM5-DISK DOCth file - ! ~T #M M 2 2 2 2 ! >2 3o: : @ ***No CRC Files found***$> ʉ ʉw#: <2 P6: .6@ Can not parse string ! ~ʽT #ñM ! > 6 #6^#6! ~T #! 4M #x] #e w~ T #>2 @ - s M@ File not found ! 4 >2 o: G: „: G: „@ *Match* 2 ! 4@ <-- is, was --> : ) > T : ) M 2 ! 4<2 ~# @ Not a space between CRC values<2 G-CATALOG???  @ ++ Now searching for "-CATALOG" file++ !  ) .) ! ”>.”#””͡”››tK››͸›* =: =͔="  ʳ ª~#.  ¿~  #~  .+~#0:0~#!A.O.Gy~#0M0 K MMɷ:m2 FSÄCRCKLIST$$$››tK›, › **}|!"*{z*~]*"Ü  DISK FULL: CRCFILE$!"*~9͜&!X͜&!͜&!͜&p!P!e*!M)!͜&pÃ!"![^#V" """RCommand: RESTART? Restart command ignored. QUIT? Exit command ignored. GRAF recognizes the following commands: BORDER draws a border around the graph KILL removes all border points LINE allows the user to draw straight lines ERASE is used to erase lines CIRCLE is used to plot circles NO CIRCLE is used to erase circles PLOT allows the user to plot indivi match - : ̓ : J M @ Quantity of lines failed parse test - : ̓ : ~ M @ Quantity of file(s) not found - : ̓ * d͔  ͔ 0T  Җ Wyʩ 0T 0ztiil9s#r!9^#V!$# !d ͜&!"R!9^#V!9^#V! 9^#V!9^#V!9 ------- Line Plotting Function ------- ------- Line Erasing Function ------- Input the coordinates of the first endpoint. Horizontal coord: Vertical coords: Input the coordinates of the second endpoint. Horizontal coord: Vertical coord (1000 to ABORT command): Function aborted. ͝$*R|ʐ ! ͜&Ø ! ͜&! ͜& ------- Point Plotting Function ------- ------- Point Erasing Function ------- Enter*#"ɯ2i2}! "!"]]2 s : ~# ++FILE NOT FOUND++$: F*}’">͇†]<  CANNOT CLOSE CRCFILE$CRCKLISTCRCSK FULL: CRCFILE$  w# !]͐ DONE$!e S!]Q !eZ @ --> FILE: XXXXXXXX.XXX CRC = oS) \<‘@ ++OPEN FAILED++ !" !" * | ʹ) \!~2 #" Ý: ) > T : ) @ ++FILE READ Edual points UNPLOT removes individual points DUMP sends a copy of the graph to the printer INVERT allows color inversion: black <-> white SAVE saves a copy of an existing graph on disk GET retrieves a previously SAVEd graph TELL returns the current graph dimensions RESTART erases the current graph QUIT returns control to CP/M To execute a command, only the first letter needs to be typed (in upper or lower case). ? ͝$!͜&!Mp(XG"R*R@%!P!e*!@!͜&ͺ#7͝$!͜&!I͜&ͺp Epson MX-80 Bit-Plot Graphics Utility. Don Brittain 3 January 1983 ͝$!͜&!Mp(:Mo&ͻIE!"Rp!"Rp!"R`p!"R`p!"R.p!"R.p!"Rx p!"Rx p pͅ p!"Rp!"Rpͽp!͜&!Mp(:Mo&ͻIY$GO!͜&p!͜&!Mp(:Mo&ͻIY$|u:Ä!͜&p!͜&!͜&!'͜&!H͜&!v͜&!͜&!͜&!͜&! ͜&!/͜&!_͜&!͜&!͜&!͜&!͜&! the coordinate 1000 to QU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9s#rÃ1!F9^#V!l$.2!N9~#fo#s#r+^!F9s#r!:9!R9~#fos#rIJ2!F9^#V!d$d2!:9!R9~#fo##s#r++^#VlMJ2!F9^#V!e$”2!F9^#V!f$”2!F9^#V!g$ʺ2!9!R9~#fos#r͇M͇M2!:9!R9~#fo##s#r++^#V^MJ!F9^#VÙ4!9!!>9I"JE6!~#fo#s#r+!9^#V!9~#fo%j#!DM/#`i#DM+`i*R%g#!9^#V+!9^#V)`iR͌%#Rs#r)#"!9^#V,r ERROR: %s does not exist on the current drive. The graph in %s has the following dimensions: Horizontal size: %3d Vertical size: %3d ͝$!DM$`i#DM+!9^#V`i^ͻI`iMsz?$$!.`i#DM+Ms!G`i#DM+Ms!R`i#DM+Ms!F`i#DM+Ms!`iMs|g}o|/g}/o^#V#DM!99`i͜$|z2M9%:M%}R%}}$|$!}$|$!}|%}|?>`i~v-! ^!͌$--!͈-!9s#r! ^9I]J"J5!9!49s#r!-!69~#fo+s#rsÄ3!9! !>9I"J5!9!49s#r4!9! !>9I"JE6!9!49s#r4!9!!>9I"JE6!9!49s#r4!:9IM!49s#r͞H!89s#r4!F9^#V!e$ 4!4!!B9^#V!$%4!-4!B9^#V!9! 9͇M͇M͇M!9! 9!49s#r͞H!89s#r!!@9s#r4!:9IM!F9s#r!F9^#V!9!69s#rs4&o2d3u3x3s3e3f3cm44!9!49~#fo%!89s#r!89^#V!@9~#fo%4!@9^#V!89s#r!D9~o&zo&| %}|>o&|o&z2M9%:M%||D%/g}/o#zR%/W{/_R%DM!>2M))e%#}o|g}% :M=2M]%}:M=2M]%}DM!>))Ҝ% =”%}}/o|/g#}|$$|g}o{_%|]&|7g}o%{_%)%}}o|gN#F# N#F#z &{ &##^#VBK^#Vz3&#y-&###&#x(&#~#fo}|>?o&}|>o&{_%|g}o]&|g}o~# xr&!9M~#‰&!&|ɧ͝$!P"M! 9! 9^#V!&A0͝$!9^#V"M! 9! 9^#V!&A0͝$*M! 9^#Ve*͝ s#r*gQ|%/*gQ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^#V#N#F#nx>Hs# 3H!9^#V#~#foxdHiHdH# PH!sH!}!}!9^#V#~#foxʛH~ʛH# ÊH!9~#foʳH#êH}!9^#V#^#V#N#FPH!9^#V#^#V#N#FÊH!9^#V#~#foxʛH~I98`i!9s#r`i#DM~F9`i^! $49`i^! $C9!`i#DM+sF99!9^#VI#+I!|!9^#V#nZI#QIx8I +~ZI>I!9~ ʏI ʏI ʏIäI!9~AڤI[ҤI!}!9~aڤI{ڏI!!9~0ڤI:ҤIÏI!9~aI{I o&!9~AI[I o&!*eQJ!*cQw#w#w#w*cQ~#~#~#~"P*cQV+^+V+^*P"P*eQs#r#s#r*P*eQ*cQ"eQ"cQ*cQ>w#cJ*cQ~.M#rJ#M=ɯ<*cQ*eQ###JJåJJJƒJ+§J*cQ*eQ#J*cQ*eQ#J*cQ*eQ#J*cQ*e:^?AA:BDDQ#K*cQ*eQ#K*cQ~/w#(K*eQ~?G*cQ^#V#~#fo))MK#EKDM*cQs#r#q#p*eQ~?W*cQ###~K~w+vKrK7~w+ˆK„K~#™KO`J*cQP͖Ky2P*eQP͖K:P2PLP*cQw#K:P]J*cQP͖Ky2P*eQP͖KLP*cQw#L:P]J!Pw#L> 2P!P~w#,LOP!P#ALy\L!P4!P5&L!P5ʎL!P~w#iLOP!P#|Ly\LPLP!P#—L*eQP~#ªL*cQP~#ºL!Pw#L> 2P!P~w#LMP!P#LMPP:::::::::::::::iQ:iQ:oQ:oQ:oQ:oQ:oQ:oQ:uQ:uQRp=L!P5L*cQPw#M͇J.M!͇J#M!<͇J.M#M͇J.M.M#M͇J#M.M͇J#M#M.M*cQs#r#6#6*cQs#r#zfM6#6*cQ^#V0123456789abcdef           return(p); }  /********************************************************/ /* */ /* Point-Plotting routines for MX-80 Graphics */ /* */ /* Don Brittain 3 January 1983 */ /* */ /********************************************************/ #define HSIZE 320 #define VSIZE 328 #define NO 0 #define YES 1 extern int horsize, versize, flag; extern short grafbuf[HSIZE][VSIZE/8]; pixplot(h,v) /* Plots point (in the graphics RAM image) */ /* having coordinates (h, v). */ int h,v; { int w; if((v0; --n) p=p*x;    /********************************************************/ /* */ /* Line-Plotting Routines for MX-80 Graphics */ /* */ /* Don Brittain 3 January 1983 */ /* */ /********************************************************/ #define NO 0 #define YES 1 extern int horsize, versize, flag; extern int pixplot(), unpixplot(); lineplot(x,y,h,v) /* plots segment from (x,y) to (h,v) */ int x,y,h,v; { if((x==h)&&(y==v)) noline(x,y); else if(abs(y-v)h)||(y>v)) { printf("Argument error in INVERT: command aborted.\n\n"); command(); } else for(j=y; j<=v; j++) for(i=x; i<=h; i++) if(get(i,j)) unpixplot(i,j); else pixplot(i,j); } get(h,v) /* returns the value (0 or 1) of the pixel at (h,v) */ int h,v; { return(power(2,v%8)&grafbuf[h][(versize-1)/8-v/8]); }  pixplot(l,i); } else for(i=y; i<=v; i++) { k=h; k=(k-x)*(i-y); l=k/(v-y)+x; unpixplot(l,i); } }  register i; if(x<0) { printf("Argument error in SQRT.\n\n"); return(-1); } for(i=0; i=(x-i/2)) return(i); } (x0) return(x); else return(-x); } horline(x,y,h,v) /* plots line having abs(slope) <= 1 */ /* assumes x < h */ int x,y,h,v; { re /********************************************************/ /* */ /* Circle-Plotting Routine for MX-80 Graphics */ /* */ /* Don Brittain 3 January 1983 */ /* */ /********************************************************/ #define NO 0 #define YES 1 extern int flag; extern int pixplot(), unpixplot(); circle(x,y,r) /* plots circle with center (x,y) and */ /* radius = r */ int x,y,r; { register i; int end, sqt; long li, lr; lr=r; if(f /********************************************************/ /* */ /* Graph Inversion for MX-80 Bit-Plot Graphics */ /* */ /* Don Brittain 3 January 1983 */ /* */ /********************************************************/ #define HSIZE 320 #define VSIZE 328 extern int versize; extern int pixplot(), unpixplot(), power(); extern short grafbuf[HSIZE][VSIZE/8]; invert(x,h,y,v) /* Changes all pixels with coords (a,b) */ /* satisfying x < a < h and */ int x,h,y,v; gister i; long k; short l; if(flag) for(i=x; i<=h; i++) { k=v; k=(k-y)*(i-x); l=k/(h-x)+y; pixplot(i,l); } else for(i=x; i<=h; i++) { k=v; k=(k-y)*(i-x); l=k/(h-x)+y; unpixplot(i,l); } } vertline(x,y,h,v) /* plots line having abs(slope) >= 1 */ /* assumes y < v */ int x,y,h,v; { register i; long k; short l; if(flag) for(i=y; i<=v; i++) { k=h; k=(k-x)*(i-y); l=k/(v-y)+x; lag) { end=r-r/4; for(i=r/4-r; i<=end; i++) { li=i; sqt=sqrt(lr*lr-li*li); pixplot(x+i,y+sqt); pixplot(x+i,y-sqt); pixplot(x+sqt,y+i); pixplot(x-sqt,y+i); } } else { end=r-r/4; for(i=r/4-r; i<=end; i++) { li=i; sqt=sqrt(lr*lr-li*li); unpixplot(x+i,y+sqt); unpixplot(x+i,y-sqt); unpixplot(x+sqt,y+i); unpixplot(x-sqt,y+i); } } } sqrt(x) /* Cluge returning approximate square-root of integers */ long x; {    /********************************************************/ /* */ /* File-Handling for MX-80 Bit-Plot Graphics */ /* */ /* Don Brittain 3 January 1983 */ /* */ /********************************************************/ #define HSIZE 320 #define VSIZE 328 extern int horsize, versize; extern short grafbuf[HSIZE][VSIZE/8]; static char grafname[13]; #include "libc.h" savegraf(h,v,name) /* saves graph having dimensions h x v */ /* under the filename NAME.GRF */  !ͨ! ͌ !#ͨtitlePRELIMINARY VERSION 1.0 3 January 1983Don Brittain 4200 Spruce St. #208 Philadelphia, PA 19104 (215) 386-2684This program was written to illustrate the power of GRAF. All the examples were created with this preliminary version. Actually, GRAF is just an interactive 'shell' allowing (minimal) access to the modules grafutil.c, grafplot.c, grafline.c, graf- circ.c, grafinvt.c, and graffile.c. These modules were originally written to be included in C progr fclose(fp); } graffcb(name) /* changes "name" to NAME.GRF */ char *name; { register i; for(i=0; (grafname[i]=toupper(name[i]))!='\0'; i++); grafname[i++]='.'; grafname[i++]='G'; grafname[i++]='R'; grafname[i++]='F'; grafname[i]='\0'; } rcle (ellipse?) plotting command:circleand the ability to plot (or unplot) points and lines:lineIn order to use GRAF, simply type 'graf' after CP/M signs on, enter the dimensions of the graph when asked, then (following the 'command:' prompt) type HELP. A list of GRAF commands, together with a brief description of their actions, will be displayed on your console. Have fun!start!9^#VL ! !B!9s#r!9~# !B! s! s!9^#V"@!9^#V"O*O͑! int h,v; char *name; { FILE *fopen(), *fp; int vrt; register i,j; vrt=(versize+7)/8; graffcb(name); fp=fopen(grafname,"w"); putw(h,fp); putw(v,fp); /* NO ERROR CHECKING !!!!! */ for(j=0; j! ^#V!ͫ!!9! ^+ͫH! 9^#V! ^#V`is#r! ^#V! ^#V! s#r!`in&͍s! 9^#V`i~#fo#s#r+s!ct! 9N#F! ^#V!ͫi`i! s#r*|ʉ*!9s#r*^#V"ð! ^#V!9s#rz°!! s#rZ!`in&͍s!9^#V! s#rt*L6|!q!"J6"L6*L6DM!9^#V*L6"!r,wca!! s!! s#r!`is#r! s#r! s#r`it!9N#F`i~}!`i#DM+^ͫz!S!! t!9N#F`i~! 9^#V`i#DM+^ͫ!×!t!9N#F!PYcDM`i ͫ! 9^#V! Ͷͫ!! 9^#VͶt! 9^#VgDMͫP! 9^#Vg!9s#r!ͫT!!9^#V!ͯPY͍t! 9N#F! ^#V`i^#V6! ^!cʛ!!`in&cs`i~#>! ^#V! ^#V! ^T(!9s#r!!9~#!!9!49s#r$!9!!>9ʹ22ͩ!9!49s#r$!:9ʹ276!49s#rV1!89s#r<!F9^#V!eͫo!r!!B9^#V!ͫʉ!Ñ!B9^#V!9! 9?6?6?6!9! 9!49s#rV1!89s#r!!@9s#r<!:9ʹ276!F9s#r!F9^#V!9!69s#rs$oLdruxs7eYfYc!9!49~#foͿ!89s#r!89^#V!@9~#fo_!@9^#V!89s#r!D9~#ʚ!>9~#fo+s#r#!89~#foʚ!B9^#V`isi!!69s#r÷!69~#fo#s#r!49^#V~!69^#V!@9~#fo!49~#fo#s#r+^`isè!D9~#.t!!9s#r#!9~#fo#s#r+!9^#V! 9~#foH! !͟ t!ͨ!9^#V|g}o|/g}/o^#V#DM!99`is|z2A6:A6{})}}µ|!}|ʵ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 !!$ s! 9!! ^#V6͟232!$ ^$62p33ʹ2p32/!"ͭ2;/o///!!# s! 9ʹ2͟25 0!!! s#r!$ s!"ͭ2! 9ʹ276c!$ s! 9ʹ2͟2476!! s#r! 9ʹ2T!R0T"*D6!"D6*B6‹0*B6!4}0#4*F6+"F6}S0o&"*F6t!9!.9^#V !9!͟ ! 9F+N+V+^+~+ngx0w# 0!9^#V#N#F#nx0s# 0!9  4y5!q94!p954!p95F5!q9~w#!5Ou9!y9#45y55u9!y9#O5*y9~#b5*u9~#r5!q9w#€5> 2p9!q9~w#‘5Ҽ5q9!y9#¥5Ҽ5°5!p95‹5*q9w#5?35!?35!horsize int h,v or v>versize this does nothing. [grafplot.c] unpixplot(h,v) similar to pixplot, but this function unplots points. int h,v [grafplot.c] lineplot(x,y,h,v) plots a line segment from (x, y) to (h, v). int x,y,v,h No assumptions are made concerning the relationships of the variables ( <, ts are virtually guaranteed to be disastrous -- the plotting routines will be altering the program code! Unless you need to make hugh plots, or memory is at a premium, it is probably best to only alter 'horsize' and 'versize' in any particular application. This package supports the following functions: (The file name in brackets following the description indicates the file in which the function is defined. The user-interface functions in GRAF.C are not described here.) init(h,v) clears t doesn't exist on the current drive, an error message is displayed on the console. Otherwise, the dimensions of the retrieved graph are displayed. This command, if successful, alters 'horsize' and 'versize'. [graffile.c] Remarks: To utilize the graphics subroutines, it is only necessary to link them to the C program which requires them. (They must first be compiled, of course.) If your C compiler/assembler package does not support linking, then the files may be included directly in tperience; actually, from several bad experiences.) NOTE: If your C compiler supports declarations of external arrays without their size, then you can alter the external declarations external short grafbuf[HSIZE][VSIZE/8]; to read esternal short grafbuf[][]; and remove #define HSIZE 320 #define VSIZE 328 from all files except grafutil.c. Then changing graph dimensions is easy: simply modify HSIZE and VSIZE in grafutil.c. Although HSIZE and VSIZE govern how much RAM >, =). This function uses pixplot and unpixplot. (As usual, if flag=0 the line is unplotted. Otherwise, it is plotted.) [grafline.c] invert(x,h,y,v) inverts (white <-> black) all points with int x,h,y,v coordinates (a,b) satisfying x<=a<=h and y<=b<=v . Note the order of the variables! This function is especially useful for making bar graphs (and checker- boards!) [grafinvt.c] get(h,v) returns the value of the bit corresponding int h,v to the pixel with coordinhe graphics region from 0 to h horizontally, int h,v and 0 to v vertically. If flag=1 the region is set to all white, and if flag=0 the region is set all black. This function is usually used to initiallize a graph, and for this purpose it is called via init(horsize, versize). [grafutil.c] grafprnt(n) sends a copy of the graph (horsize x versize) to the int n MX-80. The image is produced using the low-resolution (480 dots/line) bit-plot graphics function in the GRAFTRAX packahe program (using #include) but this requires modification of the 'external' declarations and the #define statements. (They should be removed.) Of course, this lengthens the compile time of the application program considerably. To create the GRAF.COM file I used the following AZTEC C II command: ln graf.o -f graf where the file GRAF. (the filetype is 3 blanks) contains the list grafutil.o grafplot.o grafline.o grafinvt.o grafcirc.o graffile.o -l libc.lib If you'ris allotted for the graphics image, the external variables 'horsize' and 'versize' govern how much of this RAM is actually accessed by the plotting routines. Thus the actual graph size is horsize x versize . Obviously it is necessary that horsize <= HSIZE and versize <= VSIZE-8. GRAF checks that this is true, but none of the subroutines do. Thus it is left to the programmer to make sure these conditions are met before the subroutines are called. If 'horsize' or 'versize' are too large, the resulates (h,v). savegraf(h,v,name) saves a copy of the current graph image as int h,v the CP/M file NAME.GRF. Only the region char *name having horizontal coordinates less than h and vertical coordinates less than v is saved. Thus the usual invocation is savegraf(horsize,versize,name). The size of the resulting file is of course depen- dent on h and v. [graffile.c] getgraf(name) is used to retrieve a previously saved graph having char *name filename NAME.GRF. If the file  e wondering why I didn't simply include graf.o in the list and then execute ln -f graf it's because the latter command results in a '.COM' file having the name ' . '. (Yes, that's all blanks.) You then have to execute the following idiotic command: A>ren graf.com= At least the linker doesn't call the file ' .COM'. If it did that, then any inadvertent bump of the -key at system level would cause CP/M to start executing GRAF!! Of course, the -o option could be usis has the advantage of allowing precision on what regions can be inverted, but causes the function to work rather slowly. For large regions, invert() should operate on bytes (or even words) everywhere except the vertical edges. This could increase speed by a factor of 5 or 10. It would also be nice to be able to invert regions of dif- ferent shapes. There is no 'fill', 'paint', or 'color' command. This makes it very difficult to fill in regions of a graph after some lines, points, or circles erhaps error-checking should be done condition- ally using C's #ifdef command. That way, the error-checking could be easily removed from a thoroughly debugged application. The circle routine appears to draw ellipses since the MX-80 puts more space between horizontal columns than vertical rows. (Similary, squares look like horizontally-long rectangles.) The 960 bits/inch graphics mode on the MX-80 reverses the problem -- it squeezes the horizontal dots too close together. Thus some kind of scal large graphs can't be built up out of smaller components, and if you blow it in some small region you may have to recreate the entire graph (even with the all the un- plot options). I suggest building large graphs in stages, and saving the images often. That way, if you blow it at some late stage, it is not necessary to recreate the entire graph -- simply retrieve the most recently saved image. Although bar graphs are especially easy to create (with the invert() function), there is no conveniened to rename the .COM file. The file DEMO.C contains so many character strings that the -z option must be used to compile it on AZTEC C II: ln -z2900 demo.c (Numbers smaller than 2900 might work. I didn't try for the smallest one.) THE FUTURE OF GRAF In its present form, GRAF is supports only the minimum number of commands required of an interactive graphics program. As more modules are written, GRAF will be expanded. However, the real power of this graphics package lies in thhave been plotted. (Invert() works fine at the beginning, but it never erases or covers anything.) I recommend the following form for a fill command: fill(x,y) will fill the region containing the point (x,y). int x,y It examines the adjacent bits and fills as follows: ^^^^^ ^^^^^ (continues ^) XXXXX XXXXX XXX XXXXX XXX X X X XXXXXXXXXXXXXX X X XX XXXXXXXXXXXXXXXXX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>>> X @ ing routines should be written (perhaps to be called by grafprnt()) to take care of this problem. Also, there is presently no way to plot only por- tions of a circle (arcs). There is no way to enlarge or shrink a graph. Sometimes it is de- sirable to change the scale of a graph late in the game. Thus, it would be nice to have a function which changes 'horsize' and 'versize' and then scales the existing graph accordingly. The inversion routine (invert()) operates on bits rather than bytes. Tht way to label the graphs. A 'label' command would be great here. I suggest the following functions: x-axis(label) plots a horizontal axis and labels it 'label'. (This one's easy to write.) y-axis(label) plots a vertical axis and labels it 'label'. (This one's not so easy.) To implement these, it might be best to simply define a new grafprnt() function (called lablprnt()?) which prints the graph along with the labels. Note that there is currently no convenient way to put text inside ae fact that the modules may be easily included in any C program. Present deficincies of this package include the following: Only minimal error-checking takes place in any of the subroutines. This is especially critical in the file-handling portion. (If there's no room on the current disk for another .GRF file, savegraf() dies a sudden death.) I wonder what happens when pixplot() is handed negative num- bers? (I think it will quite happily rewrite random portions of the executing .COM file!) P XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>>> X X XXXXXXXXXXXXXXX (continues->) X X X XX XXXXXXXXXXXX X XX XXXX X X Before Fill(@) After Fill(@) (I don't know if this makes sense to amyone but me. But the point is that fill actually has to examine more than just the bits in the current row or column that it is filling -- a 'hole' of only one bit should not be interpretted as a 'hole' by fill().) There is no 'copy' or 'move' command. Thus   graph. PROJECTS For those of you with a lot of ambition, I recommend the following projects. (Most of which are non-trivial.) letters Write a function which prints nice (smooth) large letters at a given location on a piece of paper. This involves creating a lot of .GRF files containing the alphabet and rewriting the grafprnt() function (grafprnt() will only print one graph in a given vertical region). Another (easier?) way to imple- ment this project would be to write the ortability of the FORTH language is great, but the transportability of its screens on disk isn't too good. CONCLUDING REMARKS As with all of my programs, suggestions, criticisms, and improvements concerning GRAF or any of its modules are always welcome. I would appreciate being informed of any applications of these routines. I would also like to know of any other MX-80 graphics programs in existence (and preferably in the public domain). I hope that GRAF proves to be a useful additio have it still fit in the TPA. (GRAF.COM is already 46k!) I'd appreciate having a nice math routines library, even without any tie-ins to graphics! recursive Since C supports recursion, the routines already drawings written can be used to easily create some nice recursively-drawn pictures. See Hofstader's 'Godel, Escher, and Bach', and 'LISP', by Winston and Horn, for references. 3-D graphics Here's a real biggy. This project makes the existing GRAF look ridiculously trivial. /********************************************************/ /* */ /* GRAF Demonstration Program */ /* */ /* Uses the following .GRF files: */ /* TITLE, SMALL, MEDIUM, HUGH, BAR1 */ /* BAR2, CIRCLE, LINE, and STAR */ /* */ /* Don Brittain 3 January 1983 */ /* 4200 Spruce St. #208 phone: */ /* Philadelphia, PA 19104 (215) 386-2684 */ /* */ /********************************************************/ #define HSIZE 320 #define VSIZE 328 'move' or 'copy' function described above, then have the letters program simply move the corresponding LETTER.GRF files to the appropriate places in a large rectangular graph. An advanced version of this program will print upper and lower case, possibly in different fonts and sizes. (I'd really love to have each chapter of my PhD thesis start with one of those nice, big, capital Gothic letters!!) functions Write a module for GRAF which allows the user to plot elementaryn to your program library. Don Brittain 4200 Spruce St. #208 Philadelphia, PA 19104 (215) 386-2684  FORTH Rewrite the entire package (or your own graphics package) in FORTH. I originally planned to write GRAF in FORTH, but after receiving AZTEC C II I couldn't resist writing it in C. FORTH has the advantage (and disadvantage) of being interpretive. (You wouldn't believe how many times I got to sit around watching my disk drive go through 10 or 15 minutes of calisthentics just to produce a worth- less GRAF.COM file. My refrigerator has been empty for a week.) The transp#define LIST 5 #define ESC 27 short grafbuf[HSIZE][VSIZE/8]; int horsize, versize; int flag=1; char grafname[13]; #include "libc.h" main() { bdos(LIST,12); crlf(8); graph("title"); crlf(3); margin(23); pr("PRELIMINARY VERSION 1.0\n"); margin(23); pr(" 3 January 1983"); crlf(19); margin(27); pr("Don Brittain\n"); margin(23); pr("4200 Spruce St. #208\n"); margin(22); pr("Philadelphia, PA 19104\n"); margin(26);  functions such as sin, cos, exp, and ln, in addition to recognizing + - * /. This is a very extensive project: It will be neces- sary to implement a 'desk calculator' similar to the one in K&R, a math routines library or module, (for integer or floating point math, keeping in mind that pixplot(), etc. only except small, posi- tive integers), and (probably) some 'virtual memory' routines, since I find it hard to believe that all this can be added to the present GRAF file and   pr("(215) 386-2684"); crlf(12); pr("This program was written to illustrate the power of GRAF. All\n"); pr("the examples were created with this preliminary version.\n\n"); pr("Actually, GRAF is just an interactive 'shell' allowing (minimal) \n"); pr("access to the modules grafutil.c, grafplot.c, grafline.c, graf-\n"); pr("circ.c, grafinvt.c, and graffile.c. These modules were originally\n"); pr("written to be included in C programs requiring graphics. GRAF\n"); gister i,j; graffcb(name); fp=fopen(grafname,"r"); if(fp==NULL) { printf("\nERROR: %s does not exist on ",grafname); printf("the current drive.\n\n"); return(); } horsize=getw(fp); versize=getw(fp); vrt=(versize+7)/8; printf("\nThe graph in %s has the following dimensions:",grafname); printf("\n\tHorizontal size: %3d",horsize); printf("\n\tVertical size: %3d\n\n",versize); for(j=0; j white"); printf("\n\tSAVE saves a copy of an existing graph on disk"); printf("\n\tGET retrieves a previously SAVEd graph"); printf("\n\tTELL returns the current graph dimensions"); printf("\n\tRESTART erases the current graph"); printf("\n\tQUIT returns; command(); case 'U' : flag = NO; complot(); command(); case 'D' : comdump(); command(); case 'I' : cominvt(); command(); case 'S' : flag = NO; getsave(); command(); case 'G' : flag = YES; getsave(); command(); case 'T' : comtell(); command(); case 'R' : printf("\nRESTART? "); gets(tempbuf); if(toupper(*tempbuf)=='Y') main(); else printf("\nRestart command ignored.\n"); command(); case 'Q' : printf("\nQUIT? ");art(); } printf("Do you want the initial graph to be white or black? "); gets(tempbuf); if(toupper(*tempbuf)=='B') flag = NO; putchar(14); putchar(10); init(horsize,versize); printf("\nType HELP for assistance.\n\n"); } comline() /* User interface to the lineplot() subroutine */ { int x,y,h,v; if(flag) printf("\n\t------- Line Plotting Function -------\n\n"); else printf("\n\t------- Line Erasing Function -------\n\n"); printf( external */ int flag = YES; /* so that the functions in the various */ /* GRAF???? files have access to them */ static char tempbuf[10]; extern int border(), lineplot(), grafprnt(), invert(), circle(); extern int savegraf(), getgraf(); main() { printf("\n\t\tEpson MX-80 Bit-Plot Graphics Utility."); printf("\n\t\t Don Brittain 3 January 1983\n\n"); start(); command(); } command() /* This is the main user interface routine. It */ /* reads the console th control to CP/M"); printf("\n\nTo execute a command, only the first letter "); printf("needs to be typed (in "); printf("\nupper or lower case).\n\n"); command(); default : putchar(7); puts(tempbuf); printf("?\n"); command(); } } start() /* This routine sets up the matrix size using the external */ /* variables horsize and versize. Note that the actual */ /* graphics buffer is always HSIZE * VSIZE / 8 bytes long. */ /* horsize and vertize really only restric gets(tempbuf); if(toupper(*tempbuf)=='Y') exit(); else printf("\nExit command ignored.\n"); command(); case 'H' : printf("\nGRAF recognizes the following commands:\n"); printf("\n\tBORDER draws a border around the graph"); printf("\n\tKILL removes all border points"); printf("\n\tLINE allows the user to draw straight lines"); printf("\n\tERASE is used to erase lines"); printf("\n\tCIRCLE is used to plot circles"); printf("\n\tNO CIRCLE is used to erase circ"Input the coordinates of the first endpoint.\n"); printf("\tHorizontal coord: "); x=atoi(gets(tempbuf)); printf("\tVertical coords: "); y=atoi(gets(tempbuf)); printf("Input the coordinates of the second endpoint.\n"); printf("\tHorizontal coord: "); h=atoi(gets(tempbuf)); printf("\tVertical coord (1000 to ABORT command): "); v=atoi(gets(tempbuf)); if(v==1000) { printf("Function aborted.\n\n"); flag=YES; return(); } lineplot(x,y,h,v); } comen calls the appropriate */ /* graphics function */ { printf("Command: "); gets(tempbuf); switch(toupper(*tempbuf)) { case 'B' : flag = YES; border(); command(); case 'K' : flag = NO; border(); command(); case 'L' : flag = YES; comline(); command(); case 'E' : flag = NO; comline(); command(); case 'C' : flag = YES; comcircle(); command(); case 'N' : flag = NO; comcircle(); command(); case 'P' : flag = YES; complot()t the portion of */ /* the buffer the routines can access (thereby increasing */ /* the speed of some of the routines for small graphs). */ { printf("\nHorizontal size: "); horsize=(atoi(gets(tempbuf))); if(horsize>HSIZE) { putchar(7); printf("The maximum horizontal dimension is %d.", HSIZE); start(); } printf("Vertical size: "); versize=(atoi(gets(tempbuf))); if(versize>(VSIZE-8)) { putchar(7); printf("The maximum vertical dimension is %d.", VSIZE-8); st  plot() /* Interface to pixplot() and unpixplot() */ { if(flag) printf("\n\t------- Point Plotting Function -------\n\n"); else printf("\n\t------- Point Erasing Function -------\n\n"); printf("Enter the coordinate 1000 to QUIT. \n"); plotaux(); } plotaux() { int h,v; printf("\tHorizontal coord: "); h=atoi(gets(tempbuf)); if(h==1000) { flag = YES; return(); } printf("\tVertical coord: "); v=atoi(gets(tempbuf)); if(v==1000) { flag ; } comtell() /* Prints the current graph dimensions -- useful mainly */ /* for debugging the file-handling routines */ { printf("\nThe current graph dimensions are --"); printf("\n\tHorizontal size: %3d",horsize); printf("\n\tVertical size: %3d\n\n",versize); }  subr. */ { int x,y,r; if(flag) printf("\n\t------- Circle Plotting Function -------\n\n"); else printf("\n\t------- Circle Erasing Function -------\n\n"); printf("Input the coordinates for the center of the circle.\n"); printf("\tHorizontal Coord: "); x=atoi(gets(tempbuf)); printf("\tVertical Coord: "); y=atoi(gets(tempbuf)); printf("Input the radius (1000 to ABORT): "); r=atoi(gets(tempbuf)); if(r==1000) { printf("Function aborted.\n\n"reak; case 2 : fill=3; break; case 3 : fill=7; break; case 4 : fill=15; break; case 5 : fill=31; break; case 6 : fill=63; break; case 7 : fill=127; break; case 0 : fill=255; } for(i=0; i80) n=80-versize/5; grafprnt(n); } cominvt() /* Interface to the inversion subr. (black <-> white) */ { int x,y,h,v; printf("\n\t------- Graph Inversion Function -------\n\n /********************************************************/ /* */ /* Utility Routines for MX-80 Bit-Plot Graphics */ /* */ /* Don Brittain 3 January 1983 */ /* */ /********************************************************/ #define HSIZE 320 #define VSIZE 328 #define NO 0 #define YES 1 #define LIST 5 #define ESC 27 short grafbuf[HSIZE][VSIZE/8]; /* MUST be EXTERNAL */ extern int horsize, versize, flag; extern int pixplot(), unpixplot(); init(h,v) /* Clears or fill); flag=YES; return(); } circle(x,y,r); } getsave() /* Interface to getgraf() and savegraf() -- routines */ /* to store and retrieve graphics images */ { if(flag) printf("\n\t------- Graph Retrieval Utility -------\n\n"); else printf("\n\t------- Graph Save Utility -------\n\n"); printf("Enter the name of the graph: "); gets(tempbuf); if(flag) getgraf(tempbuf); else savegraf(horsize,versize,tempbuf); putchar(10); putchar(14); flag=YES setline(8); clmar(n); v=(versize+7)/8; for(j=0; j1Ͽ?C|x?8?ظx?????#?????? } else { bdos(LIST,n-256); bdos(LIST,1); } } crlf(n) /* printer carriage-return-linefeed */ int n; { int i; for(i=0; i>>>>>>>>~.6:<>><:6.~>>>>>>>>>>?kkkk]~?????>>>> >>>>====]k~~~]]]]]]]]]]***************IIIIIIIIIIIIIIIIIIIIIIIIII@@@@@BBBBBBBBBBBBBDDDDDDDD"""$$$$$$$$((HHHHHHPPPPPP@@@@@@@@@@@@@ HHHHHHHDDDDD$$$$""""""""!@@@@@@@@@@@@@@@@@@@@@@@@@@@pNA@@@?@@@@@@@@@@@@?@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@   ,,        @  @@  @@  @@  @@  @@  @@  @@  @@  @@    @@  @@  @@  @@  @@  @@  @ @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@ @ @@  @@  @@  @@  @@  @@  @@ @`````` @@  @@  @@  @@  @A""AA""A@! !@@! !@ @@  @@  @@  @@  @@  @@  @@  @@  @@ `` @P PP@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  !   @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@   @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@  @@ @@  @@  @@  @@  @@  @@  @@  @@  @@  @@ !@@! !@@! !@@! !@@  @  @@  @@  @@  @@  !AA!  !AA!  !A @ @@  @@  @@  @@  @@  @@ @  @@  @P PP PP PP P @"  A!  !AA! ????????????????|d|d#  , `0@  ` @ @@ @ @@@ ???|>xp`` 0@ @@???0`0@0@  @ @ @ @@@@@???8p```0 0@ @ @ ?????``8~????? 0@00@  @ @ @@ @ @@?` 0  0@ @ @ @ x0 0   @@@??????x<0@ ????880 p 0 `   @ @?????<x80`0@  @ @@ @` 0 px|>???? @@@@ @ @088pp<|?@@??? p 0 0` `    @ @ @@@????80 pp?? 8$  ?? @@ @` ```8pp<??? @@ @ @` ` @@@@ @ @ @0@ @`0@ ?? @@@ @ @ @ `|<` 0 @    @    @ 0 `<|p 0 a@#$C$dD((Fd$CB"  @` 0 x8 0`p` !@A""AA""AA!  0 p0L 0 |??>800 0 p`8p???? @@ @ @ @0@0 080??? ? ? ? ? ??????????????????????????????????????????????????? ? ? ? ? ? @0`? !!!AA !!A !A !A !A!A a! 0   @A&(!"AAB$$BA! ``B$ !@ 00 8 p 000@0@ 4B@"$BD((DA"a`A"  `` @0 0 8x|<` 0 0@ `  A  A "AAA$$DHH00(HB$A`C! !A0 `00p 0 ` c!B!B!!CA$$(DEP PPED($A @@ @0@`   ````? @@@@@ @ @ @  @` ` 0@` 0?o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@߿߿@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%  B!B!bB! a `p 8 0a1B"D"D"D"D!BB$(0(I ```` E(($BaDB!D"D"D2 "!C0 ap 8?>80 1"&$$$I$H"D"BD!BB((000II @@@ II)((BB!D""HD"ID$I$I$E2dfca s655JJJ%J)R%I$$I"$DH!"BD01IIJ !!!!!!! JJI))DB""HD$II$RIR*RUU.%ef?o @@  @@@@@@@@@@@@  @@  @@@@@_k׮[[VUU*R%II"$DDH!""BBB """""AAAAAAAAAA!!!!! DDBB"""HD$$$JI)TRUjmo_o?[kUUUU%%%IIIII!!!!!!!!!!AAAAAAAAAAAAAAAAAAAA!!!!!!!!!!IIIII)UUյmݽ????@~~ @@@@@@  @@@@@@@  !!!!!!AAAAAAA!  !AAAAAAA!!!!!! @@@@@ &   --> FILE: CRC .COM CRC = B2 07 --> FILE: GRAF .COM CRC = D0 A4 --> FILE: GRAFPLOT.C CRC = 31 6B --> FILE: GRAFLINE.C CRC = DA 9D --> FILE: GRAFINVT.C CRC = 6D F2 --> FILE: GRAFCIRC.C CRC = 6F CA --> FILE: GRAFFILE.C CRC = 42 A1 --> FILE: DEMO .COM CRC = 52 3B --> FILE: GRAF .DOC CRC = E1 3C --> FILE: DEMO .C CRC = 54 DB --> FILE: GRAF .C CRC = 54 EC --> FILE: GRAFUTIL.C CRC = 3B CB --> FILE: TITLE .GRF CRC = 8C C1 --> FILE: SMALL?? .GRF CRC = 48 23 --> FILE: MEDIUM .GRF CRC = 57 5F --> FILE: HUGH .GRF CRC = 37 69 --> FILE: BAR1 .GRF CRC = 8B 88 --> FILE: BAR2 .GRF CRC = F6 6C --> FILE: CIRCLE .GRF CRC = 65 65 --> FILE: LINE .GRF CRC = 61 F0 --> FILE: STAR .GRF CRC = 3A 75 --> FILE: D .COM CRC = 66 48 --> FILE: 5-DISK .DOC CRC = DE F5'   Hit Space: KK : k Used: /k Not used: k *% DMf : remain on 1 !9" ! J> # ->! . *ͪe> # < * v K  K  K !B r+s+p+qA ?  p*A *? :]$Ž l]Q !]6 !E 6!C 6 :C *C &l ~2D U¼:E 2 :D S:E 2:D F:E 2:D V:E 2:D P:E 2 :D N2E ! _{ozgO{ozgi`N#Fogo&og_{_z#W OK = Y -S {-_ ! s+p+q*  ͼ 2 <2 : ! ڗ  K ! 4Á ! 6: =! ڻ * & NK ! 4œ >3  03} Z; { ) # ^#V"; *;  ͪ  *; q#pÝn* " ! p+q* )*= ^#V"; ! 6> ! i* &*; >OK : <2 E:/ *; ^#V*% DMf kK : *; Nf E*; ~ڻWK þE *; ~SK E = ! 6:! ':/ : = !: = : <2 * " !" >! .  * *&͵ "( * *&͵ > j*( #"( *DM*( V"( !" (   K!" }2 : <2 O:* * * "    >! = * DM** +" *( * " Ø* #" *&C 4Ø:!4:!5(  ! I3= : [= t:\a:\=_: :] t ?]\ : ҃! 6?Î : 2   ]Q  ?\\ : DM, Q ! "= *3 ##)*= "; */ &# "! *3 #"#  !! "% >!1 . 2' \: 2 : ʩ: ƀo&"* ~ʛ*# +"# ** DMY қ** DM  *; q#p* " . ** #DM*; -e**  *; w* #" )*= *; s#r*; "; : 2 !S 6!"V * "n >!S d*S &T ) ^#V"K O!l ^#V"M :S =2S M K  a*K "G * KAYPRO USER'S DISK #5 MX-80 GRAPHICS SOFTWARE This is a graphics display packaage for use with the MX-80 with GRAFTRAX. This had really been a major project for Don. It was written to compile under AZTEC C II. Don sent me some samples of the output and they are very very stunning. You'll have to see for yourself! Don's documentation is in GRAF.DOC. To verify the files on this disk type CRC. Contributed By: Don B*( * " 3*1 #" " " *5 " > # R : B * +" ! +s#r( ! 6: " * ~2 * #" * +" > ʶ : 2 Ғ * +" : <2 O>ҳ ! 6* #" * ~2 p ̓: AOK = * Ͱ= * ͷ= * Ͱ= *# ͷ= * Ͱ= . g S -A >>!  ~?l W >#^ : /!:' —  ʑ #‹  W ʢ #™ i`N#FogDM!>))덑o|g =¼ DM!>)) = ^#V) ^#V|g}o M "I *K  )*= ^#V"O I G  *G )*= N#F*O ? J*G #"G (*I )*= ^#V*O DM? m*I +"I JI G  *G )*= ^#V"Q *I )*= *G )*= N#Fq#p*I )*= *Q s#r*G #"G *I +"I K I  G M   !M G  :S <2S O!T *G s#r*S &l ) *M s#r*I "M ^I K  X:S <2S O!T *K s#r*S &l ) *I s#r*G "K û!" "    #* #" )*= * #" )*= N#Fq#p   * )*= * ) *= ^#VN#F? H * #" )*= ^#V";  *; ^#V" * )*= rittain, 4200 Spruce Street #200, Philadelphia, PA 19104