govett@avsd.UUCP (David Govett) (04/12/88)
Help! I am learning Personal Pascal, and am simply trying to output a word to the printer using WRITELN. Standard output goes to the screen, I know, but how the hell do I redirect output to my printer using Personal Pascal? That is, writeln(output,'randomtext') outputs to screen, but what do I use to output to printer? Thanks for any help.
REEVES@SLACSLD.BITNET (04/20/88)
In order to redirect the output that goes to the screen, one should use the command REWRITE ( OUTPUT, 'LST:' ); Note that the colon is absolutely necessary, otherwise, Personal Pascal will open a file named LST. This is described on pages 6-124 to 6-129 of the version 2 manual. In order to direct the output back to the screen, one should use the command REWRITE ( OUTPUT, 'CON:' ); The manual does not say what will happen if you try 'lst:' instead of 'LST:'. I don't know what happens when one tries to use the screen dump key sequence from inside a pascal program. My best guess is that it probably will not work. What you might try instead is calling the XBIOS routine SCRDMP. To do this from Pascal, you will have to add the following lines to your program PROCEDURE SCRDMP; XBIOS ( 20 ); You could then access the screen dump by the command SCRDMP; You will find the BIOS, XBIOS, and GEMDOS compiler directives described on pages 8-1 to 8-15 of the version 2 manual. For the function numbers, refer to a book like the Atari ST Internals from Abacus Software. There are some other books on the market that will also document the routines in the operating system, but I have not had any experience with them. Like I said, I have never tried ALT-HELP from inside one of my programs, so it may work. It's just out of my experience. Terry W. Reeves Don't go near the operating system; it's a trap.