Diagram v2.00

By Mick Comley & Gus Donnachaidh

Originally published in EUG #16

I must apologise for not submitting anything for so long but I have been rather busy of late with a new back fence, a new shed, insulation, double-glazing and a bench. Back to reality now, though...

Annoyingly, most of what you see below is a second attempt at typing it as my Elk crashed - losing two hours of typing! - and left me with no screen display and feeling very annoyed. Into the shed it went and I poured its guts out to find a broken wire between the Master RAM Board and the main board. No wonder it'd crashed of late. Must have been a dry joint for ages before it parted company.

I mentioned a new keyboard layout to EUG's editor but I haven't yet finished it for the above reasons. However, I used Diagram to draw it out [It's the file U.KEYBOAR - Gus] and, as you suggested, improved the program. See what you think of my meagre effort. As I did not like the way you used the keyboard to generate control code numbers (It caused me no end of problems trying to amend things!), the rest is as follows:

  1. Altered information layout
  2. Scrolling menu, hit RETURN to scroll
  3. Working cursor, i.e. a cross
  4. TEXT command now needs text in quotes so you can print out User Defined Characters which have been previously loaded. For example, "This is a "+CHR$255+CHR$10+"test" is now interpreted by EVAL so it will now crash if you do not use quotes
  5. DELETE now toggles between background and foreground colours so you can delete anything you've done wrong
  6. A FILL routine draws rectangles, either filled in or deleted depending on the DELETE instruction. Use it by aligning the cursor on one corner and hit 'F'. A reminder is printed in the top left hand corner to say that the 'Fill' routine has started. Move to the diagonal corner opposite and hit 'F' again
  7. MOVE used to move an area of the screen around the screen. Warning: Do not move off the top of the screen or you will delete part of the program. Stick between the lines. Move to the top left hand point or beyond and hit 'M'. You will get a similar reminder to fill. Move to the bottom right hand corner and hit 'M' again. The normal menu will be replaced by a new one. Use the cursor keys to move and 'Q' to quit. DEFFNadd looks to see if the program is resident in an Elk or a BBC and returns the address of the character cell the current pixel is in to use in the MOVE instruction. So the area moved is slightly larger than you might expect.
  8. Normal QUIT routine returns keys to normal use.

Mick Comley

Well, Diagram [Version 1 in EUG #15 - Gus] seems to have attracted a lot of interest. And no doubt we will now be seeing even more submissions with illustrations.

Mick Comley's version of Diagram is much more user-friendly and all of the features he describes are very useful. Also, it's very easy to add extra commands; you simply put a letter into line 50. As Val Black, another reader of EUG, submitted a circle-drawing routine, I simply added a "c" in line 50 plus the extra line:

      IF C%=24 THEN PROCcircle

Her procedure itself is, as she admits, a little limited but one of our readers will soon sort that out. I have found a printer dump to add too, based on a program from Electron User, June 1986. This is featured as a review of Electron User.

My printer is a Star LC10. I have adapted the code to suit its peculiarities. As originally written, the printing was single bit image and produced a large drawing but cut a quarter off the side. I changed this to double bit image by altering line 380 from LDA #75 to LDA #76. This printed a drawing about one third of the size but made squares into rectangles. So I reduced the line spacing by a half by altering line 320 from LDA #8 to LDA #4.

I have tried to change the starting and finishing points so that the titles at the top and bottom of Diagram's screen are not printed but I haven't been successful so far. Perhaps someone might be able to fix this.

The code on this disk is the code for my printer which is LX-800 compatible.

If the code does not work too well on your printer, try adapting the source code which is listed. You will however need to refer to your Printer Manual. Note some printers will not like this code at all! If yours doesn't, then write in saying what printer you have and a full description of the problems. Some printers will need a different dump altogether. If yours is one of these then write in saying what printer it is. I unfortunately only have one printer so this will probably be the only dump I will be able to produce.

I do intend to work further on this dump and try to combine the code with text file code from the menu. This is taking some time and I am being nagged by a few members for this disk. However, I must emphasise once again that I can only work with one printer as it is the only one I own.

Gus Donnachaidh, EUG #16