Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_22.ADF » P/VTtxt1

P/VTtxt1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_22.ADF
Filename: P/VTtxt1
Read OK:
File size: 0691 bytes
Load address: 24204556
Exec address: 7454562E
File contents
VIEW TYPE
~~~~~~~~~
By Richard Dimond

This program (fileanme V-TYPE) was mentioned in my explanation of the new
coding in Issue 20 but was omitted from the disc.  I have since made small
changes so that you can alter HIMEM to enable longer files to be printed. 
The default value is &2600 as on the discs.

There are two routines in CODE4, at &900 is a short clear routine to clear
the memory between HIMEM and &4000 (MODE3 screen start).  This is needed
as the  print routine checks for a zero byte to stop the routine.  This
seemed to be the easiest way to check for the end of the file.

The second is the print routine at &98C.  This uses OSBYTE &87 to check
the MODE and sets a flag if MODE6 is selected.  If this is set, the
routine includes the word-wrapping routine for 40 column printing,
otherwise the routine runs normally for 80 columns.

In the menus, another flag is used to enable the perforation skip routine.
This simply counts the CR characters to print the number of lines and then
the number of blank lines to skip to the next page.

I suggest the you transfer the program together with CODE4 to the disc you
use for your submissions so that you can print out your text and see how
it will appear in the magazine.

If the file is too long, it will not be all printed out and there may be
some odd characters at the end.  This is because it may print some
characters from the screen area before finding a zero byte.  The file will
then need to be split at some point, preferrably at the end of a paragraph
though it can be at the end of any line.

**************************************************************************
00000000  0d 56 49 45 57 20 54 59  50 45 0d 7e 7e 7e 7e 7e  |.VIEW TYPE.~~~~~|
00000010  7e 7e 7e 7e 0d 42 79 20  52 69 63 68 61 72 64 20  |~~~~.By Richard |
00000020  44 69 6d 6f 6e 64 0d 0d  54 68 69 73 20 70 72 6f  |Dimond..This pro|
00000030  67 72 61 6d 20 28 66 69  6c 65 61 6e 6d 65 20 56  |gram (fileanme V|
00000040  2d 54 59 50 45 29 20 77  61 73 1a 20 6d 65 6e 74  |-TYPE) was. ment|
00000050  69 6f 6e 65 64 20 69 6e  20 6d 79 20 65 78 70 6c  |ioned in my expl|
00000060  61 6e 61 74 69 6f 6e 20  6f 66 20 74 68 65 20 6e  |anation of the n|
00000070  65 77 0d 63 6f 64 69 6e  67 20 69 6e 20 49 73 73  |ew.coding in Iss|
00000080  75 65 20 32 30 20 62 75  74 20 77 61 73 20 6f 6d  |ue 20 but was om|
00000090  69 74 74 65 64 20 66 72  6f 6d 20 74 68 65 20 64  |itted from the d|
000000a0  69 73 63 2e 20 20 49 20  68 61 76 65 20 73 69 6e  |isc.  I have sin|
000000b0  63 65 20 6d 61 64 65 20  73 6d 61 6c 6c 0d 63 68  |ce made small.ch|
000000c0  61 6e 67 65 73 20 73 6f  20 74 68 61 74 20 79 6f  |anges so that yo|
000000d0  75 20 63 61 6e 20 61 6c  74 65 72 1a 20 48 49 4d  |u can alter. HIM|
000000e0  45 4d 20 74 6f 20 65 6e  61 62 6c 65 20 6c 6f 6e  |EM to enable lon|
000000f0  67 65 72 20 66 69 6c 65  73 20 74 6f 20 62 65 20  |ger files to be |
00000100  70 72 69 6e 74 65 64 2e  20 0d 54 68 65 20 64 65  |printed. .The de|
00000110  66 61 75 6c 74 20 76 61  6c 75 65 20 69 73 20 26  |fault value is &|
00000120  32 36 30 30 20 61 73 20  6f 6e 20 74 68 65 20 64  |2600 as on the d|
00000130  69 73 63 73 2e 0d 0d 54  68 65 72 65 20 61 72 65  |iscs...There are|
00000140  20 74 77 6f 20 72 6f 75  74 69 6e 65 73 20 69 6e  | two routines in|
00000150  20 43 4f 44 45 34 2c 20  61 74 20 26 39 30 30 20  | CODE4, at &900 |
00000160  69 73 20 61 20 73 68 6f  72 74 20 63 6c 65 61 72  |is a short clear|
00000170  20 72 6f 75 74 69 6e 65  20 74 6f 20 63 6c 65 61  | routine to clea|
00000180  72 0d 74 68 65 20 6d 65  6d 6f 72 79 1a 20 62 65  |r.the memory. be|
00000190  74 77 65 65 6e 20 48 49  4d 45 4d 1a 20 61 6e 64  |tween HIMEM. and|
000001a0  20 26 34 30 30 30 20 28  4d 4f 44 45 33 20 73 63  | &4000 (MODE3 sc|
000001b0  72 65 65 6e 20 73 74 61  72 74 29 2e 20 20 54 68  |reen start).  Th|
000001c0  69 73 20 69 73 20 6e 65  65 64 65 64 0d 61 73 20  |is is needed.as |
000001d0  74 68 65 20 20 70 72 69  6e 74 20 72 6f 75 74 69  |the  print routi|
000001e0  6e 65 1a 20 63 68 65 63  6b 73 1a 20 66 6f 72 1a  |ne. checks. for.|
000001f0  20 61 20 7a 65 72 6f 20  62 79 74 65 20 74 6f 20  | a zero byte to |
00000200  73 74 6f 70 20 74 68 65  20 72 6f 75 74 69 6e 65  |stop the routine|
00000210  2e 20 20 54 68 69 73 0d  73 65 65 6d 65 64 20 74  |.  This.seemed t|
00000220  6f 20 62 65 20 74 68 65  20 65 61 73 69 65 73 74  |o be the easiest|
00000230  20 77 61 79 20 74 6f 20  63 68 65 63 6b 20 66 6f  | way to check fo|
00000240  72 20 74 68 65 20 65 6e  64 20 6f 66 20 74 68 65  |r the end of the|
00000250  20 66 69 6c 65 2e 0d 0d  54 68 65 20 73 65 63 6f  | file...The seco|
00000260  6e 64 20 69 73 20 74 68  65 20 70 72 69 6e 74 20  |nd is the print |
00000270  72 6f 75 74 69 6e 65 20  61 74 1a 20 26 39 38 43  |routine at. &98C|
00000280  2e 1a 20 20 54 68 69 73  1a 20 75 73 65 73 20 4f  |..  This. uses O|
00000290  53 42 59 54 45 20 26 38  37 20 74 6f 20 63 68 65  |SBYTE &87 to che|
000002a0  63 6b 0d 74 68 65 1a 20  4d 4f 44 45 1a 20 61 6e  |ck.the. MODE. an|
000002b0  64 20 73 65 74 73 20 61  20 66 6c 61 67 20 69 66  |d sets a flag if|
000002c0  20 4d 4f 44 45 36 20 69  73 20 73 65 6c 65 63 74  | MODE6 is select|
000002d0  65 64 2e 1a 20 20 49 66  1a 20 74 68 69 73 1a 20  |ed..  If. this. |
000002e0  69 73 1a 20 73 65 74 2c  1a 20 74 68 65 0d 72 6f  |is. set,. the.ro|
000002f0  75 74 69 6e 65 1a 20 69  6e 63 6c 75 64 65 73 1a  |utine. includes.|
00000300  20 74 68 65 1a 20 77 6f  72 64 2d 77 72 61 70 70  | the. word-wrapp|
00000310  69 6e 67 1a 20 72 6f 75  74 69 6e 65 1a 20 66 6f  |ing. routine. fo|
00000320  72 1a 20 34 30 1a 20 63  6f 6c 75 6d 6e 1a 20 70  |r. 40. column. p|
00000330  72 69 6e 74 69 6e 67 2c  0d 6f 74 68 65 72 77 69  |rinting,.otherwi|
00000340  73 65 20 74 68 65 20 72  6f 75 74 69 6e 65 20 72  |se the routine r|
00000350  75 6e 73 20 6e 6f 72 6d  61 6c 6c 79 20 66 6f 72  |uns normally for|
00000360  20 38 30 20 63 6f 6c 75  6d 6e 73 2e 0d 0d 49 6e  | 80 columns...In|
00000370  20 74 68 65 20 6d 65 6e  75 73 2c 20 61 6e 6f 74  | the menus, anot|
00000380  68 65 72 20 66 6c 61 67  20 69 73 20 75 73 65 64  |her flag is used|
00000390  20 74 6f 20 65 6e 61 62  6c 65 20 74 68 65 20 70  | to enable the p|
000003a0  65 72 66 6f 72 61 74 69  6f 6e 20 73 6b 69 70 20  |erforation skip |
000003b0  72 6f 75 74 69 6e 65 2e  0d 54 68 69 73 20 73 69  |routine..This si|
000003c0  6d 70 6c 79 20 63 6f 75  6e 74 73 20 74 68 65 20  |mply counts the |
000003d0  43 52 20 63 68 61 72 61  63 74 65 72 73 20 74 6f  |CR characters to|
000003e0  20 70 72 69 6e 74 20 74  68 65 20 6e 75 6d 62 65  | print the numbe|
000003f0  72 20 6f 66 20 6c 69 6e  65 73 20 61 6e 64 20 74  |r of lines and t|
00000400  68 65 6e 0d 74 68 65 20  6e 75 6d 62 65 72 20 6f  |hen.the number o|
00000410  66 20 62 6c 61 6e 6b 20  6c 69 6e 65 73 20 74 6f  |f blank lines to|
00000420  20 73 6b 69 70 20 74 6f  20 74 68 65 20 6e 65 78  | skip to the nex|
00000430  74 20 70 61 67 65 2e 0d  0d 49 20 73 75 67 67 65  |t page...I sugge|
00000440  73 74 20 74 68 65 20 79  6f 75 20 74 72 61 6e 73  |st the you trans|
00000450  66 65 72 20 74 68 65 20  70 72 6f 67 72 61 6d 20  |fer the program |
00000460  74 6f 67 65 74 68 65 72  20 77 69 74 68 20 43 4f  |together with CO|
00000470  44 45 34 20 74 6f 20 74  68 65 20 64 69 73 63 20  |DE4 to the disc |
00000480  79 6f 75 0d 75 73 65 20  66 6f 72 20 79 6f 75 72  |you.use for your|
00000490  20 73 75 62 6d 69 73 73  69 6f 6e 73 20 73 6f 1a  | submissions so.|
000004a0  20 74 68 61 74 1a 20 79  6f 75 20 63 61 6e 20 70  | that. you can p|
000004b0  72 69 6e 74 20 6f 75 74  20 79 6f 75 72 20 74 65  |rint out your te|
000004c0  78 74 20 61 6e 64 20 73  65 65 20 68 6f 77 0d 69  |xt and see how.i|
000004d0  74 20 77 69 6c 6c 20 61  70 70 65 61 72 20 69 6e  |t will appear in|
000004e0  20 74 68 65 20 6d 61 67  61 7a 69 6e 65 2e 0d 0d  | the magazine...|
000004f0  49 66 20 74 68 65 20 66  69 6c 65 20 69 73 20 74  |If the file is t|
00000500  6f 6f 20 6c 6f 6e 67 2c  20 69 74 20 77 69 6c 6c  |oo long, it will|
00000510  1a 20 6e 6f 74 1a 20 62  65 20 61 6c 6c 20 70 72  |. not. be all pr|
00000520  69 6e 74 65 64 20 6f 75  74 20 61 6e 64 20 74 68  |inted out and th|
00000530  65 72 65 20 6d 61 79 20  62 65 0d 73 6f 6d 65 20  |ere may be.some |
00000540  6f 64 64 20 63 68 61 72  61 63 74 65 72 73 20 61  |odd characters a|
00000550  74 20 74 68 65 1a 20 65  6e 64 2e 1a 20 20 54 68  |t the. end..  Th|
00000560  69 73 1a 20 69 73 1a 20  62 65 63 61 75 73 65 1a  |is. is. because.|
00000570  20 69 74 1a 20 6d 61 79  1a 20 70 72 69 6e 74 1a  | it. may. print.|
00000580  20 73 6f 6d 65 0d 63 68  61 72 61 63 74 65 72 73  | some.characters|
00000590  20 66 72 6f 6d 20 74 68  65 20 73 63 72 65 65 6e  | from the screen|
000005a0  20 61 72 65 61 20 62 65  66 6f 72 65 20 66 69 6e  | area before fin|
000005b0  64 69 6e 67 20 61 20 7a  65 72 6f 20 62 79 74 65  |ding a zero byte|
000005c0  2e 20 20 54 68 65 20 66  69 6c 65 20 77 69 6c 6c  |.  The file will|
000005d0  0d 74 68 65 6e 20 6e 65  65 64 20 74 6f 20 62 65  |.then need to be|
000005e0  20 73 70 6c 69 74 20 61  74 20 73 6f 6d 65 20 70  | split at some p|
000005f0  6f 69 6e 74 2c 20 70 72  65 66 65 72 72 61 62 6c  |oint, preferrabl|
00000600  79 20 61 74 20 74 68 65  20 65 6e 64 20 6f 66 20  |y at the end of |
00000610  61 20 70 61 72 61 67 72  61 70 68 0d 74 68 6f 75  |a paragraph.thou|
00000620  67 68 20 69 74 20 63 61  6e 20 62 65 20 61 74 20  |gh it can be at |
00000630  74 68 65 20 65 6e 64 20  6f 66 20 61 6e 79 20 6c  |the end of any l|
00000640  69 6e 65 2e 0d 0d 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |ine...**********|
00000650  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000690  0d                                                |.|
00000691
P/VTtxt1.m0
P/VTtxt1.m1
P/VTtxt1.m2
P/VTtxt1.m4
P/VTtxt1.m5