Home » Archimedes archive » Acorn User » AU 1998-12.adf » Regulars » StarInfo/Granger/!Chemistry/PROCS/MiscPROCs

StarInfo/Granger/!Chemistry/PROCS/MiscPROCs

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 User » AU 1998-12.adf » Regulars
Filename: StarInfo/Granger/!Chemistry/PROCS/MiscPROCs
Read OK:
File size: 02B2 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM ### MISC PROCS ###
   20
   30DEF PROCerror(err$)
   40!t%=ERR
   50$(t%+4)=err$+CHR$(0)
   60SYS "Wimp_ReportError",t%,3,"Chemistry" TO ,out%
   70IF out%=2 THEN SYS "Wimp_CloseDown":END
   80ENDPROC
   90
  100DEF PROCsetcaret(win%,icon%)
  110SYS "Wimp_GetCaretPosition",,b%
  120IF !b%=win% AND icon%=b%!4 THEN
  130SYS "Wimp_SetCaretPosition",win%,icon%,0,-1,-1,LEN(FNreadicon(win%,icon%))
  140ENDIF
  150ENDPROC
  160
  170DEF PROCnewcaret(win%,icon%)
  180SYS "Wimp_SetCaretPosition",win%,icon%,0,-1,-1,LEN(FNreadicon(win%,icon%))
  190ENDPROC
  200
  210DEF PROCfontarray
  220DIM font% 256
  230FOR n=0 TO 256 STEP 4
  240!(n+font%)=0
  250NEXT n
  260fontarray%=font%
  270SYS "Font_FindFont",,"Homerton.Medium",16*12,16*12,0,0 TO font1%
  280SYS "Font_FindFont",,"Trinity.Medium",16*12,16*12,0,0 TO font2%
  290ENDPROC

� ### MISC PROCS ###

� �error(err$)
(	!t%=�
2$(t%+4)=err$+�(0)
<2ș "Wimp_ReportError",t%,3,"Chemistry" � ,out%
F$� out%=2 � ș "Wimp_CloseDown":�
P�
Z
d� �setcaret(win%,icon%)
n"ș "Wimp_GetCaretPosition",,b%
x� !b%=win% � icon%=b%!4 �
�Jș "Wimp_SetCaretPosition",win%,icon%,0,-1,-1,�(�readicon(win%,icon%))
��
��
�
�� �newcaret(win%,icon%)
�Jș "Wimp_SetCaretPosition",win%,icon%,0,-1,-1,�(�readicon(win%,icon%))
��
�
�� �fontarray
�� font% 256
�� n=0 � 256 � 4
�!(n+font%)=0
�� n
fontarray%=font%
Bș "Font_FindFont",,"Homerton.Medium",16*12,16*12,0,0 � font1%
Aș "Font_FindFont",,"Trinity.Medium",16*12,16*12,0,0 � font2%
"�
�
00000000  0d 00 0a 18 f4 20 23 23  23 20 4d 49 53 43 20 50  |..... ### MISC P|
00000010  52 4f 43 53 20 23 23 23  0d 00 14 04 0d 00 1e 12  |ROCS ###........|
00000020  dd 20 f2 65 72 72 6f 72  28 65 72 72 24 29 0d 00  |. .error(err$)..|
00000030  28 09 21 74 25 3d 9f 0d  00 32 15 24 28 74 25 2b  |(.!t%=...2.$(t%+|
00000040  34 29 3d 65 72 72 24 2b  bd 28 30 29 0d 00 3c 32  |4)=err$+.(0)..<2|
00000050  c8 99 20 22 57 69 6d 70  5f 52 65 70 6f 72 74 45  |.. "Wimp_ReportE|
00000060  72 72 6f 72 22 2c 74 25  2c 33 2c 22 43 68 65 6d  |rror",t%,3,"Chem|
00000070  69 73 74 72 79 22 20 b8  20 2c 6f 75 74 25 0d 00  |istry" . ,out%..|
00000080  46 24 e7 20 6f 75 74 25  3d 32 20 8c 20 c8 99 20  |F$. out%=2 . .. |
00000090  22 57 69 6d 70 5f 43 6c  6f 73 65 44 6f 77 6e 22  |"Wimp_CloseDown"|
000000a0  3a e0 0d 00 50 05 e1 0d  00 5a 04 0d 00 64 1b dd  |:...P....Z...d..|
000000b0  20 f2 73 65 74 63 61 72  65 74 28 77 69 6e 25 2c  | .setcaret(win%,|
000000c0  69 63 6f 6e 25 29 0d 00  6e 22 c8 99 20 22 57 69  |icon%)..n".. "Wi|
000000d0  6d 70 5f 47 65 74 43 61  72 65 74 50 6f 73 69 74  |mp_GetCaretPosit|
000000e0  69 6f 6e 22 2c 2c 62 25  0d 00 78 1d e7 20 21 62  |ion",,b%..x.. !b|
000000f0  25 3d 77 69 6e 25 20 80  20 69 63 6f 6e 25 3d 62  |%=win% . icon%=b|
00000100  25 21 34 20 8c 0d 00 82  4a c8 99 20 22 57 69 6d  |%!4 ....J.. "Wim|
00000110  70 5f 53 65 74 43 61 72  65 74 50 6f 73 69 74 69  |p_SetCaretPositi|
00000120  6f 6e 22 2c 77 69 6e 25  2c 69 63 6f 6e 25 2c 30  |on",win%,icon%,0|
00000130  2c 2d 31 2c 2d 31 2c a9  28 a4 72 65 61 64 69 63  |,-1,-1,.(.readic|
00000140  6f 6e 28 77 69 6e 25 2c  69 63 6f 6e 25 29 29 0d  |on(win%,icon%)).|
00000150  00 8c 05 cd 0d 00 96 05  e1 0d 00 a0 04 0d 00 aa  |................|
00000160  1b dd 20 f2 6e 65 77 63  61 72 65 74 28 77 69 6e  |.. .newcaret(win|
00000170  25 2c 69 63 6f 6e 25 29  0d 00 b4 4a c8 99 20 22  |%,icon%)...J.. "|
00000180  57 69 6d 70 5f 53 65 74  43 61 72 65 74 50 6f 73  |Wimp_SetCaretPos|
00000190  69 74 69 6f 6e 22 2c 77  69 6e 25 2c 69 63 6f 6e  |ition",win%,icon|
000001a0  25 2c 30 2c 2d 31 2c 2d  31 2c a9 28 a4 72 65 61  |%,0,-1,-1,.(.rea|
000001b0  64 69 63 6f 6e 28 77 69  6e 25 2c 69 63 6f 6e 25  |dicon(win%,icon%|
000001c0  29 29 0d 00 be 05 e1 0d  00 c8 04 0d 00 d2 10 dd  |))..............|
000001d0  20 f2 66 6f 6e 74 61 72  72 61 79 0d 00 dc 0f de  | .fontarray.....|
000001e0  20 66 6f 6e 74 25 20 32  35 36 0d 00 e6 13 e3 20  | font% 256..... |
000001f0  6e 3d 30 20 b8 20 32 35  36 20 88 20 34 0d 00 f0  |n=0 . 256 . 4...|
00000200  10 21 28 6e 2b 66 6f 6e  74 25 29 3d 30 0d 00 fa  |.!(n+font%)=0...|
00000210  07 ed 20 6e 0d 01 04 14  66 6f 6e 74 61 72 72 61  |.. n....fontarra|
00000220  79 25 3d 66 6f 6e 74 25  0d 01 0e 42 c8 99 20 22  |y%=font%...B.. "|
00000230  46 6f 6e 74 5f 46 69 6e  64 46 6f 6e 74 22 2c 2c  |Font_FindFont",,|
00000240  22 48 6f 6d 65 72 74 6f  6e 2e 4d 65 64 69 75 6d  |"Homerton.Medium|
00000250  22 2c 31 36 2a 31 32 2c  31 36 2a 31 32 2c 30 2c  |",16*12,16*12,0,|
00000260  30 20 b8 20 66 6f 6e 74  31 25 0d 01 18 41 c8 99  |0 . font1%...A..|
00000270  20 22 46 6f 6e 74 5f 46  69 6e 64 46 6f 6e 74 22  | "Font_FindFont"|
00000280  2c 2c 22 54 72 69 6e 69  74 79 2e 4d 65 64 69 75  |,,"Trinity.Mediu|
00000290  6d 22 2c 31 36 2a 31 32  2c 31 36 2a 31 32 2c 30  |m",16*12,16*12,0|
000002a0  2c 30 20 b8 20 66 6f 6e  74 32 25 0d 01 22 05 e1  |,0 . font2%.."..|
000002b0  0d ff                                             |..|
000002b2