This is a revision of "VIEW2" which allows up to 80 column output. For requested column widths of less than 80, the routine will center output on the screen. Other than these two changes the routine works the same as "VIEW2". To get it working, use Select, Cut, and Paste to isolate the HEX listing and the "VIEW80.BA" front end routine (you can also isolate the "V80SRC.BA" program if you want to use the source file; use the old "VDATA.CO" from "VIEW2"). Using CHANGE.BA convert the HEX listing into "VIEW80.CO", and then load and run "VIEW80.BA". The input screen is identical to "VIEW2". The code and memory location is compatible with TDD DOS. While the display is slightly more difficult to read, it is now a little easier to get an idea of changes needed to text files before printing. Have fun! --Don Hergert --72235,32 VIEW80.CO [Hex File from "CHANGE.BA"] 61311 62949 61311 CD22F42162F922BDF421EFF57E6F2600EB21EEF57E6F26001922BBF42ABDF4EB2102001922B9F4 21E6F522B7F42ABDF47E6F2600EB21C000CD76F47CB5C21BF0CDFFF2CD72F32AB9F4EB2ABDF4D5 EB210A0019D1CD8EF47CB5CA04F02ABDF4EB210200197E6F2600EB210001CD49F4EB2ABDF4D5EB 210100197E6F2600D11922B5F4C338F02AB9F47E6F2600EB2AB7F47E6F2600CD8EF47CB5C2BFEF 2ABDF4EB210B001922BDF42ABDF4EB218BFACD8EF47CB5C258F2C39BEF2AB5F422B7F421010022 B3F421310022B1F4CD3142CD16F321020022AFF421A6FFE52100007DE1772AB7F47E6F260022AD F42AADF4EB212000CD8EF47CB5CA90F02AB9F4EB2103001922B9F4CD72F32AB7F422ABF4C3BEF1 21000022ABF42AADF4EB210D00CD8EF47CB5CAAEF021200022ADF4C37EF32AB9F4EB2ABBF4D5EB 21F000D5EB2ABBF4EB424B08EB210200CD5DF4D119D1EBCD76F47CB5CAD9F0CD0BF32AAFF4EB21 3D00EBCD76F47CB5C2F2F12AADF4EB210900CD8EF47CB5CA11F12AB9F4EB211800CD5DF4EB2118 00CD49F4EB2118001922B9F42AADF4EB217E00EBCD76F47CB5CA27F1217E0022ADF42AADF4EB21 1A00CD8EF47CB5CA42F1217F0022ADF4CD65F2C3F2F1CD72F32AADF4EB212100CD76F47CB5C260 F0CD65F22AB7F422ABF42AADF4EB212D00CD8EF47CB5C2BEF12AABF4EB2AB7F4EB424B08EB2103 00CD49F4EB2AB9F419EB210100EB424B08EB2ABBF4D5EB21F000D5EB2ABBF4EB424B08EB210200 CD5DF4D119D1EBCD76F47CB5CABBF12AB9F47CB5CABBF1CD0BF3C360F02AABF47E6F2600EB2121 00CD76F47CB5C26CF12AABF47E6F2600EB212D00CD8EF47CB5C26CF12AABF4EB2101001922ABF4 C3BEF121A6FF7E6F260022ABF42AABF47CB5C207F2C3F2F12AABF4EB212E00CD8EF47CB5C238F0 2AABF4EB213F00CD8EF47CB5C258F22AABF4EB213B00CD8EF47CB5CA40F221C000E52ABDF4D17B CD40592AADF4EB217F00CD76F47CB5CA58F22AA9F422B7F4C34AF021AAFFE52100007DE177CD97 5721C6F422A7F42AA7F4EB2AADF4D5EB212000EB424B08EB210300CD49F4D1197E6F260022ABF4 2AA7F4EB2101001922A7F421010022A5F42AAFF422A3F42AA5F4EB2AABF4CD6FF47CB5CABEF22A B9F4E52AA3F45DE155CD4C742AA3F4EB2101001922A3F42AA5F4EB2AABF4CD76F47CB5CAE6F22A A5F4EB2AA5F41922A5F4C3A2F221000022ABF4CDFFF22AA7F4EB21C9F4CD76F47CB5C26BF2C92A B9F4EB2101001922B9F4C92AAFF4EB2106001922AFF421F000EB2ABBF4EB424B08EB210200CD5D F422B9F42AAFF4EB213D00CD76F47CB5CA51F32AB3F4EB21E6F57E6F2600EBCD76F47CB5CA51F3 C3A0F32AAFF4EB213900CD76F47CB5CA71F32AB3F4EB2101001922B3F42AB7F422A9F4C92AB7F4 EB2101001922B7F4C92AB9F4EB21EE00EBCD76F47CB5CA94F321EF0022B9F4CD65F2CD72F3CD0B F3C360F02AADF422A1F4212D0022ADF4CD65F22AB9F4EB21030019EB2ABBF4D5EB21F000D5EB2A BBF4EB424B08EB210200CD5DF4D119D1CD76F47CB5C2ACF32AB1F4EB213A00CD8EF47CB5CAF0F3 21300022B1F42AB1F422ADF4CD65F22AA1F422ADF42AAFF4EB213800CD76F47CB5CA1FF4210100 22B3F42AB1F4EB2101001922B1F4C30BF321A1F41123003600231B7AB3C228F421C0F422C1F421 000022C3F42123F9EB2125F91922BFF4C9444D2100003E1029EB29EBD258F4093DC250F4C97CB5 C8EB424B1100001308D266F41B09EBC97CA2677DA36FC97CEE80677AEE80BCC283F47BBDDA8AF4 210000C921FFFFC97CBAC29CF47DBBC29CF421FFFFC9210000C900000000000000000000000000 000000000000000000000000000000000000000000000000000400000017000300030A1B0A1037 1A1904130A151A0201000E110000110E150E15040E04100C000404040010001804030E110E121F 1019151211150A06041F1715090E1508011D031F151F02150E000A00100A00040A110A0A0A110A 0401150208151E1E051E1F150A0E110A1F110E1F15111F05010E11191F041F111F1108100F1F04 1B1F10101F061F1F011F1F111F1F09060E111E1F0916121509011F011F101F0F100F1F0C1F1B04 1B031C031915131F110003041800111F0201021010100102000C121E1F120C0C12120C121F0C1A 141E0902242A1C1F021C001D00201D001F0814001F001E041E1E021C0C120C3E120C0C123C1E02 0410161A021F021E101E0E100E1E081E120C1226281E1A1612041B11001B00111B04150A15040E 15 371596 VIEW80.BA [Front-end routine] 10 CLEAR56,61311 20 CALL7994:INPUT"File Name";A$:IFLEN(A$)>6THEN20 30 IFA$=""THEN60 40 A$=A$+SPACE$(6-LEN(A$))+"DO":FORX=1TO8 45 F=ASC(MID$(A$,X,1)):IFF>96THENF=F-32 50 POKE62950+X,F:NEXT 60 INPUT"Word Wrap";I 70 II=0:IFI<10ORI>80THENI=60:II=20:GOTO80 75 IFI>60THENII=I-60:I=60 80 POKE62959,I*3-1:POKE62958,II*3 90 INPUT"Page Break";J 100 IFJ=0THENJ=54 110 POKE62950,J 120 RUNM"VIEW80 V80SRC.BA [BASIC source code] 19 'U=Beginning of Ram Directory 20 U=63842:Z=PEEK(62959)+PEEK(62958) 27 'X+1=File name in Dir 28 'N+1=File name looking for in Ram 29 'if U = 192 then .DO file 30 X=U+2:N=62950:IFPEEK(U)<192THEN70 39 'Add 1 to X and N 40 GOSUB400:GOSUB460 46 'If the Names are the same then 47 'T = Start Address of Ram File 48 'U = Ram Dir address 49 'Go To Start of View 50 IFX=U+10THEN T=PEEK(U+2)*256+PEEK(U+1):GOTO90 59 'Compare characters if same check next characters 60 IFPEEK(X)=PEEK(N)THEN40 68 'If not Then next Ram Dir entry 69 '64139 = End of Ram Dir - Not found then Menu 70 U=U+11:IFU=64139THEN330 80 GOTO30 86 'Start of View 87 'N = Location in Ram File 88 'P = Lines Printed 89 'M = Page number ASC(49)="1" 90 N=T:P=1:M=49 98 'Clear Screen : X=0 99 'W = Current line : Clear Key Press 100 CALL16945:GOSUB420:W=2:POKE65446,0 109 'A = character : If Space Then move X : Add to N : Check for Word Wrap 110 A=PEEK(N):IFA=32THENX=X+3:GOSUB460:B=N:GOTO240 117 'B = Flag - set for first print 118 'Data for CR stored as Asc(32) 119 'goto CR Check 120 B=0:IFA=13THENA=32:GOTO470 129 'If X > Word Wrap then Do Line Feed 130 IFX>Z+((240-Z)\2)THENGOSUB410 139 'If Cur Line > 10 lines Goto Input 140 IFW>61THEN 270 149 'If TAB then next column 150 IFA=9THENX=(X\24)*24+24 159 'Character 126 shown as undefined 160 IFA>126THENA=126 169 'If End of File then show arrow, Goto Input 170 IFA=26THENA=127:GOSUB340:GOTO270 179 'Add 1 to N : No character printed if less than space 180 GOSUB460:IFA<33THEN110 189 'Goto Print routine 190 GOSUB340 199 'Check for Word Wrap 200 B=N 209 'If Hyphen Find next Break 210 IFA=45 THEN 240 216 'Word Wrap formula 217 'if not start of line 218 'B-N = No. characters to next break 219 'each character takes 3 pixels 220 IF(B-N)*3+X-1>Z+((240-Z)\2)THEN IF X THENGOSUB410 229 'Start Over 230 GOTO110 238 'Find Next Break 239 'Space or less 240 IF PEEK(B)<33 THEN220 249 'Hyphen 250 IF PEEK(B)=45 THEN220 259 'Keep looking 260 B=B+1:GOTO240 268 'User Input 269 'Last key pressed 270 B=PEEK(65446):IF B THEN290 279 'If no Key has been pressed since Line 100 then wait here 280 GOTO270 289 'If Up arrow then Top of file 290 IFB=46THEN90 299 'If F8 then Menu 300 IFB=63THEN330 309 'If F4 goto Text U = Ram Dir Address 310 IFB=59THENCALL22848,192,U 319 'If Not EOF then next page D = Start of current last line 320 IFA<127THEN N=D:GOTO100 329 'Clear Keyboard Buffer : Menu 330 POKE65450,0:CALL22423 338 'Print Routine 339 'R = Start of character data 340 R=62662 349 'Find Location of data 350 B=PEEK(R+(A-32)*3):R=R+1 358 'characters printed in three parts 359 'C = Bit Test : Reset Y to current Line 360 C=1:Y=W 369 'if Bit = 0 then pset 370 IFC ANDB THENPSET(X,Y) 379 'next pixel : If not done then next test next bit 380 Y=Y+1:IFCPEEK(62950)THENGOTO490 439 'as long as not line Ten then Add 1 to Line No. and set D at start of line 440 IFW<57THENP=P+1:D=N 450 RETURN 459 'Add 1 to N Four times : Saves Ram 460 N=N+1:RETURN 468 'Carrage Return Check 469 'If 81st character Backup one 470 IFX>238THENX=239 478 'Draw dot : Add 1 to N 479 'Do Line Feed : Start over 480 GOSUB340:GOSUB460:GOSUB410:GOTO110 488 'Page Break Display 489 'J = Temp hold for A : A = Dash 490 J=A:A=45 499 'Draw dash until almost Word Wrap 500 GOSUB340:IFX+3 Ten (shown as zero) 509 'then start over with 1 510 IF M=58 THEN M=48 519 'Draw page No. : Restor A 520 A=M:GOSUB340:A=J 528 'If not Line 10 then reset line No. 529 'Add one to Page No. 530 IFW<56THENP=1:M=M+1 539 'Do Line Feed and return 540 GOTO410