Home » Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s » PD/ShutDown/!Help/!RunImage
PD/ShutDown/!Help/!RunImage
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 » Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s |
Filename: | PD/ShutDown/!Help/!RunImage |
Read OK: | ✔ |
File size: | 0E4F bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There are 3 duplicate copies of this file in the archive:
- Archimedes archive » Acorn Computing » 1994 05 subscription disc.adf » 9405s » Miscellany/!RiscTimer/!Help/!RunImage
- Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s » PD/ClownPlay/!ClownPlay/!Help/!RunImage
- Archimedes archive » Acorn Computing » 1994 05 subscription disc.adf » 9405s » Miscellany/Clown/!ClownPlay/!Help/!RunImage
- Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s » PD/ShutDown/!Help/!RunImage
File contents
10REM Name: HelpView 20REM Author: Graham Jones 30REM Version: 1.00 40REM Public Domain 50: 60REM Displays a text file in a window. Intended for use instead of 70REM a plain !Help text file. 80: 90REM The text must be formatted to 64 char per line or less. 100REM Any control codes terminate the lines. There's a maximum 110REM of 500 lines. The program leaves room for about 19k of text 120REM with a 32k wimpslot. It will normally give an error if the 130REM text is too long, *BUT* if it is just too long, there can be trouble 140REM eg no room to call the error handler 150: 160PROC_globals 170PROC_wimp_init 180ON ERROR PROC_fatalerr 190PROC_my_init 200REPEAT 210SYS "Wimp_Poll",1,b% TO reason% 220CASE reason% OF 230WHEN 1: PROC_redrawmain 240WHEN 2: SYS "Wimp_OpenWindow",,b% 250WHEN 3: SYS "Wimp_CloseDown",,!saysTASK%: END 260WHEN 17,18: IF b%!16 = 0 THEN SYS "Wimp_CloseDown",,!saysTASK%: END 270ENDCASE 280UNTIL FALSE 290END 300: 310: 320: 330DEF PROC_fatalerr 340ON ERROR OFF 350SYS "Hourglass_Smash" 360!os_error%=ERR 370IF (!os_error%) = 11 THEN 380$(os_error%+4) = "Not enough room. Increase WimpSlot or shorten text"+CHR$0 390ELSE 400$(os_error%+4)=LEFT$(REPORT$,100)+" ("+STR$ERL+")"+CHR$0 410ENDIF 420SYS "Wimp_ReportError", os_error%, 1, PROGRAMNAME$ 430SYS "Wimp_CloseDown",,!saysTASK% 440END 450ENDPROC 460: 470: 480DEFPROC_globals 490PROGRAMNAME$ = "HelpView" 500MAX_NOF_LINES% = 500 510SEP_LINE% = 36 520DIM saysTASK%4 530$saysTASK%="TASK" 540DIM general% 256 :REM general temporary workspace 550DIM b% 512 :REM for wimp block 560DIM os_error% 256 :REM 4 byte num plus 0-term string 570resources$ = "" :REM = <HelpView$Dir> 580textarea% = 0 :REM ptr to area to load text into 590textlen% = 0 600DIM lineptrs%(MAX_NOF_LINES%) :REM ptrs to start of each line in textarea% 610noflines% = 0 620w_sx% = 0 :REM for redraw calcs 630w_sy% = 0 640gtop% = 0 650gbot% = 0 660ENDPROC 670: 680: 690DEFPROC_wimp_init 700SYS "Wimp_Initialise",200,!saysTASK%,"Help Viewer" TO version% 710PROC_res_init 720PROC_templates_init 730ENDPROC 740: 750: 760DEFPROC_res_init 770LOCAL len% 780SYS "XOS_ReadVarVal", PROGRAMNAME$+"$Dir", general%, 255, 0, 0 TO ,,len% 790$(general%+len%)=CHR$13 800resources$=$general% 810ENDPROC 820: 830: 840DEFPROC_templates_init 850LOCAL ws% 860DIM ws% 100 870SYS"Wimp_OpenTemplate",, resources$+".Templates" 880SYS"Wimp_LoadTemplate",,b%,ws%,ws%+100,-1,"mainW",0 890SYS"Wimp_CreateWindow",,b% TO mainW_handle% 900SYS"Wimp_CloseTemplate" 910ENDPROC 920: 930: 940DEFPROC_my_init 950LOCAL A%, B% 960SYS "Hourglass_On" 970SYS "OS_File", 17, resources$+".HelpText" TO ,,,,textlen% 980DIM textarea% (textlen% + 1) 990SYS "OS_File", 16, resources$+".HelpText", textarea%, 0 1000textarea%?textlen% = 13 1010A% = textarea%: B% = A% 1020noflines% = 0 1030WHILE A% < textarea% + textlen% 1040WHILE?A%>=32:A%+=1:ENDWHILE 1050?A% = 13 1060lineptrs%(noflines%) = B% 1070noflines% += 1 1080IF noflines% = MAX_NOF_LINES% THEN ERROR 1, "Too many lines - max is STR$MAX_NOF_LINES%" 1090A% += 1 1100B% = A% 1110ENDWHILE 1120SYS "Hourglass_Off" 1130b%!0 = 0 1140b%!4 = -SEP_LINE%*noflines% 1150b%!8 = 1040 1160b%!12 = 0 1170SYS "Wimp_SetExtent", mainW_handle%, b% 1180b%!0 = mainW_handle% 1190SYS "Wimp_GetWindowState",,b% 1200SYS "Wimp_OpenWindow",,b% 1210ENDPROC 1220: 1230: 1240DEFPROCdecodeblock 1250w_sx% = b%!4 - b%!20 1260w_sy% = b%!16 - b%!24 1270gtop% = b%!40 1280gbot% = b%!32 1290ENDPROC 1300: 1310: 1320DEFPROC_redrawmain 1330LOCAL more%, x0%, x1%, y0%, y1%, I%, T%, B%, S% 1340: 1350S% = SEP_LINE% 1360SYS "Wimp_RedrawWindow",,b% TO more% 1370WHILE more% 1380PROCdecodeblock 1390T% = (-(gtop% - w_sy%) - S%)/S% 1400IF T%<0 T% = 0 1410B% = (-(gbot% - w_sy%))/S% 1420IF B%>= noflines% B% = noflines%-1 1430FOR I% = T% TO B% 1440x0% = 8 + w_sx% 1450y1% = -8 - S%*I% + w_sy% 1460MOVE x0%, y1% 1470PRINT $(lineptrs%(I%)) 1480NEXT 1490SYS "Wimp_GetRectangle",,b% TO more% 1500ENDWHILE 1510ENDPROC
� Name: HelpView � Author: Graham Jones � Version: 1.00 (� Public Domain 2: <D� Displays a text file in a window. Intended for use instead of F� a plain !Help text file. P: Z=� The text must be formatted to 64 char per line or less. d?� Any control codes terminate the lines. There's a maximum nB� of 500 lines. The program leaves room for about 19k of text xB� with a 32k wimpslot. It will normally give an error if the �J� text is too long, *BUT* if it is just too long, there can be trouble �*� eg no room to call the error handler �: � �_globals ��_wimp_init �� � �_fatalerr � �_my_init �� �!ș "Wimp_Poll",1,b% � reason% �Ȏ reason% � �� 1: �_redrawmain �!� 2: ș "Wimp_OpenWindow",,b% �+� 3: ș "Wimp_CloseDown",,!saysTASK%: � =� 17,18: � b%!16 = 0 � ș "Wimp_CloseDown",,!saysTASK%: � � � � "� ,: 6: @: J� �_fatalerr T � � � ^ș "Hourglass_Smash" h!os_error%=� r� (!os_error%) = 11 � |M$(os_error%+4) = "Not enough room. Increase WimpSlot or shorten text"+�0 �� �*$(os_error%+4)=��$,100)+" ("+Þ+")"+�0 �� �5ș "Wimp_ReportError", os_error%, 1, PROGRAMNAME$ �#ș "Wimp_CloseDown",,!saysTASK% �� �� �: �: ���_globals �PROGRAMNAME$ = "HelpView" �MAX_NOF_LINES% = 500 �SEP_LINE% = 36 � saysTASK%4 $saysTASK%="TASK" ?� general% 256 :� general temporary workspace &7� b% 512 :� for wimp block 0A� os_error% 256 :� 4 byte num plus 0-term string :5resources$ = "" :� = <HelpView$Dir> DBtextarea% = 0 :� ptr to area to load text into Ntextlen% = 0 XJ� lineptrs%(MAX_NOF_LINES%) :� ptrs to start of each line in textarea% bnoflines% = 0 l5w_sx% = 0 :� for redraw calcs v w_sy% = 0 � gtop% = 0 � gbot% = 0 �� �: �: ���_wimp_init �@ș "Wimp_Initialise",200,!saysTASK%,"Help Viewer" � version% ��_res_init ��_templates_init �� �: �: ���_res_init � len% Jș "XOS_ReadVarVal", PROGRAMNAME$+"$Dir", general%, 255, 0, 0 � ,,len% $(general%+len%)=�13 resources$=$general% *� 4: >: H��_templates_init R � ws% \ � ws% 100 f3ș"Wimp_OpenTemplate",, resources$+".Templates" p7ș"Wimp_LoadTemplate",,b%,ws%,ws%+100,-1,"mainW",0 z-ș"Wimp_CreateWindow",,b% � mainW_handle% �ș"Wimp_CloseTemplate" �� �: �: ���_my_init �� A%, B% �ș "Hourglass_On" �;ș "OS_File", 17, resources$+".HelpText" � ,,,,textlen% �� textarea% (textlen% + 1) �:ș "OS_File", 16, resources$+".HelpText", textarea%, 0 �textarea%?textlen% = 13 �A% = textarea%: B% = A% �noflines% = 0 ȕ A% < textarea% + textlen% ȕ?A%>=32:A%+=1:� ?A% = 13 $lineptrs%(noflines%) = B% .noflines% += 1 8T� noflines% = MAX_NOF_LINES% � � 1, "Too many lines - max is STR$MAX_NOF_LINES%" BA% += 1 LB% = A% V� `ș "Hourglass_Off" jb%!0 = 0 tb%!4 = -SEP_LINE%*noflines% ~b%!8 = 1040 � b%!12 = 0 �*ș "Wimp_SetExtent", mainW_handle%, b% �b%!0 = mainW_handle% � ș "Wimp_GetWindowState",,b% �ș "Wimp_OpenWindow",,b% �� �: �: ���decodeblock �w_sx% = b%!4 - b%!20 �w_sy% = b%!16 - b%!24 �gtop% = b%!40 gbot% = b%!32 � : : ('��_redrawmain 2/� more%, x0%, x1%, y0%, y1%, I%, T%, B%, S% <: FS% = SEP_LINE% P&ș "Wimp_RedrawWindow",,b% � more% Zȕ more% d�decodeblock n#T% = (-(gtop% - w_sy%) - S%)/S% x� T%<0 T% = 0 �B% = (-(gbot% - w_sy%))/S% �%� B%>= noflines% B% = noflines%-1 �� I% = T% � B% �x0% = 8 + w_sx% �y1% = -8 - S%*I% + w_sy% �� x0%, y1% �� $(lineptrs%(I%)) �� �&ș "Wimp_GetRectangle",,b% � more% �� �� �
00000000 0d 00 0a 18 f4 20 4e 61 6d 65 3a 20 20 20 20 20 |..... Name: | 00000010 48 65 6c 70 56 69 65 77 0d 00 14 1c f4 20 41 75 |HelpView..... Au| 00000020 74 68 6f 72 3a 20 20 20 47 72 61 68 61 6d 20 4a |thor: Graham J| 00000030 6f 6e 65 73 0d 00 1e 14 f4 20 56 65 72 73 69 6f |ones..... Versio| 00000040 6e 3a 20 20 31 2e 30 30 0d 00 28 13 f4 20 50 75 |n: 1.00..(.. Pu| 00000050 62 6c 69 63 20 44 6f 6d 61 69 6e 0d 00 32 05 3a |blic Domain..2.:| 00000060 0d 00 3c 44 f4 20 44 69 73 70 6c 61 79 73 20 61 |..<D. Displays a| 00000070 20 74 65 78 74 20 66 69 6c 65 20 69 6e 20 61 20 | text file in a | 00000080 77 69 6e 64 6f 77 2e 20 20 49 6e 74 65 6e 64 65 |window. Intende| 00000090 64 20 66 6f 72 20 75 73 65 20 69 6e 73 74 65 61 |d for use instea| 000000a0 64 20 6f 66 0d 00 46 1e f4 20 61 20 70 6c 61 69 |d of..F.. a plai| 000000b0 6e 20 21 48 65 6c 70 20 74 65 78 74 20 66 69 6c |n !Help text fil| 000000c0 65 2e 0d 00 50 05 3a 0d 00 5a 3d f4 20 54 68 65 |e...P.:..Z=. The| 000000d0 20 74 65 78 74 20 6d 75 73 74 20 62 65 20 66 6f | text must be fo| 000000e0 72 6d 61 74 74 65 64 20 74 6f 20 36 34 20 63 68 |rmatted to 64 ch| 000000f0 61 72 20 70 65 72 20 6c 69 6e 65 20 6f 72 20 6c |ar per line or l| 00000100 65 73 73 2e 0d 00 64 3f f4 20 41 6e 79 20 63 6f |ess...d?. Any co| 00000110 6e 74 72 6f 6c 20 63 6f 64 65 73 20 74 65 72 6d |ntrol codes term| 00000120 69 6e 61 74 65 20 74 68 65 20 6c 69 6e 65 73 2e |inate the lines.| 00000130 20 20 54 68 65 72 65 27 73 20 61 20 6d 61 78 69 | There's a maxi| 00000140 6d 75 6d 0d 00 6e 42 f4 20 6f 66 20 35 30 30 20 |mum..nB. of 500 | 00000150 6c 69 6e 65 73 2e 20 20 54 68 65 20 70 72 6f 67 |lines. The prog| 00000160 72 61 6d 20 6c 65 61 76 65 73 20 72 6f 6f 6d 20 |ram leaves room | 00000170 66 6f 72 20 61 62 6f 75 74 20 31 39 6b 20 6f 66 |for about 19k of| 00000180 20 74 65 78 74 0d 00 78 42 f4 20 77 69 74 68 20 | text..xB. with | 00000190 61 20 33 32 6b 20 77 69 6d 70 73 6c 6f 74 2e 20 |a 32k wimpslot. | 000001a0 20 49 74 20 77 69 6c 6c 20 6e 6f 72 6d 61 6c 6c | It will normall| 000001b0 79 20 67 69 76 65 20 61 6e 20 65 72 72 6f 72 20 |y give an error | 000001c0 69 66 20 74 68 65 20 0d 00 82 4a f4 20 74 65 78 |if the ...J. tex| 000001d0 74 20 69 73 20 74 6f 6f 20 6c 6f 6e 67 2c 20 2a |t is too long, *| 000001e0 42 55 54 2a 20 69 66 20 69 74 20 69 73 20 6a 75 |BUT* if it is ju| 000001f0 73 74 20 74 6f 6f 20 6c 6f 6e 67 2c 20 74 68 65 |st too long, the| 00000200 72 65 20 63 61 6e 20 62 65 20 74 72 6f 75 62 6c |re can be troubl| 00000210 65 0d 00 8c 2a f4 20 65 67 20 6e 6f 20 72 6f 6f |e...*. eg no roo| 00000220 6d 20 74 6f 20 63 61 6c 6c 20 74 68 65 20 65 72 |m to call the er| 00000230 72 6f 72 20 68 61 6e 64 6c 65 72 0d 00 96 05 3a |ror handler....:| 00000240 0d 00 a0 0d f2 5f 67 6c 6f 62 61 6c 73 0d 00 aa |....._globals...| 00000250 0f f2 5f 77 69 6d 70 5f 69 6e 69 74 0d 00 b4 12 |.._wimp_init....| 00000260 ee 20 85 20 f2 5f 66 61 74 61 6c 65 72 72 0d 00 |. . ._fatalerr..| 00000270 be 0d f2 5f 6d 79 5f 69 6e 69 74 0d 00 c8 05 f5 |..._my_init.....| 00000280 0d 00 d2 21 c8 99 20 22 57 69 6d 70 5f 50 6f 6c |...!.. "Wimp_Pol| 00000290 6c 22 2c 31 2c 62 25 20 b8 20 72 65 61 73 6f 6e |l",1,b% . reason| 000002a0 25 0d 00 dc 10 c8 8e 20 72 65 61 73 6f 6e 25 20 |%...... reason% | 000002b0 ca 0d 00 e6 15 c9 20 31 3a 20 f2 5f 72 65 64 72 |...... 1: ._redr| 000002c0 61 77 6d 61 69 6e 0d 00 f0 21 c9 20 32 3a 20 c8 |awmain...!. 2: .| 000002d0 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 69 6e 64 |. "Wimp_OpenWind| 000002e0 6f 77 22 2c 2c 62 25 0d 00 fa 2b c9 20 33 3a 20 |ow",,b%...+. 3: | 000002f0 c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 44 6f |.. "Wimp_CloseDo| 00000300 77 6e 22 2c 2c 21 73 61 79 73 54 41 53 4b 25 3a |wn",,!saysTASK%:| 00000310 20 e0 0d 01 04 3d c9 20 31 37 2c 31 38 3a 20 e7 | ....=. 17,18: .| 00000320 20 62 25 21 31 36 20 3d 20 30 20 8c 20 c8 99 20 | b%!16 = 0 . .. | 00000330 22 57 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 |"Wimp_CloseDown"| 00000340 2c 2c 21 73 61 79 73 54 41 53 4b 25 3a 20 e0 0d |,,!saysTASK%: ..| 00000350 01 0e 05 cb 0d 01 18 07 fd 20 a3 0d 01 22 05 e0 |......... ..."..| 00000360 0d 01 2c 05 3a 0d 01 36 05 3a 0d 01 40 05 3a 0d |..,.:..6.:..@.:.| 00000370 01 4a 10 dd 20 f2 5f 66 61 74 61 6c 65 72 72 0d |.J.. ._fatalerr.| 00000380 01 54 09 ee 20 85 20 87 0d 01 5e 18 c8 99 20 22 |.T.. . ...^... "| 00000390 48 6f 75 72 67 6c 61 73 73 5f 53 6d 61 73 68 22 |Hourglass_Smash"| 000003a0 0d 01 68 10 21 6f 73 5f 65 72 72 6f 72 25 3d 9f |..h.!os_error%=.| 000003b0 0d 01 72 19 e7 20 28 21 6f 73 5f 65 72 72 6f 72 |..r.. (!os_error| 000003c0 25 29 20 3d 20 31 31 20 8c 0d 01 7c 4d 24 28 6f |%) = 11 ...|M$(o| 000003d0 73 5f 65 72 72 6f 72 25 2b 34 29 20 3d 20 22 4e |s_error%+4) = "N| 000003e0 6f 74 20 65 6e 6f 75 67 68 20 72 6f 6f 6d 2e 20 |ot enough room. | 000003f0 20 49 6e 63 72 65 61 73 65 20 57 69 6d 70 53 6c | Increase WimpSl| 00000400 6f 74 20 6f 72 20 73 68 6f 72 74 65 6e 20 74 65 |ot or shorten te| 00000410 78 74 22 2b bd 30 0d 01 86 05 cc 0d 01 90 2a 24 |xt"+.0........*$| 00000420 28 6f 73 5f 65 72 72 6f 72 25 2b 34 29 3d c0 f6 |(os_error%+4)=..| 00000430 24 2c 31 30 30 29 2b 22 20 28 22 2b c3 9e 2b 22 |$,100)+" ("+..+"| 00000440 29 22 2b bd 30 0d 01 9a 05 cd 0d 01 a4 35 c8 99 |)"+.0........5..| 00000450 20 22 57 69 6d 70 5f 52 65 70 6f 72 74 45 72 72 | "Wimp_ReportErr| 00000460 6f 72 22 2c 20 6f 73 5f 65 72 72 6f 72 25 2c 20 |or", os_error%, | 00000470 31 2c 20 50 52 4f 47 52 41 4d 4e 41 4d 45 24 0d |1, PROGRAMNAME$.| 00000480 01 ae 23 c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 |..#.. "Wimp_Clos| 00000490 65 44 6f 77 6e 22 2c 2c 21 73 61 79 73 54 41 53 |eDown",,!saysTAS| 000004a0 4b 25 0d 01 b8 05 e0 0d 01 c2 05 e1 0d 01 cc 05 |K%..............| 000004b0 3a 0d 01 d6 05 3a 0d 01 e0 0e dd f2 5f 67 6c 6f |:....:......_glo| 000004c0 62 61 6c 73 0d 01 ea 1d 50 52 4f 47 52 41 4d 4e |bals....PROGRAMN| 000004d0 41 4d 45 24 20 3d 20 22 48 65 6c 70 56 69 65 77 |AME$ = "HelpView| 000004e0 22 0d 01 f4 18 4d 41 58 5f 4e 4f 46 5f 4c 49 4e |"....MAX_NOF_LIN| 000004f0 45 53 25 20 3d 20 35 30 30 0d 01 fe 12 53 45 50 |ES% = 500....SEP| 00000500 5f 4c 49 4e 45 25 20 3d 20 33 36 0d 02 08 10 de |_LINE% = 36.....| 00000510 20 73 61 79 73 54 41 53 4b 25 34 0d 02 12 15 24 | saysTASK%4....$| 00000520 73 61 79 73 54 41 53 4b 25 3d 22 54 41 53 4b 22 |saysTASK%="TASK"| 00000530 0d 02 1c 3f de 20 67 65 6e 65 72 61 6c 25 20 20 |...?. general% | 00000540 20 20 20 20 32 35 36 20 20 20 20 20 20 20 20 20 | 256 | 00000550 3a f4 20 67 65 6e 65 72 61 6c 20 74 65 6d 70 6f |:. general tempo| 00000560 72 61 72 79 20 77 6f 72 6b 73 70 61 63 65 20 0d |rary workspace .| 00000570 02 26 37 de 20 62 25 20 20 20 20 20 20 20 20 20 |.&7. b% | 00000580 20 20 20 35 31 32 20 20 20 20 20 20 20 20 20 3a | 512 :| 00000590 f4 20 66 6f 72 20 77 69 6d 70 20 62 6c 6f 63 6b |. for wimp block| 000005a0 20 20 20 20 20 20 0d 02 30 41 de 20 6f 73 5f 65 | ..0A. os_e| 000005b0 72 72 6f 72 25 20 20 20 20 20 32 35 36 20 20 20 |rror% 256 | 000005c0 20 20 20 20 20 20 3a f4 20 34 20 62 79 74 65 20 | :. 4 byte | 000005d0 6e 75 6d 20 70 6c 75 73 20 30 2d 74 65 72 6d 20 |num plus 0-term | 000005e0 73 74 72 69 6e 67 20 0d 02 3a 35 72 65 73 6f 75 |string ..:5resou| 000005f0 72 63 65 73 24 20 3d 20 22 22 20 20 20 20 20 20 |rces$ = "" | 00000600 20 20 20 20 20 20 20 20 20 3a f4 20 3d 20 3c 48 | :. = <H| 00000610 65 6c 70 56 69 65 77 24 44 69 72 3e 0d 02 44 42 |elpView$Dir>..DB| 00000620 74 65 78 74 61 72 65 61 25 20 3d 20 30 20 20 20 |textarea% = 0 | 00000630 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 | :.| 00000640 20 70 74 72 20 74 6f 20 61 72 65 61 20 74 6f 20 | ptr to area to | 00000650 6c 6f 61 64 20 74 65 78 74 20 69 6e 74 6f 0d 02 |load text into..| 00000660 4e 12 74 65 78 74 6c 65 6e 25 20 3d 20 30 20 20 |N.textlen% = 0 | 00000670 0d 02 58 4a de 20 6c 69 6e 65 70 74 72 73 25 28 |..XJ. lineptrs%(| 00000680 4d 41 58 5f 4e 4f 46 5f 4c 49 4e 45 53 25 29 20 |MAX_NOF_LINES%) | 00000690 3a f4 20 70 74 72 73 20 74 6f 20 73 74 61 72 74 |:. ptrs to start| 000006a0 20 6f 66 20 65 61 63 68 20 6c 69 6e 65 20 69 6e | of each line in| 000006b0 20 74 65 78 74 61 72 65 61 25 0d 02 62 11 6e 6f | textarea%..b.no| 000006c0 66 6c 69 6e 65 73 25 20 3d 20 30 0d 02 6c 35 77 |flines% = 0..l5w| 000006d0 5f 73 78 25 20 3d 20 30 20 20 20 20 20 20 20 20 |_sx% = 0 | 000006e0 20 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 20 | :. | 000006f0 66 6f 72 20 72 65 64 72 61 77 20 63 61 6c 63 73 |for redraw calcs| 00000700 0d 02 76 0d 77 5f 73 79 25 20 3d 20 30 0d 02 80 |..v.w_sy% = 0...| 00000710 0d 67 74 6f 70 25 20 3d 20 30 0d 02 8a 0d 67 62 |.gtop% = 0....gb| 00000720 6f 74 25 20 3d 20 30 0d 02 94 05 e1 0d 02 9e 05 |ot% = 0.........| 00000730 3a 0d 02 a8 05 3a 0d 02 b2 10 dd f2 5f 77 69 6d |:....:......_wim| 00000740 70 5f 69 6e 69 74 0d 02 bc 40 c8 99 20 22 57 69 |p_init...@.. "Wi| 00000750 6d 70 5f 49 6e 69 74 69 61 6c 69 73 65 22 2c 32 |mp_Initialise",2| 00000760 30 30 2c 21 73 61 79 73 54 41 53 4b 25 2c 22 48 |00,!saysTASK%,"H| 00000770 65 6c 70 20 56 69 65 77 65 72 22 20 b8 20 76 65 |elp Viewer" . ve| 00000780 72 73 69 6f 6e 25 0d 02 c6 0e f2 5f 72 65 73 5f |rsion%....._res_| 00000790 69 6e 69 74 0d 02 d0 14 f2 5f 74 65 6d 70 6c 61 |init....._templa| 000007a0 74 65 73 5f 69 6e 69 74 0d 02 da 05 e1 0d 02 e4 |tes_init........| 000007b0 05 3a 0d 02 ee 05 3a 0d 02 f8 0f dd f2 5f 72 65 |.:....:......_re| 000007c0 73 5f 69 6e 69 74 0d 03 02 0a ea 20 6c 65 6e 25 |s_init..... len%| 000007d0 0d 03 0c 4a c8 99 20 22 58 4f 53 5f 52 65 61 64 |...J.. "XOS_Read| 000007e0 56 61 72 56 61 6c 22 2c 20 50 52 4f 47 52 41 4d |VarVal", PROGRAM| 000007f0 4e 41 4d 45 24 2b 22 24 44 69 72 22 2c 20 67 65 |NAME$+"$Dir", ge| 00000800 6e 65 72 61 6c 25 2c 20 32 35 35 2c 20 30 2c 20 |neral%, 255, 0, | 00000810 30 20 b8 20 2c 2c 6c 65 6e 25 0d 03 16 18 24 28 |0 . ,,len%....$(| 00000820 67 65 6e 65 72 61 6c 25 2b 6c 65 6e 25 29 3d bd |general%+len%)=.| 00000830 31 33 0d 03 20 18 72 65 73 6f 75 72 63 65 73 24 |13.. .resources$| 00000840 3d 24 67 65 6e 65 72 61 6c 25 0d 03 2a 05 e1 0d |=$general%..*...| 00000850 03 34 05 3a 0d 03 3e 05 3a 0d 03 48 15 dd f2 5f |.4.:..>.:..H..._| 00000860 74 65 6d 70 6c 61 74 65 73 5f 69 6e 69 74 0d 03 |templates_init..| 00000870 52 09 ea 20 77 73 25 0d 03 5c 0d de 20 77 73 25 |R.. ws%..\.. ws%| 00000880 20 31 30 30 0d 03 66 33 c8 99 22 57 69 6d 70 5f | 100..f3.."Wimp_| 00000890 4f 70 65 6e 54 65 6d 70 6c 61 74 65 22 2c 2c 20 |OpenTemplate",, | 000008a0 72 65 73 6f 75 72 63 65 73 24 2b 22 2e 54 65 6d |resources$+".Tem| 000008b0 70 6c 61 74 65 73 22 0d 03 70 37 c8 99 22 57 69 |plates"..p7.."Wi| 000008c0 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 65 22 |mp_LoadTemplate"| 000008d0 2c 2c 62 25 2c 77 73 25 2c 77 73 25 2b 31 30 30 |,,b%,ws%,ws%+100| 000008e0 2c 2d 31 2c 22 6d 61 69 6e 57 22 2c 30 20 0d 03 |,-1,"mainW",0 ..| 000008f0 7a 2d c8 99 22 57 69 6d 70 5f 43 72 65 61 74 65 |z-.."Wimp_Create| 00000900 57 69 6e 64 6f 77 22 2c 2c 62 25 20 b8 20 6d 61 |Window",,b% . ma| 00000910 69 6e 57 5f 68 61 6e 64 6c 65 25 0d 03 84 1a c8 |inW_handle%.....| 00000920 99 22 57 69 6d 70 5f 43 6c 6f 73 65 54 65 6d 70 |."Wimp_CloseTemp| 00000930 6c 61 74 65 22 0d 03 8e 05 e1 0d 03 98 05 3a 0d |late".........:.| 00000940 03 a2 05 3a 0d 03 ac 0e dd f2 5f 6d 79 5f 69 6e |...:......_my_in| 00000950 69 74 0d 03 b6 0c ea 20 41 25 2c 20 42 25 0d 03 |it..... A%, B%..| 00000960 c0 15 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f |.... "Hourglass_| 00000970 4f 6e 22 0d 03 ca 3b c8 99 20 22 4f 53 5f 46 69 |On"...;.. "OS_Fi| 00000980 6c 65 22 2c 20 31 37 2c 20 72 65 73 6f 75 72 63 |le", 17, resourc| 00000990 65 73 24 2b 22 2e 48 65 6c 70 54 65 78 74 22 20 |es$+".HelpText" | 000009a0 b8 20 2c 2c 2c 2c 74 65 78 74 6c 65 6e 25 0d 03 |. ,,,,textlen%..| 000009b0 d4 1e de 20 74 65 78 74 61 72 65 61 25 20 28 74 |... textarea% (t| 000009c0 65 78 74 6c 65 6e 25 20 2b 20 31 29 0d 03 de 3a |extlen% + 1)...:| 000009d0 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 20 31 36 |.. "OS_File", 16| 000009e0 2c 20 72 65 73 6f 75 72 63 65 73 24 2b 22 2e 48 |, resources$+".H| 000009f0 65 6c 70 54 65 78 74 22 2c 20 74 65 78 74 61 72 |elpText", textar| 00000a00 65 61 25 2c 20 30 0d 03 e8 1b 74 65 78 74 61 72 |ea%, 0....textar| 00000a10 65 61 25 3f 74 65 78 74 6c 65 6e 25 20 3d 20 31 |ea%?textlen% = 1| 00000a20 33 0d 03 f2 1b 41 25 20 3d 20 74 65 78 74 61 72 |3....A% = textar| 00000a30 65 61 25 3a 20 42 25 20 3d 20 41 25 0d 03 fc 11 |ea%: B% = A%....| 00000a40 6e 6f 66 6c 69 6e 65 73 25 20 3d 20 30 0d 04 06 |noflines% = 0...| 00000a50 20 c8 95 20 41 25 20 3c 20 74 65 78 74 61 72 65 | .. A% < textare| 00000a60 61 25 20 2b 20 74 65 78 74 6c 65 6e 25 0d 04 10 |a% + textlen%...| 00000a70 15 c8 95 3f 41 25 3e 3d 33 32 3a 41 25 2b 3d 31 |...?A%>=32:A%+=1| 00000a80 3a ce 0d 04 1a 0c 3f 41 25 20 3d 20 31 33 0d 04 |:.....?A% = 13..| 00000a90 24 1d 6c 69 6e 65 70 74 72 73 25 28 6e 6f 66 6c |$.lineptrs%(nofl| 00000aa0 69 6e 65 73 25 29 20 3d 20 42 25 0d 04 2e 12 6e |ines%) = B%....n| 00000ab0 6f 66 6c 69 6e 65 73 25 20 2b 3d 20 31 0d 04 38 |oflines% += 1..8| 00000ac0 54 e7 20 6e 6f 66 6c 69 6e 65 73 25 20 3d 20 4d |T. noflines% = M| 00000ad0 41 58 5f 4e 4f 46 5f 4c 49 4e 45 53 25 20 8c 20 |AX_NOF_LINES% . | 00000ae0 85 20 31 2c 20 22 54 6f 6f 20 6d 61 6e 79 20 6c |. 1, "Too many l| 00000af0 69 6e 65 73 20 2d 20 6d 61 78 20 69 73 20 53 54 |ines - max is ST| 00000b00 52 24 4d 41 58 5f 4e 4f 46 5f 4c 49 4e 45 53 25 |R$MAX_NOF_LINES%| 00000b10 22 0d 04 42 0b 41 25 20 2b 3d 20 31 0d 04 4c 0b |"..B.A% += 1..L.| 00000b20 42 25 20 3d 20 41 25 0d 04 56 05 ce 0d 04 60 16 |B% = A%..V....`.| 00000b30 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 |.. "Hourglass_Of| 00000b40 66 22 0d 04 6a 0c 62 25 21 30 20 3d 20 30 0d 04 |f"..j.b%!0 = 0..| 00000b50 74 1f 62 25 21 34 20 3d 20 2d 53 45 50 5f 4c 49 |t.b%!4 = -SEP_LI| 00000b60 4e 45 25 2a 6e 6f 66 6c 69 6e 65 73 25 0d 04 7e |NE%*noflines%..~| 00000b70 0f 62 25 21 38 20 3d 20 31 30 34 30 0d 04 88 0d |.b%!8 = 1040....| 00000b80 62 25 21 31 32 20 3d 20 30 0d 04 92 2a c8 99 20 |b%!12 = 0...*.. | 00000b90 22 57 69 6d 70 5f 53 65 74 45 78 74 65 6e 74 22 |"Wimp_SetExtent"| 00000ba0 2c 20 6d 61 69 6e 57 5f 68 61 6e 64 6c 65 25 2c |, mainW_handle%,| 00000bb0 20 62 25 0d 04 9c 18 62 25 21 30 20 3d 20 6d 61 | b%....b%!0 = ma| 00000bc0 69 6e 57 5f 68 61 6e 64 6c 65 25 0d 04 a6 20 c8 |inW_handle%... .| 00000bd0 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f |. "Wimp_GetWindo| 00000be0 77 53 74 61 74 65 22 2c 2c 62 25 0d 04 b0 1c c8 |wState",,b%.....| 00000bf0 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 69 6e 64 |. "Wimp_OpenWind| 00000c00 6f 77 22 2c 2c 62 25 0d 04 ba 05 e1 0d 04 c4 05 |ow",,b%.........| 00000c10 3a 0d 04 ce 05 3a 0d 04 d8 11 dd f2 64 65 63 6f |:....:......deco| 00000c20 64 65 62 6c 6f 63 6b 0d 04 e2 18 77 5f 73 78 25 |deblock....w_sx%| 00000c30 20 3d 20 62 25 21 34 20 2d 20 62 25 21 32 30 0d | = b%!4 - b%!20.| 00000c40 04 ec 19 77 5f 73 79 25 20 3d 20 62 25 21 31 36 |...w_sy% = b%!16| 00000c50 20 2d 20 62 25 21 32 34 0d 04 f6 11 67 74 6f 70 | - b%!24....gtop| 00000c60 25 20 3d 20 62 25 21 34 30 0d 05 00 11 67 62 6f |% = b%!40....gbo| 00000c70 74 25 20 3d 20 62 25 21 33 32 0d 05 0a 05 e1 0d |t% = b%!32......| 00000c80 05 14 05 3a 0d 05 1e 05 3a 0d 05 28 27 dd f2 5f |...:....:..('.._| 00000c90 72 65 64 72 61 77 6d 61 69 6e 20 20 20 20 20 20 |redrawmain | 00000ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000cb0 0d 05 32 2f ea 20 6d 6f 72 65 25 2c 20 78 30 25 |..2/. more%, x0%| 00000cc0 2c 20 78 31 25 2c 20 79 30 25 2c 20 79 31 25 2c |, x1%, y0%, y1%,| 00000cd0 20 49 25 2c 20 54 25 2c 20 42 25 2c 20 53 25 0d | I%, T%, B%, S%.| 00000ce0 05 3c 05 3a 0d 05 46 12 53 25 20 3d 20 53 45 50 |.<.:..F.S% = SEP| 00000cf0 5f 4c 49 4e 45 25 0d 05 50 26 c8 99 20 22 57 69 |_LINE%..P&.. "Wi| 00000d00 6d 70 5f 52 65 64 72 61 77 57 69 6e 64 6f 77 22 |mp_RedrawWindow"| 00000d10 2c 2c 62 25 20 b8 20 6d 6f 72 65 25 0d 05 5a 0c |,,b% . more%..Z.| 00000d20 c8 95 20 6d 6f 72 65 25 0d 05 64 10 f2 64 65 63 |.. more%..d..dec| 00000d30 6f 64 65 62 6c 6f 63 6b 0d 05 6e 23 54 25 20 3d |odeblock..n#T% =| 00000d40 20 28 2d 28 67 74 6f 70 25 20 2d 20 77 5f 73 79 | (-(gtop% - w_sy| 00000d50 25 29 20 2d 20 53 25 29 2f 53 25 0d 05 78 11 e7 |%) - S%)/S%..x..| 00000d60 20 54 25 3c 30 20 54 25 20 3d 20 30 0d 05 82 1f | T%<0 T% = 0....| 00000d70 42 25 20 3d 20 28 2d 28 67 62 6f 74 25 20 2d 20 |B% = (-(gbot% - | 00000d80 77 5f 73 79 25 29 29 2f 53 25 20 0d 05 8c 25 e7 |w_sy%))/S% ...%.| 00000d90 20 42 25 3e 3d 20 6e 6f 66 6c 69 6e 65 73 25 20 | B%>= noflines% | 00000da0 42 25 20 3d 20 6e 6f 66 6c 69 6e 65 73 25 2d 31 |B% = noflines%-1| 00000db0 0d 05 96 15 e3 20 49 25 20 3d 20 54 25 20 b8 20 |..... I% = T% . | 00000dc0 42 25 20 20 20 0d 05 a0 13 78 30 25 20 3d 20 38 |B% ....x0% = 8| 00000dd0 20 2b 20 77 5f 73 78 25 0d 05 aa 1c 79 31 25 20 | + w_sx%....y1% | 00000de0 3d 20 2d 38 20 2d 20 53 25 2a 49 25 20 2b 20 77 |= -8 - S%*I% + w| 00000df0 5f 73 79 25 0d 05 b4 0e ec 20 78 30 25 2c 20 79 |_sy%..... x0%, y| 00000e00 31 25 0d 05 be 16 f1 20 24 28 6c 69 6e 65 70 74 |1%..... $(linept| 00000e10 72 73 25 28 49 25 29 29 0d 05 c8 05 ed 0d 05 d2 |rs%(I%))........| 00000e20 26 c8 99 20 22 57 69 6d 70 5f 47 65 74 52 65 63 |&.. "Wimp_GetRec| 00000e30 74 61 6e 67 6c 65 22 2c 2c 62 25 20 b8 20 6d 6f |tangle",,b% . mo| 00000e40 72 65 25 0d 05 dc 05 ce 0d 05 e6 05 e1 0d ff |re%............| 00000e4f