home *** CD-ROM | disk | FTP | other *** search
Unknown | 1996-03-14 | 10.2 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
| |
100%
| xdgMime
| image/x-tga
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 0a 12 f4 20 54 69 | 6d 65 72 20 6d 6f 64 75 |..... Ti|mer modu|
|00000010| 6c 65 0d 00 14 17 f4 20 | 4d 69 6c 6c 69 73 65 63 |le..... |Millisec|
|00000020| 6f 6e 64 20 74 69 6d 65 | 72 0d 00 1e 12 f4 20 56 |ond time|r..... V|
|00000030| 65 72 73 69 6f 6e 20 31 | 2e 30 38 0d 00 28 15 f4 |ersion 1|.08..(..|
|00000040| 20 31 34 74 68 20 4d 61 | 72 63 68 20 31 39 39 36 | 14th Ma|rch 1996|
|00000050| 0d 00 32 18 f4 20 28 63 | 29 20 53 74 65 66 66 61 |..2.. (c|) Steffa|
|00000060| 6e 20 43 6f 72 6c 65 79 | 0d 00 3c 3c f4 20 41 6c |n Corley|..<<. Al|
|00000070| 6c 20 74 68 65 20 6e 61 | 73 74 79 20 62 69 74 73 |l the na|sty bits|
|00000080| 20 61 72 65 20 74 68 61 | 6e 6b 73 20 74 6f 20 44 | are tha|nks to D|
|00000090| 61 76 69 64 20 57 61 6c | 6b 65 72 20 6f 66 20 41 |avid Wal|ker of A|
|000000a0| 63 6f 72 6e 0d 00 46 04 | 0d 00 50 1a ee 20 85 20 |corn..F.|..P.. . |
|000000b0| f6 3a f1 22 20 61 74 20 | 6c 69 6e 65 20 22 3b 9e |.:." at |line ";.|
|000000c0| 3a e0 0d 00 5a 04 0d 00 | 64 41 f4 20 2a 2a 2a 2a |:...Z...|dA. ****|
|000000d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000100| 2a 2a 2a 2a 2a 2a 2a 0d | 00 6e 41 f4 20 2a 2a 20 |*******.|.nA. ** |
|00000110| 50 72 6f 76 69 73 69 6f | 6e 61 6c 20 53 57 49 20 |Provisio|nal SWI |
|00000120| 63 68 75 6e 6b 20 2d 20 | 74 68 69 73 20 69 73 20 |chunk - |this is |
|00000130| 74 68 65 20 62 61 73 65 | 20 6f 66 20 75 73 65 72 |the base| of user|
|00000140| 20 53 57 49 73 20 2a 2a | 0d 00 78 41 f4 20 2a 2a | SWIs **|..xA. **|
|00000150| 20 61 6e 64 20 69 73 20 | 6c 69 6b 65 6c 79 20 74 | and is |likely t|
|00000160| 6f 20 63 6c 61 73 68 21 | 20 45 69 74 68 65 72 20 |o clash!| Either |
|00000170| 61 6e 20 41 63 6f 72 6e | 20 61 70 70 72 6f 76 65 |an Acorn| approve|
|00000180| 64 20 53 57 49 20 20 2a | 2a 0d 00 82 41 f4 20 2a |d SWI *|*...A. *|
|00000190| 2a 20 63 68 75 6e 6b 20 | 73 68 6f 75 6c 64 20 62 |* chunk |should b|
|000001a0| 65 20 73 6f 75 67 68 74 | 20 6f 72 20 61 74 20 6c |e sought| or at l|
|000001b0| 65 61 73 74 20 61 20 6d | 6f 72 65 20 69 6e 76 65 |east a m|ore inve|
|000001c0| 6e 74 69 76 65 20 20 20 | 2a 2a 0d 00 8c 41 f4 20 |ntive |**...A. |
|000001d0| 2a 2a 20 6f 6e 65 20 63 | 68 6f 73 65 6e 20 28 65 |** one c|hosen (e|
|000001e0| 2e 67 2e 20 28 33 3c 3c | 31 38 29 20 2b 20 28 78 |.g. (3<<|18) + (x|
|000001f0| 3c 3c 36 29 20 77 68 65 | 72 65 20 78 20 69 73 20 |<<6) whe|re x is |
|00000200| 61 20 62 69 6e 61 72 79 | 20 2a 2a 0d 00 96 41 f4 |a binary| **...A.|
|00000210| 20 2a 2a 20 6e 75 6d 62 | 65 72 20 75 70 20 74 6f | ** numb|er up to|
|00000220| 20 31 31 20 62 69 74 73 | 2e 20 20 20 20 20 20 20 | 11 bits|. |
|00000230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000240| 20 20 20 20 20 20 20 20 | 20 20 2a 2a 0d 00 a0 41 | | **...A|
|00000250| f4 20 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |. ******|********|
|00000260| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000270| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0d 00 aa |********|*****...|
|00000290| 04 0d 00 b4 18 73 77 69 | 5f 63 68 75 6e 6b 25 20 |.....swi|_chunk% |
|000002a0| 3d 20 28 33 3c 3c 31 38 | 29 0d 00 be 04 0d 00 c8 |= (3<<18|).......|
|000002b0| 13 49 4f 43 25 20 3d 20 | 26 33 32 30 30 30 30 30 |.IOC% = |&3200000|
|000002c0| 0d 00 d2 1a 6f 76 65 72 | 66 6c 6f 77 5f 66 6c 61 |....over|flow_fla|
|000002d0| 67 25 20 3d 20 31 3c 3c | 32 38 0d 00 dc 04 0d 00 |g% = 1<<|28......|
|000002e0| e6 1c f4 20 4f 66 66 73 | 65 74 73 20 66 72 6f 6d |... Offs|ets from|
|000002f0| 20 49 4f 43 20 62 61 73 | 65 3a 0d 00 f0 04 0d 00 | IOC bas|e:......|
|00000300| fa 24 49 4f 43 49 52 51 | 53 54 41 41 25 20 3d 20 |.$IOCIRQ|STAA% = |
|00000310| 26 31 30 3a f4 20 49 52 | 51 20 41 20 73 74 61 74 |&10:. IR|Q A stat|
|00000320| 75 73 0d 01 04 28 49 4f | 43 49 52 51 52 45 51 41 |us...(IO|CIRQREQA|
|00000330| 25 20 3d 20 26 31 34 3a | f4 20 20 20 20 20 20 20 |% = &14:|. |
|00000340| 72 65 71 75 65 73 74 69 | 6e 67 0d 01 0e 23 49 4f |requesti|ng...#IO|
|00000350| 43 49 52 51 43 4c 52 41 | 25 20 3d 20 26 31 34 3a |CIRQCLRA|% = &14:|
|00000360| f4 20 20 20 20 20 20 20 | 63 6c 65 61 72 0d 01 18 |. |clear...|
|00000370| 22 49 4f 43 49 52 51 4d | 53 4b 41 25 20 3d 20 26 |"IOCIRQM|SKA% = &|
|00000380| 31 38 3a f4 20 20 20 20 | 20 20 20 6d 61 73 6b 0d |18:. | mask.|
|00000390| 01 22 04 0d 01 2c 33 54 | 69 6d 65 72 31 4c 4c 25 |."...,3T|imer1LL%|
|000003a0| 20 3d 20 26 35 30 3a f4 | 20 54 69 6d 65 72 20 31 | = &50:.| Timer 1|
|000003b0| 20 77 72 69 74 65 20 6c | 6f 77 20 69 6e 70 75 74 | write l|ow input|
|000003c0| 20 6c 61 74 63 68 0d 01 | 36 34 54 69 6d 65 72 31 | latch..|64Timer1|
|000003d0| 4c 48 25 20 3d 20 26 35 | 34 3a f4 20 20 20 20 20 |LH% = &5|4:. |
|000003e0| 20 20 20 20 77 72 69 74 | 65 20 68 69 67 68 20 69 | writ|e high i|
|000003f0| 6e 70 75 74 20 6c 61 74 | 63 68 0d 01 40 39 54 69 |nput lat|ch..@9Ti|
|00000400| 6d 65 72 31 47 4f 25 20 | 3d 20 26 35 38 3a f4 20 |mer1GO% |= &58:. |
|00000410| 20 20 20 20 20 20 20 20 | 6c 6f 61 64 20 63 6f 75 | |load cou|
|00000420| 6e 74 20 66 72 6f 6d 20 | 69 6e 70 75 74 20 6c 61 |nt from |input la|
|00000430| 74 63 68 0d 01 4a 32 54 | 69 6d 65 72 31 43 4c 25 |tch..J2T|imer1CL%|
|00000440| 20 3d 20 26 35 30 3a f4 | 20 20 20 20 20 20 20 20 | = &50:.| |
|00000450| 20 72 65 61 64 20 6c 6f | 77 20 69 6e 70 75 74 20 | read lo|w input |
|00000460| 6c 61 74 63 68 0d 01 54 | 33 54 69 6d 65 72 31 43 |latch..T|3Timer1C|
|00000470| 48 25 20 3d 20 26 35 34 | 3a f4 20 20 20 20 20 20 |H% = &54|:. |
|00000480| 20 20 20 72 65 61 64 20 | 68 69 67 68 20 69 6e 70 | read |high inp|
|00000490| 75 74 20 6c 61 74 63 68 | 0d 01 5e 3a 54 69 6d 65 |ut latch|..^:Time|
|000004a0| 72 31 4c 52 25 20 3d 20 | 26 35 43 3a f4 20 20 20 |r1LR% = |&5C:. |
|000004b0| 20 20 20 20 20 20 6c 6f | 61 64 20 6f 75 74 70 75 | lo|ad outpu|
|000004c0| 74 20 6c 61 74 63 68 20 | 66 72 6f 6d 20 63 6f 75 |t latch |from cou|
|000004d0| 6e 74 0d 01 68 04 0d 01 | 72 25 f4 20 42 69 74 20 |nt..h...|r%. Bit |
|000004e0| 70 6f 73 69 74 69 6f 6e | 73 20 69 6e 20 49 52 51 |position|s in IRQ|
|000004f0| 20 72 65 67 69 73 74 65 | 72 73 3a 0d 01 7c 04 0d | registe|rs:..|..|
|00000500| 01 86 35 54 69 6d 65 72 | 31 42 69 74 25 20 3d 20 |..5Timer|1Bit% = |
|00000510| 31 3c 3c 36 3a f4 20 54 | 69 6d 65 72 20 31 20 63 |1<<6:. T|imer 1 c|
|00000520| 72 6f 73 73 69 6e 67 20 | 7a 65 72 6f 20 28 65 76 |rossing |zero (ev|
|00000530| 65 6e 74 29 0d 01 90 12 | 49 5f 62 69 74 25 20 3d |ent)....|I_bit% =|
|00000540| 20 31 3c 3c 32 37 0d 01 | 9a 12 46 5f 62 69 74 25 | 1<<27..|..F_bit%|
|00000550| 20 3d 20 31 3c 3c 32 36 | 0d 01 a4 04 0d 01 ae 2c | = 1<<26|.......,|
|00000560| f4 20 44 65 76 69 63 65 | 20 6e 75 6d 62 65 72 20 |. Device| number |
|00000570| 66 6f 72 20 4f 53 5f 43 | 6c 61 69 6d 44 65 76 69 |for OS_C|laimDevi|
|00000580| 63 65 56 65 63 74 6f 72 | 0d 01 b8 04 0d 01 c2 14 |ceVector|........|
|00000590| 54 69 6d 65 72 31 44 65 | 76 4e 6f 25 20 3d 20 36 |Timer1De|vNo% = 6|
|000005a0| 0d 01 cc 04 0d 01 d6 11 | f4 20 4d 6f 64 75 6c 65 |........|. Module|
|000005b0| 20 63 6f 64 65 0d 01 e0 | 04 0d 01 ea 10 de 20 63 | code...|...... c|
|000005c0| 6f 64 65 25 20 34 30 39 | 36 0d 01 f4 15 e3 20 70 |ode% 409|6..... p|
|000005d0| 61 73 73 25 3d 34 20 b8 | 20 37 20 88 20 33 0d 01 |ass%=4 .| 7 . 3..|
|000005e0| fe 11 50 25 3d 30 3a 4f | 25 3d 63 6f 64 65 25 0d |..P%=0:O|%=code%.|
|000005f0| 02 08 04 0d 02 12 0e 5b | 4f 50 54 20 70 61 73 73 |.......[|OPT pass|
|00000600| 25 0d 02 1c 04 0d 02 26 | 28 45 51 55 44 20 30 20 |%......&|(EQUD 0 |
|00000610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 6c | | \ l|
|00000620| 61 6e 67 75 61 67 65 20 | 65 6e 74 72 79 0d 02 30 |anguage |entry..0|
|00000630| 2d 45 51 55 44 20 73 74 | 61 72 74 75 70 25 20 20 |-EQUD st|artup% |
|00000640| 20 20 20 20 20 5c 20 69 | 6e 69 74 69 61 6c 69 73 | \ i|nitialis|
|00000650| 61 74 69 6f 6e 20 63 6f | 64 65 0d 02 3a 2b 45 51 |ation co|de..:+EQ|
|00000660| 55 44 20 63 6c 6f 73 65 | 64 6f 77 6e 25 20 20 20 |UD close|down% |
|00000670| 20 20 5c 20 66 69 6e 61 | 6c 69 73 61 74 69 6f 6e | \ fina|lisation|
|00000680| 20 63 6f 64 65 0d 02 44 | 2e 45 51 55 44 20 30 20 | code..D|.EQUD 0 |
|00000690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 73 | | \ s|
|000006a0| 65 72 76 69 63 65 20 63 | 61 6c 6c 20 68 61 6e 64 |ervice c|all hand|
|000006b0| 6c 65 72 0d 02 4e 26 45 | 51 55 44 20 74 69 74 6c |ler..N&E|QUD titl|
|000006c0| 65 25 20 20 20 20 20 20 | 20 20 20 5c 20 4d 6f 64 |e% | \ Mod|
|000006d0| 75 6c 65 20 74 69 74 6c | 65 0d 02 58 2a 45 51 55 |ule titl|e..X*EQU|
|000006e0| 44 20 68 65 6c 70 25 20 | 20 20 20 20 20 20 20 20 |D help% | |
|000006f0| 20 5c 20 4d 6f 64 75 6c | 65 20 68 65 6c 70 20 74 | \ Modul|e help t|
|00000700| 65 78 74 0d 02 62 2b 45 | 51 55 44 20 30 20 20 20 |ext..b+E|QUD 0 |
|00000710| 20 20 20 20 20 20 20 20 | 20 20 20 5c 20 43 6f 6d | | \ Com|
|00000720| 6d 61 6e 64 20 68 65 6c | 70 20 74 65 78 74 0d 02 |mand hel|p text..|
|00000730| 6c 23 45 51 55 44 20 73 | 77 69 5f 63 68 75 6e 6b |l#EQUD s|wi_chunk|
|00000740| 25 20 20 20 20 20 5c 20 | 53 57 49 20 63 68 75 6e |% \ |SWI chun|
|00000750| 6b 0d 02 76 22 45 51 55 | 44 20 73 77 69 5f 63 6f |k..v"EQU|D swi_co|
|00000760| 64 65 25 20 20 20 20 20 | 20 5c 20 53 57 49 20 63 |de% | \ SWI c|
|00000770| 6f 64 65 0d 02 80 31 45 | 51 55 44 20 73 77 69 5f |ode...1E|QUD swi_|
|00000780| 74 61 62 6c 65 25 20 20 | 20 20 20 5c 20 53 57 49 |table% | \ SWI|
|00000790| 20 6e 61 6d 65 20 64 65 | 63 6f 64 69 6e 67 20 74 | name de|coding t|
|000007a0| 61 62 6c 65 0d 02 8a 30 | 45 51 55 44 20 30 20 20 |able...0|EQUD 0 |
|000007b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 20 53 57 | | \ SW|
|000007c0| 49 20 6e 61 6d 65 20 64 | 65 63 6f 64 69 6e 67 20 |I name d|ecoding |
|000007d0| 63 6f 64 65 0d 02 94 04 | 0d 02 9e 0b 2e 74 69 74 |code....|.....tit|
|000007e0| 6c 65 25 0d 02 a8 17 45 | 51 55 53 20 22 54 69 6d |le%....E|QUS "Tim|
|000007f0| 65 72 22 3a 45 51 55 42 | 20 30 0d 02 b2 04 0d 02 |er":EQUB| 0......|
|00000800| bc 0a 2e 68 65 6c 70 25 | 0d 02 c6 1b 45 51 55 53 |...help%|....EQUS|
|00000810| 20 22 6d 73 20 54 69 6d | 65 72 22 3a 45 51 55 42 | "ms Tim|er":EQUB|
|00000820| 20 26 39 0d 02 d0 1d 45 | 51 55 53 20 22 31 2e 30 | &9....E|QUS "1.0|
|00000830| 38 20 28 31 34 20 4d 61 | 72 20 31 39 39 36 29 22 |8 (14 Ma|r 1996)"|
|00000840| 0d 02 da 39 45 51 55 53 | 20 22 20 20 a9 20 53 74 |...9EQUS| " . St|
|00000850| 65 66 66 61 6e 20 43 6f | 72 6c 65 79 20 2f 20 74 |effan Co|rley / t|
|00000860| 68 61 6e 6b 73 20 74 6f | 20 44 20 57 61 6c 6b 65 |hanks to| D Walke|
|00000870| 72 22 3a 45 51 55 42 20 | 30 0d 02 e4 04 0d 02 ee |r":EQUB |0.......|
|00000880| 09 41 4c 49 47 4e 0d 02 | f8 3a 2e 63 6f 75 6e 74 |.ALIGN..|.:.count|
|00000890| 65 72 25 20 45 51 55 44 | 20 30 20 20 20 20 20 20 |er% EQUD| 0 |
|000008a0| 20 20 20 20 20 20 20 20 | 5c 20 4e 75 6d 62 65 72 | |\ Number|
|000008b0| 20 6f 66 20 6d 69 6c 6c | 69 73 65 63 6f 6e 64 73 | of mill|iseconds|
|000008c0| 0d 03 02 46 2e 65 6e 61 | 62 6c 65 64 25 20 45 51 |...F.ena|bled% EQ|
|000008d0| 55 44 20 30 20 20 20 20 | 20 20 20 20 20 20 20 20 |UD 0 | |
|000008e0| 20 20 5c 20 4e 75 6d 62 | 65 72 20 6f 66 20 74 61 | \ Numb|er of ta|
|000008f0| 73 6b 73 20 77 69 74 68 | 20 74 69 6d 65 72 20 65 |sks with| timer e|
|00000900| 6e 61 62 6c 65 64 0d 03 | 0c 45 2e 63 61 6c 69 62 |nabled..|.E.calib|
|00000910| 72 61 74 65 64 25 20 45 | 51 55 44 20 30 20 20 20 |rated% E|QUD 0 |
|00000920| 20 20 20 20 20 20 20 20 | 5c 20 57 68 65 74 68 65 | |\ Whethe|
|00000930| 72 20 74 69 6d 65 72 20 | 68 61 73 20 62 65 65 6e |r timer |has been|
|00000940| 20 63 61 6c 69 62 72 61 | 74 65 64 0d 03 16 3f 2e | calibra|ted...?.|
|00000950| 74 69 63 6b 73 25 20 45 | 51 55 44 20 30 20 20 20 |ticks% E|QUD 0 |
|00000960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 4e | | \ N|
|00000970| 75 6d 62 65 72 20 6f 66 | 20 32 4d 48 7a 20 74 69 |umber of| 2MHz ti|
|00000980| 63 6b 73 20 70 65 72 20 | 6d 73 0d 03 20 09 41 4c |cks per |ms.. .AL|
|00000990| 49 47 4e 0d 03 2a 04 0d | 03 34 19 f4 20 49 6e 69 |IGN..*..|.4.. Ini|
|000009a0| 74 69 61 6c 69 73 61 74 | 69 6f 6e 20 63 6f 64 65 |tialisat|ion code|
|000009b0| 0d 03 3e 04 0d 03 48 0d | 2e 73 74 61 72 74 75 70 |..>...H.|.startup|
|000009c0| 25 0d 03 52 04 0d 03 5c | 0e 6d 6f 76 20 72 30 2c |%..R...\|.mov r0,|
|000009d0| 20 23 30 0d 03 66 14 73 | 74 72 20 72 30 2c 20 63 | #0..f.s|tr r0, c|
|000009e0| 6f 75 6e 74 65 72 25 0d | 03 70 14 73 74 72 20 72 |ounter%.|.p.str r|
|000009f0| 30 2c 20 65 6e 61 62 6c | 65 64 25 0d 03 7a 17 73 |0, enabl|ed%..z.s|
|00000a00| 74 72 20 72 30 2c 20 63 | 61 6c 69 62 72 61 74 65 |tr r0, c|alibrate|
|00000a10| 64 25 0d 03 84 11 6d 6f | 76 20 72 30 2c 20 23 32 |d%....mo|v r0, #2|
|00000a20| 30 30 30 0d 03 8e 12 73 | 74 72 20 72 30 2c 20 74 |000....s|tr r0, t|
|00000a30| 69 63 6b 73 25 0d 03 98 | 0f 6d 6f 76 20 70 63 2c |icks%...|.mov pc,|
|00000a40| 20 72 31 34 0d 03 a2 04 | 0d 03 ac 26 f4 20 43 6f | r14....|...&. Co|
|00000a50| 64 65 20 70 65 72 66 6f | 72 6d 65 64 20 6f 6e 20 |de perfo|rmed on |
|00000a60| 65 61 63 68 20 69 6e 74 | 65 72 72 75 70 74 0d 03 |each int|errupt..|
|00000a70| b6 04 0d 03 c0 0f 2e 74 | 69 6d 65 72 5f 69 6e 63 |.......t|imer_inc|
|00000a80| 25 0d 03 ca 04 0d 03 d4 | 19 73 74 6d 66 64 20 72 |%.......|.stmfd r|
|00000a90| 31 33 21 2c 20 7b 72 31 | 2c 20 72 31 34 7d 0d 03 |13!, {r1|, r14}..|
|00000aa0| de 11 6d 6f 76 20 72 31 | 2c 20 23 49 4f 43 25 0d |..mov r1|, #IOC%.|
|00000ab0| 03 e8 3d 6d 6f 76 20 72 | 31 34 2c 20 23 54 69 6d |..=mov r|14, #Tim|
|00000ac0| 65 72 31 42 69 74 25 20 | 20 20 20 20 20 20 20 20 |er1Bit% | |
|00000ad0| 20 5c 20 57 65 20 63 61 | 6e 20 75 73 65 20 72 31 | \ We ca|n use r1|
|00000ae0| 34 20 61 73 20 73 63 72 | 61 74 63 68 0d 03 f2 45 |4 as scr|atch...E|
|00000af0| 73 74 72 62 20 72 31 34 | 2c 20 5b 72 31 2c 20 23 |strb r14|, [r1, #|
|00000b00| 49 4f 43 49 52 51 43 4c | 52 41 25 5d 20 20 5c 20 |IOCIRQCL|RA%] \ |
|00000b10| 4e 65 65 64 20 74 6f 20 | 63 6c 65 61 72 20 49 52 |Need to |clear IR|
|00000b20| 51 20 61 73 20 69 74 27 | 73 20 6c 61 74 63 68 65 |Q as it'|s latche|
|00000b30| 64 0d 03 fc 04 0d 04 06 | 17 f4 20 49 6e 63 72 65 |d.......|.. Incre|
|00000b40| 6d 65 6e 74 20 63 6f 75 | 6e 74 65 72 0d 04 10 04 |ment cou|nter....|
|00000b50| 0d 04 1a 14 6c 64 72 20 | 72 31 2c 20 63 6f 75 6e |....ldr |r1, coun|
|00000b60| 74 65 72 25 0d 04 24 12 | 61 64 64 20 72 31 2c 20 |ter%..$.|add r1, |
|00000b70| 72 31 2c 20 23 31 0d 04 | 2e 14 73 74 72 20 72 31 |r1, #1..|..str r1|
|00000b80| 2c 20 63 6f 75 6e 74 65 | 72 25 0d 04 38 04 0d 04 |, counte|r%..8...|
|00000b90| 42 0c f4 20 52 65 74 75 | 72 6e 0d 04 4c 04 0d 04 |B.. Retu|rn..L...|
|00000ba0| 56 18 6c 64 6d 66 64 20 | 72 31 33 21 2c 20 7b 72 |V.ldmfd |r13!, {r|
|00000bb0| 31 2c 20 70 63 7d 0d 04 | 60 04 0d 04 6a 17 f4 20 |1, pc}..|`...j.. |
|00000bc0| 46 69 6e 61 6c 69 73 61 | 74 69 6f 6e 20 63 6f 64 |Finalisa|tion cod|
|00000bd0| 65 0d 04 74 04 0d 04 7e | 0f 2e 63 6c 6f 73 65 64 |e..t...~|..closed|
|00000be0| 6f 77 6e 25 0d 04 88 04 | 0d 04 92 15 73 74 6d 66 |own%....|....stmf|
|00000bf0| 64 20 72 31 33 21 2c 20 | 7b 72 31 34 7d 0d 04 9c |d r13!, |{r14}...|
|00000c00| 04 0d 04 a6 14 6c 64 72 | 20 72 30 2c 20 65 6e 61 |.....ldr| r0, ena|
|00000c10| 62 6c 65 64 25 0d 04 b0 | 0e 63 6d 70 20 72 30 2c |bled%...|.cmp r0,|
|00000c20| 20 23 30 0d 04 ba 10 6d | 6f 76 6e 65 20 72 30 2c | #0....m|ovne r0,|
|00000c30| 20 23 31 0d 04 c4 16 73 | 74 72 6e 65 20 72 30 2c | #1....s|trne r0,|
|00000c40| 20 65 6e 61 62 6c 65 64 | 25 0d 04 ce 11 62 6c 6e | enabled|%....bln|
|00000c50| 65 20 64 69 73 61 62 6c | 65 25 0d 04 d8 04 0d 04 |e disabl|e%......|
|00000c60| e2 14 6c 64 6d 66 64 20 | 72 31 33 21 2c 20 7b 70 |..ldmfd |r13!, {p|
|00000c70| 63 7d 0d 04 ec 04 0d 04 | f6 0e f4 20 53 57 49 20 |c}......|... SWI |
|00000c80| 63 6f 64 65 0d 05 00 04 | 0d 05 0a 0e 2e 73 77 69 |code....|.....swi|
|00000c90| 5f 63 6f 64 65 25 0d 05 | 14 04 0d 05 1e 2c 63 6d |_code%..|.....,cm|
|00000ca0| 70 20 72 31 31 2c 20 23 | 28 6a 75 6d 70 5f 74 61 |p r11, #|(jump_ta|
|00000cb0| 62 6c 65 65 6e 64 25 2d | 6a 75 6d 70 5f 74 61 62 |bleend%-|jump_tab|
|00000cc0| 6c 65 25 29 2f 34 0d 05 | 28 3a 61 64 64 6c 6f 20 |le%)/4..|(:addlo |
|00000cd0| 70 63 2c 20 70 63 2c 20 | 72 31 31 2c 20 6c 73 6c |pc, pc, |r11, lsl|
|00000ce0| 20 23 32 20 20 20 20 20 | 20 5c 20 44 69 73 70 61 | #2 | \ Dispa|
|00000cf0| 74 63 68 20 69 66 20 6b | 6e 6f 77 6e 20 53 57 49 |tch if k|nown SWI|
|00000d00| 0d 05 32 3b 62 20 75 6e | 6b 6e 6f 77 6e 5f 73 77 |..2;b un|known_sw|
|00000d10| 69 25 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |i% | |
|00000d20| 20 20 20 5c 20 4f 74 68 | 65 72 77 69 73 65 20 72 | \ Oth|erwise r|
|00000d30| 65 74 75 72 6e 20 65 72 | 72 6f 72 0d 05 3c 04 0d |eturn er|ror..<..|
|00000d40| 05 46 10 2e 6a 75 6d 70 | 5f 74 61 62 6c 65 25 0d |.F..jump|_table%.|
|00000d50| 05 50 04 0d 05 5a 11 62 | 20 72 65 61 64 5f 74 69 |.P...Z.b| read_ti|
|00000d60| 6d 65 72 25 0d 05 64 0d | 62 20 65 6e 61 62 6c 65 |mer%..d.|b enable|
|00000d70| 25 0d 05 6e 0e 62 20 64 | 69 73 61 62 6c 65 25 0d |%..n.b d|isable%.|
|00000d80| 05 78 10 62 20 63 61 6c | 69 62 72 61 74 65 25 0d |.x.b cal|ibrate%.|
|00000d90| 05 82 11 62 20 64 69 66 | 66 65 72 65 6e 63 65 25 |...b dif|ference%|
|00000da0| 0d 05 8c 14 62 20 73 65 | 74 5f 63 61 6c 69 62 72 |....b se|t_calibr|
|00000db0| 61 74 65 25 0d 05 96 04 | 0d 05 a0 13 2e 6a 75 6d |ate%....|.....jum|
|00000dc0| 70 5f 74 61 62 6c 65 65 | 6e 64 25 0d 05 aa 04 0d |p_tablee|nd%.....|
|00000dd0| 05 b4 10 2e 72 65 61 64 | 5f 74 69 6d 65 72 25 0d |....read|_timer%.|
|00000de0| 05 be 04 0d 05 c8 1c 73 | 74 6d 66 64 20 72 31 33 |.......s|tmfd r13|
|00000df0| 21 2c 20 7b 72 32 2d 72 | 33 2c 20 72 31 34 7d 0d |!, {r2-r|3, r14}.|
|00000e00| 05 d2 04 0d 05 dc 40 6c | 64 72 20 72 30 2c 20 63 |......@l|dr r0, c|
|00000e10| 6f 75 6e 74 65 72 25 20 | 20 20 20 20 20 20 20 20 |ounter% | |
|00000e20| 20 20 20 20 20 20 5c 20 | 53 65 74 20 72 30 20 74 | \ |Set r0 t|
|00000e30| 6f 20 74 68 65 20 63 6f | 75 6e 74 65 72 20 76 61 |o the co|unter va|
|00000e40| 6c 75 65 0d 05 e6 04 0d | 05 f0 17 f4 20 52 65 61 |lue.....|.... Rea|
|00000e50| 64 20 54 69 6d 65 72 31 | 20 74 6f 20 72 31 0d 05 |d Timer1| to r1..|
|00000e60| fa 04 0d 06 04 11 6d 6f | 76 20 72 33 2c 20 23 49 |......mo|v r3, #I|
|00000e70| 4f 43 25 0d 06 0e 38 73 | 74 72 62 20 72 33 2c 20 |OC%...8s|trb r3, |
|00000e80| 5b 72 33 2c 20 23 54 69 | 6d 65 72 31 4c 52 25 5d |[r3, #Ti|mer1LR%]|
|00000e90| 20 20 20 20 20 20 5c 20 | 43 6f 70 79 20 76 61 6c | \ |Copy val|
|00000ea0| 75 65 20 74 6f 20 6c 61 | 74 63 68 0d 06 18 32 6c |ue to la|tch...2l|
|00000eb0| 64 72 62 20 72 31 2c 20 | 5b 72 33 2c 20 23 54 69 |drb r1, |[r3, #Ti|
|00000ec0| 6d 65 72 31 43 4c 25 5d | 20 20 20 20 20 20 5c 20 |mer1CL%]| \ |
|00000ed0| 52 65 61 64 20 6c 6f 77 | 20 62 79 74 65 0d 06 22 |Read low| byte.."|
|00000ee0| 33 6c 64 72 62 20 72 32 | 2c 20 5b 72 33 2c 20 23 |3ldrb r2|, [r3, #|
|00000ef0| 54 69 6d 65 72 31 43 48 | 25 5d 20 20 20 20 20 20 |Timer1CH|%] |
|00000f00| 5c 20 52 65 61 64 20 68 | 69 67 68 20 62 79 74 65 |\ Read h|igh byte|
|00000f10| 0d 06 2c 31 61 64 64 20 | 72 31 2c 20 72 31 2c 20 |..,1add |r1, r1, |
|00000f20| 72 32 2c 20 6c 73 6c 20 | 23 38 20 20 20 20 20 20 |r2, lsl |#8 |
|00000f30| 20 20 20 5c 20 43 6f 6d | 62 69 6e 65 20 74 68 65 | \ Com|bine the|
|00000f40| 6d 0d 06 36 04 0d 06 40 | 37 6c 64 72 20 72 32 2c |m..6...@|7ldr r2,|
|00000f50| 20 63 6f 75 6e 74 65 72 | 25 20 20 20 20 20 20 20 | counter|% |
|00000f60| 20 20 20 20 20 20 20 20 | 5c 20 52 65 61 64 20 63 | |\ Read c|
|00000f70| 6f 75 6e 74 65 72 20 61 | 67 61 69 6e 0d 06 4a 04 |ounter a|gain..J.|
|00000f80| 0d 06 54 41 6c 64 72 20 | 72 33 2c 20 74 69 63 6b |..TAldr |r3, tick|
|00000f90| 73 25 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s% | |
|00000fa0| 20 20 20 5c 20 57 6f 72 | 6b 20 6f 75 74 20 74 69 | \ Wor|k out ti|
|00000fb0| 63 6b 73 20 73 69 6e 63 | 65 20 6c 61 73 74 20 6d |cks sinc|e last m|
|00000fc0| 73 0d 06 5e 35 73 75 62 | 20 72 31 2c 20 72 33 2c |s..^5sub| r1, r3,|
|00000fd0| 20 72 31 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | r1 | |
|00000fe0| 20 20 20 20 5c 20 66 72 | 6f 6d 20 74 69 63 6b 73 | \ fr|om ticks|
|00000ff0| 20 74 6f 20 67 6f 0d 06 | 68 04 0d 06 72 33 f4 20 | to go..|h...r3. |
|00001000| 49 66 20 74 68 65 20 74 | 77 6f 20 72 65 61 64 69 |If the t|wo readi|
|00001010| 6e 67 73 20 6f 66 20 63 | 6f 75 6e 74 65 72 20 61 |ngs of c|ounter a|
|00001020| 72 65 20 6e 6f 74 20 65 | 71 75 61 6c 2c 0d 06 7c |re not e|qual,..||
|00001030| 32 f4 20 61 6e 20 69 6e | 74 65 72 72 75 70 74 20 |2. an in|terrupt |
|00001040| 6f 63 63 75 72 65 64 20 | 73 6f 6d 65 77 68 65 72 |occured |somewher|
|00001050| 65 20 62 65 74 77 65 65 | 6e 20 74 68 65 6d 2e 0d |e betwee|n them..|
|00001060| 06 86 04 0d 06 90 0e 63 | 6d 70 20 72 30 2c 20 72 |.......c|mp r0, r|
|00001070| 32 0d 06 9a 1d 6c 64 6d | 65 71 66 64 20 72 31 33 |2....ldm|eqfd r13|
|00001080| 21 2c 20 7b 72 32 2d 72 | 33 2c 20 70 63 7d 0d 06 |!, {r2-r|3, pc}..|
|00001090| a4 04 0d 06 ae 3e f4 20 | 49 66 20 74 68 65 20 6e |.....>. |If the n|
|000010a0| 75 6d 62 65 72 20 6f 66 | 20 74 69 63 6b 73 20 69 |umber of| ticks i|
|000010b0| 73 20 6c 6f 77 2c 20 69 | 74 20 61 67 72 65 65 73 |s low, i|t agrees|
|000010c0| 20 77 69 74 68 20 74 68 | 65 20 73 65 63 6f 6e 64 | with th|e second|
|000010d0| 0d 06 b8 2d f4 20 72 65 | 61 64 69 6e 67 20 6f 66 |...-. re|ading of|
|000010e0| 20 63 6f 75 6e 74 65 72 | 2c 20 6f 74 68 65 72 77 | counter|, otherw|
|000010f0| 69 73 65 20 74 68 65 20 | 66 69 72 73 74 0d 06 c2 |ise the |first...|
|00001100| 04 0d 06 cc 16 63 6d 70 | 20 72 31 2c 20 72 33 2c |.....cmp| r1, r3,|
|00001110| 20 6c 73 72 20 23 31 0d | 06 d6 10 6d 6f 76 6c 74 | lsr #1.|...movlt|
|00001120| 20 72 30 2c 20 72 32 0d | 06 e0 04 0d 06 ea 1b 6c | r0, r2.|.......l|
|00001130| 64 6d 66 64 20 72 31 33 | 21 2c 20 7b 72 32 2d 72 |dmfd r13|!, {r2-r|
|00001140| 33 2c 20 70 63 7d 0d 06 | f4 04 0d 06 fe 0c 2e 65 |3, pc}..|.......e|
|00001150| 6e 61 62 6c 65 25 0d 07 | 08 04 0d 07 12 3d 6c 64 |nable%..|.....=ld|
|00001160| 72 20 72 30 2c 20 65 6e | 61 62 6c 65 64 25 20 20 |r r0, en|abled% |
|00001170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 49 | | \ I|
|00001180| 66 20 74 69 6d 65 72 20 | 61 6c 72 65 61 64 79 20 |f timer |already |
|00001190| 65 6e 61 62 6c 65 64 0d | 07 1c 0e 63 6d 70 20 72 |enabled.|...cmp r|
|000011a0| 30 2c 20 23 30 0d 07 26 | 16 62 65 71 20 65 6e 61 |0, #0..&|.beq ena|
|000011b0| 62 6c 65 5f 74 69 6d 65 | 72 31 25 0d 07 30 12 61 |ble_time|r1%..0.a|
|000011c0| 64 64 20 72 30 2c 20 72 | 30 2c 20 23 31 0d 07 3a |dd r0, r|0, #1..:|
|000011d0| 42 73 74 72 20 72 30 2c | 20 65 6e 61 62 6c 65 64 |Bstr r0,| enabled|
|000011e0| 25 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |% | |
|000011f0| 5c 20 49 6e 63 72 65 6d | 65 6e 74 20 74 68 65 20 |\ Increm|ent the |
|00001200| 6e 75 6d 62 65 72 20 6f | 66 20 75 73 65 72 73 0d |number o|f users.|
|00001210| 07 44 04 0d 07 4e 3e 6c | 64 72 20 72 30 2c 20 63 |.D...N>l|dr r0, c|
|00001220| 61 6c 69 62 72 61 74 65 | 64 25 20 20 20 20 20 20 |alibrate|d% |
|00001230| 20 20 20 20 20 20 5c 20 | 72 65 74 75 72 6e 20 77 | \ |return w|
|00001240| 68 65 74 68 65 72 20 63 | 61 6c 69 62 72 61 74 65 |hether c|alibrate|
|00001250| 64 0d 07 58 0f 6d 6f 76 | 20 70 63 2c 20 72 31 34 |d..X.mov| pc, r14|
|00001260| 0d 07 62 04 0d 07 6c 3f | f4 20 45 6e 61 62 6c 65 |..b...l?|. Enable|
|00001270| 20 49 4f 43 20 54 69 6d | 65 72 20 31 20 28 69 66 | IOC Tim|er 1 (if|
|00001280| 20 74 68 65 20 74 69 6d | 65 72 20 77 61 73 20 6e | the tim|er was n|
|00001290| 6f 74 20 61 6c 72 65 61 | 64 79 20 65 6e 61 62 6c |ot alrea|dy enabl|
|000012a0| 65 64 29 0d 07 76 04 0d | 07 80 13 2e 65 6e 61 62 |ed)..v..|....enab|
|000012b0| 6c 65 5f 74 69 6d 65 72 | 31 25 0d 07 8a 04 0d 07 |le_timer|1%......|
|000012c0| 94 1c 73 74 6d 66 64 20 | 72 31 33 21 2c 20 7b 72 |..stmfd |r13!, {r|
|000012d0| 31 2d 72 35 2c 20 72 31 | 34 7d 0d 07 9e 04 0d 07 |1-r5, r1|4}......|
|000012e0| a8 46 f4 20 43 68 65 63 | 6b 20 77 68 65 74 68 65 |.F. Chec|k whethe|
|000012f0| 72 20 54 69 6d 65 72 31 | 20 49 52 51 20 69 73 20 |r Timer1| IRQ is |
|00001300| 61 6c 72 65 61 64 79 20 | 65 6e 61 62 6c 65 64 20 |already |enabled |
|00001310| 28 62 79 20 73 6f 6d 65 | 20 6f 74 68 65 72 20 74 |(by some| other t|
|00001320| 61 73 6b 29 0d 07 b2 04 | 0d 07 bc 11 6d 6f 76 20 |ask)....|....mov |
|00001330| 72 33 2c 20 23 49 4f 43 | 25 0d 07 c6 1f 6c 64 72 |r3, #IOC|%....ldr|
|00001340| 62 20 72 30 2c 20 5b 72 | 33 2c 20 23 49 4f 43 49 |b r0, [r|3, #IOCI|
|00001350| 52 51 4d 53 4b 41 25 5d | 0d 07 d0 1c 61 6e 64 73 |RQMSKA%]|....ands|
|00001360| 20 72 30 2c 20 72 30 2c | 20 23 54 69 6d 65 72 31 | r0, r0,| #Timer1|
|00001370| 42 69 74 25 0d 07 da 13 | 62 6e 65 20 74 69 6d 65 |Bit%....|bne time|
|00001380| 72 5f 75 73 65 64 25 0d | 07 e4 04 0d 07 ee 36 f4 |r_used%.|......6.|
|00001390| 20 43 6c 61 69 6d 20 76 | 65 63 74 6f 72 20 66 6f | Claim v|ector fo|
|000013a0| 72 20 54 69 6d 65 72 20 | 31 20 63 72 6f 73 73 69 |r Timer |1 crossi|
|000013b0| 6e 67 20 7a 65 72 6f 20 | 69 6e 74 65 72 72 75 70 |ng zero |interrup|
|000013c0| 74 0d 07 f8 04 0d 08 02 | 19 6d 6f 76 20 72 30 2c |t.......|.mov r0,|
|000013d0| 20 23 54 69 6d 65 72 31 | 44 65 76 4e 6f 25 0d 08 | #Timer1|DevNo%..|
|000013e0| 0c 16 61 64 72 20 72 31 | 2c 20 74 69 6d 65 72 5f |..adr r1|, timer_|
|000013f0| 69 6e 63 25 0d 08 16 0e | 6d 6f 76 20 72 32 2c 20 |inc%....|mov r2, |
|00001400| 23 30 0d 08 20 1f 73 77 | 69 20 22 58 4f 53 5f 43 |#0.. .sw|i "XOS_C|
|00001410| 6c 61 69 6d 44 65 76 69 | 63 65 56 65 63 74 6f 72 |laimDevi|ceVector|
|00001420| 22 0d 08 2a 1d 6c 64 6d | 76 73 66 64 20 72 31 33 |"..*.ldm|vsfd r13|
|00001430| 21 2c 20 7b 72 31 2d 72 | 35 2c 20 70 63 7d 0d 08 |!, {r1-r|5, pc}..|
|00001440| 34 04 0d 08 3e 1b f4 20 | 53 65 74 20 54 69 6d 65 |4...>.. |Set Time|
|00001450| 72 20 31 20 74 6f 20 74 | 69 63 6b 73 25 0d 08 48 |r 1 to t|icks%..H|
|00001460| 04 0d 08 52 11 6d 6f 76 | 20 72 33 2c 20 23 49 4f |...R.mov| r3, #IO|
|00001470| 43 25 0d 08 5c 2d 6c 64 | 72 20 72 31 2c 20 74 69 |C%..\-ld|r r1, ti|
|00001480| 63 6b 73 25 20 20 20 20 | 20 20 20 20 20 20 20 20 |cks% | |
|00001490| 20 20 20 20 20 5c 20 4c | 6f 77 20 62 79 74 65 0d | \ L|ow byte.|
|000014a0| 08 66 2e 6d 6f 76 20 72 | 32 2c 20 72 31 2c 20 6c |.f.mov r|2, r1, l|
|000014b0| 73 72 20 23 38 20 20 20 | 20 20 20 20 20 20 20 20 |sr #8 | |
|000014c0| 20 20 5c 20 48 69 67 68 | 20 62 79 74 65 0d 08 70 | \ High| byte..p|
|000014d0| 1d 73 74 72 62 20 72 31 | 2c 20 5b 72 33 2c 20 23 |.strb r1|, [r3, #|
|000014e0| 54 69 6d 65 72 31 4c 4c | 25 5d 0d 08 7a 1d 73 74 |Timer1LL|%]..z.st|
|000014f0| 72 62 20 72 32 2c 20 5b | 72 33 2c 20 23 54 69 6d |rb r2, [|r3, #Tim|
|00001500| 65 72 31 4c 48 25 5d 0d | 08 84 1d 73 74 72 62 20 |er1LH%].|...strb |
|00001510| 72 33 2c 20 5b 72 33 2c | 20 23 54 69 6d 65 72 31 |r3, [r3,| #Timer1|
|00001520| 47 4f 25 5d 0d 08 8e 04 | 0d 08 98 1a f4 20 45 6e |GO%]....|..... En|
|00001530| 61 62 6c 65 20 74 68 65 | 20 74 69 6d 65 72 20 49 |able the| timer I|
|00001540| 52 51 0d 08 a2 04 0d 08 | ac 0e 6d 6f 76 20 72 34 |RQ......|..mov r4|
|00001550| 2c 20 70 63 0d 08 b6 46 | 6f 72 72 20 72 35 2c 20 |, pc...F|orr r5, |
|00001560| 72 34 2c 20 23 28 49 5f | 62 69 74 25 20 2b 20 46 |r4, #(I_|bit% + F|
|00001570| 5f 62 69 74 25 29 20 5c | 20 41 6c 6c 20 69 6e 74 |_bit%) \| All int|
|00001580| 65 72 72 75 70 74 73 20 | 6f 66 66 20 61 73 20 46 |errupts |off as F|
|00001590| 49 51 20 70 72 6f 63 65 | 73 73 0d 08 c0 44 74 65 |IQ proce|ss...Dte|
|000015a0| 71 70 20 72 35 2c 20 23 | 30 20 20 20 20 20 20 20 |qp r5, #|0 |
|000015b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 61 | | \ a|
|000015c0| 6c 73 6f 20 6d 6f 64 69 | 66 69 65 73 20 4d 53 4b |lso modi|fies MSK|
|000015d0| 41 20 74 6f 20 64 6f 77 | 6e 67 72 61 64 65 0d 08 |A to dow|ngrade..|
|000015e0| ca 38 6c 64 72 62 20 72 | 30 2c 20 5b 72 33 2c 20 |.8ldrb r|0, [r3, |
|000015f0| 23 49 4f 43 49 52 51 4d | 53 4b 41 25 5d 20 20 20 |#IOCIRQM|SKA%] |
|00001600| 20 5c 20 73 6f 6d 65 20 | 46 49 51 73 20 69 6e 74 | \ some |FIQs int|
|00001610| 6f 20 49 52 51 73 0d 08 | d4 1b 6f 72 72 20 72 30 |o IRQs..|..orr r0|
|00001620| 2c 20 72 30 2c 20 23 54 | 69 6d 65 72 31 42 69 74 |, r0, #T|imer1Bit|
|00001630| 25 0d 08 de 1f 73 74 72 | 62 20 72 30 2c 20 5b 72 |%....str|b r0, [r|
|00001640| 33 2c 20 23 49 4f 43 49 | 52 51 4d 53 4b 41 25 5d |3, #IOCI|RQMSKA%]|
|00001650| 0d 08 e8 3c 74 65 71 70 | 20 72 34 2c 20 23 30 20 |...<teqp| r4, #0 |
|00001660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001670| 20 20 20 5c 20 52 65 73 | 74 6f 72 65 20 69 6e 74 | \ Res|tore int|
|00001680| 65 72 72 75 70 74 20 73 | 74 61 74 65 0d 08 f2 0e |errupt s|tate....|
|00001690| 6d 6f 76 20 72 30 2c 20 | 23 31 0d 08 fc 14 73 74 |mov r0, |#1....st|
|000016a0| 72 20 72 30 2c 20 65 6e | 61 62 6c 65 64 25 0d 09 |r r0, en|abled%..|
|000016b0| 06 3e 6c 64 72 20 72 30 | 2c 20 63 61 6c 69 62 72 |.>ldr r0|, calibr|
|000016c0| 61 74 65 64 25 20 20 20 | 20 20 20 20 20 20 20 20 |ated% | |
|000016d0| 20 5c 20 52 65 74 75 72 | 6e 20 77 68 65 74 68 65 | \ Retur|n whethe|
|000016e0| 72 20 63 61 6c 69 62 72 | 61 74 65 64 0d 09 10 04 |r calibr|ated....|
|000016f0| 0d 09 1a 1b 6c 64 6d 66 | 64 20 72 31 33 21 2c 20 |....ldmf|d r13!, |
|00001700| 7b 72 31 2d 72 35 2c 20 | 70 63 7d 0d 09 24 04 0d |{r1-r5, |pc}..$..|
|00001710| 09 2e 32 f4 20 45 72 72 | 6f 72 20 69 66 20 61 6e |..2. Err|or if an|
|00001720| 6f 74 68 65 72 20 61 70 | 70 6c 69 63 61 74 69 6f |other ap|plicatio|
|00001730| 6e 20 69 73 20 75 73 69 | 6e 67 20 54 69 6d 65 72 |n is usi|ng Timer|
|00001740| 31 0d 09 38 04 0d 09 42 | 10 2e 74 69 6d 65 72 5f |1..8...B|..timer_|
|00001750| 75 73 65 64 25 0d 09 4c | 04 0d 09 56 1c 61 64 72 |used%..L|...V.adr|
|00001760| 20 72 30 2c 20 65 72 72 | 6f 72 5f 74 69 6d 65 72 | r0, err|or_timer|
|00001770| 75 73 65 64 25 0d 09 60 | 1c 6c 64 6d 66 64 20 72 |used%..`|.ldmfd r|
|00001780| 31 33 21 2c 20 7b 72 31 | 2d 72 35 2c 20 72 31 34 |13!, {r1|-r5, r14|
|00001790| 7d 0d 09 6a 21 6f 72 72 | 73 20 70 63 2c 20 72 31 |}..j!orr|s pc, r1|
|000017a0| 34 2c 20 23 6f 76 65 72 | 66 6c 6f 77 5f 66 6c 61 |4, #over|flow_fla|
|000017b0| 67 25 0d 09 74 04 0d 09 | 7e 0d 2e 64 69 73 61 62 |g%..t...|~..disab|
|000017c0| 6c 65 25 0d 09 88 04 0d | 09 92 1c 73 74 6d 66 64 |le%.....|...stmfd|
|000017d0| 20 72 31 33 21 2c 20 7b | 72 30 2d 72 35 2c 20 72 | r13!, {|r0-r5, r|
|000017e0| 31 34 7d 0d 09 9c 04 0d | 09 a6 39 6c 64 72 20 72 |14}.....|..9ldr r|
|000017f0| 30 2c 20 65 6e 61 62 6c | 65 64 25 20 20 20 20 20 |0, enabl|ed% |
|00001800| 20 20 20 20 20 20 20 20 | 20 20 5c 20 49 66 20 74 | | \ If t|
|00001810| 69 6d 65 72 20 6e 6f 74 | 20 65 6e 61 62 6c 65 64 |imer not| enabled|
|00001820| 0d 09 b0 0e 63 6d 70 20 | 72 30 2c 20 23 30 0d 09 |....cmp |r0, #0..|
|00001830| ba 1d 6c 64 6d 65 71 66 | 64 20 72 31 33 21 2c 20 |..ldmeqf|d r13!, |
|00001840| 7b 72 30 2d 72 35 2c 20 | 70 63 7d 0d 09 c4 04 0d |{r0-r5, |pc}.....|
|00001850| 09 ce 13 73 75 62 73 20 | 72 30 2c 20 72 30 2c 20 |...subs |r0, r0, |
|00001860| 23 31 0d 09 d8 14 73 74 | 72 20 72 30 2c 20 65 6e |#1....st|r r0, en|
|00001870| 61 62 6c 65 64 25 0d 09 | e2 44 6c 64 6d 6e 65 66 |abled%..|.Dldmnef|
|00001880| 64 20 72 31 33 21 2c 20 | 7b 72 30 2d 72 35 2c 20 |d r13!, |{r0-r5, |
|00001890| 70 63 7d 20 20 20 20 20 | 20 5c 20 52 65 74 75 72 |pc} | \ Retur|
|000018a0| 6e 20 69 66 20 74 68 65 | 72 65 20 61 72 65 20 6f |n if the|re are o|
|000018b0| 74 68 65 72 20 75 73 65 | 72 73 0d 09 ec 04 0d 09 |ther use|rs......|
|000018c0| f6 38 f4 20 52 65 6c 65 | 61 73 65 20 76 65 63 74 |.8. Rele|ase vect|
|000018d0| 6f 72 20 66 6f 72 20 54 | 69 6d 65 72 20 31 20 63 |or for T|imer 1 c|
|000018e0| 72 6f 73 73 69 6e 67 20 | 7a 65 72 6f 20 69 6e 74 |rossing |zero int|
|000018f0| 65 72 72 75 70 74 0d 0a | 00 04 0d 0a 0a 19 6d 6f |errupt..|......mo|
|00001900| 76 20 72 30 2c 20 23 54 | 69 6d 65 72 31 44 65 76 |v r0, #T|imer1Dev|
|00001910| 4e 6f 25 0d 0a 14 16 61 | 64 72 20 72 31 2c 20 74 |No%....a|dr r1, t|
|00001920| 69 6d 65 72 5f 69 6e 63 | 25 0d 0a 1e 0e 6d 6f 76 |imer_inc|%....mov|
|00001930| 20 72 32 2c 20 23 30 0d | 0a 28 21 73 77 69 20 22 | r2, #0.|.(!swi "|
|00001940| 58 4f 53 5f 52 65 6c 65 | 61 73 65 44 65 76 69 63 |XOS_Rele|aseDevic|
|00001950| 65 56 65 63 74 6f 72 22 | 0d 0a 32 04 0d 0a 3c 43 |eVector"|..2...<C|
|00001960| 6c 64 6d 66 64 20 72 31 | 33 21 2c 20 7b 72 30 2d |ldmfd r1|3!, {r0-|
|00001970| 72 35 2c 20 70 63 7d 20 | 20 20 20 20 20 20 5c 20 |r5, pc} | \ |
|00001980| 57 69 6c 6c 20 72 65 74 | 75 72 6e 20 61 6e 79 20 |Will ret|urn any |
|00001990| 65 72 72 6f 72 73 20 66 | 72 6f 6d 20 53 57 49 0d |errors f|rom SWI.|
|000019a0| 0a 46 04 0d 0a 50 42 f4 | 20 43 61 6c 69 62 72 61 |.F...PB.| Calibra|
|000019b0| 74 65 20 74 68 65 20 74 | 69 6d 65 72 20 28 74 68 |te the t|imer (th|
|000019c0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 20 6e |is funct|ion is n|
|000019d0| 6f 77 20 6c 61 72 67 65 | 6c 79 20 72 65 64 75 6e |ow large|ly redun|
|000019e0| 64 61 6e 74 29 0d 0a 5a | 04 0d 0a 64 0f 2e 63 61 |dant)..Z|...d..ca|
|000019f0| 6c 69 62 72 61 74 65 25 | 0d 0a 6e 04 0d 0a 78 1c |librate%|..n...x.|
|00001a00| 73 74 6d 66 64 20 72 31 | 33 21 2c 20 7b 72 31 2d |stmfd r1|3!, {r1-|
|00001a10| 72 36 2c 20 72 31 34 7d | 0d 0a 82 04 0d 0a 8c 20 |r6, r14}|....... |
|00001a20| f4 20 57 6f 72 6b 20 6f | 75 74 20 69 6e 69 74 69 |. Work o|ut initi|
|00001a30| 61 6c 20 63 6f 6e 73 74 | 61 6e 74 73 0d 0a 96 04 |al const|ants....|
|00001a40| 0d 0a a0 30 6d 6f 76 20 | 72 36 2c 20 72 30 20 20 |...0mov |r6, r0 |
|00001a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a60| 20 20 20 5c 20 4b 65 65 | 70 20 72 30 20 2b 20 31 | \ Kee|p r0 + 1|
|00001a70| 0d 0a aa 04 0d 0a b4 0e | 6d 6f 76 20 72 31 2c 20 |........|mov r1, |
|00001a80| 23 32 0d 0a be 3f 6d 6f | 76 20 72 30 2c 20 72 31 |#2...?mo|v r0, r1|
|00001a90| 2c 20 6c 73 6c 20 72 30 | 20 20 20 20 20 20 20 20 |, lsl r0| |
|00001aa0| 20 20 20 20 20 5c 20 41 | 6e 64 20 61 6c 73 6f 20 | \ A|nd also |
|00001ab0| 77 6f 72 6b 20 6f 75 74 | 20 68 6f 77 20 6d 61 6e |work out| how man|
|00001ac0| 79 0d 0a c8 3f 6d 6f 76 | 20 72 31 2c 20 23 31 30 |y...?mov| r1, #10|
|00001ad0| 30 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0 | |
|00001ae0| 20 20 20 20 5c 20 63 65 | 6e 74 69 73 65 63 6f 6e | \ ce|ntisecon|
|00001af0| 64 73 20 72 30 20 72 65 | 70 72 65 73 65 6e 74 73 |ds r0 re|presents|
|00001b00| 0d 0a d2 12 6d 75 6c 20 | 72 35 2c 20 72 30 2c 20 |....mul |r5, r0, |
|00001b10| 72 31 0d 0a dc 04 0d 0a | e6 42 f4 20 43 61 6c 69 |r1......|.B. Cali|
|00001b20| 62 72 61 74 65 20 74 69 | 6d 65 72 20 28 77 68 69 |brate ti|mer (whi|
|00001b30| 63 68 20 72 65 74 75 72 | 6e 73 20 61 6e 20 65 72 |ch retur|ns an er|
|00001b40| 72 6f 72 20 69 66 20 69 | 74 27 73 20 6e 6f 74 20 |ror if i|t's not |
|00001b50| 65 6e 61 62 6c 65 64 29 | 0d 0a f0 04 0d 0a f1 11 |enabled)|........|
|00001b60| 6d 6f 76 20 72 30 2c 20 | 23 32 30 30 30 0d 0a fa |mov r0, |#2000...|
|00001b70| 3f 62 6c 20 73 65 74 5f | 63 61 6c 69 62 72 61 74 |?bl set_|calibrat|
|00001b80| 65 25 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e% | |
|00001b90| 5c 20 52 65 73 65 74 20 | 74 69 63 6b 65 72 20 76 |\ Reset |ticker v|
|00001ba0| 61 6c 75 65 20 74 6f 20 | 32 30 30 30 0d 0b 04 1d |alue to |2000....|
|00001bb0| 6c 64 6d 76 73 66 64 20 | 72 31 33 21 2c 20 7b 72 |ldmvsfd |r13!, {r|
|00001bc0| 31 2d 72 36 2c 20 70 63 | 7d 0d 0b 0e 04 0d 0b 18 |1-r6, pc|}.......|
|00001bd0| 2d f4 20 4e 6f 77 20 74 | 69 6d 65 20 61 6e 20 69 |-. Now t|ime an i|
|00001be0| 6e 74 65 72 76 61 6c 20 | 6f 66 20 72 35 20 63 65 |nterval |of r5 ce|
|00001bf0| 6e 74 69 73 65 63 6f 6e | 64 73 0d 0b 22 3e f4 20 |ntisecon|ds..">. |
|00001c00| 46 69 72 73 74 20 77 61 | 69 74 69 6e 67 20 66 6f |First wa|iting fo|
|00001c10| 72 20 73 79 6e 63 68 72 | 6f 6e 69 7a 61 74 69 6f |r synchr|onizatio|
|00001c20| 6e 20 77 69 74 68 20 63 | 65 6e 74 69 73 65 63 6f |n with c|entiseco|
|00001c30| 6e 64 20 74 69 6d 65 72 | 0d 0b 2c 04 0d 0b 36 40 |nd timer|..,...6@|
|00001c40| 73 77 69 20 22 58 4f 53 | 5f 52 65 61 64 4d 6f 6e |swi "XOS|_ReadMon|
|00001c50| 6f 74 6f 6e 69 63 54 69 | 6d 65 22 20 20 20 20 5c |otonicTi|me" \|
|00001c60| 20 52 65 61 64 20 63 65 | 6e 74 69 73 65 63 6f 6e | Read ce|ntisecon|
|00001c70| 64 20 74 69 6d 65 72 20 | 28 63 74 29 0d 0b 40 1d |d timer |(ct)..@.|
|00001c80| 6c 64 6d 76 73 66 64 20 | 72 31 33 21 2c 20 7b 72 |ldmvsfd |r13!, {r|
|00001c90| 31 2d 72 36 2c 20 70 63 | 7d 0d 0b 4a 04 0d 0b 54 |1-r6, pc|}..J...T|
|00001ca0| 12 61 64 64 20 72 34 2c | 20 72 30 2c 20 23 32 0d |.add r4,| r0, #2.|
|00001cb0| 0b 5e 15 2e 63 61 6c 69 | 62 72 61 74 65 5f 6c 6f |.^..cali|brate_lo|
|00001cc0| 6f 70 31 25 0d 0b 68 2c | 73 77 69 20 22 58 4f 53 |op1%..h,|swi "XOS|
|00001cd0| 5f 52 65 61 64 4d 6f 6e | 6f 74 6f 6e 69 63 54 69 |_ReadMon|otonicTi|
|00001ce0| 6d 65 22 20 20 20 20 5c | 20 52 65 61 64 20 63 74 |me" \| Read ct|
|00001cf0| 0d 0b 72 1d 6c 64 6d 76 | 73 66 64 20 72 31 33 21 |..r.ldmv|sfd r13!|
|00001d00| 2c 20 7b 72 31 2d 72 36 | 2c 20 70 63 7d 0d 0b 7c |, {r1-r6|, pc}..||
|00001d10| 45 63 6d 70 20 72 34 2c | 20 72 30 20 20 20 20 20 |Ecmp r4,| r0 |
|00001d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d30| 5c 20 57 61 69 74 20 75 | 6e 74 69 6c 20 63 74 20 |\ Wait u|ntil ct |
|00001d40| 68 61 73 20 6a 75 73 74 | 20 69 6e 63 72 65 61 73 |has just| increas|
|00001d50| 65 64 0d 0b 86 31 62 68 | 69 20 63 61 6c 69 62 72 |ed...1bh|i calibr|
|00001d60| 61 74 65 5f 6c 6f 6f 70 | 31 25 20 20 20 20 20 20 |ate_loop|1% |
|00001d70| 20 20 20 20 20 5c 20 62 | 79 20 74 77 6f 20 74 69 | \ b|y two ti|
|00001d80| 63 6b 73 0d 0b 90 04 0d | 0b 9a 32 62 6c 20 72 65 |cks.....|..2bl re|
|00001d90| 61 64 5f 74 69 6d 65 72 | 25 20 20 20 20 20 20 20 |ad_timer|% |
|00001da0| 20 20 20 20 20 20 20 20 | 20 20 5c 20 52 65 61 64 | | \ Read|
|00001db0| 20 6d 73 20 74 69 6d 65 | 72 0d 0b a4 35 6d 6f 76 | ms time|r...5mov|
|00001dc0| 20 72 32 2c 20 72 30 20 | 20 20 20 20 20 20 20 20 | r2, r0 | |
|00001dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 20 61 6e | | \ an|
|00001de0| 64 20 73 74 6f 72 65 20 | 76 61 6c 75 65 73 0d 0b |d store |values..|
|00001df0| ae 0e 6d 6f 76 20 72 33 | 2c 20 72 31 0d 0b b8 04 |..mov r3|, r1....|
|00001e00| 0d 0b c2 1a f4 20 54 68 | 65 6e 20 74 69 6d 69 6e |..... Th|en timin|
|00001e10| 67 20 69 6e 74 65 72 76 | 61 6c 0d 0b cc 04 0d 0b |g interv|al......|
|00001e20| d6 38 61 64 64 20 72 34 | 2c 20 72 34 2c 20 72 35 |.8add r4|, r4, r5|
|00001e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e40| 20 5c 20 56 61 6c 75 65 | 20 63 74 20 6d 75 73 74 | \ Value| ct must|
|00001e50| 20 72 65 61 63 68 0d 0b | e0 15 2e 63 61 6c 69 62 | reach..|...calib|
|00001e60| 72 61 74 65 5f 6c 6f 6f | 70 31 25 0d 0b ea 2c 73 |rate_loo|p1%...,s|
|00001e70| 77 69 20 22 58 4f 53 5f | 52 65 61 64 4d 6f 6e 6f |wi "XOS_|ReadMono|
|00001e80| 74 6f 6e 69 63 54 69 6d | 65 22 20 20 20 20 5c 20 |tonicTim|e" \ |
|00001e90| 52 65 61 64 20 63 74 0d | 0b f4 1d 6c 64 6d 76 73 |Read ct.|...ldmvs|
|00001ea0| 66 64 20 72 31 33 21 2c | 20 7b 72 31 2d 72 36 2c |fd r13!,| {r1-r6,|
|00001eb0| 20 70 63 7d 0d 0b fe 45 | 63 6d 70 20 72 34 2c 20 | pc}...E|cmp r4, |
|00001ec0| 72 30 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r0 | |
|00001ed0| 20 20 20 20 20 20 20 5c | 20 57 61 69 74 20 75 6e | \| Wait un|
|00001ee0| 74 69 6c 20 63 74 20 68 | 61 73 20 6a 75 73 74 20 |til ct h|as just |
|00001ef0| 69 6e 63 72 65 61 73 65 | 64 0d 0c 08 2d 62 68 69 |increase|d...-bhi|
|00001f00| 20 63 61 6c 69 62 72 61 | 74 65 5f 6c 6f 6f 70 31 | calibra|te_loop1|
|00001f10| 25 20 20 20 20 20 20 20 | 20 20 20 20 5c 20 62 79 |% | \ by|
|00001f20| 20 76 61 6c 75 65 0d 0c | 12 04 0d 0c 1c 3d 62 6c | value..|.....=bl|
|00001f30| 20 72 65 61 64 5f 74 69 | 6d 65 72 25 20 20 20 20 | read_ti|mer% |
|00001f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 52 | | \ R|
|00001f50| 65 61 64 20 74 69 6d 65 | 72 20 61 6e 64 20 63 61 |ead time|r and ca|
|00001f60| 6c 63 75 6c 61 74 65 0d | 0c 26 3f 62 6c 20 64 69 |lculate.|.&?bl di|
|00001f70| 66 66 65 72 65 6e 63 65 | 25 20 20 20 20 20 20 20 |fference|% |
|00001f80| 20 20 20 20 20 20 20 20 | 20 20 5c 20 64 69 66 66 | | \ diff|
|00001f90| 65 72 65 6e 63 65 20 66 | 72 6f 6d 20 73 74 61 72 |erence f|rom star|
|00001fa0| 74 20 74 69 6d 65 0d 0c | 30 04 0d 0c 3a 41 6d 6f |t time..|0...:Amo|
|00001fb0| 76 20 72 30 2c 20 72 30 | 2c 20 6c 73 72 20 72 36 |v r0, r0|, lsr r6|
|00001fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 44 | | \ D|
|00001fd0| 69 76 69 64 65 20 62 79 | 20 32 5e 28 4e 2b 31 29 |ivide by| 2^(N+1)|
|00001fe0| 20 74 6f 20 67 65 74 20 | 6e 65 77 0d 0c 44 2a 73 | to get |new..D*s|
|00001ff0| 74 72 20 72 30 2c 20 74 | 69 63 6b 73 25 20 20 20 |tr r0, t|icks% |
|00002000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 20 | | \ |
|00002010| 76 61 6c 75 65 0d 0c 4e | 04 0d 0c 58 1b f4 20 53 |value..N|...X.. S|
|00002020| 65 74 20 54 69 6d 65 72 | 20 31 20 74 6f 20 74 69 |et Timer| 1 to ti|
|00002030| 63 6b 73 25 0d 0c 62 04 | 0d 0c 6c 11 6d 6f 76 20 |cks%..b.|..l.mov |
|00002040| 72 32 2c 20 23 49 4f 43 | 25 0d 0c 76 2e 6d 6f 76 |r2, #IOC|%..v.mov|
|00002050| 20 72 31 2c 20 72 30 2c | 20 6c 73 72 20 23 38 20 | r1, r0,| lsr #8 |
|00002060| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 20 48 69 | | \ Hi|
|00002070| 67 68 20 62 79 74 65 0d | 0c 80 1d 73 74 72 62 20 |gh byte.|...strb |
|00002080| 72 30 2c 20 5b 72 32 2c | 20 23 54 69 6d 65 72 31 |r0, [r2,| #Timer1|
|00002090| 4c 4c 25 5d 0d 0c 8a 1d | 73 74 72 62 20 72 31 2c |LL%]....|strb r1,|
|000020a0| 20 5b 72 32 2c 20 23 54 | 69 6d 65 72 31 4c 48 25 | [r2, #T|imer1LH%|
|000020b0| 5d 0d 0c 94 1d 73 74 72 | 62 20 72 32 2c 20 5b 72 |]....str|b r2, [r|
|000020c0| 32 2c 20 23 54 69 6d 65 | 72 31 47 4f 25 5d 0d 0c |2, #Time|r1GO%]..|
|000020d0| 9e 04 0d 0c a8 38 6d 6f | 76 20 72 31 2c 20 23 31 |.....8mo|v r1, #1|
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020f0| 20 20 20 20 20 5c 20 53 | 65 74 20 63 61 6c 69 62 | \ S|et calib|
|00002100| 72 61 74 65 64 20 66 6c | 61 67 0d 0c b2 17 73 74 |rated fl|ag....st|
|00002110| 72 20 72 31 2c 20 63 61 | 6c 69 62 72 61 74 65 64 |r r1, ca|librated|
|00002120| 25 0d 0c bc 04 0d 0c c6 | 1b 6c 64 6d 66 64 20 72 |%.......|.ldmfd r|
|00002130| 31 33 21 2c 20 7b 72 31 | 2d 72 36 2c 20 70 63 7d |13!, {r1|-r6, pc}|
|00002140| 0d 0c d0 04 0d 0c d1 29 | f4 20 43 61 6c 69 62 72 |.......)|. Calibr|
|00002150| 61 74 65 20 74 69 6d 65 | 72 20 74 6f 20 61 20 73 |ate time|r to a s|
|00002160| 70 65 63 69 66 69 63 20 | 76 61 6c 75 65 0d 0c d2 |pecific |value...|
|00002170| 04 0d 0c da 13 2e 73 65 | 74 5f 63 61 6c 69 62 72 |......se|t_calibr|
|00002180| 61 74 65 25 0d 0c e4 04 | 0d 0c ee 1c 73 74 6d 66 |ate%....|....stmf|
|00002190| 64 20 72 31 33 21 2c 20 | 7b 72 31 2d 72 32 2c 20 |d r13!, |{r1-r2, |
|000021a0| 72 31 34 7d 0d 0c f8 04 | 0d 0d 02 3f 6c 64 72 20 |r14}....|...?ldr |
|000021b0| 72 31 2c 20 65 6e 61 62 | 6c 65 64 25 20 20 20 20 |r1, enab|led% |
|000021c0| 20 20 20 20 20 20 20 20 | 20 20 20 5c 20 45 72 72 | | \ Err|
|000021d0| 6f 72 20 69 66 20 74 69 | 6d 65 72 20 6e 6f 74 20 |or if ti|mer not |
|000021e0| 65 6e 61 62 6c 65 64 0d | 0d 03 0e 63 6d 70 20 72 |enabled.|...cmp r|
|000021f0| 31 2c 20 23 30 0d 0d 0c | 14 62 65 71 20 6e 6f 74 |1, #0...|.beq not|
|00002200| 5f 65 6e 61 62 6c 65 64 | 25 0d 0d 16 04 0d 0d 20 |_enabled|%...... |
|00002210| 39 73 74 72 20 72 30 2c | 20 74 69 63 6b 73 25 20 |9str r0,| ticks% |
|00002220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002230| 5c 20 53 61 76 65 20 74 | 68 65 20 76 61 6c 75 65 |\ Save t|he value|
|00002240| 20 6f 66 20 72 30 0d 0d | 2a 04 0d 0d 34 1b f4 20 | of r0..|*...4.. |
|00002250| 53 65 74 20 54 69 6d 65 | 72 20 31 20 74 6f 20 74 |Set Time|r 1 to t|
|00002260| 69 63 6b 73 25 0d 0d 3e | 04 0d 0d 48 11 6d 6f 76 |icks%..>|...H.mov|
|00002270| 20 72 32 2c 20 23 49 4f | 43 25 0d 0d 52 2e 6d 6f | r2, #IO|C%..R.mo|
|00002280| 76 20 72 31 2c 20 72 30 | 2c 20 6c 73 72 20 23 38 |v r1, r0|, lsr #8|
|00002290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 20 48 | | \ H|
|000022a0| 69 67 68 20 62 79 74 65 | 0d 0d 5c 1d 73 74 72 62 |igh byte|..\.strb|
|000022b0| 20 72 30 2c 20 5b 72 32 | 2c 20 23 54 69 6d 65 72 | r0, [r2|, #Timer|
|000022c0| 31 4c 4c 25 5d 0d 0d 66 | 1d 73 74 72 62 20 72 31 |1LL%]..f|.strb r1|
|000022d0| 2c 20 5b 72 32 2c 20 23 | 54 69 6d 65 72 31 4c 48 |, [r2, #|Timer1LH|
|000022e0| 25 5d 0d 0d 70 1d 73 74 | 72 62 20 72 32 2c 20 5b |%]..p.st|rb r2, [|
|000022f0| 72 32 2c 20 23 54 69 6d | 65 72 31 47 4f 25 5d 0d |r2, #Tim|er1GO%].|
|00002300| 0d 7a 04 0d 0d 84 38 6d | 6f 76 20 72 31 2c 20 23 |.z....8m|ov r1, #|
|00002310| 31 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1 | |
|00002320| 20 20 20 20 20 20 5c 20 | 53 65 74 20 63 61 6c 69 | \ |Set cali|
|00002330| 62 72 61 74 65 64 20 66 | 6c 61 67 0d 0d 8e 17 73 |brated f|lag....s|
|00002340| 74 72 20 72 31 2c 20 63 | 61 6c 69 62 72 61 74 65 |tr r1, c|alibrate|
|00002350| 64 25 0d 0d 98 04 0d 0d | a2 1b 6c 64 6d 66 64 20 |d%......|..ldmfd |
|00002360| 72 31 33 21 2c 20 7b 72 | 31 2d 72 32 2c 20 70 63 |r13!, {r|1-r2, pc|
|00002370| 7d 0d 0d ac 04 0d 0d b6 | 11 2e 6e 6f 74 5f 65 6e |}.......|..not_en|
|00002380| 61 62 6c 65 64 25 0d 0d | c0 04 0d 0d ca 1d 61 64 |abled%..|......ad|
|00002390| 72 20 72 30 2c 20 65 72 | 72 6f 72 5f 6e 6f 74 65 |r r0, er|ror_note|
|000023a0| 6e 61 62 6c 65 64 25 0d | 0d d4 1c 6c 64 6d 66 64 |nabled%.|...ldmfd|
|000023b0| 20 72 31 33 21 2c 20 7b | 72 31 2d 72 32 2c 20 72 | r13!, {|r1-r2, r|
|000023c0| 31 34 7d 0d 0d de 21 6f | 72 72 73 20 70 63 2c 20 |14}...!o|rrs pc, |
|000023d0| 72 31 34 2c 20 23 6f 76 | 65 72 66 6c 6f 77 5f 66 |r14, #ov|erflow_f|
|000023e0| 6c 61 67 25 0d 0d e8 04 | 0d 0d f2 10 2e 64 69 66 |lag%....|.....dif|
|000023f0| 66 65 72 65 6e 63 65 25 | 0d 0d fc 04 0d 0e 06 1c |ference%|........|
|00002400| 73 74 6d 66 64 20 72 31 | 33 21 2c 20 7b 72 31 2d |stmfd r1|3!, {r1-|
|00002410| 72 32 2c 20 72 31 34 7d | 0d 0e 10 04 0d 0e 1a 3a |r2, r14}|.......:|
|00002420| 73 75 62 20 72 30 2c 20 | 72 30 2c 20 72 32 20 20 |sub r0, |r0, r2 |
|00002430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \|
|00002440| 20 44 69 66 66 65 72 65 | 6e 63 65 20 69 6e 20 63 | Differe|nce in c|
|00002450| 6f 75 6e 74 65 72 0d 0e | 24 38 73 75 62 20 72 31 |ounter..|$8sub r1|
|00002460| 2c 20 72 31 2c 20 72 33 | 20 20 20 20 20 20 20 20 |, r1, r3| |
|00002470| 20 20 20 20 20 20 20 20 | 20 5c 20 44 69 66 66 65 | | \ Diffe|
|00002480| 72 65 6e 63 65 20 69 6e | 20 74 69 63 6b 73 0d 0e |rence in| ticks..|
|00002490| 2e 04 0d 0e 38 30 f4 20 | 49 66 20 64 69 66 66 2e |....80. |If diff.|
|000024a0| 20 69 6e 20 74 69 63 6b | 73 20 3e 3d 20 74 69 63 | in tick|s >= tic|
|000024b0| 6b 73 25 2f 32 2c 20 63 | 6f 75 6e 74 65 72 20 2b |ks%/2, c|ounter +|
|000024c0| 3d 31 0d 0e 42 04 0d 0e | 4c 12 6c 64 72 20 72 33 |=1..B...|L.ldr r3|
|000024d0| 2c 20 74 69 63 6b 73 25 | 0d 0e 56 16 63 6d 70 20 |, ticks%|..V.cmp |
|000024e0| 72 31 2c 20 72 33 2c 20 | 6c 73 72 20 23 31 0d 0e |r1, r3, |lsr #1..|
|000024f0| 60 14 61 64 64 67 65 20 | 72 30 2c 20 72 30 2c 20 |`.addge |r0, r0, |
|00002500| 23 31 0d 0e 6a 04 0d 0e | 74 30 f4 20 49 66 20 64 |#1..j...|t0. If d|
|00002510| 69 66 66 2e 20 69 6e 20 | 74 69 63 6b 73 20 3c 20 |iff. in |ticks < |
|00002520| 2d 74 69 63 6b 73 25 2f | 32 2c 20 63 6f 75 6e 74 |-ticks%/|2, count|
|00002530| 65 72 20 2d 3d 31 0d 0e | 7e 04 0d 0e 88 12 73 75 |er -=1..|~.....su|
|00002540| 62 20 72 33 2c 20 72 33 | 2c 20 23 31 0d 0e 92 31 |b r3, r3|, #1...1|
|00002550| 6d 76 6e 20 72 33 2c 20 | 72 33 20 20 20 20 20 20 |mvn r3, |r3 |
|00002560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \|
|00002570| 20 72 33 20 3d 20 2d 74 | 69 63 6b 73 25 0d 0e 9c | r3 = -t|icks%...|
|00002580| 3c 63 6d 70 20 72 31 2c | 20 72 33 2c 20 61 73 72 |<cmp r1,| r3, asr|
|00002590| 20 23 31 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | #1 | |
|000025a0| 5c 20 61 73 72 20 62 65 | 63 61 75 73 65 20 72 33 |\ asr be|cause r3|
|000025b0| 20 6e 65 67 61 74 69 76 | 65 0d 0e a6 14 73 75 62 | negativ|e....sub|
|000025c0| 6c 74 20 72 30 2c 20 72 | 30 2c 20 23 31 0d 0e b0 |lt r0, r|0, #1...|
|000025d0| 04 0d 0e ba 1b 6c 64 6d | 66 64 20 72 31 33 21 2c |.....ldm|fd r13!,|
|000025e0| 20 7b 72 31 2d 72 32 2c | 20 70 63 7d 0d 0e c4 04 | {r1-r2,| pc}....|
|000025f0| 0d 0e ce 11 2e 75 6e 6b | 6e 6f 77 6e 5f 73 77 69 |.....unk|nown_swi|
|00002600| 25 0d 0e d8 04 0d 0e e2 | 19 61 64 72 20 72 30 2c |%.......|.adr r0,|
|00002610| 20 65 72 72 6f 72 5f 62 | 61 64 73 77 69 25 0d 0e | error_b|adswi%..|
|00002620| ec 21 6f 72 72 73 20 70 | 63 2c 20 72 31 34 2c 20 |.!orrs p|c, r14, |
|00002630| 23 6f 76 65 72 66 6c 6f | 77 5f 66 6c 61 67 25 0d |#overflo|w_flag%.|
|00002640| 0e f6 04 0d 0f 00 12 2e | 65 72 72 6f 72 5f 62 61 |........|error_ba|
|00002650| 64 73 77 69 25 0d 0f 0a | 04 0d 0f 14 0d 65 71 75 |dswi%...|.....equ|
|00002660| 64 20 26 31 45 36 0d 0f | 1e 12 65 71 75 73 20 22 |d &1E6..|..equs "|
|00002670| 42 61 64 20 53 57 49 22 | 0d 0f 28 0a 65 71 75 62 |Bad SWI"|..(.equb|
|00002680| 20 30 0d 0f 32 04 0d 0f | 3c 09 41 4c 49 47 4e 0d | 0..2...|<.ALIGN.|
|00002690| 0f 46 04 0d 0f 50 15 2e | 65 72 72 6f 72 5f 74 69 |.F...P..|error_ti|
|000026a0| 6d 65 72 75 73 65 64 25 | 0d 0f 5a 04 0d 0f 64 0f |merused%|..Z...d.|
|000026b0| 65 71 75 64 20 26 32 32 | 33 33 36 0d 0f 6e 32 65 |equd &22|336..n2e|
|000026c0| 71 75 73 20 22 41 6e 6f | 74 68 65 72 20 61 70 70 |qus "Ano|ther app|
|000026d0| 6c 69 63 61 74 69 6f 6e | 20 69 73 20 75 73 69 6e |lication| is usin|
|000026e0| 67 20 49 4f 43 20 54 69 | 6d 65 72 31 22 0d 0f 78 |g IOC Ti|mer1"..x|
|000026f0| 0a 65 71 75 62 20 30 0d | 0f 82 04 0d 0f 8c 09 41 |.equb 0.|.......A|
|00002700| 4c 49 47 4e 0d 0f 96 04 | 0d 0f a0 16 2e 65 72 72 |LIGN....|.....err|
|00002710| 6f 72 5f 6e 6f 74 65 6e | 61 62 6c 65 64 25 0d 0f |or_noten|abled%..|
|00002720| aa 04 0d 0f ab 0f 65 71 | 75 64 20 26 32 32 33 33 |......eq|ud &2233|
|00002730| 37 0d 0f ac 2b 65 71 75 | 73 20 22 4d 69 6c 6c 69 |7...+equ|s "Milli|
|00002740| 73 65 63 6f 6e 64 20 74 | 69 6d 65 72 20 69 73 20 |second t|imer is |
|00002750| 6e 6f 74 20 65 6e 61 62 | 6c 65 64 22 0d 0f ad 0a |not enab|led"....|
|00002760| 65 71 75 62 20 30 0d 0f | ae 04 0d 0f af 09 41 4c |equb 0..|......AL|
|00002770| 49 47 4e 0d 0f b4 04 0d | 0f be 0f 2e 73 77 69 5f |IGN.....|....swi_|
|00002780| 74 61 62 6c 65 25 0d 0f | c8 04 0d 0f d2 17 45 51 |table%..|......EQ|
|00002790| 55 53 20 22 54 69 6d 65 | 72 22 3a 45 51 55 42 20 |US "Time|r":EQUB |
|000027a0| 30 0d 0f dc 1a 45 51 55 | 53 20 22 52 65 61 64 54 |0....EQU|S "ReadT|
|000027b0| 69 6d 65 22 3a 45 51 55 | 42 20 30 0d 0f e6 18 45 |ime":EQU|B 0....E|
|000027c0| 51 55 53 20 22 45 6e 61 | 62 6c 65 22 3a 45 51 55 |QUS "Ena|ble":EQU|
|000027d0| 42 20 30 0d 0f f0 19 45 | 51 55 53 20 22 44 69 73 |B 0....E|QUS "Dis|
|000027e0| 61 62 6c 65 22 3a 45 51 | 55 42 20 30 0d 0f fa 1b |able":EQ|UB 0....|
|000027f0| 45 51 55 53 20 22 43 61 | 6c 69 62 72 61 74 65 22 |EQUS "Ca|librate"|
|00002800| 3a 45 51 55 42 20 30 0d | 10 04 1c 45 51 55 53 20 |:EQUB 0.|...EQUS |
|00002810| 22 44 69 66 66 65 72 65 | 6e 63 65 22 3a 45 51 55 |"Differe|nce":EQU|
|00002820| 42 20 30 0d 10 0e 20 45 | 51 55 53 20 22 53 65 74 |B 0... E|QUS "Set|
|00002830| 43 61 6c 69 62 72 61 74 | 69 6f 6e 22 3a 45 51 55 |Calibrat|ion":EQU|
|00002840| 42 20 30 0d 10 18 0a 45 | 51 55 42 20 30 0d 10 22 |B 0....E|QUB 0.."|
|00002850| 04 0d 10 2c 05 5d 0d 10 | 36 05 ed 0d 10 40 26 ff |...,.]..|6....@&.|
|00002860| 28 22 53 41 56 45 20 54 | 69 6d 65 72 20 22 2b c3 |("SAVE T|imer "+.|
|00002870| 7e 63 6f 64 65 25 2b 22 | 20 2b 22 2b c3 7e 50 25 |~code%+"| +"+.~P%|
|00002880| 29 0d 10 4a 19 2a 73 65 | 74 74 79 70 65 20 54 69 |)..J.*se|ttype Ti|
|00002890| 6d 65 72 20 6d 6f 64 75 | 6c 65 0d ff |mer modu|le.. |
+--------+-------------------------+-------------------------+--------+--------+