80. Text screen dump ~~~~~~~~~~~~~~~~ This Procedure enables you to dump the entire text from the screen onto your printer. It will work in any Mode from 7 up to 0, and is called by specifying the number of columns and lines; eg. PROCdump(40,25) for Modes 6 and 7. Any Mode 7 teletext control codes will be printed as blank spaces, and graphics in other Modes will be ignored. Only text which has been printed in normal character positions will be printed; any which was printed with the aid of VDU5 and MOVE will not show. If your printer has an enlarged-print facility, you might like to insert the appropriate control code in lines 1015 and 1055 for dumping Modes 2 and 5; the code is VDU14 for the Epsons. If you want to be very posh, you can extend the Procedure so that it sorts out what screen Mode is in use automatically, with the aid of the Function given in an earlier tip. Note that you should omit line 1050 if your printer does auto linefeeds after a carriage return, and that the setting of the *FX6 option has no effect on the dump Procedure. The little FNpeep at the end may be used independently if required; it returns the ASCII code of the character at screen position X,Y. Eg. A$=CHR$(FNpeep(12,15)) would make A$ equal to whatever character was in column 12 of line 15, and would leave the cursor at that position. 1000 DEF PROCdump(width%,depth%):LOCAL X%,Y%,ascii% 1010 VDU6,26,4,2 1020 FOR Y%=0 TO depth%-1:FOR X%=0 TO width%-1 1030 ascii%=FNpeep(X%,Y%):IF ascii%<32 OR ascii%>126 THEN ascii%=32 1040 VDU1,ascii%:NEXT X%:VDU1,13 1050 VDU1,10:REM Omit if printer has auto linefeed option. 1060 NEXT Y%:VDU3,30 1070 ENDPROC 1080: 1090 DEF FNpeep(X%,Y%):LOCAL A% 1100 VDU31,X%,Y%:A%=&87:=(USR&FFF4 AND &FF00)DIV &100