Nascom Newsletter |
Volume 2 · Number 6 · January 1983 |
Page 22 of 41 |
---|
with an option table asking which piece of Nascom software was required to be printed, with the option of a second menu to select the various output options, ie. is a title required, page number, etc. Later, both option tables were included on the first screen. At this stage there was the option of using the keyboard as a conventional typewriter but this was removed as the Nas-sys ‘H’ command was almost identical.
With the arrival of the Epson I suddenly began to see things in a different light. I knew that this particular printer was selling very well in the U.K., therefore, quite a number of Nascom owners were likely to purchase one. Consequently, I thought my little program, along with some changes to suit the Epson, might make a good magazine article.
There followed a very intensive period of programming to try and get the best out of the Epson and so what was initially a relatively simple program soon began to grow into something rather more involved. Allied to the fact that it was also being directed towards other Nascom users, it also had to be very easy to use.
It wasn’t until I reached the part of the program that dealt with Naspen that my problems began. The Epson printer had the potential for correspondance quality printing as well as many functions like changing the print size etc. Obviously, for my own benefit, I wanted to make the most of the printers capabilities. So, I began looking at the larger wordprocessor systems to find out what facilities they offered in the area of text formatting and soon discovered that printer control codes embedded in the text was the thing to do. By trapping each character output from Naspen, embedded control codes can be intercepted , executed and then the codes deleted from the printed text. There were several decisions to be made at this point about the form that the embedded code should take and how to seperate the codes from the text. I eventually settled on using <> brackets to enclose the code but also made allowance for this to be changed if required. The parameters to be passed on to Nasprint-80 from the text could be in decimal as the program already had a routine to convert decimal to binary which has used in the page format parameters table, eg page length. But, there was still the problem of how to control the printer.
The easiest way, from the users point of view, would be to have a series of commands that performed specific functions in the printer. Unfortunately, the 2K set aside for the program was filling up rapidly and there was not enough room for a table the size that would be required for the Epson. Also, printer codes used on the Epson may perform different functions on other printers. Because of these problems I opted to simply output the hex. value preceeded by the output command, eq. <o 1B 45>. This command will tell the Epson to start printing in emphasised characters. Great, I had basically everything that I needed, but what happens if, in typing in a control code, you miss the bracket from the end ? …@!!*%'£! There was obviously a need for some form of error detection.
Page 22 of 41 |
---|