Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Regulars » StarInfo/Kemp/ToggleSrc

StarInfo/Kemp/ToggleSrc

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Regulars
Filename: StarInfo/Kemp/ToggleSrc
Read OK:
File size: 1829 bytes
Load address: 0000
Exec address: 0000
File contents
    1REM --------------------------------------------------------------------------
    2REM
    3REM     Toggle (source)
    4REM
    5REM     Flip the icon bar between top and bottom of the window stack with
    6REM     the mouse
    7REM
    8REM     by KCE Software (Andrew Kemp)
    9REM
   10REM     LEN March 1996
   11REM
   12REM --------------------------------------------------------------------------
   13
   14run%=TRUE
   15ON ERROR VDU 7:PRINT REPORT$;" at line ";STR$(ERL):END
   16
   17REM --------------------------------------------------------------------------
   18REM     Define some handy constants
   19REM --------------------------------------------------------------------------
   20
   21svc_mode                        = 3
   22version$                        = "0.03 (02 Mar 1996)"
   23os_file_save                    = 10
   24file$                           = "Programming:Assembler.Toggle.Toggle"
   25filetype_module                 = &ffa
   26EventV                          = &10
   27os_byte_disable_event           = 13
   28os_byte_enable_event            = 14
   29os_byte_insert_character        = 138
   30event_mousebuttons              = 10
   31keyboard_buffer                 = 0
   32keyboard_buffer_shift_f12       = &dc   : REM see p. 1-892 of PRM
   33
   34REM --------------------------------------------------------------------------
   35REM     Define register name aliases
   36REM --------------------------------------------------------------------------
   37
   38sp                              = 13
   39link                            = 14
   40pc                              = 15
   41
   42REM --------------------------------------------------------------------------
   43REM     Build the module
   44REM --------------------------------------------------------------------------
   45
   46DIM code% 300
   47PROCassemble
   48SYS "OS_File", os_file_save, file$, filetype_module,, code%, O%
   49IF run% THEN SYS "OS_CLI", "Run "+file$
   50END
   51
   52:
   53
   54REM --------------------------------------------------------------------------
   55REM     Assemble module code
   56REM --------------------------------------------------------------------------
   57
   58DEF PROCassemble
   59LOCAL pass%
   60FOR pass%=4 TO 6 STEP 2
   61P%=0: O%=code%
   62
   63[       OPT     pass%
   64
   65; ----------------------------------------------------------------------------
   66;       Module header
   67; ----------------------------------------------------------------------------
   68
   69        DCD     0                       ; start code offset
   70        DCD     module_initialise
   71        DCD     module_finalise
   72        DCD     0                       ; service code offset
   73        DCD     module_title_string
   74        DCD     module_help_string
   75        DCD     0                       ; keyword table offset
   76
   77.module_title_string
   78        =       "Toggle" + CHR$(0)
   79        ALIGN
   80
   81.module_help_string
   82        =       "Toggle"
   83        =       9
   84        =       9
   85        =       version$ + " � Andrew Kemp" + CHR$(0)
   86        ALIGN
   87
   88; ----------------------------------------------------------------------------
   89;       Module intialisation
   90;
   91;       Add our routine to the chain for the event vector, and enable the
   92;       mouse click event
   93; ----------------------------------------------------------------------------
   94
   95.module_initialise
   96        STMFD   (sp)!, {link}
   97        MOV     r0, #EventV
   98        ADR     r1, event_vector_code
   99        MOV     r2, #0                  ; no significance to r2 = 0 - but use
  100        SWI     "XOS_Claim"             ; the same value on release
  101
  102        MOV     r0, #os_byte_enable_event
  103        MOV     r1, #event_mousebuttons
  104        SWI     "XOS_Byte"
  105        LDMFD   (sp)!, {pc}
  106
  107; ----------------------------------------------------------------------------
  108;       Module finalisation
  109;
  110;       Disable the mouse buttons event we earlier enabled, and remove our
  111;       routine from the chain for the event vector
  112; ----------------------------------------------------------------------------
  113
  114.module_finalise
  115        STMFD   (sp)!, {link}
  116        MOV     r0, #os_byte_disable_event
  117        MOV     r1, #event_mousebuttons
  118        SWI     "XOS_Byte"
  119
  120        MOV     r0, #EventV
  121        ADR     r1, event_vector_code
  122        MOV     r2, #0                  ; r2 = 0 is simply the value we used
  123        SWI     "XOS_Release"           ; to claim the vector
  124        LDMFD   (sp)!, {pc}
  125
  126; ----------------------------------------------------------------------------
  127;       Our routine to be added to the chain for the event vector
  128;
  129;       r0 = event number (we are only interested in the mouse buttons event)
  130;
  131;       If it is the mouse buttons event then r2 = mouse y-coordinate,
  132;                                             r3 = button state
  133; ----------------------------------------------------------------------------
  134
  135.event_vector_code
  136        TEQ     r0, #event_mousebuttons
  137        TEQEQ   r2, #0
  138        TEQEQ   r3, #%010
  139        MOVNES  pc, link                ; pass on the vector if the event is
  140                                        ; not a mouse click with the menu
  141                                        ; button at the bottom of the screen
  142
  143        STMFD   (sp)!, {r0-r3, link}
  144
  145        MOV     r3, pc                  ; preserve status and processor mode
  146        ORR     r0, r3, #svc_mode
  147        TEQP    r0, #0                  ; switch to SVC mode
  148        MOV     r0, r0                  ; do a no-op since we just changed mode
  149
  150        STMFD   (sp)!, {link}           ; save r14_svc
  151        MOV     r0, #os_byte_insert_character
  152        MOV     r1, #keyboard_buffer
  153        MOV     r2, #keyboard_buffer_shift_f12
  154        SWI     "XOS_Byte"              ; corrupts link (r14_svc)
  155        LDMFD   (sp)!, {link}           ; restore r14_svc
  156
  157        TEQP    r3, #0                  ; restore status and processor mode
  158        MOV     r0, r0                  ; do a no-op since we just changed mode
  159
  160        LDMFD   (sp)!, {r0-r3, link, pc}        ; return, claiming vector
  161
  162]
  163NEXT pass%
  164ENDPROC
P� --------------------------------------------------------------------------
�
�     Toggle (source)
�
K�     Flip the icon bar between top and bottom of the window stack with
�     the mouse
�
'�     by KCE Software (Andrew Kemp)
	�

�     � March 1996
�
P� --------------------------------------------------------------------------



run%=�
#� � � 7:� �$;" at line ";�(�):�

P� --------------------------------------------------------------------------
%�     Define some handy constants
P� --------------------------------------------------------------------------

'svc_mode                        = 3
:version$                        = "0.03 (02 Mar 1996)"
(os_file_save                    = 10
Kfile$                           = "Programming:Assembler.Toggle.Toggle"
*filetype_module                 = &ffa
)EventV                          = &10
(os_byte_disable_event           = 13
(os_byte_enable_event            = 14
)os_byte_insert_character        = 138
(event_mousebuttons              = 10
'keyboard_buffer                 = 0
 Ckeyboard_buffer_shift_f12       = &dc   : � see p. 1-892 of PRM
!
"P� --------------------------------------------------------------------------
#&�     Define register name aliases
$P� --------------------------------------------------------------------------
%
&(sp                              = 13
'(link                            = 14
((pc                              = 15
)
*P� --------------------------------------------------------------------------
+�     Build the module
,P� --------------------------------------------------------------------------
-
.� code% 300
/
�assemble
0Bș "OS_File", os_file_save, file$, filetype_module,, code%, O%
1&� run% � ș "OS_CLI", "Run "+file$
2�
3
4:
5
6P� --------------------------------------------------------------------------
7�     Assemble module code
8P� --------------------------------------------------------------------------
9
:� �assemble
;� pass%
<� pass%=4 � 6 � 2
=P%=0: O%=code%
>
?[       OPT     pass%
@
AR; ----------------------------------------------------------------------------
B;       Module header
CR; ----------------------------------------------------------------------------
D
E?        DCD     0                       ; start code offset
F%        DCD     module_initialise
G#        DCD     module_finalise
HA        DCD     0                       ; service code offset
I'        DCD     module_title_string
J&        DCD     module_help_string
KB        DCD     0                       ; keyword table offset
L
M.module_title_string
N#        =       "Toggle" + �(0)
O        ALIGN
P
Q.module_help_string
R        =       "Toggle"
S        =       9
T        =       9
U6        =       version$ + " � Andrew Kemp" + �(0)
V        ALIGN
W
XR; ----------------------------------------------------------------------------
Y ;       Module intialisation
Z;
[M;       Add our routine to the chain for the event vector, and enable the
\;       mouse click event
]R; ----------------------------------------------------------------------------
^
_.module_initialise
`!        STMFD   (sp)!, {link}
a        MOV     r0, #EventV
b)        ADR     r1, event_vector_code
cQ        MOV     r2, #0                  ; no significance to r2 = 0 - but use
dG        SWI     "XOS_Claim"             ; the same value on release
e
f-        MOV     r0, #os_byte_enable_event
g+        MOV     r1, #event_mousebuttons
h        SWI     "XOS_Byte"
i        LDMFD   (sp)!, {pc}
j
kR; ----------------------------------------------------------------------------
l;       Module finalisation
m;
nN;       Disable the mouse buttons event we earlier enabled, and remove our
o7;       routine from the chain for the event vector
pR; ----------------------------------------------------------------------------
q
r.module_finalise
s!        STMFD   (sp)!, {link}
t.        MOV     r0, #os_byte_disable_event
u+        MOV     r1, #event_mousebuttons
v        SWI     "XOS_Byte"
w
x        MOV     r0, #EventV
y)        ADR     r1, event_vector_code
zP        MOV     r2, #0                  ; r2 = 0 is simply the value we used
{A        SWI     "XOS_Release"           ; to claim the vector
|        LDMFD   (sp)!, {pc}
}
~R; ----------------------------------------------------------------------------
E;       Our routine to be added to the chain for the event vector
�;
�Q;       r0 = event number (we are only interested in the mouse buttons event)
�;
�J;       If it is the mouse buttons event then r2 = mouse y-coordinate,
�C;                                             r3 = button state
�R; ----------------------------------------------------------------------------
�
�.event_vector_code
�+        TEQ     r0, #event_mousebuttons
�        TEQEQ   r2, #0
�        TEQEQ   r3, #%010
�P        MOVNES  pc, link                ; pass on the vector if the event is
�M                                        ; not a mouse click with the menu
�P                                        ; button at the bottom of the screen
�
�(        STMFD   (sp)!, {r0-r3, link}
�
�P        MOV     r3, pc                  ; preserve status and processor mode
�$        �R     r0, r3, #svc_mode
�@        TEQP    r0, #0                  ; switch to SVC mode
�S        MOV     r0, r0                  ; do a no-op since we just changed mode
�
�:        STMFD   (sp)!, {link}           ; save r14_svc
�1        MOV     r0, #os_byte_insert_character
�(        MOV     r1, #keyboard_buffer
�2        MOV     r2, #keyboard_buffer_shift_f12
�E        SWI     "XOS_Byte"              ; corrupts link (r14_svc)
�=        LDMFD   (sp)!, {link}           ; restore r14_svc
�
�O        TEQP    r3, #0                  ; restore status and processor mode
�S        MOV     r0, r0                  ; do a no-op since we just changed mode
�
�M        LDMFD   (sp)!, {r0-r3, link, pc}        ; return, claiming vector
�
�]
�� pass%
��
�
00000000  0d 00 01 50 f4 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |...P. ----------|
00000010  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000050  0d 00 02 05 f4 0d 00 03  19 f4 20 20 20 20 20 54  |..........     T|
00000060  6f 67 67 6c 65 20 28 73  6f 75 72 63 65 29 0d 00  |oggle (source)..|
00000070  04 05 f4 0d 00 05 4b f4  20 20 20 20 20 46 6c 69  |......K.     Fli|
00000080  70 20 74 68 65 20 69 63  6f 6e 20 62 61 72 20 62  |p the icon bar b|
00000090  65 74 77 65 65 6e 20 74  6f 70 20 61 6e 64 20 62  |etween top and b|
000000a0  6f 74 74 6f 6d 20 6f 66  20 74 68 65 20 77 69 6e  |ottom of the win|
000000b0  64 6f 77 20 73 74 61 63  6b 20 77 69 74 68 0d 00  |dow stack with..|
000000c0  06 13 f4 20 20 20 20 20  74 68 65 20 6d 6f 75 73  |...     the mous|
000000d0  65 0d 00 07 05 f4 0d 00  08 27 f4 20 20 20 20 20  |e........'.     |
000000e0  62 79 20 4b 43 45 20 53  6f 66 74 77 61 72 65 20  |by KCE Software |
000000f0  28 41 6e 64 72 65 77 20  4b 65 6d 70 29 0d 00 09  |(Andrew Kemp)...|
00000100  05 f4 0d 00 0a 16 f4 20  20 20 20 20 a9 20 4d 61  |.......     . Ma|
00000110  72 63 68 20 31 39 39 36  0d 00 0b 05 f4 0d 00 0c  |rch 1996........|
00000120  50 f4 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |P. -------------|
00000130  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000160  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 00 0d  |-------------...|
00000170  04 0d 00 0e 0a 72 75 6e  25 3d b9 0d 00 0f 23 ee  |.....run%=....#.|
00000180  20 85 20 ef 20 37 3a f1  20 f6 24 3b 22 20 61 74  | . . 7:. .$;" at|
00000190  20 6c 69 6e 65 20 22 3b  c3 28 9e 29 3a e0 0d 00  | line ";.(.):...|
000001a0  10 04 0d 00 11 50 f4 20  2d 2d 2d 2d 2d 2d 2d 2d  |.....P. --------|
000001b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000001f0  2d 2d 0d 00 12 25 f4 20  20 20 20 20 44 65 66 69  |--...%.     Defi|
00000200  6e 65 20 73 6f 6d 65 20  68 61 6e 64 79 20 63 6f  |ne some handy co|
00000210  6e 73 74 61 6e 74 73 0d  00 13 50 f4 20 2d 2d 2d  |nstants...P. ---|
00000220  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000260  2d 2d 2d 2d 2d 2d 2d 0d  00 14 04 0d 00 15 27 73  |-------.......'s|
00000270  76 63 5f 6d 6f 64 65 20  20 20 20 20 20 20 20 20  |vc_mode         |
00000280  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3d  |               =|
00000290  20 33 0d 00 16 3a 76 65  72 73 69 6f 6e 24 20 20  | 3...:version$  |
000002a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002b0  20 20 20 20 20 20 3d 20  22 30 2e 30 33 20 28 30  |      = "0.03 (0|
000002c0  32 20 4d 61 72 20 31 39  39 36 29 22 0d 00 17 28  |2 Mar 1996)"...(|
000002d0  6f 73 5f 66 69 6c 65 5f  73 61 76 65 20 20 20 20  |os_file_save    |
000002e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002f0  3d 20 31 30 0d 00 18 4b  66 69 6c 65 24 20 20 20  |= 10...Kfile$   |
00000300  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000310  20 20 20 20 20 20 20 20  3d 20 22 50 72 6f 67 72  |        = "Progr|
00000320  61 6d 6d 69 6e 67 3a 41  73 73 65 6d 62 6c 65 72  |amming:Assembler|
00000330  2e 54 6f 67 67 6c 65 2e  54 6f 67 67 6c 65 22 0d  |.Toggle.Toggle".|
00000340  00 19 2a 66 69 6c 65 74  79 70 65 5f 6d 6f 64 75  |..*filetype_modu|
00000350  6c 65 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |le              |
00000360  20 20 20 3d 20 26 66 66  61 0d 00 1a 29 45 76 65  |   = &ffa...)Eve|
00000370  6e 74 56 20 20 20 20 20  20 20 20 20 20 20 20 20  |ntV             |
00000380  20 20 20 20 20 20 20 20  20 20 20 20 20 3d 20 26  |             = &|
00000390  31 30 0d 00 1b 28 6f 73  5f 62 79 74 65 5f 64 69  |10...(os_byte_di|
000003a0  73 61 62 6c 65 5f 65 76  65 6e 74 20 20 20 20 20  |sable_event     |
000003b0  20 20 20 20 20 20 3d 20  31 33 0d 00 1c 28 6f 73  |      = 13...(os|
000003c0  5f 62 79 74 65 5f 65 6e  61 62 6c 65 5f 65 76 65  |_byte_enable_eve|
000003d0  6e 74 20 20 20 20 20 20  20 20 20 20 20 20 3d 20  |nt            = |
000003e0  31 34 0d 00 1d 29 6f 73  5f 62 79 74 65 5f 69 6e  |14...)os_byte_in|
000003f0  73 65 72 74 5f 63 68 61  72 61 63 74 65 72 20 20  |sert_character  |
00000400  20 20 20 20 20 20 3d 20  31 33 38 0d 00 1e 28 65  |      = 138...(e|
00000410  76 65 6e 74 5f 6d 6f 75  73 65 62 75 74 74 6f 6e  |vent_mousebutton|
00000420  73 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3d  |s              =|
00000430  20 31 30 0d 00 1f 27 6b  65 79 62 6f 61 72 64 5f  | 10...'keyboard_|
00000440  62 75 66 66 65 72 20 20  20 20 20 20 20 20 20 20  |buffer          |
00000450  20 20 20 20 20 20 20 3d  20 30 0d 00 20 43 6b 65  |       = 0.. Cke|
00000460  79 62 6f 61 72 64 5f 62  75 66 66 65 72 5f 73 68  |yboard_buffer_sh|
00000470  69 66 74 5f 66 31 32 20  20 20 20 20 20 20 3d 20  |ift_f12       = |
00000480  26 64 63 20 20 20 3a 20  f4 20 73 65 65 20 70 2e  |&dc   : . see p.|
00000490  20 31 2d 38 39 32 20 6f  66 20 50 52 4d 0d 00 21  | 1-892 of PRM..!|
000004a0  04 0d 00 22 50 f4 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..."P. ---------|
000004b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000004f0  2d 0d 00 23 26 f4 20 20  20 20 20 44 65 66 69 6e  |-..#&.     Defin|
00000500  65 20 72 65 67 69 73 74  65 72 20 6e 61 6d 65 20  |e register name |
00000510  61 6c 69 61 73 65 73 0d  00 24 50 f4 20 2d 2d 2d  |aliases..$P. ---|
00000520  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000560  2d 2d 2d 2d 2d 2d 2d 0d  00 25 04 0d 00 26 28 73  |-------..%...&(s|
00000570  70 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |p               |
00000580  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3d  |               =|
00000590  20 31 33 0d 00 27 28 6c  69 6e 6b 20 20 20 20 20  | 13..'(link     |
000005a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000005b0  20 20 20 20 20 20 20 3d  20 31 34 0d 00 28 28 70  |       = 14..((p|
000005c0  63 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |c               |
000005d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3d  |               =|
000005e0  20 31 35 0d 00 29 04 0d  00 2a 50 f4 20 2d 2d 2d  | 15..)...*P. ---|
000005f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000630  2d 2d 2d 2d 2d 2d 2d 0d  00 2b 1a f4 20 20 20 20  |-------..+..    |
00000640  20 42 75 69 6c 64 20 74  68 65 20 6d 6f 64 75 6c  | Build the modul|
00000650  65 0d 00 2c 50 f4 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |e..,P. ---------|
00000660  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000006a0  2d 0d 00 2d 04 0d 00 2e  0f de 20 63 6f 64 65 25  |-..-...... code%|
000006b0  20 33 30 30 0d 00 2f 0d  f2 61 73 73 65 6d 62 6c  | 300../..assembl|
000006c0  65 0d 00 30 42 c8 99 20  22 4f 53 5f 46 69 6c 65  |e..0B.. "OS_File|
000006d0  22 2c 20 6f 73 5f 66 69  6c 65 5f 73 61 76 65 2c  |", os_file_save,|
000006e0  20 66 69 6c 65 24 2c 20  66 69 6c 65 74 79 70 65  | file$, filetype|
000006f0  5f 6d 6f 64 75 6c 65 2c  2c 20 63 6f 64 65 25 2c  |_module,, code%,|
00000700  20 4f 25 0d 00 31 26 e7  20 72 75 6e 25 20 8c 20  | O%..1&. run% . |
00000710  c8 99 20 22 4f 53 5f 43  4c 49 22 2c 20 22 52 75  |.. "OS_CLI", "Ru|
00000720  6e 20 22 2b 66 69 6c 65  24 0d 00 32 05 e0 0d 00  |n "+file$..2....|
00000730  33 04 0d 00 34 05 3a 0d  00 35 04 0d 00 36 50 f4  |3...4.:..5...6P.|
00000740  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | ---------------|
00000750  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000780  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 00 37 1e f4  |-----------..7..|
00000790  20 20 20 20 20 41 73 73  65 6d 62 6c 65 20 6d 6f  |     Assemble mo|
000007a0  64 75 6c 65 20 63 6f 64  65 0d 00 38 50 f4 20 2d  |dule code..8P. -|
000007b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000007f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 00 39 04 0d 00 3a  |---------..9...:|
00000800  0f dd 20 f2 61 73 73 65  6d 62 6c 65 0d 00 3b 0b  |.. .assemble..;.|
00000810  ea 20 70 61 73 73 25 0d  00 3c 15 e3 20 70 61 73  |. pass%..<.. pas|
00000820  73 25 3d 34 20 b8 20 36  20 88 20 32 0d 00 3d 12  |s%=4 . 6 . 2..=.|
00000830  50 25 3d 30 3a 20 4f 25  3d 63 6f 64 65 25 0d 00  |P%=0: O%=code%..|
00000840  3e 04 0d 00 3f 19 5b 20  20 20 20 20 20 20 4f 50  |>...?.[       OP|
00000850  54 20 20 20 20 20 70 61  73 73 25 0d 00 40 04 0d  |T     pass%..@..|
00000860  00 41 52 3b 20 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.AR; -----------|
00000870  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000008b0  2d 0d 00 42 19 3b 20 20  20 20 20 20 20 4d 6f 64  |-..B.;       Mod|
000008c0  75 6c 65 20 68 65 61 64  65 72 0d 00 43 52 3b 20  |ule header..CR; |
000008d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000910  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 00 44 04  |------------..D.|
00000920  0d 00 45 3f 20 20 20 20  20 20 20 20 44 43 44 20  |..E?        DCD |
00000930  20 20 20 20 30 20 20 20  20 20 20 20 20 20 20 20  |    0           |
00000940  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 73 74  |            ; st|
00000950  61 72 74 20 63 6f 64 65  20 6f 66 66 73 65 74 0d  |art code offset.|
00000960  00 46 25 20 20 20 20 20  20 20 20 44 43 44 20 20  |.F%        DCD  |
00000970  20 20 20 6d 6f 64 75 6c  65 5f 69 6e 69 74 69 61  |   module_initia|
00000980  6c 69 73 65 0d 00 47 23  20 20 20 20 20 20 20 20  |lise..G#        |
00000990  44 43 44 20 20 20 20 20  6d 6f 64 75 6c 65 5f 66  |DCD     module_f|
000009a0  69 6e 61 6c 69 73 65 0d  00 48 41 20 20 20 20 20  |inalise..HA     |
000009b0  20 20 20 44 43 44 20 20  20 20 20 30 20 20 20 20  |   DCD     0    |
000009c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000009d0  20 20 20 3b 20 73 65 72  76 69 63 65 20 63 6f 64  |   ; service cod|
000009e0  65 20 6f 66 66 73 65 74  0d 00 49 27 20 20 20 20  |e offset..I'    |
000009f0  20 20 20 20 44 43 44 20  20 20 20 20 6d 6f 64 75  |    DCD     modu|
00000a00  6c 65 5f 74 69 74 6c 65  5f 73 74 72 69 6e 67 0d  |le_title_string.|
00000a10  00 4a 26 20 20 20 20 20  20 20 20 44 43 44 20 20  |.J&        DCD  |
00000a20  20 20 20 6d 6f 64 75 6c  65 5f 68 65 6c 70 5f 73  |   module_help_s|
00000a30  74 72 69 6e 67 0d 00 4b  42 20 20 20 20 20 20 20  |tring..KB       |
00000a40  20 44 43 44 20 20 20 20  20 30 20 20 20 20 20 20  | DCD     0      |
00000a50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a60  20 3b 20 6b 65 79 77 6f  72 64 20 74 61 62 6c 65  | ; keyword table|
00000a70  20 6f 66 66 73 65 74 0d  00 4c 04 0d 00 4d 18 2e  | offset..L...M..|
00000a80  6d 6f 64 75 6c 65 5f 74  69 74 6c 65 5f 73 74 72  |module_title_str|
00000a90  69 6e 67 0d 00 4e 23 20  20 20 20 20 20 20 20 3d  |ing..N#        =|
00000aa0  20 20 20 20 20 20 20 22  54 6f 67 67 6c 65 22 20  |       "Toggle" |
00000ab0  2b 20 bd 28 30 29 0d 00  4f 11 20 20 20 20 20 20  |+ .(0)..O.      |
00000ac0  20 20 41 4c 49 47 4e 0d  00 50 04 0d 00 51 17 2e  |  ALIGN..P...Q..|
00000ad0  6d 6f 64 75 6c 65 5f 68  65 6c 70 5f 73 74 72 69  |module_help_stri|
00000ae0  6e 67 0d 00 52 1c 20 20  20 20 20 20 20 20 3d 20  |ng..R.        = |
00000af0  20 20 20 20 20 20 22 54  6f 67 67 6c 65 22 0d 00  |      "Toggle"..|
00000b00  53 15 20 20 20 20 20 20  20 20 3d 20 20 20 20 20  |S.        =     |
00000b10  20 20 39 0d 00 54 15 20  20 20 20 20 20 20 20 3d  |  9..T.        =|
00000b20  20 20 20 20 20 20 20 39  0d 00 55 36 20 20 20 20  |       9..U6    |
00000b30  20 20 20 20 3d 20 20 20  20 20 20 20 76 65 72 73  |    =       vers|
00000b40  69 6f 6e 24 20 2b 20 22  20 a9 20 41 6e 64 72 65  |ion$ + " . Andre|
00000b50  77 20 4b 65 6d 70 22 20  2b 20 bd 28 30 29 0d 00  |w Kemp" + .(0)..|
00000b60  56 11 20 20 20 20 20 20  20 20 41 4c 49 47 4e 0d  |V.        ALIGN.|
00000b70  00 57 04 0d 00 58 52 3b  20 2d 2d 2d 2d 2d 2d 2d  |.W...XR; -------|
00000b80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000bc0  2d 2d 2d 2d 2d 0d 00 59  20 3b 20 20 20 20 20 20  |-----..Y ;      |
00000bd0  20 4d 6f 64 75 6c 65 20  69 6e 74 69 61 6c 69 73  | Module intialis|
00000be0  61 74 69 6f 6e 0d 00 5a  05 3b 0d 00 5b 4d 3b 20  |ation..Z.;..[M; |
00000bf0  20 20 20 20 20 20 41 64  64 20 6f 75 72 20 72 6f  |      Add our ro|
00000c00  75 74 69 6e 65 20 74 6f  20 74 68 65 20 63 68 61  |utine to the cha|
00000c10  69 6e 20 66 6f 72 20 74  68 65 20 65 76 65 6e 74  |in for the event|
00000c20  20 76 65 63 74 6f 72 2c  20 61 6e 64 20 65 6e 61  | vector, and ena|
00000c30  62 6c 65 20 74 68 65 0d  00 5c 1d 3b 20 20 20 20  |ble the..\.;    |
00000c40  20 20 20 6d 6f 75 73 65  20 63 6c 69 63 6b 20 65  |   mouse click e|
00000c50  76 65 6e 74 0d 00 5d 52  3b 20 2d 2d 2d 2d 2d 2d  |vent..]R; ------|
00000c60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000ca0  2d 2d 2d 2d 2d 2d 0d 00  5e 04 0d 00 5f 16 2e 6d  |------..^..._..m|
00000cb0  6f 64 75 6c 65 5f 69 6e  69 74 69 61 6c 69 73 65  |odule_initialise|
00000cc0  0d 00 60 21 20 20 20 20  20 20 20 20 53 54 4d 46  |..`!        STMF|
00000cd0  44 20 20 20 28 73 70 29  21 2c 20 7b 6c 69 6e 6b  |D   (sp)!, {link|
00000ce0  7d 0d 00 61 1f 20 20 20  20 20 20 20 20 4d 4f 56  |}..a.        MOV|
00000cf0  20 20 20 20 20 72 30 2c  20 23 45 76 65 6e 74 56  |     r0, #EventV|
00000d00  0d 00 62 29 20 20 20 20  20 20 20 20 41 44 52 20  |..b)        ADR |
00000d10  20 20 20 20 72 31 2c 20  65 76 65 6e 74 5f 76 65  |    r1, event_ve|
00000d20  63 74 6f 72 5f 63 6f 64  65 0d 00 63 51 20 20 20  |ctor_code..cQ   |
00000d30  20 20 20 20 20 4d 4f 56  20 20 20 20 20 72 32 2c  |     MOV     r2,|
00000d40  20 23 30 20 20 20 20 20  20 20 20 20 20 20 20 20  | #0             |
00000d50  20 20 20 20 20 3b 20 6e  6f 20 73 69 67 6e 69 66  |     ; no signif|
00000d60  69 63 61 6e 63 65 20 74  6f 20 72 32 20 3d 20 30  |icance to r2 = 0|
00000d70  20 2d 20 62 75 74 20 75  73 65 0d 00 64 47 20 20  | - but use..dG  |
00000d80  20 20 20 20 20 20 53 57  49 20 20 20 20 20 22 58  |      SWI     "X|
00000d90  4f 53 5f 43 6c 61 69 6d  22 20 20 20 20 20 20 20  |OS_Claim"       |
00000da0  20 20 20 20 20 20 3b 20  74 68 65 20 73 61 6d 65  |      ; the same|
00000db0  20 76 61 6c 75 65 20 6f  6e 20 72 65 6c 65 61 73  | value on releas|
00000dc0  65 0d 00 65 04 0d 00 66  2d 20 20 20 20 20 20 20  |e..e...f-       |
00000dd0  20 4d 4f 56 20 20 20 20  20 72 30 2c 20 23 6f 73  | MOV     r0, #os|
00000de0  5f 62 79 74 65 5f 65 6e  61 62 6c 65 5f 65 76 65  |_byte_enable_eve|
00000df0  6e 74 0d 00 67 2b 20 20  20 20 20 20 20 20 4d 4f  |nt..g+        MO|
00000e00  56 20 20 20 20 20 72 31  2c 20 23 65 76 65 6e 74  |V     r1, #event|
00000e10  5f 6d 6f 75 73 65 62 75  74 74 6f 6e 73 0d 00 68  |_mousebuttons..h|
00000e20  1e 20 20 20 20 20 20 20  20 53 57 49 20 20 20 20  |.        SWI    |
00000e30  20 22 58 4f 53 5f 42 79  74 65 22 0d 00 69 1f 20  | "XOS_Byte"..i. |
00000e40  20 20 20 20 20 20 20 4c  44 4d 46 44 20 20 20 28  |       LDMFD   (|
00000e50  73 70 29 21 2c 20 7b 70  63 7d 0d 00 6a 04 0d 00  |sp)!, {pc}..j...|
00000e60  6b 52 3b 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |kR; ------------|
00000e70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000eb0  0d 00 6c 1f 3b 20 20 20  20 20 20 20 4d 6f 64 75  |..l.;       Modu|
00000ec0  6c 65 20 66 69 6e 61 6c  69 73 61 74 69 6f 6e 0d  |le finalisation.|
00000ed0  00 6d 05 3b 0d 00 6e 4e  3b 20 20 20 20 20 20 20  |.m.;..nN;       |
00000ee0  44 69 73 61 62 6c 65 20  74 68 65 20 6d 6f 75 73  |Disable the mous|
00000ef0  65 20 62 75 74 74 6f 6e  73 20 65 76 65 6e 74 20  |e buttons event |
00000f00  77 65 20 65 61 72 6c 69  65 72 20 65 6e 61 62 6c  |we earlier enabl|
00000f10  65 64 2c 20 61 6e 64 20  72 65 6d 6f 76 65 20 6f  |ed, and remove o|
00000f20  75 72 0d 00 6f 37 3b 20  20 20 20 20 20 20 72 6f  |ur..o7;       ro|
00000f30  75 74 69 6e 65 20 66 72  6f 6d 20 74 68 65 20 63  |utine from the c|
00000f40  68 61 69 6e 20 66 6f 72  20 74 68 65 20 65 76 65  |hain for the eve|
00000f50  6e 74 20 76 65 63 74 6f  72 0d 00 70 52 3b 20 2d  |nt vector..pR; -|
00000f60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000fa0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 00 71 04 0d  |-----------..q..|
00000fb0  00 72 14 2e 6d 6f 64 75  6c 65 5f 66 69 6e 61 6c  |.r..module_final|
00000fc0  69 73 65 0d 00 73 21 20  20 20 20 20 20 20 20 53  |ise..s!        S|
00000fd0  54 4d 46 44 20 20 20 28  73 70 29 21 2c 20 7b 6c  |TMFD   (sp)!, {l|
00000fe0  69 6e 6b 7d 0d 00 74 2e  20 20 20 20 20 20 20 20  |ink}..t.        |
00000ff0  4d 4f 56 20 20 20 20 20  72 30 2c 20 23 6f 73 5f  |MOV     r0, #os_|
00001000  62 79 74 65 5f 64 69 73  61 62 6c 65 5f 65 76 65  |byte_disable_eve|
00001010  6e 74 0d 00 75 2b 20 20  20 20 20 20 20 20 4d 4f  |nt..u+        MO|
00001020  56 20 20 20 20 20 72 31  2c 20 23 65 76 65 6e 74  |V     r1, #event|
00001030  5f 6d 6f 75 73 65 62 75  74 74 6f 6e 73 0d 00 76  |_mousebuttons..v|
00001040  1e 20 20 20 20 20 20 20  20 53 57 49 20 20 20 20  |.        SWI    |
00001050  20 22 58 4f 53 5f 42 79  74 65 22 0d 00 77 04 0d  | "XOS_Byte"..w..|
00001060  00 78 1f 20 20 20 20 20  20 20 20 4d 4f 56 20 20  |.x.        MOV  |
00001070  20 20 20 72 30 2c 20 23  45 76 65 6e 74 56 0d 00  |   r0, #EventV..|
00001080  79 29 20 20 20 20 20 20  20 20 41 44 52 20 20 20  |y)        ADR   |
00001090  20 20 72 31 2c 20 65 76  65 6e 74 5f 76 65 63 74  |  r1, event_vect|
000010a0  6f 72 5f 63 6f 64 65 0d  00 7a 50 20 20 20 20 20  |or_code..zP     |
000010b0  20 20 20 4d 4f 56 20 20  20 20 20 72 32 2c 20 23  |   MOV     r2, #|
000010c0  30 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0               |
000010d0  20 20 20 3b 20 72 32 20  3d 20 30 20 69 73 20 73  |   ; r2 = 0 is s|
000010e0  69 6d 70 6c 79 20 74 68  65 20 76 61 6c 75 65 20  |imply the value |
000010f0  77 65 20 75 73 65 64 0d  00 7b 41 20 20 20 20 20  |we used..{A     |
00001100  20 20 20 53 57 49 20 20  20 20 20 22 58 4f 53 5f  |   SWI     "XOS_|
00001110  52 65 6c 65 61 73 65 22  20 20 20 20 20 20 20 20  |Release"        |
00001120  20 20 20 3b 20 74 6f 20  63 6c 61 69 6d 20 74 68  |   ; to claim th|
00001130  65 20 76 65 63 74 6f 72  0d 00 7c 1f 20 20 20 20  |e vector..|.    |
00001140  20 20 20 20 4c 44 4d 46  44 20 20 20 28 73 70 29  |    LDMFD   (sp)|
00001150  21 2c 20 7b 70 63 7d 0d  00 7d 04 0d 00 7e 52 3b  |!, {pc}..}...~R;|
00001160  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | ---------------|
00001170  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000011a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 00 7f  |-------------...|
000011b0  45 3b 20 20 20 20 20 20  20 4f 75 72 20 72 6f 75  |E;       Our rou|
000011c0  74 69 6e 65 20 74 6f 20  62 65 20 61 64 64 65 64  |tine to be added|
000011d0  20 74 6f 20 74 68 65 20  63 68 61 69 6e 20 66 6f  | to the chain fo|
000011e0  72 20 74 68 65 20 65 76  65 6e 74 20 76 65 63 74  |r the event vect|
000011f0  6f 72 0d 00 80 05 3b 0d  00 81 51 3b 20 20 20 20  |or....;...Q;    |
00001200  20 20 20 72 30 20 3d 20  65 76 65 6e 74 20 6e 75  |   r0 = event nu|
00001210  6d 62 65 72 20 28 77 65  20 61 72 65 20 6f 6e 6c  |mber (we are onl|
00001220  79 20 69 6e 74 65 72 65  73 74 65 64 20 69 6e 20  |y interested in |
00001230  74 68 65 20 6d 6f 75 73  65 20 62 75 74 74 6f 6e  |the mouse button|
00001240  73 20 65 76 65 6e 74 29  0d 00 82 05 3b 0d 00 83  |s event)....;...|
00001250  4a 3b 20 20 20 20 20 20  20 49 66 20 69 74 20 69  |J;       If it i|
00001260  73 20 74 68 65 20 6d 6f  75 73 65 20 62 75 74 74  |s the mouse butt|
00001270  6f 6e 73 20 65 76 65 6e  74 20 74 68 65 6e 20 72  |ons event then r|
00001280  32 20 3d 20 6d 6f 75 73  65 20 79 2d 63 6f 6f 72  |2 = mouse y-coor|
00001290  64 69 6e 61 74 65 2c 0d  00 84 43 3b 20 20 20 20  |dinate,...C;    |
000012a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000012c0  20 20 20 20 20 20 20 20  20 72 33 20 3d 20 62 75  |         r3 = bu|
000012d0  74 74 6f 6e 20 73 74 61  74 65 0d 00 85 52 3b 20  |tton state...R; |
000012e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001320  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 00 86 04  |------------....|
00001330  0d 00 87 16 2e 65 76 65  6e 74 5f 76 65 63 74 6f  |.....event_vecto|
00001340  72 5f 63 6f 64 65 0d 00  88 2b 20 20 20 20 20 20  |r_code...+      |
00001350  20 20 54 45 51 20 20 20  20 20 72 30 2c 20 23 65  |  TEQ     r0, #e|
00001360  76 65 6e 74 5f 6d 6f 75  73 65 62 75 74 74 6f 6e  |vent_mousebutton|
00001370  73 0d 00 89 1a 20 20 20  20 20 20 20 20 54 45 51  |s....        TEQ|
00001380  45 51 20 20 20 72 32 2c  20 23 30 0d 00 8a 1d 20  |EQ   r2, #0.... |
00001390  20 20 20 20 20 20 20 54  45 51 45 51 20 20 20 72  |       TEQEQ   r|
000013a0  33 2c 20 23 25 30 31 30  0d 00 8b 50 20 20 20 20  |3, #%010...P    |
000013b0  20 20 20 20 4d 4f 56 4e  45 53 20 20 70 63 2c 20  |    MOVNES  pc, |
000013c0  6c 69 6e 6b 20 20 20 20  20 20 20 20 20 20 20 20  |link            |
000013d0  20 20 20 20 3b 20 70 61  73 73 20 6f 6e 20 74 68  |    ; pass on th|
000013e0  65 20 76 65 63 74 6f 72  20 69 66 20 74 68 65 20  |e vector if the |
000013f0  65 76 65 6e 74 20 69 73  0d 00 8c 4d 20 20 20 20  |event is...M    |
00001400  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001420  20 20 20 20 3b 20 6e 6f  74 20 61 20 6d 6f 75 73  |    ; not a mous|
00001430  65 20 63 6c 69 63 6b 20  77 69 74 68 20 74 68 65  |e click with the|
00001440  20 6d 65 6e 75 0d 00 8d  50 20 20 20 20 20 20 20  | menu...P       |
00001450  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001470  20 3b 20 62 75 74 74 6f  6e 20 61 74 20 74 68 65  | ; button at the|
00001480  20 62 6f 74 74 6f 6d 20  6f 66 20 74 68 65 20 73  | bottom of the s|
00001490  63 72 65 65 6e 0d 00 8e  04 0d 00 8f 28 20 20 20  |creen.......(   |
000014a0  20 20 20 20 20 53 54 4d  46 44 20 20 20 28 73 70  |     STMFD   (sp|
000014b0  29 21 2c 20 7b 72 30 2d  72 33 2c 20 6c 69 6e 6b  |)!, {r0-r3, link|
000014c0  7d 0d 00 90 04 0d 00 91  50 20 20 20 20 20 20 20  |}.......P       |
000014d0  20 4d 4f 56 20 20 20 20  20 72 33 2c 20 70 63 20  | MOV     r3, pc |
000014e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000014f0  20 3b 20 70 72 65 73 65  72 76 65 20 73 74 61 74  | ; preserve stat|
00001500  75 73 20 61 6e 64 20 70  72 6f 63 65 73 73 6f 72  |us and processor|
00001510  20 6d 6f 64 65 0d 00 92  24 20 20 20 20 20 20 20  | mode...$       |
00001520  20 84 52 20 20 20 20 20  72 30 2c 20 72 33 2c 20  | .R     r0, r3, |
00001530  23 73 76 63 5f 6d 6f 64  65 0d 00 93 40 20 20 20  |#svc_mode...@   |
00001540  20 20 20 20 20 54 45 51  50 20 20 20 20 72 30 2c  |     TEQP    r0,|
00001550  20 23 30 20 20 20 20 20  20 20 20 20 20 20 20 20  | #0             |
00001560  20 20 20 20 20 3b 20 73  77 69 74 63 68 20 74 6f  |     ; switch to|
00001570  20 53 56 43 20 6d 6f 64  65 0d 00 94 53 20 20 20  | SVC mode...S   |
00001580  20 20 20 20 20 4d 4f 56  20 20 20 20 20 72 30 2c  |     MOV     r0,|
00001590  20 72 30 20 20 20 20 20  20 20 20 20 20 20 20 20  | r0             |
000015a0  20 20 20 20 20 3b 20 64  6f 20 61 20 6e 6f 2d 6f  |     ; do a no-o|
000015b0  70 20 73 69 6e 63 65 20  77 65 20 6a 75 73 74 20  |p since we just |
000015c0  63 68 61 6e 67 65 64 20  6d 6f 64 65 0d 00 95 04  |changed mode....|
000015d0  0d 00 96 3a 20 20 20 20  20 20 20 20 53 54 4d 46  |...:        STMF|
000015e0  44 20 20 20 28 73 70 29  21 2c 20 7b 6c 69 6e 6b  |D   (sp)!, {link|
000015f0  7d 20 20 20 20 20 20 20  20 20 20 20 3b 20 73 61  |}           ; sa|
00001600  76 65 20 72 31 34 5f 73  76 63 0d 00 97 31 20 20  |ve r14_svc...1  |
00001610  20 20 20 20 20 20 4d 4f  56 20 20 20 20 20 72 30  |      MOV     r0|
00001620  2c 20 23 6f 73 5f 62 79  74 65 5f 69 6e 73 65 72  |, #os_byte_inser|
00001630  74 5f 63 68 61 72 61 63  74 65 72 0d 00 98 28 20  |t_character...( |
00001640  20 20 20 20 20 20 20 4d  4f 56 20 20 20 20 20 72  |       MOV     r|
00001650  31 2c 20 23 6b 65 79 62  6f 61 72 64 5f 62 75 66  |1, #keyboard_buf|
00001660  66 65 72 0d 00 99 32 20  20 20 20 20 20 20 20 4d  |fer...2        M|
00001670  4f 56 20 20 20 20 20 72  32 2c 20 23 6b 65 79 62  |OV     r2, #keyb|
00001680  6f 61 72 64 5f 62 75 66  66 65 72 5f 73 68 69 66  |oard_buffer_shif|
00001690  74 5f 66 31 32 0d 00 9a  45 20 20 20 20 20 20 20  |t_f12...E       |
000016a0  20 53 57 49 20 20 20 20  20 22 58 4f 53 5f 42 79  | SWI     "XOS_By|
000016b0  74 65 22 20 20 20 20 20  20 20 20 20 20 20 20 20  |te"             |
000016c0  20 3b 20 63 6f 72 72 75  70 74 73 20 6c 69 6e 6b  | ; corrupts link|
000016d0  20 28 72 31 34 5f 73 76  63 29 0d 00 9b 3d 20 20  | (r14_svc)...=  |
000016e0  20 20 20 20 20 20 4c 44  4d 46 44 20 20 20 28 73  |      LDMFD   (s|
000016f0  70 29 21 2c 20 7b 6c 69  6e 6b 7d 20 20 20 20 20  |p)!, {link}     |
00001700  20 20 20 20 20 20 3b 20  72 65 73 74 6f 72 65 20  |      ; restore |
00001710  72 31 34 5f 73 76 63 0d  00 9c 04 0d 00 9d 4f 20  |r14_svc.......O |
00001720  20 20 20 20 20 20 20 54  45 51 50 20 20 20 20 72  |       TEQP    r|
00001730  33 2c 20 23 30 20 20 20  20 20 20 20 20 20 20 20  |3, #0           |
00001740  20 20 20 20 20 20 20 3b  20 72 65 73 74 6f 72 65  |       ; restore|
00001750  20 73 74 61 74 75 73 20  61 6e 64 20 70 72 6f 63  | status and proc|
00001760  65 73 73 6f 72 20 6d 6f  64 65 0d 00 9e 53 20 20  |essor mode...S  |
00001770  20 20 20 20 20 20 4d 4f  56 20 20 20 20 20 72 30  |      MOV     r0|
00001780  2c 20 72 30 20 20 20 20  20 20 20 20 20 20 20 20  |, r0            |
00001790  20 20 20 20 20 20 3b 20  64 6f 20 61 20 6e 6f 2d  |      ; do a no-|
000017a0  6f 70 20 73 69 6e 63 65  20 77 65 20 6a 75 73 74  |op since we just|
000017b0  20 63 68 61 6e 67 65 64  20 6d 6f 64 65 0d 00 9f  | changed mode...|
000017c0  04 0d 00 a0 4d 20 20 20  20 20 20 20 20 4c 44 4d  |....M        LDM|
000017d0  46 44 20 20 20 28 73 70  29 21 2c 20 7b 72 30 2d  |FD   (sp)!, {r0-|
000017e0  72 33 2c 20 6c 69 6e 6b  2c 20 70 63 7d 20 20 20  |r3, link, pc}   |
000017f0  20 20 20 20 20 3b 20 72  65 74 75 72 6e 2c 20 63  |     ; return, c|
00001800  6c 61 69 6d 69 6e 67 20  76 65 63 74 6f 72 0d 00  |laiming vector..|
00001810  a1 04 0d 00 a2 05 5d 0d  00 a3 0b ed 20 70 61 73  |......]..... pas|
00001820  73 25 0d 00 a4 05 e1 0d  ff                       |s%.......|
00001829