Home » Archimedes archive » Acorn User » AU 1994-02.adf » !StarInfo_StarInfo » Gerrits/!ModeFont/ModeChange

Gerrits/!ModeFont/ModeChange

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 1994-02.adf » !StarInfo_StarInfo
Filename: Gerrits/!ModeFont/ModeChange
Read OK:
File size: 0319 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >ModeChange
   20REM Receive Mode-change messages to reset font defenitions
   30REM By Erwin Gerrits
   40REM For RISC-OS 3.1
   50REM (c) BAA
   60
   70ON ERROR REPORT:PRINT" at line ";ERL:END
   80
   90DIM block 256
  100$block="TASK":block!4=&400C1:block!8=0
  110SYS "Wimp_Initialise",310,!block,"ModeChange",block+4
  120REPEAT
  130  SYS "Wimp_Poll",%00000001100101110011,block TO reason
  140  IF (reason=17 OR reason=18) AND block!16=&400C1 THEN PROCfonts
  150UNTIL (reason=17 OR reason=18) AND block!16=0
  160SYS "Wimp_CloseDown"
  170END
  180
  190DEF PROCfonts
  200 SYS "XOS_ReadVarVal","Desktop$FontHandle",block,255,0,3 TO ,,len
  210 block?len=13
  220 SYS "XFont_LoseFont",VAL($block)
  230 SYS "XOS_ReadVarVal","Desktop$Font",block,255,0,3 TO ,,len
  240 block?len=13
  250 SYS "XFont_FindFont",,$block,11*16,11*16 TO handle
  260
  270 OSCLI("SetEval Desktop$FontHandle "+STR$(handle))
  280ENDPROC

� >ModeChange
<� Receive Mode-change messages to reset font defenitions
� By Erwin Gerrits
(� For RISC-OS 3.1
2
� (c) BAA
<
F� � �:�" at line ";�:�
P
Z� block 256
d*$block="TASK":block!4=&400C1:block!8=0
n8ș "Wimp_Initialise",310,!block,"ModeChange",block+4
x�
�9  ș "Wimp_Poll",%00000001100101110011,block � reason
�:  � (reason=17 � reason=18) � block!16=&400C1 � �fonts
�*� (reason=17 � reason=18) � block!16=0
�ș "Wimp_CloseDown"
��
�
�� �fonts
�C ș "XOS_ReadVarVal","Desktop$FontHandle",block,255,0,3 � ,,len
� block?len=13
�" ș "XFont_LoseFont",�($block)
�= ș "XOS_ReadVarVal","Desktop$Font",block,255,0,3 � ,,len
� block?len=13
�5 ș "XFont_FindFont",,$block,11*16,11*16 � handle

/ �("SetEval Desktop$FontHandle "+�(handle))
�
�
00000000  0d 00 0a 11 f4 20 3e 4d  6f 64 65 43 68 61 6e 67  |..... >ModeChang|
00000010  65 0d 00 14 3c f4 20 52  65 63 65 69 76 65 20 4d  |e...<. Receive M|
00000020  6f 64 65 2d 63 68 61 6e  67 65 20 6d 65 73 73 61  |ode-change messa|
00000030  67 65 73 20 74 6f 20 72  65 73 65 74 20 66 6f 6e  |ges to reset fon|
00000040  74 20 64 65 66 65 6e 69  74 69 6f 6e 73 0d 00 1e  |t defenitions...|
00000050  16 f4 20 42 79 20 45 72  77 69 6e 20 47 65 72 72  |.. By Erwin Gerr|
00000060  69 74 73 0d 00 28 15 f4  20 46 6f 72 20 52 49 53  |its..(.. For RIS|
00000070  43 2d 4f 53 20 33 2e 31  0d 00 32 0d f4 20 28 63  |C-OS 3.1..2.. (c|
00000080  29 20 42 41 41 0d 00 3c  04 0d 00 46 1a ee 20 85  |) BAA..<...F.. .|
00000090  20 f6 3a f1 22 20 61 74  20 6c 69 6e 65 20 22 3b  | .:." at line ";|
000000a0  9e 3a e0 0d 00 50 04 0d  00 5a 0f de 20 62 6c 6f  |.:...P...Z.. blo|
000000b0  63 6b 20 32 35 36 0d 00  64 2a 24 62 6c 6f 63 6b  |ck 256..d*$block|
000000c0  3d 22 54 41 53 4b 22 3a  62 6c 6f 63 6b 21 34 3d  |="TASK":block!4=|
000000d0  26 34 30 30 43 31 3a 62  6c 6f 63 6b 21 38 3d 30  |&400C1:block!8=0|
000000e0  0d 00 6e 38 c8 99 20 22  57 69 6d 70 5f 49 6e 69  |..n8.. "Wimp_Ini|
000000f0  74 69 61 6c 69 73 65 22  2c 33 31 30 2c 21 62 6c  |tialise",310,!bl|
00000100  6f 63 6b 2c 22 4d 6f 64  65 43 68 61 6e 67 65 22  |ock,"ModeChange"|
00000110  2c 62 6c 6f 63 6b 2b 34  0d 00 78 05 f5 0d 00 82  |,block+4..x.....|
00000120  39 20 20 c8 99 20 22 57  69 6d 70 5f 50 6f 6c 6c  |9  .. "Wimp_Poll|
00000130  22 2c 25 30 30 30 30 30  30 30 31 31 30 30 31 30  |",%0000000110010|
00000140  31 31 31 30 30 31 31 2c  62 6c 6f 63 6b 20 b8 20  |1110011,block . |
00000150  72 65 61 73 6f 6e 0d 00  8c 3a 20 20 e7 20 28 72  |reason...:  . (r|
00000160  65 61 73 6f 6e 3d 31 37  20 84 20 72 65 61 73 6f  |eason=17 . reaso|
00000170  6e 3d 31 38 29 20 80 20  62 6c 6f 63 6b 21 31 36  |n=18) . block!16|
00000180  3d 26 34 30 30 43 31 20  8c 20 f2 66 6f 6e 74 73  |=&400C1 . .fonts|
00000190  0d 00 96 2a fd 20 28 72  65 61 73 6f 6e 3d 31 37  |...*. (reason=17|
000001a0  20 84 20 72 65 61 73 6f  6e 3d 31 38 29 20 80 20  | . reason=18) . |
000001b0  62 6c 6f 63 6b 21 31 36  3d 30 0d 00 a0 17 c8 99  |block!16=0......|
000001c0  20 22 57 69 6d 70 5f 43  6c 6f 73 65 44 6f 77 6e  | "Wimp_CloseDown|
000001d0  22 0d 00 aa 05 e0 0d 00  b4 04 0d 00 be 0c dd 20  |".............. |
000001e0  f2 66 6f 6e 74 73 0d 00  c8 43 20 c8 99 20 22 58  |.fonts...C .. "X|
000001f0  4f 53 5f 52 65 61 64 56  61 72 56 61 6c 22 2c 22  |OS_ReadVarVal","|
00000200  44 65 73 6b 74 6f 70 24  46 6f 6e 74 48 61 6e 64  |Desktop$FontHand|
00000210  6c 65 22 2c 62 6c 6f 63  6b 2c 32 35 35 2c 30 2c  |le",block,255,0,|
00000220  33 20 b8 20 2c 2c 6c 65  6e 0d 00 d2 11 20 62 6c  |3 . ,,len.... bl|
00000230  6f 63 6b 3f 6c 65 6e 3d  31 33 0d 00 dc 22 20 c8  |ock?len=13..." .|
00000240  99 20 22 58 46 6f 6e 74  5f 4c 6f 73 65 46 6f 6e  |. "XFont_LoseFon|
00000250  74 22 2c bb 28 24 62 6c  6f 63 6b 29 0d 00 e6 3d  |t",.($block)...=|
00000260  20 c8 99 20 22 58 4f 53  5f 52 65 61 64 56 61 72  | .. "XOS_ReadVar|
00000270  56 61 6c 22 2c 22 44 65  73 6b 74 6f 70 24 46 6f  |Val","Desktop$Fo|
00000280  6e 74 22 2c 62 6c 6f 63  6b 2c 32 35 35 2c 30 2c  |nt",block,255,0,|
00000290  33 20 b8 20 2c 2c 6c 65  6e 0d 00 f0 11 20 62 6c  |3 . ,,len.... bl|
000002a0  6f 63 6b 3f 6c 65 6e 3d  31 33 0d 00 fa 35 20 c8  |ock?len=13...5 .|
000002b0  99 20 22 58 46 6f 6e 74  5f 46 69 6e 64 46 6f 6e  |. "XFont_FindFon|
000002c0  74 22 2c 2c 24 62 6c 6f  63 6b 2c 31 31 2a 31 36  |t",,$block,11*16|
000002d0  2c 31 31 2a 31 36 20 b8  20 68 61 6e 64 6c 65 0d  |,11*16 . handle.|
000002e0  01 04 04 0d 01 0e 2f 20  ff 28 22 53 65 74 45 76  |....../ .("SetEv|
000002f0  61 6c 20 44 65 73 6b 74  6f 70 24 46 6f 6e 74 48  |al Desktop$FontH|
00000300  61 6e 64 6c 65 20 22 2b  c3 28 68 61 6e 64 6c 65  |andle "+.(handle|
00000310  29 29 0d 01 18 05 e1 0d  ff                       |)).......|
00000319