home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / basicaof_1 / Examples_!UnSqueeze_s_call_unsq < prev    next >
Unknown  |  1994-01-03  |  1.5 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.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% xdgMime image/x-tga default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 0a 10 f4 20 3e 63 | 61 6c 6c 5f 75 6e 73 71 |..... >c|all_unsq|
|00000010| 0d 00 14 04 0d 00 1e 15 | de 20 63 6f 64 65 25 20 |........|. code% |
|00000020| 31 30 30 30 2c 4c 25 2d | 31 0d 00 28 15 69 70 3d |1000,L%-|1..(.ip=|
|00000030| 31 32 3a 73 70 3d 31 33 | 3a 6c 72 3d 31 34 0d 00 |12:sp=13|:lr=14..|
|00000040| 32 04 0d 00 3c 26 e3 20 | 70 61 73 73 3d 38 20 b8 |2...<&. |pass=8 .|
|00000050| 20 31 30 20 88 32 3a 50 | 25 3d 63 6f 64 65 25 3a | 10 .2:P|%=code%:|
|00000060| 5b 4f 50 54 70 61 73 73 | 0d 00 46 46 2e 63 61 6c |[OPTpass|..FF.cal|
|00000070| 6c 5f 75 6e 73 71 75 65 | 65 7a 65 20 20 20 20 20 |l_unsque|eze |
|00000080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000090| 20 20 20 20 3b 6f 6e 20 | 65 6e 74 72 79 20 52 30 | ;on |entry R0|
|000000a0| 2d 3e 73 71 75 65 65 7a | 65 64 20 41 49 46 0d 00 |->squeez|ed AIF..|
|000000b0| 50 5a 20 20 20 20 20 20 | 20 20 41 44 44 20 20 20 |PZ | ADD |
|000000c0| 20 20 72 31 2c 20 72 30 | 2c 20 23 34 20 20 20 20 | r1, r0|, #4 |
|000000d0| 20 20 20 20 20 20 20 20 | 20 20 3b 72 31 20 70 6f | | ;r1 po|
|000000e0| 69 6e 74 73 20 77 68 65 | 72 65 20 74 68 65 20 69 |ints whe|re the i|
|000000f0| 6e 73 74 72 75 63 74 69 | 6f 6e 20 77 69 6c 6c 20 |nstructi|on will |
|00000100| 62 65 20 70 6f 6b 65 64 | 0d 00 5a 68 20 20 20 20 |be poked|..Zh |
|00000110| 20 20 20 20 41 44 52 20 | 20 20 20 20 69 70 2c 20 | ADR | ip, |
|00000120| 72 65 74 75 72 6e 20 20 | 20 20 20 20 20 20 20 20 |return | |
|00000130| 20 20 20 20 3b 69 70 20 | 70 6f 69 6e 74 73 20 74 | ;ip |points t|
|00000140| 6f 20 77 68 65 72 65 20 | 77 65 20 77 61 6e 74 20 |o where |we want |
|00000150| 74 6f 20 72 65 74 75 72 | 6e 20 61 66 74 65 72 20 |to retur|n after |
|00000160| 75 6e 73 71 75 65 65 7a | 69 6e 67 20 63 6f 64 65 |unsqueez|ing code|
|00000170| 0d 00 64 04 0d 00 6e 54 | 20 20 20 20 20 20 20 20 |..d...nT| |
|00000180| 53 55 42 20 20 20 20 20 | 69 70 2c 20 69 70 2c 20 |SUB |ip, ip, |
|00000190| 72 31 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r1 | |
|000001a0| 3b 6e 6f 77 20 63 72 65 | 61 74 65 20 69 6e 73 74 |;now cre|ate inst|
|000001b0| 72 75 63 74 69 6f 6e 20 | 61 74 20 3c 72 31 3e 20 |ruction |at <r1> |
|000001c0| 22 42 20 3c 69 70 3e 22 | 0d 00 78 45 20 20 20 20 |"B <ip>"|..xE |
|000001d0| 20 20 20 20 53 55 42 20 | 20 20 20 20 69 70 2c 20 | SUB | ip, |
|000001e0| 69 70 2c 20 23 38 20 20 | 20 20 20 20 20 20 20 20 |ip, #8 | |
|000001f0| 20 20 20 20 3b 74 61 6b | 65 20 61 63 63 6f 75 6e | ;tak|e accoun|
|00000200| 74 20 6f 66 20 70 69 70 | 65 6c 69 6e 65 0d 00 82 |t of pip|eline...|
|00000210| 44 20 20 20 20 20 20 20 | 20 4d 4f 56 20 20 20 20 |D | MOV |
|00000220| 20 69 70 2c 20 69 70 2c | 20 41 53 52 23 32 20 20 | ip, ip,| ASR#2 |
|00000230| 20 20 20 20 20 20 20 20 | 20 3b 63 6f 6d 70 75 74 | | ;comput|
|00000240| 65 20 6f 66 66 73 65 74 | 20 69 6e 20 77 6f 72 64 |e offset| in word|
|00000250| 73 0d 00 8c 3d 20 20 20 | 20 20 20 20 20 42 49 43 |s...= | BIC|
|00000260| 20 20 20 20 20 69 70 2c | 20 69 70 2c 20 23 26 46 | ip,| ip, #&F|
|00000270| 46 30 30 30 30 30 30 20 | 20 20 20 20 20 3b 63 6c |F000000 | ;cl|
|00000280| 65 61 72 20 74 6f 70 20 | 38 20 62 69 74 73 0d 00 |ear top |8 bits..|
|00000290| 96 39 20 20 20 20 20 20 | 20 20 84 52 20 20 20 20 |.9 | .R |
|000002a0| 20 69 70 2c 20 69 70 2c | 20 23 26 45 41 30 30 30 | ip, ip,| #&EA000|
|000002b0| 30 30 30 20 20 20 20 20 | 20 3b 42 72 61 6e 63 68 |000 | ;Branch|
|000002c0| 20 6f 70 63 6f 64 65 0d | 00 a0 04 0d 00 aa 1c 20 | opcode.|....... |
|000002d0| 20 20 20 20 20 20 20 4c | 44 52 20 20 20 20 20 72 | L|DR r|
|000002e0| 32 2c 20 5b 72 31 5d 0d | 00 b4 47 20 20 20 20 20 |2, [r1].|..G |
|000002f0| 20 20 20 53 54 52 20 20 | 20 20 20 72 32 2c 20 6f | STR | r2, o|
|00000300| 72 69 67 69 6e 61 6c 5f | 77 6f 72 64 20 20 20 20 |riginal_|word |
|00000310| 20 20 20 3b 70 72 65 73 | 65 72 76 65 20 6f 72 69 | ;pres|erve ori|
|00000320| 67 69 6e 61 6c 20 63 6f | 6e 74 65 6e 74 73 0d 00 |ginal co|ntents..|
|00000330| be 49 20 20 20 20 20 20 | 20 20 53 54 52 20 20 20 |.I | STR |
|00000340| 20 20 69 70 2c 20 5b 72 | 31 5d 20 20 20 20 20 20 | ip, [r|1] |
|00000350| 20 20 20 20 20 20 20 20 | 20 20 3b 73 74 6f 72 65 | | ;store|
|00000360| 20 22 42 20 72 65 74 75 | 72 6e 22 20 69 6e 73 74 | "B retu|rn" inst|
|00000370| 72 75 63 74 69 6f 6e 0d | 00 c8 04 0d 00 d2 70 20 |ruction.|......p |
|00000380| 20 20 20 20 20 20 20 41 | 44 52 20 20 20 20 20 69 | A|DR i|
|00000390| 70 2c 20 72 65 67 73 20 | 20 20 20 20 20 20 20 20 |p, regs | |
|000003a0| 20 20 20 20 20 20 20 3b | 70 72 65 73 65 72 76 65 | ;|preserve|
|000003b0| 20 61 6c 6c 20 72 65 67 | 69 73 74 65 72 73 20 62 | all reg|isters b|
|000003c0| 65 63 61 75 73 65 20 74 | 68 65 79 20 61 72 65 20 |ecause t|hey are |
|000003d0| 63 6f 72 72 75 70 74 65 | 64 20 69 6e 20 75 6e 73 |corrupte|d in uns|
|000003e0| 71 75 65 65 7a 65 20 63 | 6f 64 65 0d 00 dc 1f 20 |queeze c|ode.... |
|000003f0| 20 20 20 20 20 20 20 53 | 54 4d 49 41 20 20 20 69 | S|TMIA i|
|00000400| 70 2c 20 7b 72 30 2d 6c | 72 7d 0d 00 e6 47 20 20 |p, {r0-l|r}...G |
|00000410| 20 20 20 20 20 20 4d 4f | 56 20 20 20 20 20 70 63 | MO|V pc|
|00000420| 2c 20 72 30 20 20 20 20 | 20 20 20 20 20 20 20 20 |, r0 | |
|00000430| 20 20 20 20 20 20 3b 6e | 6f 77 20 65 78 65 63 75 | ;n|ow execu|
|00000440| 74 65 20 75 6e 73 71 75 | 65 65 7a 65 20 63 6f 64 |te unsqu|eeze cod|
|00000450| 65 0d 00 f0 0b 2e 72 65 | 74 75 72 6e 0d 00 fa 42 |e.....re|turn...B|
|00000460| 20 20 20 20 20 20 20 20 | 41 44 52 20 20 20 20 20 | |ADR |
|00000470| 69 70 2c 20 72 65 67 73 | 20 20 20 20 20 20 20 20 |ip, regs| |
|00000480| 20 20 20 20 20 20 20 20 | 3b 72 65 73 74 6f 72 65 | |;restore|
|00000490| 20 61 6c 6c 20 72 65 67 | 69 73 74 65 72 73 0d 01 | all reg|isters..|
|000004a0| 04 1f 20 20 20 20 20 20 | 20 20 4c 44 4d 49 41 20 |.. | LDMIA |
|000004b0| 20 20 69 70 2c 20 7b 72 | 30 2d 6c 72 7d 0d 01 0e | ip, {r|0-lr}...|
|000004c0| 57 20 20 20 20 20 20 20 | 20 53 54 52 20 20 20 20 |W | STR |
|000004d0| 20 72 32 2c 20 5b 72 31 | 5d 20 20 20 20 20 20 20 | r2, [r1|] |
|000004e0| 20 20 20 20 20 20 20 20 | 20 3b 72 65 73 74 6f 72 | | ;restor|
|000004f0| 65 20 6f 72 69 67 69 6e | 61 6c 20 73 65 63 6f 6e |e origin|al secon|
|00000500| 64 20 77 6f 72 64 20 6f | 66 20 41 49 46 20 68 65 |d word o|f AIF he|
|00000510| 61 64 65 72 0d 01 18 33 | 20 20 20 20 20 20 20 20 |ader...3| |
|00000520| 4d 4f 56 53 20 20 20 20 | 70 63 2c 20 6c 72 20 20 |MOVS |pc, lr |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 3b 72 65 74 75 72 6e 0d | 01 22 12 2e 6f 72 69 67 |;return.|."..orig|
|00000550| 69 6e 61 6c 5f 77 6f 72 | 64 0d 01 2c 15 20 20 20 |inal_wor|d..,. |
|00000560| 20 20 20 20 20 44 43 44 | 20 20 20 20 20 30 0d 01 | DCD| 0..|
|00000570| 36 09 2e 72 65 67 73 0d | 01 40 39 20 20 20 20 20 |6..regs.|.@9 |
|00000580| 20 20 20 44 43 42 20 20 | 20 20 20 c4 31 36 2a 34 | DCB | .16*4|
|00000590| 2c 20 bd 30 29 20 20 20 | 20 3b 73 70 61 63 65 20 |, .0) | ;space |
|000005a0| 66 6f 72 20 31 36 20 72 | 65 67 69 73 74 65 72 73 |for 16 r|egisters|
|000005b0| 0d 01 4a 07 5d 3a ed 0d | 01 54 04 0d 01 5e 3a c8 |..J.]:..|.T...^:.|
|000005c0| 99 20 22 42 61 73 69 63 | 41 4f 46 5f 45 78 70 6f |. "Basic|AOF_Expo|
|000005d0| 72 74 22 2c 20 22 63 61 | 6c 6c 5f 75 6e 73 71 75 |rt", "ca|ll_unsqu|
|000005e0| 65 65 7a 65 22 2c 20 63 | 61 6c 6c 5f 75 6e 73 71 |eeze", c|all_unsq|
|000005f0| 75 65 65 7a 65 0d 01 68 | 24 c8 99 20 22 42 61 73 |ueeze..h|$.. "Bas|
|00000600| 69 63 41 4f 46 5f 53 61 | 76 65 41 4f 46 22 2c 20 |icAOF_Sa|veAOF", |
|00000610| 63 6f 64 65 25 2c 20 50 | 25 0d ff |code%, P|%.. |
+--------+-------------------------+-------------------------+--------+--------+