home *** CD-ROM | disk | FTP | other *** search
Unknown | 1995-07-09 | 70.9 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%
| gt2
| Kopftext: 'HELP('
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 48 45 4c 50 28 00 00 00 | c9 00 00 00 ff ff ff ff |HELP(...|........|
|00000010| 2c 00 00 00 00 fd ff ff | 00 00 00 00 10 01 00 00 |,.......|........|
|00000020| 00 01 00 00 00 00 00 00 | 24 00 00 00 44 49 52 24 |........|$...DIR$|
|00000030| 18 01 00 00 18 01 00 00 | 44 01 00 00 46 fd ff ff |........|D...F...|
|00000040| b9 eb bf 2d b3 00 00 00 | 13 00 00 00 00 00 00 00 |...-....|........|
|00000050| 21 52 6f 6f 74 00 00 00 | f8 01 00 00 46 fd ff ff |!Root...|....F...|
|00000060| cb 46 d3 2e f4 00 00 00 | 13 01 00 00 00 00 00 00 |.F......|........|
|00000070| 41 4f 46 00 c8 1c 00 00 | 46 fd ff ff cb 47 d3 2e |AOF.....|F....G..|
|00000080| e4 00 00 00 13 01 00 00 | 00 00 00 00 41 52 4d 49 |........|....ARMI|
|00000090| 6e 73 74 72 00 00 00 00 | 10 28 00 00 46 fd ff ff |nstr....|.(..F...|
|000000a0| a3 48 d3 2e 20 03 00 00 | 13 01 00 00 00 00 00 00 |.H.. ...|........|
|000000b0| 45 78 74 72 61 49 6e 73 | 74 72 00 00 64 5f 00 00 |ExtraIns|tr..d_..|
|000000c0| 46 fd ff ff a2 4b d3 2e | 8c 00 00 00 13 01 00 00 |F....K..|........|
|000000d0| 00 00 00 00 46 50 41 49 | 6e 73 74 72 00 00 00 00 |....FPAI|nstr....|
|000000e0| 48 6e 00 00 46 fd ff ff | 33 4c d3 2e b8 03 00 00 |Hn..F...|3L......|
|000000f0| 13 01 00 00 00 00 00 00 | 4d 69 73 63 00 00 00 00 |........|Misc....|
|00000100| 88 cb 00 00 46 fd ff ff | ef 4f d3 2e 14 04 00 00 |....F...|.O......|
|00000110| 13 01 00 00 00 00 00 00 | 53 77 69 74 63 68 65 73 |........|Switches|
|00000120| 00 00 00 00 80 f5 00 00 | 46 fd ff ff 71 54 d3 2e |........|F...qT..|
|00000130| f0 00 00 00 13 01 00 00 | 00 00 00 00 57 69 6e 64 |........|....Wind|
|00000140| 6f 77 73 00 44 41 54 41 | b3 00 00 00 48 65 6c 70 |ows.DATA|....Help|
|00000150| 20 6f 6e 20 65 78 74 41 | 53 4d 0a 23 77 72 61 70 | on extA|SM.#wrap|
|00000160| 20 6f 66 66 0a 59 6f 75 | 20 63 61 6e 20 67 65 74 | off.You| can get|
|00000170| 20 68 65 6c 70 20 6f 6e | 3a 0a 0a 3c 53 77 69 74 | help on|:..<Swit|
|00000180| 63 68 65 73 3e 0a 3c 45 | 78 74 72 61 20 69 6e 73 |ches>.<E|xtra ins|
|00000190| 74 72 75 63 74 69 6f 6e | 73 3d 3e 45 78 74 72 61 |truction|s=>Extra|
|000001a0| 49 6e 73 74 72 3e 0a 3c | 41 52 4d 20 69 6e 73 74 |Instr>.<|ARM inst|
|000001b0| 72 75 63 74 69 6f 6e 73 | 3d 3e 41 52 4d 49 6e 73 |ructions|=>ARMIns|
|000001c0| 74 72 3e 0a 3c 46 50 41 | 20 69 6e 73 74 72 75 63 |tr>.<FPA| instruc|
|000001d0| 74 69 6f 6e 73 3d 3e 46 | 50 41 49 6e 73 74 72 3e |tions=>F|PAInstr>|
|000001e0| 0a 3c 57 69 6e 64 6f 77 | 73 3e 0a 3c 4d 69 73 63 |.<Window|s>.<Misc|
|000001f0| 3e 0a 3c 41 4f 46 3e 00 | 44 49 52 24 f4 00 00 00 |>.<AOF>.|DIR$....|
|00000200| f4 00 00 00 ec 02 00 00 | 45 fd ff ff ba f8 07 f6 |........|E.......|
|00000210| 6c 00 00 00 13 00 00 00 | 00 00 00 00 21 52 6f 6f |l.......|....!Roo|
|00000220| 74 00 00 00 58 03 00 00 | 46 ff ff ff 95 5e c5 2c |t...X...|F....^.,|
|00000230| 9e 04 00 00 13 00 00 00 | 00 00 00 00 4c 69 6e 6b |........|....Link|
|00000240| 61 62 6c 65 00 00 00 00 | f8 07 00 00 46 ff ff ff |able....|....F...|
|00000250| d8 61 c5 2c 55 03 00 00 | 13 00 00 00 00 00 00 00 |.a.,U...|........|
|00000260| 4c 69 6e 6b 61 62 6c 65 | 45 32 00 00 50 0b 00 00 |Linkable|E2..P...|
|00000270| 46 ff ff ff 7c 64 c5 2c | b7 03 00 00 13 00 00 00 |F...|d.,|........|
|00000280| 00 00 00 00 4c 69 6e 6b | 61 62 6c 65 45 78 00 00 |....Link|ableEx..|
|00000290| 08 0f 00 00 46 ff ff ff | 6d 3d 1b 2d 3e 06 00 00 |....F...|m=.->...|
|000002a0| 13 00 00 00 00 00 00 00 | 53 74 65 70 73 00 00 00 |........|Steps...|
|000002b0| 48 15 00 00 46 ff ff ff | 41 1f 1b 2d c9 02 00 00 |H...F...|A..-....|
|000002c0| 13 00 00 00 00 00 00 00 | 53 79 73 74 65 6d 00 00 |........|System..|
|000002d0| 14 18 00 00 46 ff ff ff | 5c 6f c5 2c b3 04 00 00 |....F...|\o.,....|
|000002e0| 13 00 00 00 00 00 00 00 | 55 73 65 00 44 41 54 41 |........|Use.DATA|
|000002f0| 6c 00 00 00 41 52 4d 20 | 4f 62 6a 65 63 74 20 46 |l...ARM |Object F|
|00000300| 6f 72 6d 61 74 0a 3c 41 | 4f 46 20 53 79 73 74 65 |ormat.<A|OF Syste|
|00000310| 6d 3d 3e 41 4f 46 53 79 | 73 74 65 6d 3e 0a 3c 53 |m=>AOFSy|stem>.<S|
|00000320| 74 65 70 73 20 74 6f 20 | 6d 61 6b 65 20 41 4f 46 |teps to |make AOF|
|00000330| 3d 3e 41 4f 46 53 74 65 | 70 73 3e 0a 3c 4c 69 6e |=>AOFSte|ps>.<Lin|
|00000340| 6b 61 62 6c 65 20 63 6f | 64 65 3d 3e 41 4f 46 4c |kable co|de=>AOFL|
|00000350| 69 6e 6b 61 62 6c 65 3e | 44 41 54 41 9e 04 00 00 |inkable>|DATA....|
|00000360| 4c 69 6e 6b 61 62 6c 65 | 20 63 6f 64 65 0a 23 77 |Linkable| code.#w|
|00000370| 72 61 70 20 6f 66 66 0a | 48 6f 77 20 74 6f 20 6d |rap off.|How to m|
|00000380| 61 6b 65 20 6c 69 6e 6b | 61 62 6c 65 20 63 6f 64 |ake link|able cod|
|00000390| 65 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |e.------|--------|
|000003a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003d0| 2d 2d 2d 2d 0a 57 68 65 | 6e 20 63 61 6c 6c 69 6e |----.Whe|n callin|
|000003e0| 67 20 61 6e 20 65 78 74 | 65 72 6e 61 6c 20 70 72 |g an ext|ernal pr|
|000003f0| 6f 63 65 64 75 72 65 2c | 20 6f 72 20 77 68 65 6e |ocedure,| or when|
|00000400| 20 6d 61 6b 69 6e 67 20 | 61 20 70 72 6f 63 65 64 | making |a proced|
|00000410| 75 72 65 0a 74 68 61 74 | 20 63 61 6e 20 62 65 20 |ure.that| can be |
|00000420| 72 65 66 65 72 65 6e 63 | 65 64 20 66 72 6f 6d 20 |referenc|ed from |
|00000430| 61 6e 6f 74 68 65 72 20 | 66 69 6c 65 2c 20 74 68 |another |file, th|
|00000440| 65 20 72 65 67 69 73 74 | 65 72 20 75 73 61 67 65 |e regist|er usage|
|00000450| 20 69 73 0a 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 0a | is.as f|ollows:.|
|00000460| 0a 4f 6e 20 65 6e 74 72 | 79 20 74 6f 20 61 20 70 |.On entr|y to a p|
|00000470| 72 6f 63 65 64 75 72 65 | 2c 20 74 68 65 20 66 6f |rocedure|, the fo|
|00000480| 6c 6c 6f 77 69 6e 67 20 | 73 74 61 74 65 6d 65 6e |llowing |statemen|
|00000490| 74 73 20 73 68 6f 75 6c | 64 20 62 65 20 74 72 75 |ts shoul|d be tru|
|000004a0| 65 3a 0a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |e:.-----|--------|
|000004b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004e0| 2d 2d 2d 2d 0a 41 72 67 | 75 6d 65 6e 74 20 31 20 |----.Arg|ument 1 |
|000004f0| 69 73 20 69 6e 20 52 30 | 0a 41 72 67 75 6d 65 6e |is in R0|.Argumen|
|00000500| 74 20 32 20 69 73 20 69 | 6e 20 52 31 0a 41 72 67 |t 2 is i|n R1.Arg|
|00000510| 75 6d 65 6e 74 20 33 20 | 69 73 20 69 6e 20 52 32 |ument 3 |is in R2|
|00000520| 0a 41 72 67 75 6d 65 6e | 74 20 34 20 69 73 20 69 |.Argumen|t 4 is i|
|00000530| 6e 20 52 33 0a 41 72 67 | 75 6d 65 6e 74 20 35 20 |n R3.Arg|ument 5 |
|00000540| 61 6e 64 20 6f 6e 77 61 | 72 64 73 20 61 72 65 20 |and onwa|rds are |
|00000550| 73 74 6f 72 65 64 20 6f | 6e 20 74 68 65 20 73 74 |stored o|n the st|
|00000560| 61 63 6b 20 28 52 31 33 | 29 2e 0a 0a 41 6c 6c 20 |ack (R13|)...All |
|00000570| 69 6e 74 65 67 65 72 20 | 61 6e 64 20 70 6f 69 6e |integer |and poin|
|00000580| 74 65 72 20 61 72 67 75 | 6d 65 6e 74 73 20 61 72 |ter argu|ments ar|
|00000590| 65 20 70 61 73 73 65 64 | 20 61 73 20 33 32 2d 62 |e passed| as 32-b|
|000005a0| 69 74 20 77 6f 72 64 73 | 2e 20 41 6c 6c 0a 66 6c |it words|. All.fl|
|000005b0| 6f 61 74 69 6e 67 20 70 | 6f 69 6e 74 20 61 72 67 |oating p|oint arg|
|000005c0| 75 6d 65 6e 74 73 20 61 | 72 65 20 70 61 73 73 65 |uments a|re passe|
|000005d0| 64 20 61 73 20 36 34 2d | 62 69 74 20 76 61 6c 75 |d as 64-|bit valu|
|000005e0| 65 73 2c 20 69 6e 20 74 | 77 6f 0a 77 6f 72 64 73 |es, in t|wo.words|
|000005f0| 20 28 61 73 20 73 74 6f | 72 65 64 20 62 79 20 74 | (as sto|red by t|
|00000600| 68 65 20 27 53 54 46 44 | 27 20 69 6e 73 74 72 75 |he 'STFD|' instru|
|00000610| 63 74 69 6f 6e 29 2e 0a | 0a 0a 4f 6e 20 65 78 69 |ction)..|..On exi|
|00000620| 74 20 66 72 6f 6d 20 61 | 20 70 72 6f 63 65 64 75 |t from a| procedu|
|00000630| 72 65 2c 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |re, the |followin|
|00000640| 67 20 73 74 61 74 65 6d | 65 6e 74 73 20 73 68 6f |g statem|ents sho|
|00000650| 75 6c 64 20 62 65 20 74 | 72 75 65 3a 0a 2d 2d 2d |uld be t|rue:.---|
|00000660| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000670| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000680| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|000006a0| 52 34 2d 52 31 31 2c 20 | 61 6e 64 20 46 34 2d 46 |R4-R11, |and F4-F|
|000006b0| 37 20 73 68 6f 75 6c 64 | 20 63 6f 6e 74 61 69 6e |7 should| contain|
|000006c0| 20 74 68 65 20 73 61 6d | 65 20 76 61 6c 75 65 73 | the sam|e values|
|000006d0| 20 74 68 61 74 20 74 68 | 65 79 20 64 69 64 20 61 | that th|ey did a|
|000006e0| 74 0a 74 68 65 20 69 6e | 73 74 61 6e 74 20 6f 66 |t.the in|stant of|
|000006f0| 20 74 68 65 20 63 61 6c | 6c 2e 20 49 66 20 74 68 | the cal|l. If th|
|00000700| 65 20 70 72 6f 63 65 64 | 75 72 65 20 72 65 74 75 |e proced|ure retu|
|00000710| 72 6e 73 20 61 20 77 6f | 72 64 2d 73 69 7a 65 64 |rns a wo|rd-sized|
|00000720| 0a 72 65 73 75 6c 74 2c | 20 77 68 69 63 68 20 69 |.result,| which i|
|00000730| 73 20 6e 6f 74 20 61 20 | 66 6c 6f 61 74 69 6e 67 |s not a |floating|
|00000740| 20 70 6f 69 6e 74 20 76 | 61 6c 75 65 2c 20 74 68 | point v|alue, th|
|00000750| 65 6e 20 69 74 20 73 68 | 6f 75 6c 64 20 62 65 20 |en it sh|ould be |
|00000760| 69 6e 0a 52 30 2e 20 49 | 66 20 74 68 65 20 70 72 |in.R0. I|f the pr|
|00000770| 6f 63 65 64 75 72 65 20 | 72 65 74 75 72 6e 73 20 |ocedure |returns |
|00000780| 61 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |a floati|ng point|
|00000790| 20 72 65 73 75 6c 74 2c | 20 74 68 65 6e 20 69 74 | result,| then it|
|000007a0| 0a 73 68 6f 75 6c 64 20 | 62 65 20 69 6e 20 46 30 |.should |be in F0|
|000007b0| 2e 0a 0a 43 6c 69 63 6b | 20 3c 68 65 72 65 3d 3e |...Click| <here=>|
|000007c0| 41 4f 46 4c 69 6e 6b 61 | 62 6c 65 45 78 3e 20 66 |AOFLinka|bleEx> f|
|000007d0| 6f 72 20 61 6e 20 65 78 | 61 6d 70 6c 65 20 6f 66 |or an ex|ample of|
|000007e0| 20 61 20 6c 69 6e 6b 61 | 62 6c 65 20 70 72 6f 63 | a linka|ble proc|
|000007f0| 65 64 75 72 65 2e 00 00 | 44 41 54 41 55 03 00 00 |edure...|DATAU...|
|00000800| 4c 69 6e 6b 61 62 6c 65 | 20 63 6f 64 65 20 65 78 |Linkable| code ex|
|00000810| 61 6d 70 6c 65 0a 23 77 | 72 61 70 20 6f 66 66 0a |ample.#w|rap off.|
|00000820| 43 6f 64 65 20 66 6f 72 | 20 70 72 6f 63 65 64 75 |Code for| procedu|
|00000830| 72 65 2c 20 77 68 69 63 | 68 20 61 6c 73 6f 20 63 |re, whic|h also c|
|00000840| 61 6c 6c 73 20 61 6e 20 | 65 78 74 65 72 6e 61 6c |alls an |external|
|00000850| 20 70 72 6f 63 65 64 75 | 72 65 0a 2d 2d 2d 2d 2d | procedu|re.-----|
|00000860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000870| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000880| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000890| 2d 2d 2d 2d 2d 0a 0a 43 | 20 68 65 61 64 65 72 0a |-----..C| header.|
|000008a0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 65 78 74 65 72 6e 20 |--------|.extern |
|000008b0| 76 6f 69 64 20 54 65 73 | 74 50 72 6f 63 28 76 6f |void Tes|tProc(vo|
|000008c0| 69 64 29 3b 0a 0a 43 6f | 64 65 20 66 6f 72 20 70 |id);..Co|de for p|
|000008d0| 72 6f 63 65 64 75 72 65 | 0a 2d 2d 2d 2d 2d 2d 2d |rocedure|.-------|
|000008e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 5c 23 61 72 |--------|---.\#ar|
|000008f0| 65 61 20 54 65 73 74 50 | 72 6f 63 41 72 65 61 2c |ea TestP|rocArea,|
|00000900| 63 6f 64 65 0a 0a 5c 23 | 65 78 70 6f 72 74 20 54 |code..\#|export T|
|00000910| 65 73 74 50 72 6f 63 0a | 5c 23 69 6d 70 6f 72 74 |estProc.|\#import|
|00000920| 20 70 72 69 6e 74 66 0a | 0a 2e 54 65 73 74 50 72 | printf.|..TestPr|
|00000930| 6f 63 0a 53 54 4d 46 44 | 20 20 20 20 52 31 33 21 |oc.STMFD| R13!|
|00000940| 2c 7b 52 34 2c 52 31 34 | 7d 20 20 20 20 3b 20 52 |,{R4,R14|} ; R|
|00000950| 34 20 69 73 20 75 73 65 | 64 2c 20 73 6f 20 69 74 |4 is use|d, so it|
|00000960| 20 68 61 73 20 74 6f 20 | 62 65 20 0a 41 44 52 20 | has to |be .ADR |
|00000970| 20 20 20 20 20 52 30 2c | 54 65 78 74 53 74 72 20 | R0,|TextStr |
|00000980| 20 20 20 20 20 20 3b 20 | 73 74 6f 72 65 64 20 6f | ; |stored o|
|00000990| 6e 20 74 68 65 20 73 74 | 61 63 6b 0a 4d 4f 56 20 |n the st|ack.MOV |
|000009a0| 20 20 20 20 20 52 31 2c | 23 31 0a 4d 4f 56 20 20 | R1,|#1.MOV |
|000009b0| 20 20 20 20 52 32 2c 23 | 32 0a 4d 4f 56 20 20 20 | R2,#|2.MOV |
|000009c0| 20 20 20 52 33 2c 23 33 | 0a 4d 4f 56 20 20 20 20 | R3,#3|.MOV |
|000009d0| 20 20 52 34 2c 23 34 0a | 53 54 4d 46 44 20 20 20 | R4,#4.|STMFD |
|000009e0| 20 52 31 33 21 2c 7b 52 | 34 7d 20 20 20 20 20 20 | R13!,{R|4} |
|000009f0| 20 20 3b 20 4c 61 73 74 | 20 70 61 72 61 6d 65 74 | ; Last| paramet|
|00000a00| 65 72 20 69 73 20 73 74 | 6f 72 65 64 20 6f 6e 20 |er is st|ored on |
|00000a10| 74 68 65 20 0a 42 4c 20 | 20 20 20 20 20 20 70 72 |the .BL | pr|
|00000a20| 69 6e 74 66 20 20 20 20 | 20 20 20 20 20 20 20 3b |intf | ;|
|00000a30| 20 73 74 61 63 6b 0a 41 | 44 44 20 20 20 20 20 20 | stack.A|DD |
|00000a40| 52 31 33 2c 52 31 33 2c | 23 34 20 20 20 20 20 20 |R13,R13,|#4 |
|00000a50| 20 3b 20 52 65 73 74 6f | 72 65 20 73 74 61 63 6b | ; Resto|re stack|
|00000a60| 0a 4c 44 4d 46 44 20 20 | 20 20 52 31 33 21 2c 7b |.LDMFD | R13!,{|
|00000a70| 52 34 2c 52 31 35 7d 5e | 20 20 20 3b 20 55 73 65 |R4,R15}^| ; Use|
|00000a80| 20 74 68 65 20 27 5e 27 | 20 73 75 66 66 69 78 20 | the '^'| suffix |
|00000a90| 74 6f 20 70 72 65 73 65 | 72 76 65 20 0a 2e 54 65 |to prese|rve ..Te|
|00000aa0| 78 74 53 74 72 20 20 20 | 20 20 20 20 20 20 20 20 |xtStr | |
|00000ab0| 20 20 20 20 20 20 20 3b | 20 74 68 65 20 66 6c 61 | ;| the fla|
|00000ac0| 67 73 2e 0a 44 43 42 20 | 20 20 20 20 20 22 54 68 |gs..DCB | "Th|
|00000ad0| 69 73 20 69 73 20 61 20 | 74 65 73 74 2c 20 76 61 |is is a |test, va|
|00000ae0| 72 31 3d 25 64 2c 20 76 | 61 72 32 3d 25 64 2c 20 |r1=%d, v|ar2=%d, |
|00000af0| 76 61 72 33 3d 25 64 2c | 0a 20 20 20 20 20 20 20 |var3=%d,|. |
|00000b00| 20 20 20 76 61 72 34 3d | 25 64 5c 6e 22 2c 30 0a | var4=|%d\n",0.|
|00000b10| 41 4c 49 47 4e 0a 5c 23 | 65 6e 64 0a 0a 43 6c 69 |ALIGN.\#|end..Cli|
|00000b20| 63 6b 20 3c 68 65 72 65 | 3d 3e 41 4f 46 4c 69 6e |ck <here|=>AOFLin|
|00000b30| 6b 61 62 6c 65 45 32 3e | 20 66 6f 72 20 61 6e 6f |kableE2>| for ano|
|00000b40| 74 68 65 72 20 65 78 61 | 6d 70 6c 65 2e 00 00 00 |ther exa|mple....|
|00000b50| 44 41 54 41 b7 03 00 00 | 45 78 61 6d 70 6c 65 73 |DATA....|Examples|
|00000b60| 20 6f 66 20 6c 69 6e 6b | 61 62 6c 65 20 63 6f 64 | of link|able cod|
|00000b70| 65 0a 23 77 72 61 70 20 | 6f 66 66 0a 43 20 68 65 |e.#wrap |off.C he|
|00000b80| 61 64 65 72 0a 2d 2d 2d | 2d 2d 2d 2d 2d 0a 65 78 |ader.---|-----.ex|
|00000b90| 74 65 72 6e 20 69 6e 74 | 20 61 64 64 6e 75 6d 28 |tern int| addnum(|
|00000ba0| 69 6e 74 2c 69 6e 74 29 | 3b 20 2f 2a 20 54 68 69 |int,int)|; /* Thi|
|00000bb0| 73 20 6a 75 73 74 20 61 | 64 64 73 20 74 77 6f 20 |s just a|dds two |
|00000bc0| 6e 75 6d 62 65 72 73 0a | 20 20 20 20 20 20 20 20 |numbers.| |
|00000bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000be0| 20 20 20 20 20 20 20 61 | 6e 64 20 72 65 74 75 72 | a|nd retur|
|00000bf0| 6e 73 20 74 68 65 20 72 | 65 73 75 6c 74 20 2a 2f |ns the r|esult */|
|00000c00| 0a 0a 2f 2a 0a 54 68 65 | 20 41 4f 46 20 66 69 6c |../*.The| AOF fil|
|00000c10| 65 73 20 63 6f 6e 74 61 | 69 6e 20 6e 6f 20 69 6e |es conta|in no in|
|00000c20| 66 6f 72 6d 61 74 69 6f | 6e 20 77 68 65 74 68 65 |formatio|n whethe|
|00000c30| 72 20 61 20 73 79 6d 62 | 6f 6c 20 69 73 20 61 0a |r a symb|ol is a.|
|00000c40| 70 72 6f 63 65 64 75 72 | 65 20 6f 72 20 61 20 76 |procedur|e or a v|
|00000c50| 61 72 69 61 62 6c 65 2c | 20 73 6f 20 74 68 69 73 |ariable,| so this|
|00000c60| 20 68 61 73 20 74 6f 20 | 62 65 20 64 65 63 6c 61 | has to |be decla|
|00000c70| 72 65 64 2c 20 65 69 74 | 68 65 72 0a 69 6e 20 74 |red, eit|her.in t|
|00000c80| 68 65 20 43 20 73 6f 75 | 72 63 65 2c 20 6f 72 20 |he C sou|rce, or |
|00000c90| 69 6e 20 61 20 68 65 61 | 64 65 72 20 66 69 6c 65 |in a hea|der file|
|00000ca0| 0a 2a 2f 0a 0a 43 6f 64 | 65 20 66 6f 72 20 70 72 |.*/..Cod|e for pr|
|00000cb0| 6f 63 65 64 75 72 65 0a | 2d 2d 2d 2d 2d 2d 2d 2d |ocedure.|--------|
|00000cc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 5c 23 61 72 65 |--------|--.\#are|
|00000cd0| 61 20 41 64 64 4e 75 6d | 41 72 65 61 2c 63 6f 64 |a AddNum|Area,cod|
|00000ce0| 65 0a 5c 23 65 78 70 6f | 72 74 20 41 64 64 4e 75 |e.\#expo|rt AddNu|
|00000cf0| 6d 0a 0a 2e 41 64 64 4e | 75 6d 0a 41 44 44 20 20 |m...AddN|um.ADD |
|00000d00| 20 20 20 20 52 30 2c 52 | 30 2c 52 31 20 20 20 20 | R0,R|0,R1 |
|00000d10| 20 20 20 3b 20 41 72 67 | 75 6d 65 6e 74 20 31 20 | ; Arg|ument 1 |
|00000d20| 61 6e 64 20 32 20 61 72 | 65 20 69 6e 20 72 65 67 |and 2 ar|e in reg|
|00000d30| 69 73 74 65 72 73 0a 20 | 20 20 20 20 20 20 20 20 |isters. | |
|00000d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00000d50| 20 52 30 20 61 6e 64 20 | 52 31 2e 20 52 65 74 75 | R0 and |R1. Retu|
|00000d60| 72 6e 20 72 65 73 75 6c | 74 20 69 6e 20 52 30 2e |rn resul|t in R0.|
|00000d70| 0a 4d 4f 56 53 20 20 20 | 20 20 52 31 35 2c 52 31 |.MOVS | R15,R1|
|00000d80| 34 20 20 20 20 20 20 20 | 20 3b 20 52 65 74 75 72 |4 | ; Retur|
|00000d90| 6e 20 66 72 6f 6d 20 70 | 72 6f 63 65 64 75 72 65 |n from p|rocedure|
|00000da0| 2e 20 55 73 65 20 74 68 | 65 20 27 53 27 0a 20 20 |. Use th|e 'S'. |
|00000db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000dc0| 20 20 20 20 20 20 3b 20 | 73 75 66 66 69 78 20 74 | ; |suffix t|
|00000dd0| 6f 20 70 72 65 73 65 72 | 76 65 20 74 68 65 20 66 |o preser|ve the f|
|00000de0| 6c 61 67 73 2e 0a 5c 23 | 65 6e 64 0a 0a 49 74 20 |lags..\#|end..It |
|00000df0| 69 73 20 61 73 20 65 61 | 73 79 20 61 73 20 74 68 |is as ea|sy as th|
|00000e00| 69 73 21 0a 0a 49 66 20 | 79 6f 75 20 75 73 65 20 |is!..If |you use |
|00000e10| 61 6e 79 20 6f 74 68 65 | 72 20 72 65 67 69 73 74 |any othe|r regist|
|00000e20| 65 72 73 20 74 68 61 6e | 20 52 30 2d 52 33 20 6f |ers than| R0-R3 o|
|00000e30| 72 20 52 31 32 2c 20 6f | 72 20 46 30 2d 46 33 2c |r R12, o|r F0-F3,|
|00000e40| 0a 74 68 65 6e 20 74 68 | 65 73 65 20 68 61 76 65 |.then th|ese have|
|00000e50| 20 74 6f 20 62 65 20 70 | 72 65 73 65 72 76 65 64 | to be p|reserved|
|00000e60| 20 6f 6e 20 74 68 65 20 | 73 74 61 63 6b 20 61 74 | on the |stack at|
|00000e70| 20 74 68 65 20 73 74 61 | 72 74 20 6f 66 0a 74 68 | the sta|rt of.th|
|00000e80| 65 20 70 72 6f 63 65 64 | 75 72 65 20 28 74 68 65 |e proced|ure (the|
|00000e90| 20 52 31 33 20 69 73 20 | 73 65 74 20 75 70 20 61 | R13 is |set up a|
|00000ea0| 73 20 61 20 73 74 61 63 | 6b 29 2c 20 61 6e 64 20 |s a stac|k), and |
|00000eb0| 72 65 73 74 6f 72 65 64 | 0a 77 68 65 6e 20 72 65 |restored|.when re|
|00000ec0| 74 75 72 6e 69 6e 67 2e | 20 53 65 65 20 74 68 65 |turning.| See the|
|00000ed0| 20 65 6e 74 72 79 2f 65 | 78 69 74 20 63 6f 6e 64 | entry/e|xit cond|
|00000ee0| 69 74 69 6f 6e 73 20 66 | 6f 72 20 61 0a 70 72 6f |itions f|or a.pro|
|00000ef0| 63 65 64 75 72 65 20 64 | 65 73 63 72 69 62 65 64 |cedure d|escribed|
|00000f00| 20 61 62 6f 76 65 2e 00 | 44 41 54 41 3e 06 00 00 | above..|DATA>...|
|00000f10| 53 74 65 70 73 20 66 6f | 72 20 6d 61 6b 69 6e 67 |Steps fo|r making|
|00000f20| 20 41 4f 46 20 66 69 6c | 65 0a 23 77 72 61 70 20 | AOF fil|e.#wrap |
|00000f30| 6f 66 66 0a 54 6f 20 6d | 61 6b 65 20 61 6e 20 41 |off.To m|ake an A|
|00000f40| 4f 46 20 66 69 6c 65 2c | 20 73 65 6c 65 63 74 20 |OF file,| select |
|00000f50| 27 41 4f 46 27 20 69 6e | 20 74 68 65 20 4f 70 74 |'AOF' in| the Opt|
|00000f60| 69 6f 6e 73 20 77 69 6e | 64 6f 77 2c 20 61 6e 64 |ions win|dow, and|
|00000f70| 0a 61 73 73 65 6d 62 6c | 65 20 74 68 65 20 73 6f |.assembl|e the so|
|00000f80| 75 72 63 65 2e 20 54 68 | 65 20 72 65 73 75 6c 74 |urce. Th|e result|
|00000f90| 69 6e 67 20 6f 62 6a 65 | 63 74 20 66 69 6c 65 20 |ing obje|ct file |
|00000fa0| 77 69 6c 6c 20 62 65 20 | 69 6e 0a 41 4f 46 20 66 |will be |in.AOF f|
|00000fb0| 6f 72 6d 61 74 2e 20 41 | 4f 46 2d 73 74 61 74 65 |ormat. A|OF-state|
|00000fc0| 6d 65 6e 74 73 20 6c 69 | 6b 65 20 27 23 61 72 65 |ments li|ke '#are|
|00000fd0| 61 27 20 65 74 63 2e 20 | 68 61 76 65 20 74 6f 20 |a' etc. |have to |
|00000fe0| 62 65 0a 70 72 65 73 65 | 6e 74 20 74 6f 20 6d 61 |be.prese|nt to ma|
|00000ff0| 6b 65 20 61 6e 20 41 4f | 46 20 66 69 6c 65 2c 20 |ke an AO|F file, |
|00001000| 73 65 65 20 74 68 65 20 | 64 65 73 63 72 69 70 74 |see the |descript|
|00001010| 69 6f 6e 20 6f 66 20 74 | 68 65 73 65 0a 75 6e 64 |ion of t|hese.und|
|00001020| 65 72 20 27 4f 62 6a 65 | 63 74 20 61 73 73 65 6d |er 'Obje|ct assem|
|00001030| 62 6c 65 72 20 73 74 61 | 74 65 6d 65 6e 74 73 27 |bler sta|tements'|
|00001040| 20 62 65 6c 6f 77 2e 0a | 0a 54 6f 20 6c 69 6e 6b | below..|.To link|
|00001050| 20 43 20 61 6e 64 20 61 | 73 73 65 6d 62 6c 79 2c | C and a|ssembly,|
|00001060| 20 79 6f 75 20 63 61 6e | 20 64 6f 20 74 68 65 20 | you can| do the |
|00001070| 66 6f 6c 6c 6f 77 69 6e | 67 3a 0a 0a 31 2e 09 53 |followin|g:..1..S|
|00001080| 65 6c 65 63 74 20 27 41 | 4f 46 27 20 69 6e 20 74 |elect 'A|OF' in t|
|00001090| 68 65 20 4f 70 74 69 6f | 6e 73 2c 20 61 6e 64 20 |he Optio|ns, and |
|000010a0| 61 73 73 65 6d 62 6c 65 | 20 74 68 65 20 73 6f 75 |assemble| the sou|
|000010b0| 72 63 65 2e 20 59 6f 75 | 0a 09 74 68 65 6e 20 67 |rce. You|..then g|
|000010c0| 65 74 20 61 6e 20 41 4f | 46 20 66 69 6c 65 2e 0a |et an AO|F file..|
|000010d0| 0a 32 2e 09 50 75 74 20 | 74 68 69 73 20 41 4f 46 |.2..Put |this AOF|
|000010e0| 20 66 69 6c 65 20 73 6f | 6d 65 77 68 65 72 65 20 | file so|mewhere |
|000010f0| 77 68 65 72 65 20 69 74 | 20 63 61 6e 20 62 65 20 |where it| can be |
|00001100| 75 73 65 64 20 66 6f 72 | 0a 09 6c 69 6e 6b 69 6e |used for|..linkin|
|00001110| 67 2e 20 59 6f 75 20 63 | 61 6e 20 65 2e 67 2e 20 |g. You c|an e.g. |
|00001120| 68 61 76 65 20 69 74 20 | 69 6e 20 61 20 64 69 72 |have it |in a dir|
|00001130| 65 63 74 6f 72 79 20 74 | 6f 67 65 74 68 65 72 0a |ectory t|ogether.|
|00001140| 09 77 69 74 68 20 74 68 | 65 20 6f 74 68 65 72 20 |.with th|e other |
|00001150| 6f 62 6a 65 63 74 20 66 | 69 6c 65 20 64 69 72 65 |object f|ile dire|
|00001160| 63 74 6f 72 69 65 73 2c | 20 73 75 63 68 20 74 68 |ctories,| such th|
|00001170| 61 74 20 43 4c 69 62 0a | 09 61 6e 64 20 52 49 53 |at CLib.|.and RIS|
|00001180| 43 5f 4f 53 4c 69 62 2e | 20 54 68 65 20 66 69 6c |C_OSLib.| The fil|
|00001190| 65 73 20 69 6e 20 74 68 | 65 20 27 4f 27 20 73 75 |es in th|e 'O' su|
|000011a0| 62 64 69 72 65 63 74 6f | 72 69 65 73 20 6f 66 0a |bdirecto|ries of.|
|000011b0| 09 74 68 65 73 65 20 64 | 69 72 65 63 74 6f 72 69 |.these d|irectori|
|000011c0| 65 73 20 61 72 65 20 74 | 68 65 20 6f 62 6a 65 63 |es are t|he objec|
|000011d0| 74 20 66 69 6c 65 73 2e | 20 54 68 65 20 70 6c 61 |t files.| The pla|
|000011e0| 63 65 6d 65 6e 74 20 6f | 66 0a 09 74 68 65 20 6f |cement o|f..the o|
|000011f0| 62 6a 65 63 74 20 66 69 | 6c 65 20 69 73 20 6e 6f |bject fi|le is no|
|00001200| 74 20 69 6d 70 6f 72 74 | 61 6e 74 20 74 68 6f 75 |t import|ant thou|
|00001210| 67 68 2e 0a 0a 09 59 6f | 75 20 74 68 65 6e 20 68 |gh....Yo|u then h|
|00001220| 61 76 65 20 74 6f 20 69 | 6e 66 6f 72 6d 20 74 68 |ave to i|nform th|
|00001230| 65 20 6c 69 6e 6b 65 72 | 20 6f 66 20 74 68 65 20 |e linker| of the |
|00001240| 65 78 69 73 74 65 6e 63 | 65 20 6f 66 0a 09 74 68 |existenc|e of..th|
|00001250| 65 20 6f 62 6a 65 63 74 | 20 66 69 6c 65 2e 20 49 |e object| file. I|
|00001260| 6e 20 41 4e 53 49 20 43 | 20 74 68 69 73 20 63 61 |n ANSI C| this ca|
|00001270| 6e 20 62 65 20 64 6f 6e | 65 20 62 79 20 61 70 70 |n be don|e by app|
|00001280| 65 6e 64 69 6e 67 0a 09 | 74 68 65 20 66 75 6c 6c |ending..|the full|
|00001290| 20 70 61 74 68 6e 61 6d | 65 20 6f 66 20 74 68 65 | pathnam|e of the|
|000012a0| 20 41 4f 46 20 66 69 6c | 65 20 69 6e 20 74 68 65 | AOF fil|e in the|
|000012b0| 20 27 4c 69 62 72 61 72 | 69 65 73 27 20 6d 65 6e | 'Librar|ies' men|
|000012c0| 75 0a 09 65 6e 74 72 79 | 2e 0a 0a 33 2e 09 59 6f |u..entry|...3..Yo|
|000012d0| 75 20 61 6c 73 6f 20 68 | 61 76 65 20 74 6f 20 6d |u also h|ave to m|
|000012e0| 61 6b 65 20 61 20 68 65 | 61 64 65 72 20 66 69 6c |ake a he|ader fil|
|000012f0| 65 20 66 6f 72 20 61 6e | 79 20 70 72 6f 63 65 64 |e for an|y proced|
|00001300| 75 72 65 20 79 6f 75 0a | 09 64 65 66 69 6e 65 2c |ure you.|.define,|
|00001310| 20 74 6f 20 62 65 20 69 | 6e 63 6c 75 64 65 64 20 | to be i|ncluded |
|00001320| 77 69 74 68 20 74 68 65 | 20 6f 74 68 65 72 20 68 |with the| other h|
|00001330| 65 61 64 65 72 20 66 69 | 6c 65 73 2e 0a 0a 09 46 |eader fi|les....F|
|00001340| 6f 72 20 65 2e 67 2e 20 | 61 20 70 72 6f 63 65 64 |or e.g. |a proced|
|00001350| 75 72 65 20 63 61 6c 6c | 65 64 20 27 74 65 73 74 |ure call|ed 'test|
|00001360| 70 72 6f 63 27 2c 20 77 | 68 69 63 68 20 61 64 64 |proc', w|hich add|
|00001370| 73 20 74 77 6f 0a 09 6e | 75 6d 62 65 72 73 2c 20 |s two..n|umbers, |
|00001380| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 74 68 65 20 |and retu|rns the |
|00001390| 72 65 73 75 6c 74 2c 20 | 74 68 65 20 68 65 61 64 |result, |the head|
|000013a0| 65 72 20 69 6e 66 6f 20 | 63 6f 75 6c 64 20 62 65 |er info |could be|
|000013b0| 0a 09 61 73 20 66 6f 6c | 6c 6f 77 73 3a 20 27 65 |..as fol|lows: 'e|
|000013c0| 78 74 65 72 6e 20 69 6e | 74 20 74 65 73 74 70 72 |xtern in|t testpr|
|000013d0| 6f 63 28 69 6e 74 2c 69 | 6e 74 29 3b 27 0a 0a 09 |oc(int,i|nt);'...|
|000013e0| 54 68 69 73 20 63 61 6e | 20 61 6c 73 6f 20 62 65 |This can| also be|
|000013f0| 20 70 75 74 20 69 6e 20 | 74 68 65 20 43 20 73 6f | put in |the C so|
|00001400| 75 72 63 65 2e 0a 0a 57 | 68 65 6e 20 79 6f 75 20 |urce...W|hen you |
|00001410| 74 68 65 6e 20 63 6f 6d | 70 69 6c 65 20 61 20 43 |then com|pile a C|
|00001420| 20 70 72 6f 67 72 61 6d | 2c 20 74 68 65 20 72 65 | program|, the re|
|00001430| 6c 65 76 61 6e 74 20 61 | 73 73 65 6d 62 6c 65 72 |levant a|ssembler|
|00001440| 0a 70 61 72 74 20 77 69 | 6c 6c 20 62 65 20 6c 69 |.part wi|ll be li|
|00001450| 6e 6b 65 64 20 69 6e 2c | 20 69 66 20 69 74 20 69 |nked in,| if it i|
|00001460| 73 20 72 65 66 65 72 65 | 6e 63 65 64 20 69 6e 20 |s refere|nced in |
|00001470| 74 68 65 20 43 0a 70 72 | 6f 67 72 61 6d 2c 20 65 |the C.pr|ogram, e|
|00001480| 2e 67 2e 20 62 79 20 63 | 61 6c 6c 69 6e 67 20 6f |.g. by c|alling o|
|00001490| 6e 65 20 6f 66 20 74 68 | 65 20 61 73 73 65 6d 62 |ne of th|e assemb|
|000014a0| 6c 65 72 20 72 6f 75 74 | 69 6e 65 73 2e 20 49 66 |ler rout|ines. If|
|000014b0| 0a 79 6f 75 20 68 61 76 | 65 20 61 6e 20 61 73 73 |.you hav|e an ass|
|000014c0| 65 6d 62 6c 65 72 20 72 | 6f 75 74 69 6e 65 20 77 |embler r|outine w|
|000014d0| 69 74 68 20 74 68 65 20 | 6e 61 6d 65 20 27 70 72 |ith the |name 'pr|
|000014e0| 6f 63 65 64 75 72 65 27 | 2c 0a 74 68 65 6e 20 63 |ocedure'|,.then c|
|000014f0| 61 6c 6c 69 6e 67 20 27 | 70 72 6f 63 65 64 75 72 |alling '|procedur|
|00001500| 65 28 5c 3c 61 6e 79 20 | 70 61 72 61 6d 65 74 65 |e(\<any |paramete|
|00001510| 72 73 3e 29 3b 27 20 66 | 72 6f 6d 20 61 20 43 20 |rs>);' f|rom a C |
|00001520| 70 72 6f 67 72 61 6d 0a | 77 69 6c 6c 20 6c 69 6e |program.|will lin|
|00001530| 6b 20 69 74 20 77 69 74 | 68 20 74 68 65 20 70 72 |k it wit|h the pr|
|00001540| 6f 67 72 61 6d 2e 00 00 | 44 41 54 41 c9 02 00 00 |ogram...|DATA....|
|00001550| 54 68 65 20 41 4f 46 20 | 73 79 73 74 65 6d 0a 23 |The AOF |system.#|
|00001560| 77 72 61 70 20 6f 66 66 | 0a 65 78 74 41 53 4d 20 |wrap off|.extASM |
|00001570| 63 61 6e 20 70 72 6f 64 | 75 63 65 20 61 20 66 69 |can prod|uce a fi|
|00001580| 6c 65 20 69 6e 20 74 68 | 65 20 41 52 4d 20 4f 62 |le in th|e ARM Ob|
|00001590| 6a 65 63 74 20 46 6f 72 | 6d 61 74 20 28 41 4f 46 |ject For|mat (AOF|
|000015a0| 29 2e 0a 54 68 69 73 20 | 63 61 6e 20 74 68 65 6e |)..This |can then|
|000015b0| 20 62 65 20 6c 69 6e 6b | 65 64 20 77 69 74 68 20 | be link|ed with |
|000015c0| 65 2e 67 2e 20 41 4f 46 | 20 66 69 6c 65 73 20 66 |e.g. AOF| files f|
|000015d0| 72 6f 6d 20 61 20 43 20 | 63 6f 6d 70 69 6c 65 72 |rom a C |compiler|
|000015e0| 2e 0a 0a 54 68 65 20 73 | 79 73 74 65 6d 20 69 73 |...The s|ystem is|
|000015f0| 20 61 73 20 66 6f 6c 6c | 6f 77 73 3a 0a 7b 66 63 | as foll|ows:.{fc|
|00001600| 6f 64 65 7d 20 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |ode} ___|________|
|00001610| 5f 20 20 20 20 20 20 5f | 5f 5f 5f 5f 5f 5f 5f 5f |_ _|________|
|00001620| 5f 5f 0a 7c 20 43 20 63 | 6f 6d 70 69 6c 65 72 20 |__.| C c|ompiler |
|00001630| 7c 20 20 20 20 7c 20 41 | 73 73 65 6d 62 6c 65 72 || | A|ssembler|
|00001640| 20 7c 20 20 7b 66 7d 2e | 2e 2e 20 28 6f 74 68 65 | | {f}.|.. (othe|
|00001650| 72 20 70 6f 73 73 69 62 | 6c 65 20 63 6f 64 65 0a |r possib|le code.|
|00001660| 7b 66 63 6f 64 65 7d 7c | 5f 5f 5f 5f 5f 5f 5f 5f |{fcode}||________|
|00001670| 5f 5f 5f 5f 7c 20 20 20 | 20 7c 5f 5f 5f 5f 5f 5f |____| | |______|
|00001680| 5f 5f 5f 5f 5f 7c 7b 66 | 7d 20 20 20 20 20 20 20 |_____|{f|} |
|00001690| 20 20 20 67 65 6e 65 72 | 61 74 6f 72 73 29 0a 7b | gener|ators).{|
|000016a0| 66 63 6f 64 65 7d 20 20 | 20 20 20 20 7c 20 20 20 |fcode} | | |
|000016b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 0a | | |.|
|000016c0| 20 20 5f 5f 5f 5f 7c 5f | 5f 5f 5f 5f 20 20 20 20 | ____|_|____ |
|000016d0| 20 20 20 5f 5f 5f 5f 5f | 7c 5f 5f 5f 5f 0a 20 7c | _____||____. ||
|000016e0| 20 41 4f 46 20 66 69 6c | 65 20 7c 20 20 20 20 20 | AOF fil|e | |
|000016f0| 7c 20 41 4f 46 20 66 69 | 6c 65 20 7c 0a 20 7c 5f || AOF fi|le |. |_|
|00001700| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 7c 20 20 20 20 20 7c |________|_| ||
|00001710| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 7c 0a 20 20 20 20 |________|__|. |
|00001720| 20 20 7c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |
|00001730| 20 20 20 20 7c 0a 20 20 | 20 20 20 20 7c 5f 5f 5f | |. | |___|
|00001740| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 7c 0a |________|______|.|
|00001750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7c | | ||
|00001760| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 5f 5f 5f |. | ___|
|00001770| 7c 5f 5f 5f 5f 0a 20 20 | 20 20 20 20 20 20 20 20 ||____. | |
|00001780| 20 7c 20 4c 69 6e 6b 65 | 72 20 7c 0a 20 20 20 20 | | Linke|r |. |
|00001790| 20 20 20 20 20 20 20 7c | 5f 5f 5f 5f 5f 5f 5f 5f | ||________|
|000017a0| 7c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 ||. | |
|000017b0| 20 7c 0a 20 20 20 20 20 | 20 20 20 20 20 5f 5f 5f | |. | ___|
|000017c0| 5f 5f 7c 5f 5f 5f 5f 5f | 5f 0a 20 20 20 20 20 20 |__|_____|_. |
|000017d0| 20 20 20 7c 20 45 78 65 | 63 75 74 61 62 6c 65 20 | | Exe|cutable |
|000017e0| 7c 0a 20 20 20 20 20 20 | 20 20 20 7c 20 66 69 6c ||. | | fil|
|000017f0| 65 20 20 20 20 20 20 20 | 7c 0a 20 20 20 20 20 20 |e ||. |
|00001800| 20 20 20 7c 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f | |____|________|
|00001810| 7c 00 00 00 44 41 54 41 | b3 04 00 00 0a 23 77 72 ||...DATA|.....#wr|
|00001820| 61 70 20 6f 66 66 0a 41 | 4f 46 20 66 69 6c 65 73 |ap off.A|OF files|
|00001830| 20 61 72 65 20 61 6c 73 | 6f 20 63 61 6c 6c 65 64 | are als|o called|
|00001840| 20 6f 62 6a 65 63 74 20 | 66 69 6c 65 73 2e 20 53 | object |files. S|
|00001850| 69 6e 63 65 20 74 68 65 | 20 6c 69 6e 6b 65 72 0a |ince the| linker.|
|00001860| 64 6f 65 73 6e 27 74 20 | 63 61 72 65 20 77 68 65 |doesn't |care whe|
|00001870| 72 65 20 61 6e 20 6f 62 | 6a 65 63 74 20 66 69 6c |re an ob|ject fil|
|00001880| 65 20 63 6f 6d 65 73 20 | 66 72 6f 6d 2c 20 79 6f |e comes |from, yo|
|00001890| 75 20 63 61 6e 20 75 73 | 65 0a 74 68 65 20 6f 62 |u can us|e.the ob|
|000018a0| 6a 65 63 74 20 66 69 6c | 65 2c 20 61 6e 64 20 6c |ject fil|e, and l|
|000018b0| 69 6e 6b 65 72 2c 20 73 | 79 73 74 65 6d 20 69 6e |inker, s|ystem in|
|000018c0| 20 64 69 66 66 65 72 65 | 6e 74 20 77 61 79 73 2c | differe|nt ways,|
|000018d0| 20 65 2e 67 2e 3a 0a 0a | 8f 20 59 6f 75 20 63 61 | e.g.:..|. You ca|
|000018e0| 6e 20 6a 75 73 74 20 6c | 69 6e 6b 20 6f 62 6a 65 |n just l|ink obje|
|000018f0| 63 74 20 66 69 6c 65 73 | 20 66 72 6f 6d 20 74 68 |ct files| from th|
|00001900| 65 20 43 20 63 6f 6d 70 | 69 6c 65 72 2e 20 54 68 |e C comp|iler. Th|
|00001910| 69 73 0a 20 20 69 73 20 | 74 68 65 20 6e 6f 72 6d |is. is |the norm|
|00001920| 61 6c 20 75 73 65 20 77 | 68 65 6e 20 63 6f 6d 70 |al use w|hen comp|
|00001930| 69 6c 69 6e 67 20 61 20 | 43 20 70 72 6f 67 72 61 |iling a |C progra|
|00001940| 6d 2e 20 54 68 65 20 43 | 0a 20 20 63 6f 6d 70 69 |m. The C|. compi|
|00001950| 6c 65 72 20 63 6f 6d 70 | 69 6c 65 73 20 74 68 65 |ler comp|iles the|
|00001960| 20 43 20 70 72 6f 67 72 | 61 6d 20 61 6e 64 20 70 | C progr|am and p|
|00001970| 72 6f 64 75 63 65 73 20 | 61 6e 20 41 4f 46 20 66 |roduces |an AOF f|
|00001980| 69 6c 65 0a 20 20 69 20 | 74 68 65 20 27 4f 27 20 |ile. i |the 'O' |
|00001990| 64 69 72 65 63 74 6f 72 | 79 2e 20 54 68 65 6e 20 |director|y. Then |
|000019a0| 74 68 65 20 6c 69 6e 6b | 65 72 20 6c 69 6e 6b 73 |the link|er links|
|000019b0| 20 74 6f 67 65 74 68 65 | 72 20 74 68 69 73 0a 20 | togethe|r this. |
|000019c0| 20 41 4f 46 20 66 69 6c | 65 20 61 6e 64 20 61 6e | AOF fil|e and an|
|000019d0| 79 20 6f 74 68 65 72 20 | 6c 69 62 72 61 72 79 20 |y other |library |
|000019e0| 66 69 6c 65 73 20 74 68 | 61 74 20 69 73 20 72 65 |files th|at is re|
|000019f0| 66 65 72 65 6e 63 65 64 | 2c 0a 20 20 65 2e 67 2e |ferenced|,. e.g.|
|00001a00| 20 52 49 53 43 5f 4f 53 | 4c 69 62 2c 20 61 6e 64 | RISC_OS|Lib, and|
|00001a10| 20 6d 61 6b 65 73 20 61 | 6e 20 65 78 65 63 75 74 | makes a|n execut|
|00001a20| 61 62 6c 65 20 70 72 6f | 67 72 61 6d 2e 0a 0a 8f |able pro|gram....|
|00001a30| 20 59 6f 75 20 63 61 6e | 20 61 6c 73 6f 20 6c 69 | You can| also li|
|00001a40| 6e 6b 20 43 20 61 6e 64 | 20 61 73 73 65 6d 62 6c |nk C and| assembl|
|00001a50| 79 20 62 79 20 75 73 69 | 6e 67 20 65 78 74 41 53 |y by usi|ng extAS|
|00001a60| 4d 20 74 6f 20 6d 61 6b | 65 0a 20 20 61 6e 20 41 |M to mak|e. an A|
|00001a70| 4f 46 20 66 69 6c 65 2c | 20 77 68 69 63 68 20 63 |OF file,| which c|
|00001a80| 61 6e 20 74 68 65 6e 20 | 62 65 20 6c 69 6e 6b 65 |an then |be linke|
|00001a90| 64 20 77 69 74 68 20 6f | 6e 65 20 6f 72 20 6d 6f |d with o|ne or mo|
|00001aa0| 72 65 0a 20 20 6f 62 6a | 65 63 74 20 66 69 6c 65 |re. obj|ect file|
|00001ab0| 73 20 66 72 6f 6d 20 74 | 68 65 20 43 20 63 6f 6d |s from t|he C com|
|00001ac0| 70 69 6c 65 72 2e 0a 0a | 8f 20 41 6e 6f 74 68 65 |piler...|. Anothe|
|00001ad0| 72 20 77 61 79 20 79 6f | 75 20 63 61 6e 20 75 73 |r way yo|u can us|
|00001ae0| 65 20 74 68 65 20 6f 62 | 6a 65 63 74 20 66 69 6c |e the ob|ject fil|
|00001af0| 65 20 73 79 73 74 65 6d | 20 69 73 20 74 6f 0a 20 |e system| is to. |
|00001b00| 20 70 65 72 66 6f 72 6d | 20 61 20 6c 69 6e 6b 69 | perform| a linki|
|00001b10| 6e 67 20 6f 66 20 6a 75 | 73 74 20 61 73 73 65 6d |ng of ju|st assem|
|00001b20| 62 6c 65 72 20 72 6f 75 | 74 69 6e 65 73 2e 20 54 |bler rou|tines. T|
|00001b30| 68 69 73 20 63 61 6e 20 | 62 65 0a 20 20 68 61 6e |his can |be. han|
|00001b40| 64 79 20 69 66 20 79 6f | 75 20 68 61 76 65 20 61 |dy if yo|u have a|
|00001b50| 20 6c 61 72 67 65 20 61 | 73 73 65 6d 62 6c 79 20 | large a|ssembly |
|00001b60| 73 6f 75 72 63 65 2c 20 | 61 6e 64 20 79 6f 75 20 |source, |and you |
|00001b70| 6f 6e 6c 79 0a 20 20 63 | 68 61 6e 67 65 20 61 20 |only. c|hange a |
|00001b80| 70 61 72 74 20 6f 66 20 | 69 74 2e 20 54 68 65 6e |part of |it. Then|
|00001b90| 20 79 6f 75 20 63 61 6e | 20 70 72 65 2d 61 73 73 | you can| pre-ass|
|00001ba0| 65 6d 62 6c 65 20 74 68 | 65 20 6f 74 68 65 72 0a |emble th|e other.|
|00001bb0| 20 20 70 61 72 74 73 20 | 61 73 20 41 4f 46 20 66 | parts |as AOF f|
|00001bc0| 69 6c 65 73 2c 20 61 6e | 64 20 6c 69 6e 6b 20 74 |iles, an|d link t|
|00001bd0| 68 65 6d 20 77 69 74 68 | 20 74 68 65 20 72 6f 75 |hem with| the rou|
|00001be0| 74 69 6e 65 20 79 6f 75 | 20 61 72 65 0a 20 20 77 |tine you| are. w|
|00001bf0| 6f 72 6b 69 6e 67 20 6f | 6e 2e 20 54 68 65 6e 20 |orking o|n. Then |
|00001c00| 79 6f 75 20 64 6f 6e 27 | 74 20 68 61 76 65 20 74 |you don'|t have t|
|00001c10| 6f 20 61 73 73 65 6d 62 | 6c 65 20 74 68 65 20 77 |o assemb|le the w|
|00001c20| 68 6f 6c 65 0a 20 20 73 | 6f 75 72 63 65 20 65 76 |hole. s|ource ev|
|00001c30| 65 72 79 20 74 69 6d 65 | 2e 0a 0a 20 20 49 6e 20 |ery time|... In |
|00001c40| 74 68 69 73 20 77 61 79 | 2c 20 6f 6e 65 20 73 6f |this way|, one so|
|00001c50| 75 72 63 65 20 63 61 6e | 20 63 61 6c 6c 20 61 20 |urce can| call a |
|00001c60| 72 6f 75 74 69 6e 65 20 | 6f 72 20 72 65 66 65 72 |routine |or refer|
|00001c70| 65 6e 63 65 20 61 0a 20 | 20 76 61 72 69 61 62 6c |ence a. | variabl|
|00001c80| 65 20 69 6e 20 61 6e 6f | 74 68 65 72 20 73 6f 75 |e in ano|ther sou|
|00001c90| 72 63 65 2c 20 61 6e 64 | 20 74 68 65 20 72 65 66 |rce, and| the ref|
|00001ca0| 65 72 65 6e 63 69 6e 67 | 20 69 73 20 77 6f 72 6b |erencing| is work|
|00001cb0| 65 64 0a 20 20 6f 75 74 | 20 62 79 20 74 68 65 20 |ed. out| by the |
|00001cc0| 6c 69 6e 6b 65 72 2e 00 | 44 49 52 24 e4 00 00 00 |linker..|DIR$....|
|00001cd0| e4 00 00 00 ac 1d 00 00 | 46 fd ff ff 24 f6 15 2d |........|F...$..-|
|00001ce0| 17 08 00 00 13 00 00 00 | 00 00 00 00 21 52 6f 6f |........|....!Roo|
|00001cf0| 74 00 00 00 c4 25 00 00 | 46 ff ff ff 4f 05 15 2d |t....%..|F...O..-|
|00001d00| ad 00 00 00 13 00 00 00 | 00 00 00 00 41 64 64 72 |........|....Addr|
|00001d10| 65 73 73 00 74 26 00 00 | 46 ff ff ff 4e 18 15 2d |ess.t&..|F...N..-|
|00001d20| 86 00 00 00 13 00 00 00 | 00 00 00 00 50 53 52 00 |........|....PSR.|
|00001d30| fc 26 00 00 46 ff ff ff | 3f 7c c5 2c 3a 00 00 00 |.&..F...|?|.,:...|
|00001d40| 13 00 00 00 00 00 00 00 | 50 53 52 46 00 00 00 00 |........|PSRF....|
|00001d50| 38 27 00 00 46 ff ff ff | 6b 7e c5 2c 4d 00 00 00 |8'..F...|k~.,M...|
|00001d60| 13 00 00 00 00 00 00 00 | 50 55 00 00 88 27 00 00 |........|PU...'..|
|00001d70| 46 ff ff ff 06 0c 15 2d | 2c 00 00 00 13 00 00 00 |F......-|,.......|
|00001d80| 00 00 00 00 52 65 67 4c | 69 73 74 00 b4 27 00 00 |....RegL|ist..'..|
|00001d90| 46 ff ff ff 1b 83 c5 2c | 5c 00 00 00 13 00 00 00 |F......,|\.......|
|00001da0| 00 00 00 00 53 68 69 66 | 74 00 00 00 44 41 54 41 |....Shif|t...DATA|
|00001db0| 17 08 00 00 41 52 4d 20 | 32 2f 33 2f 36 20 69 6e |....ARM |2/3/6 in|
|00001dc0| 73 74 72 75 63 74 69 6f | 6e 73 0a 23 77 72 61 70 |structio|ns.#wrap|
|00001dd0| 20 6f 66 66 0a 23 70 72 | 65 66 69 78 20 41 52 4d | off.#pr|efix ARM|
|00001de0| 49 6e 73 74 72 0a 41 52 | 4d 20 32 2f 33 2f 36 20 |Instr.AR|M 2/3/6 |
|00001df0| 69 6e 73 74 72 75 63 74 | 69 6f 6e 73 0a 2d 2d 2d |instruct|ions.---|
|00001e00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 7b 66 63 6f 64 |--------|--.{fcod|
|00001e20| 65 7d 4d 4f 56 5c 7b 43 | 43 7d 5c 7b 53 7d 20 20 |e}MOV\{C|C}\{S} |
|00001e30| 20 20 52 64 2c 4f 70 32 | 09 09 3b 20 52 64 20 3d | Rd,Op2|..; Rd =|
|00001e40| 20 4f 70 32 0a 7b 66 63 | 6f 64 65 7d 4d 56 4e 5c | Op2.{fc|ode}MVN\|
|00001e50| 7b 43 43 7d 5c 7b 53 7d | 20 20 20 20 52 64 2c 4f |{CC}\{S}| Rd,O|
|00001e60| 70 32 09 09 3b 20 52 64 | 20 3d 20 4e 4f 54 20 4f |p2..; Rd| = NOT O|
|00001e70| 70 32 0a 0a 7b 66 63 6f | 64 65 7d 41 44 44 5c 7b |p2..{fco|de}ADD\{|
|00001e80| 43 43 7d 5c 7b 53 7d 20 | 20 20 20 52 64 2c 52 6e |CC}\{S} | Rd,Rn|
|00001e90| 2c 4f 70 32 09 3b 20 52 | 64 20 3d 20 52 6e 20 2b |,Op2.; R|d = Rn +|
|00001ea0| 20 4f 70 32 0a 7b 66 63 | 6f 64 65 7d 53 55 42 5c | Op2.{fc|ode}SUB\|
|00001eb0| 7b 43 43 7d 5c 7b 53 7d | 20 20 20 20 52 64 2c 52 |{CC}\{S}| Rd,R|
|00001ec0| 6e 2c 4f 70 32 09 3b 20 | 52 64 20 3d 20 52 6e 20 |n,Op2.; |Rd = Rn |
|00001ed0| 2d 20 4f 70 32 0a 7b 66 | 63 6f 64 65 7d 52 53 42 |- Op2.{f|code}RSB|
|00001ee0| 5c 7b 43 43 7d 5c 7b 53 | 7d 20 20 20 20 52 64 2c |\{CC}\{S|} Rd,|
|00001ef0| 52 6e 2c 4f 70 32 09 3b | 20 52 64 20 3d 20 4f 70 |Rn,Op2.;| Rd = Op|
|00001f00| 32 20 2d 20 52 6e 0a 7b | 66 63 6f 64 65 7d 41 44 |2 - Rn.{|fcode}AD|
|00001f10| 43 5c 7b 43 43 7d 5c 7b | 53 7d 20 20 20 20 52 64 |C\{CC}\{|S} Rd|
|00001f20| 2c 52 6e 2c 4f 70 32 09 | 3b 20 52 64 20 3d 20 52 |,Rn,Op2.|; Rd = R|
|00001f30| 6e 20 2b 20 4f 70 32 20 | 2b 20 43 61 72 72 79 0a |n + Op2 |+ Carry.|
|00001f40| 7b 66 63 6f 64 65 7d 53 | 42 43 5c 7b 43 43 7d 5c |{fcode}S|BC\{CC}\|
|00001f50| 7b 53 7d 20 20 20 20 52 | 64 2c 52 6e 2c 4f 70 32 |{S} R|d,Rn,Op2|
|00001f60| 09 3b 20 52 64 20 3d 20 | 52 6e 20 2d 20 4f 70 32 |.; Rd = |Rn - Op2|
|00001f70| 20 2b 20 43 61 72 72 79 | 20 2d 20 31 0a 7b 66 63 | + Carry| - 1.{fc|
|00001f80| 6f 64 65 7d 52 53 43 5c | 7b 43 43 7d 5c 7b 53 7d |ode}RSC\|{CC}\{S}|
|00001f90| 20 20 20 20 52 64 2c 52 | 6e 2c 4f 70 32 09 3b 20 | Rd,R|n,Op2.; |
|00001fa0| 52 64 20 3d 20 4f 70 32 | 20 2d 20 52 6e 20 2b 20 |Rd = Op2| - Rn + |
|00001fb0| 43 61 72 72 79 20 2d 20 | 31 0a 7b 66 63 6f 64 65 |Carry - |1.{fcode|
|00001fc0| 7d 41 4e 44 5c 7b 43 43 | 7d 5c 7b 53 7d 20 20 20 |}AND\{CC|}\{S} |
|00001fd0| 20 52 64 2c 52 6e 2c 4f | 70 32 09 3b 20 52 64 20 | Rd,Rn,O|p2.; Rd |
|00001fe0| 3d 20 52 6e 20 41 4e 44 | 20 4f 70 32 0a 7b 66 63 |= Rn AND| Op2.{fc|
|00001ff0| 6f 64 65 7d 4f 52 52 5c | 7b 43 43 7d 5c 7b 53 7d |ode}ORR\|{CC}\{S}|
|00002000| 20 20 20 20 52 64 2c 52 | 6e 2c 4f 70 32 09 3b 20 | Rd,R|n,Op2.; |
|00002010| 52 64 20 3d 20 52 6e 20 | 4f 52 20 4f 70 32 0a 7b |Rd = Rn |OR Op2.{|
|00002020| 66 63 6f 64 65 7d 45 4f | 52 5c 7b 43 43 7d 5c 7b |fcode}EO|R\{CC}\{|
|00002030| 53 7d 20 20 20 20 52 64 | 2c 52 6e 2c 4f 70 32 09 |S} Rd|,Rn,Op2.|
|00002040| 3b 20 52 64 20 3d 20 52 | 6e 20 45 4f 52 20 4f 70 |; Rd = R|n EOR Op|
|00002050| 32 0a 7b 66 63 6f 64 65 | 7d 42 49 43 5c 7b 43 43 |2.{fcode|}BIC\{CC|
|00002060| 7d 5c 7b 53 7d 20 20 20 | 20 52 64 2c 52 6e 2c 4f |}\{S} | Rd,Rn,O|
|00002070| 70 32 09 3b 20 52 64 20 | 3d 20 52 6e 20 41 4e 44 |p2.; Rd |= Rn AND|
|00002080| 20 4e 4f 54 20 4f 70 32 | 0a 0a 7b 66 63 6f 64 65 | NOT Op2|..{fcode|
|00002090| 7d 43 4d 50 5c 7b 43 43 | 7d 5c 7b 53 7d 5c 7b 50 |}CMP\{CC|}\{S}\{P|
|000020a0| 7d 20 52 6e 2c 4f 70 32 | 09 09 3b 20 53 61 6d 65 |} Rn,Op2|..; Same|
|000020b0| 20 61 73 20 53 55 42 2c | 20 62 75 74 20 72 65 73 | as SUB,| but res|
|000020c0| 75 6c 74 20 69 73 20 64 | 69 73 63 61 72 64 65 64 |ult is d|iscarded|
|000020d0| 0a 7b 66 63 6f 64 65 7d | 43 4d 4e 5c 7b 43 43 7d |.{fcode}|CMN\{CC}|
|000020e0| 5c 7b 53 7d 5c 7b 50 7d | 20 52 6e 2c 4f 70 32 09 |\{S}\{P}| Rn,Op2.|
|000020f0| 09 3b 20 53 61 6d 65 20 | 61 73 20 41 44 44 2c 20 |.; Same |as ADD, |
|00002100| 62 75 74 20 72 65 73 75 | 6c 74 20 69 73 20 64 69 |but resu|lt is di|
|00002110| 73 63 61 72 64 65 64 0a | 7b 66 63 6f 64 65 7d 54 |scarded.|{fcode}T|
|00002120| 53 54 5c 7b 43 43 7d 5c | 7b 53 7d 5c 7b 50 7d 20 |ST\{CC}\|{S}\{P} |
|00002130| 52 6e 2c 4f 70 32 09 09 | 3b 20 53 61 6d 65 20 61 |Rn,Op2..|; Same a|
|00002140| 73 20 41 4e 44 2c 20 62 | 75 74 20 72 65 73 75 6c |s AND, b|ut resul|
|00002150| 74 20 69 73 20 64 69 73 | 63 61 72 64 65 64 0a 7b |t is dis|carded.{|
|00002160| 66 63 6f 64 65 7d 54 45 | 51 5c 7b 43 43 7d 5c 7b |fcode}TE|Q\{CC}\{|
|00002170| 53 7d 5c 7b 50 7d 20 52 | 6e 2c 4f 70 32 09 09 3b |S}\{P} R|n,Op2..;|
|00002180| 20 53 61 6d 65 20 61 73 | 20 45 4f 52 2c 20 62 75 | Same as| EOR, bu|
|00002190| 74 20 72 65 73 75 6c 74 | 20 69 73 20 64 69 73 63 |t result| is disc|
|000021a0| 61 72 64 65 64 0a 0a 7b | 66 63 6f 64 65 7d 4d 55 |arded..{|fcode}MU|
|000021b0| 4c 5c 7b 43 43 7d 5c 7b | 53 7d 20 20 20 20 52 64 |L\{CC}\{|S} Rd|
|000021c0| 2c 52 6e 2c 4f 70 32 09 | 3b 20 52 64 20 3d 20 52 |,Rn,Op2.|; Rd = R|
|000021d0| 6e 20 2a 20 4f 70 32 0a | 7b 66 63 6f 64 65 7d 4d |n * Op2.|{fcode}M|
|000021e0| 4c 41 5c 7b 43 43 7d 5c | 7b 53 7d 20 20 20 20 52 |LA\{CC}\|{S} R|
|000021f0| 64 2c 52 6e 2c 4f 70 32 | 2c 4f 70 33 09 3b 20 52 |d,Rn,Op2|,Op3.; R|
|00002200| 64 20 3d 20 52 6e 20 2a | 20 4f 70 32 20 2b 20 4f |d = Rn *| Op2 + O|
|00002210| 70 33 0a 0a 7b 66 63 6f | 64 65 7d 4c 44 52 5c 7b |p3..{fco|de}LDR\{|
|00002220| 43 43 7d 5c 7b 42 7d 5c | 7b 54 7d 20 52 64 2c 3c |CC}\{B}\|{T} Rd,<|
|00002230| 41 64 64 72 65 73 73 3e | 09 3b 20 4c 6f 61 64 20 |Address>|.; Load |
|00002240| 66 72 6f 6d 20 6d 65 6d | 6f 72 79 20 69 6e 74 6f |from mem|ory into|
|00002250| 20 61 20 72 65 67 69 73 | 74 65 72 0a 7b 66 63 6f | a regis|ter.{fco|
|00002260| 64 65 7d 53 54 52 5c 7b | 43 43 7d 5c 7b 42 7d 5c |de}STR\{|CC}\{B}\|
|00002270| 7b 54 7d 20 52 64 2c 3c | 41 64 64 72 65 73 73 3e |{T} Rd,<|Address>|
|00002280| 09 3b 20 53 74 6f 72 65 | 20 66 72 6f 6d 20 61 20 |.; Store| from a |
|00002290| 72 65 67 69 73 74 65 72 | 20 69 6e 74 6f 20 6d 65 |register| into me|
|000022a0| 6d 6f 72 79 0a 0a 7b 66 | 63 6f 64 65 7d 4c 44 4d |mory..{f|code}LDM|
|000022b0| 5c 7b 43 43 7d 3c 50 55 | 3e 20 20 20 20 20 52 6e |\{CC}<PU|> Rn|
|000022c0| 5c 7b 21 7d 2c 5c 7b 3c | 52 65 67 4c 69 73 74 3e |\{!},\{<|RegList>|
|000022d0| 7d 5c 7b 5e 7d 09 3b 20 | 4c 6f 61 64 20 52 65 67 |}\{^}.; |Load Reg|
|000022e0| 69 73 74 65 72 73 20 66 | 72 6f 6d 20 52 6e 20 69 |isters f|rom Rn i|
|000022f0| 6e 20 6d 65 6d 6f 72 79 | 0a 7b 66 63 6f 64 65 7d |n memory|.{fcode}|
|00002300| 53 54 4d 5c 7b 43 43 7d | 3c 50 55 3e 20 20 20 20 |STM\{CC}|<PU> |
|00002310| 20 52 6e 5c 7b 21 7d 2c | 5c 7b 3c 52 65 67 4c 69 | Rn\{!},|\{<RegLi|
|00002320| 73 74 3e 7d 5c 7b 5e 7d | 09 3b 20 53 74 6f 72 65 |st>}\{^}|.; Store|
|00002330| 20 52 65 67 69 73 74 65 | 72 73 20 74 6f 20 52 6e | Registe|rs to Rn|
|00002340| 20 69 6e 20 6d 65 6d 6f | 72 79 0a 0a 7b 66 63 6f | in memo|ry..{fco|
|00002350| 64 65 7d 42 5c 7b 43 43 | 7d 20 20 20 20 20 20 20 |de}B\{CC|} |
|00002360| 20 20 5c 3c 41 64 64 72 | 65 73 73 3e 09 3b 20 42 | \<Addr|ess>.; B|
|00002370| 72 61 6e 63 68 0a 7b 66 | 63 6f 64 65 7d 42 4c 5c |ranch.{f|code}BL\|
|00002380| 7b 43 43 7d 20 20 20 20 | 20 20 20 20 5c 3c 41 64 |{CC} | \<Ad|
|00002390| 64 72 65 73 73 3e 09 3b | 20 42 72 61 6e 63 68 20 |dress>.;| Branch |
|000023a0| 77 69 74 68 20 6c 69 6e | 6b 0a 0a 7b 66 63 6f 64 |with lin|k..{fcod|
|000023b0| 65 7d 53 57 49 5c 7b 43 | 43 7d 20 20 20 20 20 20 |e}SWI\{C|C} |
|000023c0| 20 5c 3c 65 78 70 72 65 | 73 73 69 6f 6e 3e 09 3b | \<expre|ssion>.;|
|000023d0| 20 50 65 72 66 6f 72 6d | 20 61 20 53 6f 66 74 57 | Perform| a SoftW|
|000023e0| 61 72 65 20 49 6e 74 65 | 72 72 75 70 74 0a 0a 7b |are Inte|rrupt..{|
|000023f0| 66 63 6f 64 65 7d 53 57 | 50 5c 7b 43 43 7d 5c 7b |fcode}SW|P\{CC}\{|
|00002400| 42 7d 20 20 20 20 52 64 | 2c 52 6d 2c 5b 52 6e 5d |B} Rd|,Rm,[Rn]|
|00002410| 09 3b 20 53 69 6e 67 6c | 65 20 64 61 74 61 20 73 |.; Singl|e data s|
|00002420| 77 61 70 20 28 41 52 4d | 20 33 20 6f 72 20 68 69 |wap (ARM| 3 or hi|
|00002430| 67 68 65 72 29 0a 0a 7b | 66 63 6f 64 65 7d 4d 52 |gher)..{|fcode}MR|
|00002440| 53 5c 7b 43 43 7d 20 20 | 20 20 20 20 20 52 64 2c |S\{CC} | Rd,|
|00002450| 3c 70 73 72 3e 09 09 3b | 20 54 72 61 6e 73 66 65 |<psr>..;| Transfe|
|00002460| 72 20 50 53 52 20 74 6f | 20 72 65 67 69 73 74 65 |r PSR to| registe|
|00002470| 72 20 28 41 52 4d 20 36 | 20 6f 72 20 68 69 67 68 |r (ARM 6| or high|
|00002480| 65 72 29 0a 7b 66 63 6f | 64 65 7d 4d 53 52 5c 7b |er).{fco|de}MSR\{|
|00002490| 43 43 7d 20 20 20 20 20 | 20 20 3c 70 73 72 3e 2c |CC} | <psr>,|
|000024a0| 52 6d 09 09 3b 20 54 72 | 61 6e 73 66 65 72 20 72 |Rm..; Tr|ansfer r|
|000024b0| 65 67 69 73 74 65 72 20 | 74 6f 20 50 53 52 20 28 |egister |to PSR (|
|000024c0| 41 52 4d 20 36 20 6f 72 | 20 68 69 67 68 65 72 29 |ARM 6 or| higher)|
|000024d0| 0a 7b 66 63 6f 64 65 7d | 20 20 20 20 20 20 20 20 |.{fcode}| |
|000024e0| 20 20 20 20 20 20 3c 70 | 73 72 66 3e 2c 52 6d 0a | <p|srf>,Rm.|
|000024f0| 7b 66 63 6f 64 65 7d 20 | 20 20 20 20 20 20 20 20 |{fcode} | |
|00002500| 20 20 20 20 20 3c 70 73 | 72 66 3e 2c 23 5c 3c 65 | <ps|rf>,#\<e|
|00002510| 78 70 72 3e 7b 66 73 74 | 64 7d 0a 0a 5c 3c 43 43 |xpr>{fst|d}..\<CC|
|00002520| 3e 20 20 3a 3a 3d 20 20 | 5c 3c 45 51 20 7c 20 4e |> ::= |\<EQ | N|
|00002530| 45 20 7c 20 4c 45 20 7c | 20 47 45 20 7c 20 4c 54 |E | LE || GE | LT|
|00002540| 20 7c 20 47 54 20 7c 20 | 4c 53 20 7c 20 48 53 20 | | GT | |LS | HS |
|00002550| 7c 20 4c 4f 20 7c 0a 20 | 20 20 20 20 20 20 20 20 || LO |. | |
|00002560| 20 20 20 20 20 20 20 20 | 20 20 20 48 49 20 7c 20 | | HI | |
|00002570| 43 53 20 7c 20 43 43 20 | 7c 20 4d 49 20 7c 20 50 |CS | CC || MI | P|
|00002580| 4c 20 7c 20 56 53 20 7c | 20 56 43 20 7c 20 41 4c |L | VS || VC | AL|
|00002590| 20 7c 20 4e 56 3e 0a 0a | 5c 3c 4f 70 32 3e 20 3a | | NV>..|\<Op2> :|
|000025a0| 3a 3d 20 20 52 6d 20 5c | 7b 2c 3c 73 68 69 66 74 |:= Rm \|{,<shift|
|000025b0| 3e 7d 20 7c 20 23 5c 3c | 65 78 70 72 65 73 73 69 |>} | #\<|expressi|
|000025c0| 6f 6e 3e 00 44 41 54 41 | ad 00 00 00 41 64 64 72 |on>.DATA|....Addr|
|000025d0| 65 73 73 0a 23 77 72 61 | 70 20 6f 66 66 0a 23 70 |ess.#wra|p off.#p|
|000025e0| 72 65 66 69 78 20 41 52 | 4d 49 6e 73 74 72 0a 5c |refix AR|MInstr.\|
|000025f0| 3c 41 64 64 72 65 73 73 | 3e 20 3a 3a 3d 09 5c 3c |<Address|> ::=.\<|
|00002600| 65 78 70 72 65 73 73 69 | 6f 6e 3e 0a 09 09 5b 52 |expressi|on>...[R|
|00002610| 6e 2c 5c 3c 5c 23 65 78 | 70 72 65 73 73 69 6f 6e |n,\<\#ex|pression|
|00002620| 3e 5d 7b 21 7d 0a 09 09 | 5b 52 6e 2c 7b 2b 2f 2d |>]{!}...|[Rn,{+/-|
|00002630| 7d 52 6d 7b 2c 3c 73 68 | 69 66 74 3e 7d 5d 7b 21 |}Rm{,<sh|ift>}]{!|
|00002640| 7d 0a 09 09 5b 52 6e 5d | 2c 5c 3c 5c 23 65 78 70 |}...[Rn]|,\<\#exp|
|00002650| 72 65 73 73 69 6f 6e 3e | 0a 09 09 5b 52 6e 5d 2c |ression>|...[Rn],|
|00002660| 7b 2b 2f 2d 7d 52 6d 7b | 2c 3c 73 68 69 66 74 3e |{+/-}Rm{|,<shift>|
|00002670| 7d 00 00 00 44 41 54 41 | 86 00 00 00 50 53 52 0a |}...DATA|....PSR.|
|00002680| 23 77 72 61 70 20 6f 66 | 66 0a 5c 3c 70 73 72 3e |#wrap of|f.\<psr>|
|00002690| 20 3a 3a 3d 09 5c 3c 43 | 50 53 52 20 7c 20 43 50 | ::=.\<C|PSR | CP|
|000026a0| 53 52 5f 61 6c 6c 20 7c | 20 53 50 53 52 20 7c 20 |SR_all || SPSR | |
|000026b0| 53 50 53 52 5f 61 6c 6c | 3e 0a 09 09 28 43 50 53 |SPSR_all|>...(CPS|
|000026c0| 52 20 61 6e 64 20 43 50 | 53 52 5f 61 6c 6c 20 61 |R and CP|SR_all a|
|000026d0| 72 65 20 73 79 6e 6f 6e | 79 6d 6f 75 73 2c 0a 09 |re synon|ymous,..|
|000026e0| 09 61 73 20 61 72 65 20 | 53 50 53 52 20 61 6e 64 |.as are |SPSR and|
|000026f0| 20 53 50 53 52 5f 61 6c | 6c 29 00 00 44 41 54 41 | SPSR_al|l)..DATA|
|00002700| 3a 00 00 00 50 53 52 46 | 0a 23 77 72 61 70 20 6f |:...PSRF|.#wrap o|
|00002710| 66 66 0a 5c 3c 70 73 72 | 66 3e 20 3a 3a 3d 20 20 |ff.\<psr|f> ::= |
|00002720| 5c 3c 43 50 53 52 5f 66 | 6c 67 20 7c 20 53 50 53 |\<CPSR_f|lg | SPS|
|00002730| 52 5f 66 6c 67 3e 00 00 | 44 41 54 41 4d 00 00 00 |R_flg>..|DATAM...|
|00002740| 50 55 20 62 69 74 73 0a | 23 77 72 61 70 20 6f 66 |PU bits.|#wrap of|
|00002750| 66 0a 5c 3c 50 55 3e 20 | 3a 3a 3d 20 20 5c 3c 46 |f.\<PU> |::= \<F|
|00002760| 44 20 7c 20 45 44 20 7c | 20 46 41 20 7c 20 45 41 |D | ED || FA | EA|
|00002770| 20 7c 20 49 41 20 7c 20 | 49 42 20 7c 20 44 41 20 | | IA | |IB | DA |
|00002780| 7c 20 44 42 3e 00 00 00 | 44 41 54 41 2c 00 00 00 || DB>...|DATA,...|
|00002790| 52 65 67 4c 69 73 74 0a | 23 77 72 61 70 20 6f 66 |RegList.|#wrap of|
|000027a0| 66 0a 52 65 67 20 5c 7b | 2c 52 65 67 20 7c 20 2d |f.Reg \{|,Reg | -|
|000027b0| 52 65 67 7d 44 41 54 41 | 5c 00 00 00 53 68 69 66 |Reg}DATA|\...Shif|
|000027c0| 74 0a 23 77 72 61 70 20 | 6f 66 66 0a 5c 3c 73 68 |t.#wrap |off.\<sh|
|000027d0| 69 66 74 3e 20 3a 3a 3d | 20 20 5b 5c 3c 4c 53 4c |ift> ::=| [\<LSL|
|000027e0| 20 7c 20 41 53 4c 20 7c | 20 4c 53 52 20 7c 20 41 | | ASL || LSR | A|
|000027f0| 53 52 20 7c 20 52 4f 52 | 3e 20 5c 23 5c 3c 65 78 |SR | ROR|> \#\<ex|
|00002800| 70 72 3e 20 7c 20 52 73 | 20 5d 20 7c 20 52 52 58 |pr> | Rs| ] | RRX|
|00002810| 44 49 52 24 20 03 00 00 | 20 03 00 00 30 2b 00 00 |DIR$ ...| ...0+..|
|00002820| 46 fd ff ff 3b 02 b9 2d | 00 01 00 00 13 00 00 00 |F...;..-|........|
|00002830| 00 00 00 00 21 52 6f 6f | 74 00 00 00 30 2c 00 00 |....!Roo|t...0,..|
|00002840| 46 ff ff ff 42 f7 b8 2d | 97 00 00 00 13 00 00 00 |F...B..-|........|
|00002850| 00 00 00 00 41 44 52 00 | c8 2c 00 00 46 ff ff ff |....ADR.|.,..F...|
|00002860| 20 88 13 2d 3d 02 00 00 | 13 00 00 00 00 00 00 00 | ..-=...|........|
|00002870| 41 4c 49 47 4e 00 00 00 | 08 2f 00 00 46 ff ff ff |ALIGN...|./..F...|
|00002880| e2 9b ba 2d cb 02 00 00 | 13 00 00 00 00 00 00 00 |...-....|........|
|00002890| 42 6c 6f 63 6b 73 00 00 | d4 31 00 00 46 ff ff ff |Blocks..|.1..F...|
|000028a0| e9 dd b9 2d aa 02 00 00 | 13 00 00 00 00 00 00 00 |...-....|........|
|000028b0| 43 6f 6e 73 74 61 6e 74 | 73 00 00 00 80 34 00 00 |Constant|s....4..|
|000028c0| 46 ff ff ff 48 46 0f 2d | ee 00 00 00 13 00 00 00 |F...HF.-|........|
|000028d0| 00 00 00 00 44 49 56 00 | 70 35 00 00 46 ff ff ff |....DIV.|p5..F...|
|000028e0| b3 4f 0f 2d dc 00 00 00 | 13 00 00 00 00 00 00 00 |.O.-....|........|
|000028f0| 45 58 47 00 4c 36 00 00 | 46 ff ff ff 6e ec ba 2d |EXG.L6..|F...n..-|
|00002900| 1b 01 00 00 13 00 00 00 | 00 00 00 00 49 4e 43 42 |........|....INCB|
|00002910| 49 4e 00 00 68 37 00 00 | 46 ff ff ff 0c 6e 0f 2d |IN..h7..|F....n.-|
|00002920| 55 01 00 00 13 00 00 00 | 00 00 00 00 4c 4f 43 4b |U.......|....LOCK|
|00002930| 00 00 00 00 c0 38 00 00 | 46 ff ff ff 83 e6 bd 2d |.....8..|F......-|
|00002940| 8e 03 00 00 13 00 00 00 | 00 00 00 00 4d 41 43 52 |........|....MACR|
|00002950| 4f 00 00 00 50 3c 00 00 | 46 ff ff ff 00 dc 10 2d |O...P<..|F......-|
|00002960| 5d 02 00 00 13 00 00 00 | 00 00 00 00 4d 61 63 72 |].......|....Macr|
|00002970| 6f 43 6f 6e 64 00 00 00 | b0 3e 00 00 46 ff ff ff |oCond...|.>..F...|
|00002980| 24 16 bf 2d a0 01 00 00 | 13 00 00 00 00 00 00 00 |$..-....|........|
|00002990| 4d 61 63 72 6f 45 78 00 | 50 40 00 00 46 ff ff ff |MacroEx.|P@..F...|
|000029a0| 08 7e be 2d cd 05 00 00 | 13 00 00 00 00 00 00 00 |.~.-....|........|
|000029b0| 4d 61 63 72 6f 50 61 72 | 00 00 00 00 20 46 00 00 |MacroPar|.... F..|
|000029c0| 46 ff ff ff 54 a3 c5 2c | 63 00 00 00 13 00 00 00 |F...T..,|c.......|
|000029d0| 00 00 00 00 4f 55 54 50 | 55 54 00 00 84 46 00 00 |....OUTP|UT...F..|
|000029e0| 46 ff ff ff bd 06 bd 2d | 37 05 00 00 13 00 00 00 |F......-|7.......|
|000029f0| 00 00 00 00 52 45 4c 41 | 54 49 56 45 00 00 00 00 |....RELA|TIVE....|
|00002a00| bc 4b 00 00 46 ff ff ff | 91 89 bd 2d 59 03 00 00 |.K..F...|...-Y...|
|00002a10| 13 00 00 00 00 00 00 00 | 52 65 6c 61 74 69 76 65 |........|Relative|
|00002a20| 45 78 00 00 18 4f 00 00 | 46 ff ff ff c9 1b 13 2d |Ex...O..|F......-|
|00002a30| 3b 02 00 00 13 00 00 00 | 00 00 00 00 53 54 52 55 |;.......|....STRU|
|00002a40| 43 54 00 00 54 51 00 00 | 46 ff ff ff bf d1 13 2d |CT..TQ..|F......-|
|00002a50| d5 03 00 00 13 00 00 00 | 00 00 00 00 53 74 72 75 |........|....Stru|
|00002a60| 63 74 45 78 00 00 00 00 | 2c 55 00 00 46 ff ff ff |ctEx....|,U..F...|
|00002a70| ba 19 bc 2d cb 02 00 00 | 13 00 00 00 00 00 00 00 |...-....|........|
|00002a80| 53 74 72 75 63 74 45 78 | 32 00 00 00 f8 57 00 00 |StructEx|2....W..|
|00002a90| 46 ff ff ff d2 59 bc 2d | 62 01 00 00 13 00 00 00 |F....Y.-|b.......|
|00002aa0| 00 00 00 00 53 74 72 75 | 63 74 4e 65 73 74 00 00 |....Stru|ctNest..|
|00002ab0| 5c 59 00 00 46 ff ff ff | 50 83 0f 2d 6c 01 00 00 |\Y..F...|P..-l...|
|00002ac0| 13 00 00 00 00 00 00 00 | 54 45 4d 50 00 00 00 00 |........|TEMP....|
|00002ad0| c8 5a 00 00 46 ff ff ff | af 6f b9 2d 3f 02 00 00 |.Z..F...|.o.-?...|
|00002ae0| 13 00 00 00 00 00 00 00 | 41 44 52 4c 00 00 00 00 |........|ADRL....|
|00002af0| 08 5d 00 00 46 ff ff ff | a0 1b ba 2d b3 01 00 00 |.]..F...|...-....|
|00002b00| 13 00 00 00 00 00 00 00 | 44 43 78 45 78 00 00 00 |........|DCxEx...|
|00002b10| bc 5e 00 00 46 ff ff ff | 41 b7 ba 2d a8 00 00 00 |.^..F...|A..-....|
|00002b20| 13 00 00 00 00 00 00 00 | 44 42 78 45 78 00 00 00 |........|DBxEx...|
|00002b30| 44 41 54 41 00 01 00 00 | 45 78 74 72 61 20 69 6e |DATA....|Extra in|
|00002b40| 73 74 72 2e 0a 23 70 72 | 65 66 69 78 20 45 78 74 |str..#pr|efix Ext|
|00002b50| 72 61 49 6e 73 74 72 0a | 3c 41 44 52 3e 0a 3c 41 |raInstr.|<ADR>.<A|
|00002b60| 44 52 4c 3e 0a 3c 44 49 | 56 3e 0a 3c 45 58 47 3e |DRL>.<DI|V>.<EXG>|
|00002b70| 0a 3c 41 4c 49 47 4e 3e | 0a 3c 43 6f 6e 73 74 61 |.<ALIGN>|.<Consta|
|00002b80| 6e 74 20 64 65 63 6c 61 | 72 65 3d 3e 45 78 74 72 |nt decla|re=>Extr|
|00002b90| 61 49 6e 73 74 72 43 6f | 6e 73 74 61 6e 74 73 3e |aInstrCo|nstants>|
|00002ba0| 0a 3c 42 6c 6f 63 6b 20 | 64 65 63 6c 61 72 65 3d |.<Block |declare=|
|00002bb0| 3e 45 78 74 72 61 49 6e | 73 74 72 42 6c 6f 63 6b |>ExtraIn|strBlock|
|00002bc0| 73 3e 0a 3c 49 4e 43 42 | 49 4e 3e 0a 3c 53 54 52 |s>.<INCB|IN>.<STR|
|00002bd0| 55 43 54 3e 0a 3c 52 45 | 4c 41 54 49 56 45 3e 0a |UCT>.<RE|LATIVE>.|
|00002be0| 3c 4d 41 43 52 4f 3e 0a | 3c 54 45 4d 50 3e 0a 3c |<MACRO>.|<TEMP>.<|
|00002bf0| 4c 4f 43 4b 3e 0a 3c 46 | 50 54 45 4d 50 3d 3e 45 |LOCK>.<F|PTEMP=>E|
|00002c00| 78 74 72 61 49 6e 73 74 | 72 54 65 6d 70 3e 0a 3c |xtraInst|rTemp>.<|
|00002c10| 46 50 4c 4f 43 4b 3d 3e | 45 78 74 72 61 49 6e 73 |FPLOCK=>|ExtraIns|
|00002c20| 74 72 4c 6f 63 6b 3e 0a | 3c 4f 55 54 50 55 54 3e |trLock>.|<OUTPUT>|
|00002c30| 44 41 54 41 97 00 00 00 | 41 44 52 0a 23 77 72 61 |DATA....|ADR.#wra|
|00002c40| 70 20 6f 66 66 0a 47 65 | 74 20 61 64 64 72 65 73 |p off.Ge|t addres|
|00002c50| 73 2e 0a 0a 53 79 6e 74 | 61 78 3a 09 09 41 44 52 |s...Synt|ax:..ADR|
|00002c60| 5b 43 43 5d 20 20 20 52 | 64 2c 5c 3c 4c 61 62 65 |[CC] R|d,\<Labe|
|00002c70| 6c 3e 0a 4f 70 65 72 61 | 74 69 6f 6e 3a 09 52 64 |l>.Opera|tion:.Rd|
|00002c80| 20 3d 20 41 64 64 72 65 | 73 73 20 6f 66 20 5c 3c | = Addre|ss of \<|
|00002c90| 6c 61 62 65 6c 3e 0a 0a | 45 78 61 6d 70 6c 65 73 |label>..|Examples|
|00002ca0| 20 6f 66 20 75 73 65 3a | 0a 0a 7b 66 63 6f 64 65 | of use:|..{fcode|
|00002cb0| 7d 41 44 52 20 20 20 52 | 31 2c 44 61 74 61 5f 42 |}ADR R|1,Data_B|
|00002cc0| 6c 6f 63 6b 7b 66 7d 00 | 44 41 54 41 3d 02 00 00 |lock{f}.|DATA=...|
|00002cd0| 41 4c 49 47 4e 0a 23 77 | 72 61 70 20 6f 66 66 0a |ALIGN.#w|rap off.|
|00002ce0| 41 6c 69 67 6e 6d 65 6e | 74 20 6f 66 20 43 6f 64 |Alignmen|t of Cod|
|00002cf0| 65 20 26 20 44 61 74 61 | 0a 0a 53 79 6e 74 61 78 |e & Data|..Syntax|
|00002d00| 3a 20 20 41 4c 49 47 4e | 20 5b 5c 3c 42 6f 75 6e |: ALIGN| [\<Boun|
|00002d10| 64 61 72 79 3e 5d 20 5b | 2c 5c 3c 4f 66 66 73 65 |dary>] [|,\<Offse|
|00002d20| 74 3e 5d 0a 4e 6f 74 69 | 63 65 3a 20 20 54 68 65 |t>].Noti|ce: The|
|00002d30| 20 61 73 73 65 6d 62 6c | 65 72 20 77 69 6c 6c 20 | assembl|er will |
|00002d40| 69 73 73 75 65 20 77 61 | 72 6e 69 6e 67 73 20 69 |issue wa|rnings i|
|00002d50| 66 20 63 6f 64 65 20 69 | 73 0a 20 20 20 20 20 20 |f code i|s. |
|00002d60| 20 20 20 20 20 20 20 20 | 6e 6f 74 20 77 6f 72 64 | |not word|
|00002d70| 2d 61 6c 69 67 6e 65 64 | 2c 20 62 75 74 20 69 74 |-aligned|, but it|
|00002d80| 20 77 69 6c 6c 20 6e 6f | 74 20 77 61 72 6e 20 69 | will no|t warn i|
|00002d90| 66 20 64 61 74 61 0a 20 | 20 20 20 20 20 20 20 20 |f data. | |
|00002da0| 20 20 20 20 20 69 73 20 | 6e 6f 74 20 77 6f 72 64 | is |not word|
|00002db0| 2d 61 6c 69 67 6e 65 64 | 20 28 62 79 74 65 73 2e |-aligned| (bytes.|
|00002dc0| 2e 2e 29 2e 0a 0a 49 74 | 20 61 6c 69 67 6e 73 20 |..)...It| aligns |
|00002dd0| 74 68 65 20 63 6f 64 65 | 20 74 6f 20 61 20 63 68 |the code| to a ch|
|00002de0| 6f 73 65 6e 20 62 6f 75 | 6e 64 61 72 79 20 61 6e |osen bou|ndary an|
|00002df0| 64 20 6f 66 66 73 65 74 | 2e 0a 28 64 65 66 61 75 |d offset|..(defau|
|00002e00| 6c 74 20 62 6f 75 6e 64 | 61 72 79 20 69 73 20 34 |lt bound|ary is 4|
|00002e10| 20 28 77 6f 72 64 29 20 | 61 6e 64 20 6f 66 66 73 | (word) |and offs|
|00002e20| 65 74 20 30 29 2e 20 4f | 66 66 73 65 74 0a 6d 65 |et 0). O|ffset.me|
|00002e30| 61 6e 73 20 74 68 61 74 | 20 61 66 74 65 72 20 5c |ans that| after \|
|00002e40| 3c 4f 66 66 73 65 74 3e | 20 62 79 74 65 73 2c 20 |<Offset>| bytes, |
|00002e50| 74 68 65 20 70 6f 69 6e | 74 65 72 20 77 69 6c 6c |the poin|ter will|
|00002e60| 0a 62 65 20 5c 3c 42 6f | 75 6e 64 61 72 79 3e 20 |.be \<Bo|undary> |
|00002e70| 61 6c 69 67 6e 65 64 2e | 0a 0a 45 78 61 6d 70 6c |aligned.|..Exampl|
|00002e80| 65 73 20 6f 66 20 75 73 | 65 3a 0a 0a 7b 66 63 6f |es of us|e:..{fco|
|00002e90| 64 65 7d 41 4c 49 47 4e | 0a 0a 41 4c 49 47 4e 20 |de}ALIGN|..ALIGN |
|00002ea0| 31 36 2c 34 09 09 3b 20 | 43 61 63 68 65 2d 61 6c |16,4..; |Cache-al|
|00002eb0| 69 67 6e 6d 65 6e 74 0a | 7b 66 63 6f 64 65 7d 44 |ignment.|{fcode}D|
|00002ec0| 43 44 20 20 20 30 09 09 | 3b 20 54 68 69 73 20 77 |CD 0..|; This w|
|00002ed0| 69 6c 6c 20 6e 6f 74 20 | 62 65 20 61 6c 69 67 6e |ill not |be align|
|00002ee0| 65 64 0a 7b 66 63 6f 64 | 65 7d 2e 53 74 61 72 74 |ed.{fcod|e}.Start|
|00002ef0| 09 09 3b 20 42 75 74 20 | 74 68 69 73 20 77 69 6c |..; But |this wil|
|00002f00| 6c 20 62 65 21 00 00 00 | 44 41 54 41 cb 02 00 00 |l be!...|DATA....|
|00002f10| 42 6c 6f 63 6b 20 64 65 | 63 6c 61 72 61 74 69 6f |Block de|claratio|
|00002f20| 6e 73 0a 23 77 72 61 70 | 20 6f 66 66 0a 44 42 42 |ns.#wrap| off.DBB|
|00002f30| 09 44 65 63 6c 61 72 65 | 20 42 6c 6f 63 6b 20 6f |.Declare| Block o|
|00002f40| 66 20 42 79 74 65 73 2e | 0a 44 42 57 09 44 65 63 |f Bytes.|.DBW.Dec|
|00002f50| 6c 61 72 65 20 42 6c 6f | 63 6b 20 6f 66 20 57 6f |lare Blo|ck of Wo|
|00002f60| 72 64 73 20 28 31 36 20 | 62 69 74 29 2e 0a 44 42 |rds (16 |bit)..DB|
|00002f70| 44 09 44 65 63 6c 61 72 | 65 20 42 6c 6f 63 6b 20 |D.Declar|e Block |
|00002f80| 6f 66 20 44 6f 75 62 6c | 65 77 6f 72 64 73 20 28 |of Doubl|ewords (|
|00002f90| 33 32 20 62 69 74 29 2e | 0a 44 42 46 53 09 44 65 |32 bit).|.DBFS.De|
|00002fa0| 63 6c 61 72 65 20 42 6c | 6f 63 6b 20 6f 66 20 46 |clare Bl|ock of F|
|00002fb0| 50 2d 43 6f 6e 73 74 61 | 6e 74 2c 20 53 69 6e 67 |P-Consta|nt, Sing|
|00002fc0| 6c 65 20 70 72 65 63 69 | 73 69 6f 6e 20 28 33 32 |le preci|sion (32|
|00002fd0| 20 62 69 74 29 2e 0a 44 | 42 46 44 09 44 65 63 6c | bit)..D|BFD.Decl|
|00002fe0| 61 72 65 20 42 6c 6f 63 | 6b 20 6f 66 20 46 50 2d |are Bloc|k of FP-|
|00002ff0| 43 6f 6e 73 74 61 6e 74 | 2c 20 44 6f 75 62 6c 65 |Constant|, Double|
|00003000| 20 70 72 65 63 69 73 69 | 6f 6e 20 28 36 34 20 62 | precisi|on (64 b|
|00003010| 69 74 29 2e 0a 44 42 46 | 45 09 44 65 63 6c 61 72 |it)..DBF|E.Declar|
|00003020| 65 20 42 6c 6f 63 6b 20 | 6f 66 20 46 50 2d 43 6f |e Block |of FP-Co|
|00003030| 6e 73 74 61 6e 74 2c 20 | 45 78 74 65 6e 64 65 64 |nstant, |Extended|
|00003040| 20 70 72 65 63 69 73 69 | 6f 6e 20 28 39 36 20 62 | precisi|on (96 b|
|00003050| 69 74 29 2e 0a 44 42 46 | 50 09 44 65 63 6c 61 72 |it)..DBF|P.Declar|
|00003060| 65 20 42 6c 6f 63 6b 20 | 6f 66 20 46 50 2d 43 6f |e Block |of FP-Co|
|00003070| 6e 73 74 61 6e 74 2c 20 | 50 61 63 6b 65 64 20 42 |nstant, |Packed B|
|00003080| 43 44 20 28 39 36 20 62 | 69 74 29 2e 0a 44 42 46 |CD (96 b|it)..DBF|
|00003090| 45 50 09 44 65 63 6c 61 | 72 65 20 42 6c 6f 63 6b |EP.Decla|re Block|
|000030a0| 20 6f 66 20 46 50 2d 43 | 6f 6e 73 74 61 6e 74 2c | of FP-C|onstant,|
|000030b0| 20 45 78 74 65 6e 64 65 | 64 20 50 61 63 6b 65 64 | Extende|d Packed|
|000030c0| 20 42 43 44 20 28 31 32 | 38 20 62 69 74 29 2e 0a | BCD (12|8 bit)..|
|000030d0| 0a 53 79 6e 74 61 78 3a | 09 5c 3c 44 42 42 20 7c |.Syntax:|.\<DBB ||
|000030e0| 20 44 42 57 20 7c 20 44 | 42 44 20 7c 20 44 42 46 | DBW | D|BD | DBF|
|000030f0| 53 20 7c 20 44 42 46 44 | 20 7c 20 44 42 46 45 20 |S | DBFD| | DBFE |
|00003100| 7c 20 44 42 46 50 20 7c | 20 44 42 46 45 50 3e 0a || DBFP || DBFEP>.|
|00003110| 09 5c 3c 53 69 7a 65 3e | 20 5b 2c 20 5c 3c 43 6f |.\<Size>| [, \<Co|
|00003120| 6e 73 74 61 6e 74 3e 5d | 0a 57 68 65 72 65 3a 09 |nstant>]|.Where:.|
|00003130| 5c 3c 53 69 7a 65 3e 20 | 69 73 20 68 6f 77 20 6d |\<Size> |is how m|
|00003140| 61 6e 79 20 69 74 65 6d | 73 20 69 6e 20 74 68 65 |any item|s in the|
|00003150| 20 62 6c 6f 63 6b 20 28 | 62 79 74 65 73 2c 20 77 | block (|bytes, w|
|00003160| 6f 72 64 73 20 6f 72 20 | 64 6f 75 62 6c 65 73 29 |ords or |doubles)|
|00003170| 2e 0a 09 5c 3c 43 6f 6e | 73 74 61 6e 74 3e 20 69 |...\<Con|stant> i|
|00003180| 73 20 74 68 65 20 76 61 | 6c 75 65 20 6f 66 20 65 |s the va|lue of e|
|00003190| 61 63 68 20 69 74 65 6d | 2c 20 64 65 66 61 75 6c |ach item|, defaul|
|000031a0| 74 20 3d 20 30 2e 0a 0a | 43 6c 69 63 6b 20 3c 68 |t = 0...|Click <h|
|000031b0| 65 72 65 3d 3e 45 78 74 | 72 61 49 6e 73 74 72 44 |ere=>Ext|raInstrD|
|000031c0| 42 78 45 78 3e 20 66 6f | 72 20 65 78 61 6d 70 6c |BxEx> fo|r exampl|
|000031d0| 65 73 2e 00 44 41 54 41 | aa 02 00 00 43 6f 6e 73 |es..DATA|....Cons|
|000031e0| 74 61 6e 74 20 64 65 63 | 6c 61 72 61 74 69 6f 6e |tant dec|laration|
|000031f0| 73 0a 23 77 72 61 70 20 | 6f 66 66 0a 44 43 42 09 |s.#wrap |off.DCB.|
|00003200| 44 65 63 6c 61 72 65 20 | 43 6f 6e 73 74 61 6e 74 |Declare |Constant|
|00003210| 20 42 79 74 65 2c 20 61 | 6c 73 6f 20 75 73 65 64 | Byte, a|lso used|
|00003220| 20 66 6f 72 20 73 74 72 | 69 6e 67 73 2e 0a 44 43 | for str|ings..DC|
|00003230| 57 09 44 65 63 6c 61 72 | 65 20 43 6f 6e 73 74 61 |W.Declar|e Consta|
|00003240| 6e 74 20 57 6f 72 64 20 | 28 31 36 20 62 69 74 29 |nt Word |(16 bit)|
|00003250| 2e 0a 44 43 44 09 44 65 | 63 6c 61 72 65 20 43 6f |..DCD.De|clare Co|
|00003260| 6e 73 74 61 6e 74 20 44 | 6f 75 62 6c 65 77 6f 72 |nstant D|oublewor|
|00003270| 64 20 28 33 32 20 62 69 | 74 29 2e 0a 44 43 46 53 |d (32 bi|t)..DCFS|
|00003280| 09 44 65 63 6c 61 72 65 | 20 46 50 2d 43 6f 6e 73 |.Declare| FP-Cons|
|00003290| 74 61 6e 74 2c 20 53 69 | 6e 67 6c 65 20 70 72 65 |tant, Si|ngle pre|
|000032a0| 63 69 73 69 6f 6e 20 28 | 33 32 20 62 69 74 29 2e |cision (|32 bit).|
|000032b0| 0a 44 43 46 44 09 44 65 | 63 6c 61 72 65 20 46 50 |.DCFD.De|clare FP|
|000032c0| 2d 43 6f 6e 73 74 61 6e | 74 2c 20 44 6f 75 62 6c |-Constan|t, Doubl|
|000032d0| 65 20 70 72 65 63 69 73 | 69 6f 6e 20 28 36 34 20 |e precis|ion (64 |
|000032e0| 62 69 74 29 2e 0a 44 43 | 46 45 09 44 65 63 6c 61 |bit)..DC|FE.Decla|
|000032f0| 72 65 20 46 50 2d 43 6f | 6e 73 74 61 6e 74 2c 20 |re FP-Co|nstant, |
|00003300| 45 78 74 65 6e 64 65 64 | 20 70 72 65 63 69 73 69 |Extended| precisi|
|00003310| 6f 6e 20 28 39 36 20 62 | 69 74 29 2e 0a 44 43 46 |on (96 b|it)..DCF|
|00003320| 50 09 44 65 63 6c 61 72 | 65 20 46 50 2d 43 6f 6e |P.Declar|e FP-Con|
|00003330| 73 74 61 6e 74 2c 20 50 | 61 63 6b 65 64 20 42 43 |stant, P|acked BC|
|00003340| 44 20 28 39 36 20 62 69 | 74 29 2e 0a 44 43 46 45 |D (96 bi|t)..DCFE|
|00003350| 50 09 44 65 63 6c 61 72 | 65 20 46 50 2d 43 6f 6e |P.Declar|e FP-Con|
|00003360| 73 74 61 6e 74 2c 20 45 | 78 74 65 6e 64 65 64 20 |stant, E|xtended |
|00003370| 50 61 63 6b 65 64 20 42 | 43 44 20 28 31 32 38 20 |Packed B|CD (128 |
|00003380| 62 69 74 29 2e 0a 0a 53 | 79 6e 74 61 78 3a 09 5c |bit)...S|yntax:.\|
|00003390| 3c 44 43 42 20 7c 20 44 | 43 57 20 7c 20 44 43 44 |<DCB | D|CW | DCD|
|000033a0| 20 7c 20 44 43 46 53 20 | 7c 20 44 43 46 44 20 7c | | DCFS || DCFD ||
|000033b0| 20 44 43 46 45 20 7c 20 | 44 43 46 50 20 7c 0a 09 | DCFE | |DCFP |..|
|000033c0| 44 43 46 45 50 3e 20 5c | 3c 43 6f 6e 73 74 3e 20 |DCFEP> \|<Const> |
|000033d0| 7b 2c 20 5c 3c 43 6f 6e | 73 74 3e 7d 0a 53 70 65 |{, \<Con|st>}.Spe|
|000033e0| 63 69 61 6c 3a 09 44 43 | 42 20 5c 3c 43 6f 6e 73 |cial:.DC|B \<Cons|
|000033f0| 74 20 7c 20 53 74 72 69 | 6e 67 3e 20 7b 2c 20 5c |t | Stri|ng> {, \|
|00003400| 3c 43 6f 6e 73 74 20 7c | 20 53 74 72 69 6e 67 3e |<Const || String>|
|00003410| 7d 0a 57 68 65 72 65 3a | 09 43 6f 6e 73 74 20 69 |}.Where:|.Const i|
|00003420| 73 20 61 6e 79 20 6c 65 | 67 61 6c 20 65 78 70 72 |s any le|gal expr|
|00003430| 65 73 73 69 6f 6e 2c 20 | 61 6e 64 20 53 74 72 69 |ession, |and Stri|
|00003440| 6e 67 20 69 73 20 61 6e | 79 20 73 74 72 69 6e 67 |ng is an|y string|
|00003450| 2e 0a 0a 43 6c 69 63 6b | 20 3c 68 65 72 65 3d 3e |...Click| <here=>|
|00003460| 45 78 74 72 61 49 6e 73 | 74 72 44 43 78 45 78 3e |ExtraIns|trDCxEx>|
|00003470| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 73 2e 00 00 | for exa|mples...|
|00003480| 44 41 54 41 ee 00 00 00 | 44 49 56 0a 23 77 72 61 |DATA....|DIV.#wra|
|00003490| 70 20 6f 66 66 0a 49 6e | 74 65 67 65 72 20 64 69 |p off.In|teger di|
|000034a0| 76 69 73 69 6f 6e 2e 0a | 0a 53 79 6e 74 61 78 3a |vision..|.Syntax:|
|000034b0| 09 09 44 49 56 5b 43 43 | 5d 20 20 20 52 64 2c 52 |..DIV[CC|] Rd,R|
|000034c0| 6e 2c 52 73 0a 4f 70 65 | 72 61 74 69 6f 6e 3a 09 |n,Rs.Ope|ration:.|
|000034d0| 52 64 20 3d 20 52 6e 20 | 44 49 56 20 52 73 0a 09 |Rd = Rn |DIV Rs..|
|000034e0| 09 52 6e 20 3d 20 52 6e | 20 4d 4f 44 20 52 73 0a |.Rn = Rn| MOD Rs.|
|000034f0| 0a 4e 6f 74 69 63 65 3a | 09 52 64 2c 20 52 6e 20 |.Notice:|.Rd, Rn |
|00003500| 26 20 52 73 20 6d 75 73 | 74 20 62 65 20 75 6e 69 |& Rs mus|t be uni|
|00003510| 71 65 2e 0a 45 78 74 72 | 61 3a 09 55 73 65 73 20 |qe..Extr|a:.Uses |
|00003520| 31 20 54 65 6d 70 20 52 | 65 67 69 73 74 65 72 2e |1 Temp R|egister.|
|00003530| 0a 0a 45 78 61 6d 70 6c | 65 73 20 6f 66 20 75 73 |..Exampl|es of us|
|00003540| 65 3a 0a 0a 7b 66 63 6f | 64 65 7d 44 49 56 20 20 |e:..{fco|de}DIV |
|00003550| 20 52 31 2c 52 34 2c 52 | 37 0a 44 49 56 4c 45 20 | R1,R4,R|7.DIVLE |
|00003560| 52 31 30 2c 52 31 31 2c | 52 31 32 7b 66 7d 00 00 |R10,R11,|R12{f}..|
|00003570| 44 41 54 41 dc 00 00 00 | 45 58 47 0a 23 77 72 61 |DATA....|EXG.#wra|
|00003580| 70 20 6f 66 66 0a 45 78 | 68 61 6e 67 65 20 63 6f |p off.Ex|hange co|
|00003590| 6e 74 65 6e 74 73 20 6f | 66 20 74 77 6f 20 69 6e |ntents o|f two in|
|000035a0| 74 65 67 65 72 20 72 65 | 67 69 73 74 65 72 73 2e |teger re|gisters.|
|000035b0| 0a 0a 53 79 6e 74 61 78 | 3a 09 09 45 58 47 5b 43 |..Syntax|:..EXG[C|
|000035c0| 43 5d 20 20 20 52 64 2c | 52 6e 0a 4f 70 65 72 61 |C] Rd,|Rn.Opera|
|000035d0| 74 69 6f 6e 3a 09 52 64 | 20 3d 20 6f 6c 64 20 52 |tion:.Rd| = old R|
|000035e0| 6e 0a 09 09 52 6e 20 3d | 20 6f 6c 64 20 52 64 0a |n...Rn =| old Rd.|
|000035f0| 0a 4e 6f 74 69 63 65 3a | 09 09 52 64 20 6d 75 73 |.Notice:|..Rd mus|
|00003600| 74 20 62 65 20 64 69 66 | 66 65 72 65 6e 74 20 66 |t be dif|ferent f|
|00003610| 72 6f 6d 20 52 6e 2e 0a | 0a 45 78 61 6d 70 6c 65 |rom Rn..|.Example|
|00003620| 73 20 6f 66 20 75 73 65 | 3a 0a 0a 7b 66 63 6f 64 |s of use|:..{fcod|
|00003630| 65 7d 45 58 47 20 20 20 | 52 31 2c 52 32 0a 45 58 |e}EXG |R1,R2.EX|
|00003640| 47 4c 54 20 52 33 2c 52 | 39 7b 66 7d 44 41 54 41 |GLT R3,R|9{f}DATA|
|00003650| 1b 01 00 00 49 4e 43 42 | 49 4e 0a 23 77 72 61 70 |....INCB|IN.#wrap|
|00003660| 20 6f 66 66 0a 49 6e 63 | 6c 75 64 65 20 62 69 6e | off.Inc|lude bin|
|00003670| 61 72 79 20 66 69 6c 65 | 20 28 64 61 74 61 2d 66 |ary file| (data-f|
|00003680| 69 6c 65 29 2e 0a 0a 53 | 79 6e 74 61 78 3a 09 49 |ile)...S|yntax:.I|
|00003690| 4e 43 42 49 4e 20 5c 3c | 66 69 6c 65 6e 61 6d 65 |NCBIN \<|filename|
|000036a0| 3e 0a 57 68 65 72 65 3a | 09 66 69 6c 65 6e 61 6d |>.Where:|.filenam|
|000036b0| 65 20 69 73 20 74 68 65 | 20 64 61 74 61 2d 66 69 |e is the| data-fi|
|000036c0| 6c 65 20 74 6f 20 69 6e | 73 65 72 74 2e 0a 4e 6f |le to in|sert..No|
|000036d0| 74 69 63 65 3a 09 53 70 | 61 63 65 20 69 73 20 61 |tice:.Sp|ace is a|
|000036e0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 61 6c 6c |utomatic|ally all|
|000036f0| 6f 63 61 74 65 64 20 66 | 6f 72 20 74 68 65 20 66 |ocated f|or the f|
|00003700| 69 6c 65 2c 20 61 6e 64 | 20 69 73 20 62 79 74 65 |ile, and| is byte|
|00003710| 2d 61 6c 69 67 6e 65 64 | 2e 0a 0a 45 78 61 6d 70 |-aligned|...Examp|
|00003720| 6c 65 73 20 6f 66 20 75 | 73 65 3a 0a 7b 66 63 6f |les of u|se:.{fco|
|00003730| 64 65 7d 2e 53 69 6e 54 | 61 62 6c 65 20 69 6e 63 |de}.SinT|able inc|
|00003740| 62 69 6e 20 20 20 22 5c | 3c 54 6d 70 24 44 69 72 |bin "\|<Tmp$Dir|
|00003750| 3e 2e 54 61 62 6c 65 73 | 2e 53 69 6e 75 73 54 61 |>.Tables|.SinusTa|
|00003760| 62 6c 65 22 7b 66 7d 00 | 44 41 54 41 55 01 00 00 |ble"{f}.|DATAU...|
|00003770| 4c 4f 43 4b 20 26 20 46 | 50 4c 4f 43 4b 0a 23 77 |LOCK & F|PLOCK.#w|
|00003780| 72 61 70 20 6f 66 66 0a | 52 65 63 6c 61 69 6d 20 |rap off.|Reclaim |
|00003790| 61 20 72 65 67 69 73 74 | 65 72 20 61 66 74 65 72 |a regist|er after|
|000037a0| 20 61 20 69 74 20 68 61 | 73 20 62 65 65 6e 20 54 | a it ha|s been T|
|000037b0| 45 4d 50 27 65 64 20 6f | 72 20 46 50 54 45 4d 50 |EMP'ed o|r FPTEMP|
|000037c0| 27 65 64 2e 0a 0a 53 79 | 6e 74 61 78 3a 09 5c 3c |'ed...Sy|ntax:.\<|
|000037d0| 4c 4f 43 4b 20 7c 20 46 | 50 4c 4f 43 4b 3e 20 20 |LOCK | F|PLOCK> |
|000037e0| 20 52 65 67 4c 69 73 74 | 0a 57 68 65 72 65 3a 09 | RegList|.Where:.|
|000037f0| 52 65 67 6c 69 73 74 20 | 69 73 20 61 20 6c 69 73 |Reglist |is a lis|
|00003800| 74 20 6f 66 20 72 65 67 | 69 73 74 65 72 73 2c 20 |t of reg|isters, |
|00003810| 6f 72 20 72 65 67 69 73 | 74 65 72 2d 72 61 6e 67 |or regis|ter-rang|
|00003820| 65 73 2e 0a 4e 6f 74 69 | 63 65 3a 09 54 68 65 20 |es..Noti|ce:.The |
|00003830| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 52 65 67 4c |contents| of RegL|
|00003840| 69 73 74 20 69 73 20 73 | 61 66 65 20 61 66 74 65 |ist is s|afe afte|
|00003850| 72 20 74 68 69 73 20 70 | 6f 69 6e 74 2e 0a 0a 45 |r this p|oint...E|
|00003860| 78 61 6d 70 6c 65 73 20 | 6f 66 20 75 73 65 3a 0a |xamples |of use:.|
|00003870| 0a 7b 66 63 6f 64 65 7d | 4c 4f 43 4b 20 20 20 20 |.{fcode}|LOCK |
|00003880| 20 52 30 0a 4c 4f 43 4b | 20 20 20 20 20 52 31 2c | R0.LOCK| R1,|
|00003890| 52 32 2c 52 38 2d 52 31 | 32 0a 46 50 4c 4f 43 4b |R2,R8-R1|2.FPLOCK|
|000038a0| 20 20 20 46 30 0a 46 50 | 4c 4f 43 4b 20 20 20 46 | F0.FP|LOCK F|
|000038b0| 30 2c 46 31 2c 46 33 2d | 46 37 7b 66 7d 00 00 00 |0,F1,F3-|F7{f}...|
|000038c0| 44 41 54 41 8e 03 00 00 | 4d 41 43 52 4f 0a 23 77 |DATA....|MACRO.#w|
|000038d0| 72 61 70 20 6f 66 66 0a | 4d 61 63 72 6f 73 0a 2d |rap off.|Macros.-|
|000038e0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 54 68 65 20 75 73 65 |--------|.The use|
|000038f0| 20 6f 66 20 6d 61 63 72 | 6f 73 20 6d 61 6b 65 20 | of macr|os make |
|00003900| 69 74 20 65 61 73 69 65 | 72 20 74 6f 20 64 6f 20 |it easie|r to do |
|00003910| 72 6f 75 74 69 6e 65 6c | 79 20 74 68 69 6e 67 73 |routinel|y things|
|00003920| 2c 20 61 6e 64 20 63 61 | 6e 20 62 65 20 61 0a 76 |, and ca|n be a.v|
|00003930| 65 72 79 20 70 6f 77 65 | 72 66 75 6c 20 74 6f 6f |ery powe|rful too|
|00003940| 6c 20 69 6e 20 6d 61 6b | 69 6e 67 20 63 6f 6d 70 |l in mak|ing comp|
|00003950| 6c 65 78 20 63 6f 64 65 | 2e 20 54 68 65 20 6d 61 |lex code|. The ma|
|00003960| 63 72 6f 20 63 61 6e 20 | 62 65 20 64 65 66 69 6e |cro can |be defin|
|00003970| 65 64 0a 61 6e 79 77 68 | 65 72 65 20 69 6e 20 74 |ed.anywh|ere in t|
|00003980| 68 65 20 73 6f 75 72 63 | 65 2c 20 61 6e 64 20 69 |he sourc|e, and i|
|00003990| 74 20 69 73 20 73 6d 61 | 72 74 20 74 6f 20 68 61 |t is sma|rt to ha|
|000039a0| 76 65 20 61 20 73 74 61 | 6e 64 61 72 64 20 66 69 |ve a sta|ndard fi|
|000039b0| 6c 65 20 6f 66 20 61 6c | 6c 0a 79 6f 75 72 20 73 |le of al|l.your s|
|000039c0| 74 61 6e 64 61 72 64 20 | 6d 61 63 72 6f 73 2c 20 |tandard |macros, |
|000039d0| 73 6f 20 74 68 61 74 20 | 79 6f 75 20 63 61 6e 20 |so that |you can |
|000039e0| 65 61 73 69 6c 79 20 69 | 6e 63 6c 75 64 65 20 74 |easily i|nclude t|
|000039f0| 68 69 73 20 69 6e 74 6f | 20 61 6c 6c 20 6f 74 68 |his into| all oth|
|00003a00| 65 72 0a 70 72 6f 67 72 | 61 6d 73 20 79 6f 75 20 |er.progr|ams you |
|00003a10| 77 72 69 74 65 2e 0a 0a | 53 79 6e 74 61 78 3a 20 |write...|Syntax: |
|00003a20| 4d 41 43 52 4f 20 5c 3c | 6e 61 6d 65 3e 5b 5c 24 |MACRO \<|name>[\$|
|00003a30| 5c 3c 43 43 56 61 72 3e | 5d 09 5b 5c 3c 50 61 72 |\<CCVar>|].[\<Par|
|00003a40| 56 61 72 31 3e 3a 5c 3c | 50 61 72 54 79 70 65 31 |Var1>:\<|ParType1|
|00003a50| 3e 5d 0a 09 5c 7b 20 5b | 2c 5c 3c 50 61 72 56 61 |>]..\{ [|,\<ParVa|
|00003a60| 72 32 3a 5c 3c 50 61 72 | 54 79 70 65 32 3e 5d 20 |r2:\<Par|Type2>] |
|00003a70| 7d 0a 5c 7b 0a 5c 3c 43 | 6f 64 65 3e 0a 7d 0a 0a |}.\{.\<C|ode>.}..|
|00003a80| 49 74 20 69 73 20 63 61 | 6c 6c 65 64 20 77 69 74 |It is ca|lled wit|
|00003a90| 68 3a 0a 0a 5c 3c 6e 61 | 6d 65 3e 5b 5c 3c 43 43 |h:..\<na|me>[\<CC|
|00003aa0| 3e 5d 20 5b 50 61 72 61 | 6d 65 74 65 72 31 5d 20 |>] [Para|meter1] |
|00003ab0| 5c 7b 20 5b 2c 50 61 72 | 61 6d 65 74 65 72 32 5d |\{ [,Par|ameter2]|
|00003ac0| 20 7d 0a 0a 0a 54 68 65 | 20 6d 61 63 72 6f 20 68 | }...The| macro h|
|00003ad0| 65 61 64 65 72 20 6d 75 | 73 74 20 62 65 20 74 68 |eader mu|st be th|
|00003ae0| 65 20 66 69 72 73 74 20 | 6e 6f 6e 2d 62 6c 61 6e |e first |non-blan|
|00003af0| 6b 20 63 68 61 72 61 63 | 74 65 72 20 6f 6e 20 61 |k charac|ter on a|
|00003b00| 20 6c 69 6e 65 2e 0a 0a | 4d 61 63 72 6f 73 20 63 | line...|Macros c|
|00003b10| 61 6e 20 74 61 6b 65 20 | 66 69 76 65 20 64 69 66 |an take |five dif|
|00003b20| 66 65 72 65 6e 74 20 70 | 61 73 73 69 6e 67 2d 70 |ferent p|assing-p|
|00003b30| 61 72 61 6d 65 74 65 72 | 73 2c 20 61 6e 64 20 75 |arameter|s, and u|
|00003b40| 73 65 20 73 65 76 65 6e | 0a 64 69 66 66 65 72 65 |se seven|.differe|
|00003b50| 6e 74 20 3c 70 61 72 61 | 6d 65 74 65 72 73 3d 3e |nt <para|meters=>|
|00003b60| 45 78 74 72 61 49 6e 73 | 74 72 4d 61 63 72 6f 50 |ExtraIns|trMacroP|
|00003b70| 61 72 3e 2e 20 54 68 65 | 20 61 64 64 69 74 69 6f |ar>. The| additio|
|00003b80| 6e 61 6c 20 75 73 65 2d | 70 61 72 61 6d 65 74 65 |nal use-|paramete|
|00003b90| 72 73 20 61 72 65 20 74 | 65 6d 70 2d 72 65 67 69 |rs are t|emp-regi|
|00003ba0| 73 74 65 72 73 2e 0a 0a | 59 6f 75 20 63 61 6e 20 |sters...|You can |
|00003bb0| 65 76 65 6e 20 68 61 76 | 65 20 3c 63 6f 6e 64 69 |even hav|e <condi|
|00003bc0| 74 69 6f 6e 2d 63 6f 64 | 65 73 3d 3e 45 78 74 72 |tion-cod|es=>Extr|
|00003bd0| 61 49 6e 73 74 72 4d 61 | 63 72 6f 43 6f 6e 64 3e |aInstrMa|croCond>|
|00003be0| 20 66 6f 72 20 74 68 65 | 20 6d 61 63 72 6f 73 2c | for the| macros,|
|00003bf0| 20 73 6f 20 74 68 61 74 | 20 74 68 65 79 20 63 61 | so that| they ca|
|00003c00| 6e 0a 6d 61 6b 65 20 6e | 65 77 20 69 6e 73 74 72 |n.make n|ew instr|
|00003c10| 75 63 74 69 6f 6e 73 2e | 0a 0a 43 6c 69 63 6b 20 |uctions.|..Click |
|00003c20| 3c 68 65 72 65 3d 3e 45 | 78 74 72 61 49 6e 73 74 |<here=>E|xtraInst|
|00003c30| 72 4d 61 63 72 6f 45 78 | 3e 20 66 6f 72 20 61 20 |rMacroEx|> for a |
|00003c40| 6d 61 63 72 6f 20 65 78 | 61 6d 70 6c 65 2e 00 00 |macro ex|ample...|
|00003c50| 44 41 54 41 5d 02 00 00 | 4d 61 63 72 6f 20 63 6f |DATA]...|Macro co|
|00003c60| 6e 64 69 74 69 6f 6e 20 | 63 6f 64 65 73 0a 23 77 |ndition |codes.#w|
|00003c70| 72 61 70 20 6f 66 66 0a | 4d 61 63 72 6f 20 63 6f |rap off.|Macro co|
|00003c80| 6e 64 69 74 69 6f 6e 20 | 63 6f 64 65 73 20 63 61 |ndition |codes ca|
|00003c90| 6e 20 62 65 20 75 73 65 | 64 20 62 79 20 68 61 76 |n be use|d by hav|
|00003ca0| 69 6e 67 20 22 5c 24 5c | 3c 56 61 72 4e 61 6d 65 |ing "\$\|<VarName|
|00003cb0| 3e 22 0a 61 66 74 65 72 | 20 74 68 65 20 6d 61 63 |>".after| the mac|
|00003cc0| 72 6f 20 6e 61 6d 65 20 | 69 6e 20 74 68 65 20 64 |ro name |in the d|
|00003cd0| 65 66 69 6e 69 74 69 6f | 6e 2e 20 54 68 65 20 76 |efinitio|n. The v|
|00003ce0| 61 72 69 61 62 6c 65 0a | 5c 3c 56 61 72 4e 61 6d |ariable.|\<VarNam|
|00003cf0| 65 3e 20 77 69 6c 6c 20 | 74 68 65 6e 20 63 6f 6e |e> will |then con|
|00003d00| 74 61 69 6e 20 74 68 65 | 20 69 6e 74 65 67 65 72 |tain the| integer|
|00003d10| 20 63 6f 6e 64 69 74 69 | 6f 6e 20 63 6f 64 65 0a | conditi|on code.|
|00003d20| 28 30 2d 31 35 29 2e 0a | 0a 54 68 69 73 20 63 61 |(0-15)..|.This ca|
|00003d30| 6e 20 62 65 20 75 73 65 | 64 20 62 79 20 69 6e 73 |n be use|d by ins|
|00003d40| 74 72 75 63 74 69 6f 6e | 73 20 69 6e 20 74 68 65 |truction|s in the|
|00003d50| 20 6d 61 63 72 6f 2c 20 | 62 79 20 75 73 69 6e 67 | macro, |by using|
|00003d60| 0a 22 5c 24 5c 3c 76 61 | 72 6e 61 6d 65 3e 22 20 |."\$\<va|rname>" |
|00003d70| 61 66 74 65 72 20 61 6e | 79 20 6f 66 20 74 68 65 |after an|y of the|
|00003d80| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 2e 20 49 | instruc|tions. I|
|00003d90| 6e 20 66 61 63 74 2c 20 | 74 68 65 0a 22 5c 3c 49 |n fact, |the."\<I|
|00003da0| 6e 73 74 72 75 63 74 69 | 6f 6e 3e 5c 24 5c 3c 56 |nstructi|on>\$\<V|
|00003db0| 61 72 4e 61 6d 65 3e 22 | 20 63 6f 6e 73 74 72 75 |arName>"| constru|
|00003dc0| 63 74 69 6f 6e 20 63 61 | 6e 20 62 65 20 75 73 65 |ction ca|n be use|
|00003dd0| 64 0a 61 6e 79 77 68 65 | 72 65 20 69 6e 20 74 68 |d.anywhe|re in th|
|00003de0| 65 20 70 72 6f 67 72 61 | 6d 2c 20 6e 6f 74 20 6a |e progra|m, not j|
|00003df0| 75 73 74 20 69 6e 20 6d | 61 63 72 6f 73 2e 0a 0a |ust in m|acros...|
|00003e00| 49 66 20 74 68 65 72 65 | 20 61 72 65 20 63 68 61 |If there| are cha|
|00003e10| 72 61 63 74 65 72 73 20 | 61 66 74 65 72 20 74 68 |racters |after th|
|00003e20| 65 20 63 6f 6e 64 69 74 | 69 6f 6e 20 63 6f 64 65 |e condit|ion code|
|00003e30| 20 76 61 72 69 61 62 6c | 65 2c 0a 74 68 65 6e 20 | variabl|e,.then |
|00003e40| 79 6f 75 20 63 61 6e 20 | 74 65 72 6d 69 6e 61 74 |you can |terminat|
|00003e50| 65 20 74 68 65 20 76 61 | 72 69 61 62 6c 65 20 6e |e the va|riable n|
|00003e60| 61 6d 65 20 77 69 74 68 | 20 27 23 27 2c 20 6c 69 |ame with| '#', li|
|00003e70| 6b 65 0a 74 68 69 73 3a | 0a 0a 7b 66 63 6f 64 65 |ke.this:|..{fcode|
|00003e80| 7d 4d 4f 56 5c 24 43 43 | 23 53 20 20 20 52 31 2c |}MOV\$CC|#S R1,|
|00003e90| 23 31 0a 4c 44 4d 5c 24 | 43 43 23 46 44 20 20 52 |#1.LDM\$|CC#FD R|
|00003ea0| 31 2c 5c 7b 52 32 2d 52 | 34 7d 7b 66 7d 00 00 00 |1,\{R2-R|4}{f}...|
|00003eb0| 44 41 54 41 a0 01 00 00 | 4d 61 63 72 6f 20 65 78 |DATA....|Macro ex|
|00003ec0| 61 6d 70 6c 65 0a 23 77 | 72 61 70 20 6f 66 66 0a |ample.#w|rap off.|
|00003ed0| 44 65 66 69 6e 65 20 61 | 20 6d 61 63 72 6f 3a 0a |Define a| macro:.|
|00003ee0| 0a 7b 66 63 6f 64 65 7d | 6d 61 63 72 6f 20 54 45 |.{fcode}|macro TE|
|00003ef0| 53 54 5c 24 63 63 20 52 | 65 67 3a 72 2c 46 50 52 |ST\$cc R|eg:r,FPR|
|00003f00| 65 67 3a 66 2c 4e 75 6d | 3a 69 2c 46 50 4e 75 6d |eg:f,Num|:i,FPNum|
|00003f10| 3a 78 2c 53 74 72 3a 73 | 2c 54 65 6d 70 52 65 67 |:x,Str:s|,TempReg|
|00003f20| 3a 74 72 2c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |:tr,. | |
|00003f30| 20 20 20 46 50 54 65 6d | 70 52 65 67 3a 74 66 0a | FPTem|pReg:tf.|
|00003f40| 5c 7b 0a 20 20 20 41 44 | 44 20 20 20 20 20 20 52 |\{. AD|D R|
|00003f50| 65 67 2c 54 65 6d 70 52 | 65 67 2c 23 4e 75 6d 0a |eg,TempR|eg,#Num.|
|00003f60| 20 20 20 41 44 46 53 20 | 20 20 20 20 46 50 52 65 | ADFS | FPRe|
|00003f70| 67 2c 46 50 54 65 6d 70 | 52 65 67 2c 23 46 50 4e |g,FPTemp|Reg,#FPN|
|00003f80| 75 6d 0a 20 20 20 44 43 | 42 20 20 20 20 20 20 53 |um. DC|B S|
|00003f90| 74 72 2c 30 0a 20 20 20 | 41 44 44 5c 24 63 63 20 |tr,0. |ADD\$cc |
|00003fa0| 20 20 52 65 67 2c 23 31 | 0a 7d 7b 66 7d 0a 0a 54 | Reg,#1|.}{f}..T|
|00003fb0| 68 69 73 20 63 61 6e 20 | 62 65 20 63 61 6c 6c 65 |his can |be calle|
|00003fc0| 64 20 77 69 74 68 3a 0a | 0a 7b 66 63 6f 64 65 7d |d with:.|.{fcode}|
|00003fd0| 54 45 53 54 20 52 31 2c | 46 31 2c 31 32 33 2c 31 |TEST R1,|F1,123,1|
|00003fe0| 2e 32 33 2c 22 41 20 6c | 69 74 74 6c 65 20 73 74 |.23,"A l|ittle st|
|00003ff0| 72 69 6e 67 22 09 3b 20 | 27 63 63 27 20 69 73 20 |ring".; |'cc' is |
|00004000| 41 4c 20 28 26 45 29 0a | 7b 66 63 6f 64 65 7d 54 |AL (&E).|{fcode}T|
|00004010| 45 53 54 45 51 20 52 65 | 67 2c 46 50 52 65 67 2c |ESTEQ Re|g,FPReg,|
|00004020| 31 30 2b 32 30 2c 73 71 | 72 28 33 29 2c 22 41 42 |10+20,sq|r(3),"AB|
|00004030| 43 22 2b 22 44 45 46 22 | 09 3b 20 27 63 63 27 20 |C"+"DEF"|.; 'cc' |
|00004040| 69 73 20 45 51 20 28 26 | 30 29 7b 66 73 74 64 7d |is EQ (&|0){fstd}|
|00004050| 44 41 54 41 cd 05 00 00 | 4d 61 63 72 6f 20 70 61 |DATA....|Macro pa|
|00004060| 72 61 6d 65 74 65 72 73 | 0a 23 77 72 61 70 20 6f |rameters|.#wrap o|
|00004070| 66 66 0a 54 68 65 72 65 | 20 61 72 65 20 66 69 76 |ff.There| are fiv|
|00004080| 65 20 70 61 73 73 69 6e | 67 2d 70 61 72 61 6d 65 |e passin|g-parame|
|00004090| 74 65 72 20 74 79 70 65 | 73 20 66 6f 72 20 4d 41 |ter type|s for MA|
|000040a0| 43 52 4f 2e 20 54 68 65 | 79 20 61 72 65 3a 0a 0a |CRO. The|y are:..|
|000040b0| 54 79 70 65 09 20 09 09 | 56 61 72 69 61 62 6c 65 |Type. ..|Variable|
|000040c0| 20 74 79 70 65 20 66 6f | 72 20 70 61 72 61 6d 65 | type fo|r parame|
|000040d0| 74 65 72 20 69 6e 20 6d | 61 63 72 6f 0a 2d 2d 2d |ter in m|acro.---|
|000040e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000040f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004120| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 52 09 52 65 67 69 73 |--------|.R.Regis|
|00004130| 74 65 72 09 49 6e 74 65 | 67 65 72 0a 46 09 46 50 |ter.Inte|ger.F.FP|
|00004140| 2d 52 65 67 69 73 74 65 | 72 09 49 6e 74 65 67 65 |-Registe|r.Intege|
|00004150| 72 0a 49 09 49 6e 74 65 | 67 65 72 09 09 49 6e 74 |r.I.Inte|ger..Int|
|00004160| 65 67 65 72 0a 58 09 46 | 50 2d 76 61 6c 75 65 09 |eger.X.F|P-value.|
|00004170| 46 50 0a 53 09 53 74 72 | 69 6e 67 09 09 53 74 72 |FP.S.Str|ing..Str|
|00004180| 69 6e 67 0a 0a 54 68 65 | 20 6c 61 73 74 20 74 77 |ing..The| last tw|
|00004190| 6f 20 75 73 65 2d 6f 6e | 6c 79 20 70 61 72 61 6d |o use-on|ly param|
|000041a0| 65 74 65 72 73 20 61 72 | 65 3a 0a 0a 54 52 09 54 |eters ar|e:..TR.T|
|000041b0| 65 6d 70 20 72 65 67 69 | 73 74 65 72 09 49 6e 74 |emp regi|ster.Int|
|000041c0| 65 67 65 72 0a 54 46 09 | 54 65 6d 70 20 46 50 2d |eger.TF.|Temp FP-|
|000041d0| 72 65 67 69 73 74 65 72 | 09 49 6e 74 65 67 65 72 |register|.Integer|
|000041e0| 0a 0a 54 68 65 20 70 61 | 73 73 69 6e 67 2d 70 61 |..The pa|ssing-pa|
|000041f0| 72 61 6d 65 74 65 72 73 | 20 61 72 65 20 74 68 65 |rameters| are the|
|00004200| 20 61 72 67 75 6d 65 6e | 74 73 20 73 65 6e 74 20 | argumen|ts sent |
|00004210| 66 72 6f 6d 20 74 68 65 | 0a 73 6f 75 72 63 65 20 |from the|.source |
|00004220| 75 70 6f 6e 20 75 73 69 | 6e 67 20 74 68 65 20 6d |upon usi|ng the m|
|00004230| 61 63 72 6f 2c 20 61 6e | 64 20 74 72 61 6e 73 6c |acro, an|d transl|
|00004240| 61 74 65 73 20 74 6f 20 | 74 68 65 20 70 61 72 61 |ates to |the para|
|00004250| 6d 65 74 65 72 0a 76 61 | 72 69 61 62 6c 65 20 69 |meter.va|riable i|
|00004260| 6e 73 69 64 65 20 74 68 | 65 20 6d 61 63 72 6f 2e |nside th|e macro.|
|00004270| 20 54 68 65 20 70 61 72 | 61 6d 65 74 65 72 2d 76 | The par|ameter-v|
|00004280| 61 72 69 61 62 6c 65 73 | 20 61 72 65 20 6c 6f 63 |ariables| are loc|
|00004290| 61 6c 0a 69 6e 20 74 68 | 65 20 6d 61 63 72 6f 2e |al.in th|e macro.|
|000042a0| 0a 0a 54 68 65 20 6d 61 | 63 72 6f 20 74 65 6d 70 |..The ma|cro temp|
|000042b0| 2d 72 65 67 73 20 61 72 | 65 20 61 64 64 69 74 69 |-regs ar|e additi|
|000042c0| 6f 6e 61 6c 20 72 65 67 | 69 73 74 65 72 73 20 74 |onal reg|isters t|
|000042d0| 68 61 74 20 74 68 65 20 | 6d 61 63 72 6f 0a 6e 65 |hat the |macro.ne|
|000042e0| 65 64 73 20 74 6f 20 64 | 6f 20 74 68 65 20 6a 6f |eds to d|o the jo|
|000042f0| 62 2e 20 54 68 65 20 74 | 65 6d 70 2d 72 65 67 69 |b. The t|emp-regi|
|00004300| 73 74 65 72 73 20 77 69 | 6c 6c 20 62 65 20 61 6c |sters wi|ll be al|
|00004310| 6c 6f 63 61 74 65 64 20 | 62 79 0a 74 68 65 20 61 |located |by.the a|
|00004320| 73 73 65 6d 62 6c 65 72 | 20 61 75 74 6f 6d 61 74 |ssembler| automat|
|00004330| 69 63 61 6c 6c 79 2e 0a | 0a 4e 6f 74 65 3a 20 49 |ically..|.Note: I|
|00004340| 66 20 74 65 6d 70 2d 72 | 65 67 69 73 74 65 72 73 |f temp-r|egisters|
|00004350| 20 61 72 65 20 75 73 65 | 64 20 61 6e 64 20 73 74 | are use|d and st|
|00004360| 61 63 6b 65 64 2c 20 74 | 68 65 6e 20 6f 6e 6c 79 |acked, t|hen only|
|00004370| 20 74 68 65 0a 72 65 67 | 69 73 74 65 72 73 20 69 | the.reg|isters i|
|00004380| 6e 20 74 68 65 20 68 65 | 61 64 65 72 20 61 72 65 |n the he|ader are|
|00004390| 20 61 6c 6c 6f 77 65 64 | 20 74 6f 20 62 65 20 75 | allowed| to be u|
|000043a0| 73 65 64 20 69 6e 20 74 | 68 65 20 6d 61 63 72 6f |sed in t|he macro|
|000043b0| 2e 0a 54 68 69 73 20 69 | 73 20 62 65 63 61 75 73 |..This i|s becaus|
|000043c0| 65 20 74 68 65 20 72 65 | 67 69 73 74 65 72 20 6d |e the re|gister m|
|000043d0| 61 79 20 6f 74 68 65 72 | 77 69 73 65 20 68 61 76 |ay other|wise hav|
|000043e0| 65 20 62 65 65 6e 0a 61 | 6c 6c 6f 63 61 74 65 64 |e been.a|llocated|
|000043f0| 20 61 73 20 61 20 74 65 | 6d 70 2d 72 65 67 69 73 | as a te|mp-regis|
|00004400| 74 65 72 20 61 74 20 74 | 68 65 20 73 74 61 72 74 |ter at t|he start|
|00004410| 20 6f 66 20 74 68 65 20 | 6d 61 63 72 6f 2e 2e 2e | of the |macro...|
|00004420| 0a 54 68 65 20 61 73 73 | 65 6d 62 6c 65 72 20 77 |.The ass|embler w|
|00004430| 69 6c 6c 20 67 69 76 65 | 20 61 6e 20 65 72 72 6f |ill give| an erro|
|00004440| 72 20 69 66 20 74 68 69 | 73 20 69 73 20 6e 6f 74 |r if thi|s is not|
|00004450| 20 66 6f 6c 6c 6f 77 65 | 64 2e 0a 0a 57 68 65 6e | followe|d...When|
|00004460| 20 61 6c 6c 6f 63 61 74 | 69 6e 67 20 46 50 20 74 | allocat|ing FP t|
|00004470| 65 6d 70 2d 72 65 67 69 | 73 74 65 72 73 20 74 68 |emp-regi|sters th|
|00004480| 61 74 20 68 61 73 20 74 | 6f 20 62 65 20 73 74 61 |at has t|o be sta|
|00004490| 63 6b 65 64 2c 0a 74 68 | 65 20 61 73 73 65 6d 62 |cked,.th|e assemb|
|000044a0| 6c 65 72 20 61 6c 6c 6f | 63 61 74 65 73 20 73 75 |ler allo|cates su|
|000044b0| 62 73 65 71 75 65 6e 74 | 20 72 65 67 69 73 74 65 |bsequent| registe|
|000044c0| 72 73 2c 20 73 74 61 72 | 74 69 6e 67 20 66 72 6f |rs, star|ting fro|
|000044d0| 6d 0a 74 68 65 20 66 69 | 72 73 74 20 66 72 65 65 |m.the fi|rst free|
|000044e0| 20 72 65 67 69 73 74 65 | 72 2e 20 54 68 69 73 20 | registe|r. This |
|000044f0| 69 73 20 73 6f 20 74 68 | 61 74 20 53 46 4d 2f 4c |is so th|at SFM/L|
|00004500| 46 4d 20 63 61 6e 20 62 | 65 20 75 73 65 64 0a 66 |FM can b|e used.f|
|00004510| 6f 72 20 74 68 65 20 73 | 74 61 63 6b 69 6e 67 2e |or the s|tacking.|
|00004520| 0a 0a 42 65 63 61 75 73 | 65 20 6f 66 20 74 68 69 |..Becaus|e of thi|
|00004530| 73 2c 20 77 68 65 6e 20 | 75 73 69 6e 67 20 46 50 |s, when |using FP|
|00004540| 20 74 65 6d 70 2d 72 65 | 67 69 73 74 65 72 73 20 | temp-re|gisters |
|00004550| 69 6e 20 61 20 6d 61 63 | 72 6f 2c 0a 74 68 65 20 |in a mac|ro,.the |
|00004560| 6d 61 63 72 6f 20 68 61 | 73 20 74 6f 20 62 65 20 |macro ha|s to be |
|00004570| 63 61 6c 6c 65 64 20 69 | 6e 20 73 75 63 68 20 61 |called i|n such a|
|00004580| 20 77 61 79 20 74 68 61 | 74 20 74 68 65 72 65 20 | way tha|t there |
|00004590| 69 73 20 65 6e 6f 75 67 | 68 0a 66 72 65 65 20 72 |is enoug|h.free r|
|000045a0| 65 67 69 73 74 65 72 73 | 20 66 72 6f 6d 20 74 68 |egisters| from th|
|000045b0| 65 20 66 69 72 73 74 20 | 66 72 65 65 20 72 65 67 |e first |free reg|
|000045c0| 69 73 74 65 72 20 61 6e | 64 20 6f 6e 77 61 72 64 |ister an|d onward|
|000045d0| 73 2c 20 74 6f 0a 61 63 | 63 6f 6d 6f 64 61 74 65 |s, to.ac|comodate|
|000045e0| 20 66 6f 72 20 74 68 65 | 20 46 50 20 74 65 6d 70 | for the| FP temp|
|000045f0| 2d 72 65 67 69 73 74 65 | 72 73 2c 20 6f 74 68 65 |-registe|rs, othe|
|00004600| 72 77 69 73 65 20 74 68 | 65 72 65 20 77 69 6c 6c |rwise th|ere will|
|00004610| 0a 62 65 20 61 6e 20 65 | 72 72 6f 72 2e 00 00 00 |.be an e|rror....|
|00004620| 44 41 54 41 63 00 00 00 | 4f 55 54 50 55 54 0a 23 |DATAc...|OUTPUT.#|
|00004630| 77 72 61 70 20 6f 66 66 | 0a 4f 55 54 50 55 54 20 |wrap off|.OUTPUT |
|00004640| 5c 3c 65 78 70 72 65 73 | 73 69 6f 6e 3e 0a 0a 54 |\<expres|sion>..T|
|00004650| 68 69 73 20 70 72 69 6e | 74 73 20 65 78 70 72 65 |his prin|ts expre|
|00004660| 73 73 69 6f 6e 20 72 65 | 73 75 6c 74 20 69 6e 20 |ssion re|sult in |
|00004670| 53 74 61 74 75 73 2d 69 | 6e 66 6f 20 77 69 6e 64 |Status-i|nfo wind|
|00004680| 6f 77 2e 00 44 41 54 41 | 37 05 00 00 52 45 4c 41 |ow..DATA|7...RELA|
|00004690| 54 49 56 45 0a 23 77 72 | 61 70 20 6f 66 66 0a 52 |TIVE.#wr|ap off.R|
|000046a0| 65 6c 61 74 69 76 65 20 | 73 74 61 74 65 6d 65 6e |elative |statemen|
|000046b0| 74 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |t.------|--------|
|000046c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 59 6f 75 20 63 61 |--------|-.You ca|
|000046d0| 6e 20 64 65 73 69 67 6e | 61 74 65 20 61 6e 20 61 |n design|ate an a|
|000046e0| 72 65 61 20 77 69 74 68 | 20 6c 61 62 65 6c 73 20 |rea with| labels |
|000046f0| 61 73 20 72 65 6c 61 74 | 69 76 65 20 74 6f 20 61 |as relat|ive to a|
|00004700| 0a 72 65 67 69 73 74 65 | 72 20 6f 74 68 65 72 20 |.registe|r other |
|00004710| 74 68 61 6e 20 74 68 65 | 20 75 73 75 61 6c 20 52 |than the| usual R|
|00004720| 31 35 2c 20 66 6f 72 20 | 4c 6f 61 64 2f 53 74 6f |15, for |Load/Sto|
|00004730| 72 65 20 61 6e 64 20 41 | 44 52 2e 0a 0a 54 68 69 |re and A|DR...Thi|
|00004740| 73 20 77 61 79 20 79 6f | 75 20 63 61 6e 20 68 61 |s way yo|u can ha|
|00004750| 76 65 20 6f 6e 65 20 72 | 65 67 69 73 74 65 72 20 |ve one r|egister |
|00004760| 70 6f 69 6e 74 69 6e 67 | 20 74 6f 20 61 20 64 61 |pointing| to a da|
|00004770| 74 61 20 61 72 65 61 2c | 0a 61 6e 64 20 74 68 65 |ta area,|.and the|
|00004780| 6e 20 79 6f 75 20 63 61 | 6e 20 73 61 76 65 20 61 |n you ca|n save a|
|00004790| 20 6c 6f 74 20 6f 66 20 | 61 75 74 6f 2d 65 78 70 | lot of |auto-exp|
|000047a0| 61 6e 73 69 6f 6e 2e 20 | 54 68 65 20 72 65 67 69 |ansion. |The regi|
|000047b0| 73 74 65 72 0a 77 69 6c | 6c 20 74 68 65 6e 20 62 |ster.wil|l then b|
|000047c0| 65 20 63 6c 6f 73 65 72 | 20 74 6f 20 74 68 65 20 |e closer| to the |
|000047d0| 61 72 65 61 20 74 68 61 | 6e 20 52 31 35 2c 20 77 |area tha|n R15, w|
|000047e0| 68 65 6e 20 75 73 65 64 | 20 69 6e 20 74 68 65 0a |hen used| in the.|
|000047f0| 4c 6f 61 64 2f 53 74 6f | 72 65 20 6f 72 20 41 44 |Load/Sto|re or AD|
|00004800| 52 2e 0a 0a 54 68 65 20 | 73 74 61 74 65 6d 65 6e |R...The |statemen|
|00004810| 74 20 69 73 20 6c 69 6b | 65 20 27 73 74 72 75 63 |t is lik|e 'struc|
|00004820| 74 27 2c 20 62 65 63 61 | 75 73 65 20 74 68 65 20 |t', beca|use the |
|00004830| 6c 61 62 65 6c 73 20 69 | 6e 73 69 64 65 0a 74 68 |labels i|nside.th|
|00004840| 65 20 73 74 61 74 65 6d | 65 6e 74 20 73 74 61 72 |e statem|ent star|
|00004850| 74 20 61 74 20 7a 65 72 | 6f 20 28 6f 72 20 5c 3c |t at zer|o (or \<|
|00004860| 4f 66 66 73 65 74 3e 29 | 2e 20 4f 6e 65 20 64 69 |Offset>)|. One di|
|00004870| 66 66 65 72 65 6e 63 65 | 20 69 73 0a 74 68 61 74 |fference| is.that|
|00004880| 20 77 68 65 72 65 61 73 | 20 27 73 74 72 75 63 74 | whereas| 'struct|
|00004890| 27 20 6f 6e 6c 79 20 6d | 61 6b 65 73 20 61 20 27 |' only m|akes a '|
|000048a0| 74 65 6d 70 6c 61 74 65 | 27 20 6f 66 20 74 68 65 |template|' of the|
|000048b0| 20 64 61 74 61 2c 0a 61 | 73 73 69 67 6e 69 6e 67 | data,.a|ssigning|
|000048c0| 20 6f 6e 6c 79 20 74 68 | 65 20 6c 61 62 65 6c 73 | only th|e labels|
|000048d0| 2c 20 6e 6f 74 20 73 74 | 6f 72 69 6e 67 20 74 68 |, not st|oring th|
|000048e0| 65 20 64 61 74 61 2c 20 | 27 72 65 6c 61 74 69 76 |e data, |'relativ|
|000048f0| 65 27 0a 65 78 65 63 75 | 74 65 73 20 74 68 65 20 |e'.execu|tes the |
|00004900| 73 6f 75 72 63 65 20 69 | 6e 73 69 64 65 20 74 68 |source i|nside th|
|00004910| 65 20 73 74 61 74 65 6d | 65 6e 74 20 61 73 20 6e |e statem|ent as n|
|00004920| 6f 72 6d 61 6c 2e 20 54 | 68 65 20 64 61 74 61 0a |ormal. T|he data.|
|00004930| 61 6e 64 20 63 6f 64 65 | 20 74 68 65 72 65 20 69 |and code| there i|
|00004940| 73 20 72 65 74 61 69 6e | 65 64 2e 0a 0a 49 66 20 |s retain|ed...If |
|00004950| 74 68 65 20 27 76 69 72 | 74 75 61 6c 27 20 70 61 |the 'vir|tual' pa|
|00004960| 72 61 6d 65 74 65 72 20 | 69 73 20 75 73 65 64 2c |rameter |is used,|
|00004970| 20 74 68 65 6e 20 6f 6e | 6c 79 20 74 68 65 20 6c | then on|ly the l|
|00004980| 61 62 65 6c 73 20 61 72 | 65 0a 73 74 6f 72 65 64 |abels ar|e.stored|
|00004990| 2c 20 61 6e 64 20 6e 6f | 74 20 74 68 65 20 64 61 |, and no|t the da|
|000049a0| 74 61 2c 20 61 73 20 77 | 69 74 68 20 27 73 74 72 |ta, as w|ith 'str|
|000049b0| 75 63 74 27 2e 20 54 68 | 69 73 20 63 61 6e 20 62 |uct'. Th|is can b|
|000049c0| 65 0a 68 61 6e 64 79 20 | 62 65 63 61 75 73 65 20 |e.handy |because |
|000049d0| 74 68 65 20 6f 62 6a 65 | 63 74 20 66 69 6c 65 20 |the obje|ct file |
|000049e0| 6e 65 65 64 20 62 65 20 | 6e 6f 20 62 69 67 67 65 |need be |no bigge|
|000049f0| 72 20 74 68 61 6e 0a 6e | 65 63 65 73 73 61 72 79 |r than.n|ecessary|
|00004a00| 2c 20 6f 72 20 62 65 20 | 66 69 6c 6c 65 64 20 77 |, or be |filled w|
|00004a10| 69 74 68 20 75 6e 6e 65 | 63 65 73 73 61 72 79 20 |ith unne|cessary |
|00004a20| 64 61 74 61 2c 20 69 66 | 20 74 68 65 20 64 61 74 |data, if| the dat|
|00004a30| 61 0a 61 72 65 20 69 6e | 69 74 69 61 6c 69 73 65 |a.are in|itialise|
|00004a40| 64 20 61 74 20 72 75 6e | 2d 74 69 6d 65 2e 0a 0a |d at run|-time...|
|00004a50| 54 68 65 20 76 61 72 69 | 61 62 6c 65 73 20 61 6e |The vari|ables an|
|00004a60| 64 20 6c 61 62 65 6c 73 | 20 74 68 61 74 20 61 72 |d labels| that ar|
|00004a70| 65 20 61 73 73 69 67 6e | 65 64 20 69 6e 73 69 64 |e assign|ed insid|
|00004a80| 65 20 74 68 65 0a 73 74 | 61 74 65 6d 65 6e 74 20 |e the.st|atement |
|00004a90| 61 72 65 20 6d 61 72 6b | 65 64 20 73 70 65 63 69 |are mark|ed speci|
|00004aa0| 61 6c 6c 79 2c 20 73 6f | 20 74 68 61 74 20 74 68 |ally, so| that th|
|00004ab0| 65 79 20 77 69 6c 6c 20 | 62 65 20 63 6f 64 65 64 |ey will |be coded|
|00004ac0| 0a 61 73 20 72 65 6c 61 | 74 69 76 65 20 74 6f 20 |.as rela|tive to |
|00004ad0| 5c 3c 52 65 67 69 73 74 | 65 72 3e 20 77 68 65 6e |\<Regist|er> when|
|00004ae0| 20 75 73 65 64 20 77 69 | 74 68 20 41 44 52 20 6f | used wi|th ADR o|
|00004af0| 72 20 4c 6f 61 64 2f 53 | 74 6f 72 65 2e 0a 59 6f |r Load/S|tore..Yo|
|00004b00| 75 20 77 69 6c 6c 20 67 | 65 74 20 74 68 65 20 75 |u will g|et the u|
|00004b10| 73 75 61 6c 20 76 61 6c | 75 65 20 77 68 65 6e 20 |sual val|ue when |
|00004b20| 74 68 65 79 20 61 72 65 | 20 75 73 65 64 20 69 6e |they are| used in|
|00004b30| 20 6f 74 68 65 72 0a 70 | 6c 61 63 65 73 2e 0a 0a | other.p|laces...|
|00004b40| 53 79 6e 74 61 78 3a 0a | 2d 2d 2d 2d 2d 2d 2d 0a |Syntax:.|-------.|
|00004b50| 52 45 4c 41 54 49 56 45 | 20 5c 3c 52 65 67 69 73 |RELATIVE| \<Regis|
|00004b60| 74 65 72 3e 20 5b 2c 5c | 3c 4f 66 66 73 65 74 3e |ter> [,\|<Offset>|
|00004b70| 5d 20 5b 2c 76 69 72 74 | 75 61 6c 5d 0a 5c 7b 0a |] [,virt|ual].\{.|
|00004b80| 5c 3c 44 61 74 61 3e 0a | 7d 0a 0a 43 6c 69 63 6b |\<Data>.|}..Click|
|00004b90| 20 3c 68 65 72 65 3d 3e | 45 78 74 72 61 49 6e 73 | <here=>|ExtraIns|
|00004ba0| 74 72 52 65 6c 61 74 69 | 76 65 45 78 3e 20 66 6f |trRelati|veEx> fo|
|00004bb0| 72 20 65 78 61 6d 70 6c | 65 73 2e 00 44 41 54 41 |r exampl|es..DATA|
|00004bc0| 59 03 00 00 52 65 6c 61 | 74 69 76 65 20 65 78 61 |Y...Rela|tive exa|
|00004bd0| 6d 70 6c 65 73 0a 23 77 | 72 61 70 20 6f 66 66 0a |mples.#w|rap off.|
|00004be0| 48 65 72 65 20 61 72 65 | 20 73 6f 6d 65 20 72 65 |Here are| some re|
|00004bf0| 6c 61 74 69 76 65 20 65 | 78 61 6d 70 6c 65 73 3a |lative e|xamples:|
|00004c00| 0a 0a 7b 66 63 6f 64 65 | 7d 72 65 6c 61 74 69 76 |..{fcode|}relativ|
|00004c10| 65 20 52 31 32 0a 5c 7b | 0a 2e 4c 61 62 65 6c 20 |e R12.\{|..Label |
|00004c20| 20 20 44 43 44 20 20 20 | 30 09 3b 20 4c 61 62 65 | DCD |0.; Labe|
|00004c30| 6c 20 20 3d 20 30 0a 7b | 66 63 6f 64 65 7d 2e 4c |l = 0.{|fcode}.L|
|00004c40| 61 62 65 6c 32 20 20 44 | 43 44 20 20 20 30 09 3b |abel2 D|CD 0.;|
|00004c50| 20 4c 61 62 65 6c 32 20 | 3d 20 34 0a 7b 66 63 6f | Label2 |= 4.{fco|
|00004c60| 64 65 7d 7d 0a 0a 41 44 | 52 20 20 20 20 20 20 52 |de}}..AD|R R|
|00004c70| 31 2c 4c 61 62 65 6c 09 | 3b 20 43 6f 64 65 64 20 |1,Label.|; Coded |
|00004c80| 61 73 20 7b 66 63 6f 64 | 65 7d 41 44 44 20 20 20 |as {fcod|e}ADD |
|00004c90| 52 31 2c 52 31 32 2c 23 | 4c 61 62 65 6c 0a 7b 66 |R1,R12,#|Label.{f|
|00004ca0| 63 6f 64 65 7d 4c 44 52 | 20 20 20 20 20 20 52 32 |code}LDR| R2|
|00004cb0| 2c 4c 61 62 65 6c 32 09 | 3b 20 43 6f 64 65 64 20 |,Label2.|; Coded |
|00004cc0| 61 73 20 7b 66 63 6f 64 | 65 7d 4c 44 52 20 20 20 |as {fcod|e}LDR |
|00004cd0| 52 32 2c 5b 52 31 32 2c | 23 4c 61 62 65 6c 32 5d |R2,[R12,|#Label2]|
|00004ce0| 0a 7b 66 63 6f 64 65 7d | 4c 44 46 53 20 20 20 20 |.{fcode}|LDFS |
|00004cf0| 20 46 33 2c 4c 61 62 65 | 6c 09 3b 20 43 6f 64 65 | F3,Labe|l.; Code|
|00004d00| 64 20 61 73 20 7b 66 63 | 6f 64 65 7d 4c 44 46 53 |d as {fc|ode}LDFS|
|00004d10| 20 20 46 33 2c 5b 52 31 | 32 2c 23 4c 61 62 65 6c | F3,[R1|2,#Label|
|00004d20| 5d 0a 0a 0a 49 66 20 79 | 6f 75 20 75 73 65 20 74 |]...If y|ou use t|
|00004d30| 68 65 20 6f 66 66 73 65 | 74 20 79 6f 75 20 63 61 |he offse|t you ca|
|00004d40| 6e 20 68 61 76 65 20 74 | 77 69 63 65 20 74 68 65 |n have t|wice the|
|00004d50| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 64 61 74 61 20 | amount |of data |
|00004d60| 77 69 74 68 6f 75 74 20 | 61 75 74 6f 2d 65 78 70 |without |auto-exp|
|00004d70| 61 6e 73 69 6f 6e 2c 0a | 61 73 20 79 6f 75 20 63 |ansion,.|as you c|
|00004d80| 61 6e 20 74 68 65 6e 20 | 75 73 65 20 74 68 65 20 |an then |use the |
|00004d90| 73 69 67 6e 2d 63 61 70 | 61 62 69 6c 69 74 79 20 |sign-cap|ability |
|00004da0| 6f 66 20 41 44 52 20 61 | 6e 64 20 4c 6f 61 64 2f |of ADR a|nd Load/|
|00004db0| 53 74 6f 72 65 2e 20 41 | 44 52 20 63 61 6e 20 61 |Store. A|DR can a|
|00004dc0| 63 63 65 73 73 20 2b 2f | 2d 20 31 4b 0a 28 77 6f |ccess +/|- 1K.(wo|
|00004dd0| 72 64 2d 61 6c 69 67 6e | 65 64 2c 20 6f 72 20 65 |rd-align|ed, or e|
|00004de0| 6c 73 65 20 69 74 20 69 | 73 20 2b 2f 2d 20 32 35 |lse it i|s +/- 25|
|00004df0| 35 20 62 79 74 65 73 29 | 2c 20 61 6e 64 20 4c 44 |5 bytes)|, and LD|
|00004e00| 52 2f 53 54 52 20 63 61 | 6e 20 61 63 63 65 73 73 |R/STR ca|n access|
|00004e10| 20 2b 2f 2d 20 34 4b 2e | 0a 0a 7b 66 63 6f 64 65 | +/- 4K.|..{fcode|
|00004e20| 7d 72 65 6c 61 74 69 76 | 65 20 52 31 30 2c 2d 31 |}relativ|e R10,-1|
|00004e30| 36 2c 76 69 72 74 75 61 | 6c 09 3b 20 27 56 69 72 |6,virtua|l.; 'Vir|
|00004e40| 74 75 61 6c 27 20 70 61 | 72 61 6d 65 74 65 72 2c |tual' pa|rameter,|
|00004e50| 20 73 6f 20 6f 6e 6c 79 | 20 74 68 65 20 6c 61 62 | so only| the lab|
|00004e60| 65 6c 73 20 61 72 65 0a | 7b 66 63 6f 64 65 7d 5c |els are.|{fcode}\|
|00004e70| 7b 09 09 09 3b 20 61 73 | 73 69 67 6e 65 64 2c 20 |{...; as|signed, |
|00004e80| 6e 6f 20 64 61 74 61 20 | 69 73 20 73 74 6f 72 65 |no data |is store|
|00004e90| 64 0a 7b 66 63 6f 64 65 | 7d 2e 4c 61 62 65 6c 20 |d.{fcode|}.Label |
|00004ea0| 20 20 44 42 44 20 20 20 | 34 09 09 3b 20 4c 61 62 | DBD |4..; Lab|
|00004eb0| 65 6c 20 20 3d 20 2d 31 | 36 0a 7b 66 63 6f 64 65 |el = -1|6.{fcode|
|00004ec0| 7d 2e 4c 61 62 65 6c 32 | 20 20 44 42 44 20 20 20 |}.Label2| DBD |
|00004ed0| 34 09 09 3b 20 4c 61 62 | 65 6c 32 20 3d 20 30 0a |4..; Lab|el2 = 0.|
|00004ee0| 7b 66 63 6f 64 65 7d 2e | 4c 61 62 65 6c 33 20 20 |{fcode}.|Label3 |
|00004ef0| 44 42 44 20 20 20 34 09 | 09 3b 20 4c 61 62 65 6c |DBD 4.|.; Label|
|00004f00| 33 20 3d 20 31 36 0a 7b | 66 63 6f 64 65 7d 7d 7b |3 = 16.{|fcode}}{|
|00004f10| 66 73 74 64 7d 00 00 00 | 44 41 54 41 3b 02 00 00 |fstd}...|DATA;...|
|00004f20| 53 54 52 55 43 54 0a 23 | 77 72 61 70 20 6f 66 66 |STRUCT.#|wrap off|
|00004f30| 0a 53 74 72 75 63 74 75 | 72 65 73 0a 2d 2d 2d 2d |.Structu|res.----|
|00004f40| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 53 74 72 75 63 74 75 |--------|.Structu|
|00004f50| 72 65 73 20 6c 65 74 20 | 79 6f 75 20 63 6f 6d 62 |res let |you comb|
|00004f60| 69 6e 65 20 73 65 76 65 | 72 61 6c 20 64 61 74 61 |ine seve|ral data|
|00004f70| 2d 74 79 70 65 73 20 74 | 6f 20 6d 61 6b 65 20 61 |-types t|o make a|
|00004f80| 0a 63 6f 6d 70 6c 65 78 | 20 64 61 74 61 2d 74 79 |.complex| data-ty|
|00004f90| 70 65 2e 20 4d 6f 73 74 | 20 68 69 67 68 2d 6c 65 |pe. Most| high-le|
|00004fa0| 76 65 6c 20 6c 61 6e 67 | 75 61 67 65 73 20 73 75 |vel lang|uages su|
|00004fb0| 70 70 6f 72 74 20 73 75 | 63 68 0a 6d 65 63 68 61 |pport su|ch.mecha|
|00004fc0| 6e 69 73 6d 73 2c 20 61 | 6e 64 20 6e 6f 77 20 79 |nisms, a|nd now y|
|00004fd0| 6f 75 20 63 61 6e 20 62 | 65 6e 65 66 69 74 20 66 |ou can b|enefit f|
|00004fe0| 72 6f 6d 20 74 68 69 73 | 20 75 73 65 66 75 6c 0a |rom this| useful.|
|00004ff0| 74 65 63 68 6e 69 71 75 | 65 20 69 6e 20 61 73 73 |techniqu|e in ass|
|00005000| 65 6d 62 6c 79 20 6c 65 | 76 65 6c 20 70 72 6f 67 |embly le|vel prog|
|00005010| 72 61 6d 6d 69 6e 67 20 | 61 73 20 77 65 6c 6c 2e |ramming |as well.|
|00005020| 0a 0a 54 68 65 20 6c 61 | 62 65 6c 73 20 69 6e 73 |..The la|bels ins|
|00005030| 69 64 65 20 74 68 65 20 | 73 74 72 75 63 74 75 72 |ide the |structur|
|00005040| 65 20 77 69 6c 6c 20 73 | 74 61 72 74 20 61 74 20 |e will s|tart at |
|00005050| 7a 65 72 6f 20 28 6f 72 | 20 5c 3c 4f 66 66 73 65 |zero (or| \<Offse|
|00005060| 74 3e 29 2e 0a 49 66 20 | 79 6f 75 20 75 73 65 20 |t>)..If |you use |
|00005070| 5c 3c 53 74 65 70 3e 2c | 20 74 68 65 6e 20 74 68 |\<Step>,| then th|
|00005080| 65 20 61 64 64 72 65 73 | 73 20 77 69 6c 6c 20 69 |e addres|s will i|
|00005090| 6e 63 72 65 61 73 65 20 | 62 79 20 5c 3c 53 74 65 |ncrease |by \<Ste|
|000050a0| 70 3e 0a 66 6f 72 20 65 | 61 63 68 20 6c 69 6e 65 |p>.for e|ach line|
|000050b0| 2e 20 59 6f 75 20 63 61 | 6e 20 61 6c 73 6f 20 68 |. You ca|n also h|
|000050c0| 61 76 65 20 6e 61 6d 65 | 6c 65 73 73 20 73 74 72 |ave name|less str|
|000050d0| 75 63 74 75 72 65 73 2e | 0a 0a 53 79 6e 74 61 78 |uctures.|..Syntax|
|000050e0| 3a 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 53 54 52 55 |:.------|---.STRU|
|000050f0| 43 54 20 5b 5c 3c 4e 61 | 6d 65 3e 5d 20 5b 2c 5c |CT [\<Na|me>] [,\|
|00005100| 23 5c 3c 4f 66 66 73 65 | 74 3e 5d 20 5b 2c 5c 3c |#\<Offse|t>] [,\<|
|00005110| 53 74 65 70 3e 5d 0a 5c | 7b 0a 5c 3c 44 61 74 61 |Step>].\|{.\<Data|
|00005120| 3e 0a 7d 0a 0a 43 6c 69 | 63 6b 20 3c 68 65 72 65 |>.}..Cli|ck <here|
|00005130| 3d 3e 45 78 74 72 61 49 | 6e 73 74 72 53 74 72 75 |=>ExtraI|nstrStru|
|00005140| 63 74 45 78 3e 20 66 6f | 72 20 65 78 61 6d 70 6c |ctEx> fo|r exampl|
|00005150| 65 73 2e 00 44 41 54 41 | d5 03 00 00 53 74 72 75 |es..DATA|....Stru|
|00005160| 63 74 20 65 78 61 6d 70 | 6c 65 73 0a 23 77 72 61 |ct examp|les.#wra|
|00005170| 70 20 6f 66 66 0a 48 65 | 72 65 20 61 72 65 20 73 |p off.He|re are s|
|00005180| 6f 6d 65 20 73 74 72 75 | 63 74 20 65 78 61 6d 70 |ome stru|ct examp|
|00005190| 6c 65 73 3a 0a 0a 48 65 | 72 65 27 73 20 68 6f 77 |les:..He|re's how|
|000051a0| 20 74 6f 20 6d 61 6b 65 | 20 61 20 73 69 6d 70 6c | to make| a simpl|
|000051b0| 65 20 73 74 72 75 63 74 | 75 72 65 3a 0a 0a 7b 66 |e struct|ure:..{f|
|000051c0| 63 6f 64 65 7d 73 74 72 | 75 63 74 20 4d 6f 75 73 |code}str|uct Mous|
|000051d0| 65 0a 5c 7b 0a 20 20 20 | 2e 58 5f 50 6f 73 20 20 |e.\{. |.X_Pos |
|000051e0| 20 20 20 20 20 44 43 44 | 20 20 20 30 0a 20 20 20 | DCD| 0. |
|000051f0| 2e 59 5f 50 6f 73 20 20 | 20 20 20 20 20 44 43 44 |.Y_Pos | DCD|
|00005200| 20 20 20 30 0a 20 20 20 | 2e 42 75 74 74 6f 6e 73 | 0. |.Buttons|
|00005210| 20 20 20 20 20 44 43 44 | 20 20 20 30 0a 20 20 20 | DCD| 0. |
|00005220| 2e 53 69 7a 65 20 20 20 | 20 20 20 20 7b 66 7d 3b |.Size | {f};|
|00005230| 20 2e 53 69 7a 65 20 3d | 20 73 69 7a 65 20 6f 66 | .Size =| size of|
|00005240| 20 73 74 72 75 63 74 21 | 20 28 65 6e 64 2e 2e 2e | struct!| (end...|
|00005250| 29 0a 7b 66 63 6f 64 65 | 7d 7d 7b 66 7d 0a 0a 54 |).{fcode|}}{f}..T|
|00005260| 6f 20 61 6c 6c 6f 63 61 | 74 65 20 73 6f 6d 65 20 |o alloca|te some |
|00005270| 73 74 61 74 69 63 20 73 | 70 61 63 65 20 66 6f 72 |static s|pace for|
|00005280| 20 61 6e 20 69 6e 73 74 | 61 6e 63 65 20 6f 66 20 | an inst|ance of |
|00005290| 74 68 69 73 20 64 61 74 | 61 2d 74 79 70 65 0a 64 |this dat|a-type.d|
|000052a0| 6f 20 74 68 69 73 3a 0a | 0a 7b 66 63 6f 64 65 7d |o this:.|.{fcode}|
|000052b0| 2e 4d 6f 75 73 65 42 6c | 6f 63 6b 0a 20 20 20 44 |.MouseBl|ock. D|
|000052c0| 42 42 20 20 20 4d 6f 75 | 73 65 2e 53 69 7a 65 2c |BB Mou|se.Size,|
|000052d0| 30 09 3b 20 44 65 63 6c | 61 72 65 20 62 6c 6f 63 |0.; Decl|are bloc|
|000052e0| 6b 20 6f 66 20 72 69 67 | 68 74 20 73 69 7a 65 0a |k of rig|ht size.|
|000052f0| 7b 66 63 6f 64 65 7d 20 | 20 20 41 4c 49 47 4e 09 |{fcode} | ALIGN.|
|00005300| 09 3b 20 4a 75 73 74 20 | 69 6e 20 63 61 73 65 20 |.; Just |in case |
|00005310| 69 74 20 77 61 73 6e 27 | 74 20 61 6c 69 67 6e 65 |it wasn'|t aligne|
|00005320| 64 2e 2e 2e 0a 0a 45 61 | 73 79 21 20 4e 6f 77 2c |d.....Ea|sy! Now,|
|00005330| 20 74 6f 20 61 64 64 72 | 65 73 73 20 64 69 72 65 | to addr|ess dire|
|00005340| 63 74 6c 79 20 69 6e 74 | 6f 20 74 68 69 73 20 61 |ctly int|o this a|
|00005350| 72 65 61 2c 20 68 65 72 | 65 27 73 20 68 6f 77 3a |rea, her|e's how:|
|00005360| 0a 0a 7b 66 63 6f 64 65 | 7d 20 20 20 53 57 49 20 |..{fcode|} SWI |
|00005370| 20 20 20 20 20 4f 53 5f | 4d 6f 75 73 65 0a 20 20 | OS_|Mouse. |
|00005380| 20 53 54 52 20 20 20 20 | 20 20 52 30 2c 4d 6f 75 | STR | R0,Mou|
|00005390| 73 65 42 6c 6f 63 6b 20 | 2b 20 4d 6f 75 73 65 2e |seBlock |+ Mouse.|
|000053a0| 58 5f 50 6f 73 0a 20 20 | 20 53 54 52 20 20 20 20 |X_Pos. | STR |
|000053b0| 20 20 52 31 2c 4d 6f 75 | 73 65 42 6c 6f 63 6b 20 | R1,Mou|seBlock |
|000053c0| 2b 20 4d 6f 75 73 65 2e | 59 5f 50 6f 73 0a 20 20 |+ Mouse.|Y_Pos. |
|000053d0| 20 53 54 52 20 20 20 20 | 20 20 52 32 2c 4d 6f 75 | STR | R2,Mou|
|000053e0| 73 65 42 6c 6f 63 6b 20 | 2b 20 4d 6f 75 73 65 2e |seBlock |+ Mouse.|
|000053f0| 42 75 74 74 6f 6e 73 7b | 66 7d 0a 0a 4f 72 2c 20 |Buttons{|f}..Or, |
|00005400| 69 66 20 79 6f 75 20 68 | 61 76 65 20 61 20 72 65 |if you h|ave a re|
|00005410| 67 69 73 74 65 72 20 70 | 6f 69 6e 74 69 6e 67 20 |gister p|ointing |
|00005420| 74 6f 20 74 68 65 20 64 | 61 74 61 2d 61 72 65 61 |to the d|ata-area|
|00005430| 2c 20 79 6f 75 20 63 61 | 6e 3a 0a 0a 7b 66 63 6f |, you ca|n:..{fco|
|00005440| 64 65 7d 20 20 20 53 57 | 49 20 20 20 20 20 20 4f |de} SW|I O|
|00005450| 53 5f 4d 6f 75 73 65 0a | 20 20 20 41 44 52 20 20 |S_Mouse.| ADR |
|00005460| 20 20 20 20 52 39 2c 4d | 6f 75 73 65 42 6c 6f 63 | R9,M|ouseBloc|
|00005470| 6b 0a 20 20 20 53 54 52 | 20 20 20 20 20 20 52 30 |k. STR| R0|
|00005480| 2c 5b 52 39 2c 5c 23 4d | 6f 75 73 65 2e 58 5f 50 |,[R9,\#M|ouse.X_P|
|00005490| 6f 73 5d 0a 20 20 20 53 | 54 52 20 20 20 20 20 20 |os]. S|TR |
|000054a0| 52 31 2c 5b 52 39 2c 5c | 23 4d 6f 75 73 65 2e 59 |R1,[R9,\|#Mouse.Y|
|000054b0| 5f 50 6f 73 5d 0a 20 20 | 20 53 54 52 20 20 20 20 |_Pos]. | STR |
|000054c0| 20 20 52 32 2c 5b 52 39 | 2c 5c 23 4d 6f 75 73 65 | R2,[R9|,\#Mouse|
|000054d0| 2e 42 75 74 74 6f 6e 73 | 5d 7b 66 7d 0a 0a 43 6c |.Buttons|]{f}..Cl|
|000054e0| 69 63 6b 20 3c 68 65 72 | 65 3d 3e 45 78 74 72 61 |ick <her|e=>Extra|
|000054f0| 49 6e 73 74 72 53 74 72 | 75 63 74 45 78 32 3e 20 |InstrStr|uctEx2> |
|00005500| 66 6f 72 20 65 78 61 6d | 70 6c 65 73 20 75 73 69 |for exam|ples usi|
|00005510| 6e 67 20 5c 3c 4f 66 66 | 73 65 74 3e 20 61 6e 64 |ng \<Off|set> and|
|00005520| 20 5c 3c 53 74 65 70 3e | 2e 00 00 00 44 41 54 41 | \<Step>|....DATA|
|00005530| cb 02 00 00 4d 6f 72 65 | 20 73 74 72 75 63 74 20 |....More| struct |
|00005540| 65 78 61 6d 70 6c 65 73 | 0a 23 77 72 61 70 20 6f |examples|.#wrap o|
|00005550| 66 66 0a 48 65 72 65 20 | 61 72 65 20 73 6f 6d 65 |ff.Here |are some|
|00005560| 20 6d 6f 72 65 20 73 74 | 72 75 63 74 20 65 78 61 | more st|ruct exa|
|00005570| 6d 70 6c 65 73 2c 20 75 | 73 69 6e 67 20 5c 3c 4f |mples, u|sing \<O|
|00005580| 66 66 73 65 74 3e 20 61 | 6e 64 0a 5c 3c 53 74 65 |ffset> a|nd.\<Ste|
|00005590| 70 3e 3a 0a 0a 7b 66 63 | 6f 64 65 7d 73 74 72 75 |p>:..{fc|ode}stru|
|000055a0| 63 74 20 4c 69 73 74 2c | 5c 23 26 31 30 30 30 0a |ct List,|\#&1000.|
|000055b0| 5c 7b 0a 20 20 20 2e 43 | 6f 64 65 31 20 20 20 44 |\{. .C|ode1 D|
|000055c0| 43 44 20 20 20 30 09 3b | 20 4c 69 73 74 2e 43 6f |CD 0.;| List.Co|
|000055d0| 64 65 31 20 3d 20 26 31 | 30 30 30 0a 7b 66 63 6f |de1 = &1|000.{fco|
|000055e0| 64 65 7d 20 20 20 2e 43 | 6f 64 65 32 20 20 20 44 |de} .C|ode2 D|
|000055f0| 43 44 20 20 20 30 09 3b | 20 4c 69 73 74 2e 43 6f |CD 0.;| List.Co|
|00005600| 64 65 32 20 3d 20 26 31 | 30 30 34 0a 7b 66 63 6f |de2 = &1|004.{fco|
|00005610| 64 65 7d 20 20 20 2e 43 | 6f 64 65 33 20 20 20 44 |de} .C|ode3 D|
|00005620| 43 44 20 20 20 30 09 3b | 20 4c 69 73 74 2e 43 6f |CD 0.;| List.Co|
|00005630| 64 65 33 20 3d 20 26 31 | 30 30 38 0a 7b 66 63 6f |de3 = &1|008.{fco|
|00005640| 64 65 7d 7d 0a 0a 73 74 | 72 75 63 74 20 23 26 34 |de}}..st|ruct #&4|
|00005650| 30 30 43 30 2c 31 0a 5c | 7b 0a 20 20 20 2e 57 69 |00C0,1.\|{. .Wi|
|00005660| 6d 70 5f 49 6e 69 74 69 | 61 6c 69 73 65 09 3b 20 |mp_Initi|alise.; |
|00005670| 57 69 6d 70 5f 49 6e 69 | 74 69 61 6c 69 73 65 09 |Wimp_Ini|tialise.|
|00005680| 3d 20 26 34 30 30 43 30 | 0a 7b 66 63 6f 64 65 7d |= &400C0|.{fcode}|
|00005690| 20 20 20 2e 57 69 6d 70 | 5f 43 72 65 61 74 65 57 | .Wimp|_CreateW|
|000056a0| 69 6e 64 6f 77 09 3b 20 | 57 69 6d 70 5f 43 72 65 |indow.; |Wimp_Cre|
|000056b0| 61 74 65 57 69 6e 64 6f | 77 09 3d 20 26 34 30 30 |ateWindo|w.= &400|
|000056c0| 43 31 0a 7b 66 63 6f 64 | 65 7d 20 20 20 2e 57 69 |C1.{fcod|e} .Wi|
|000056d0| 6d 70 5f 43 72 65 61 74 | 65 49 63 6f 6e 09 3b 20 |mp_Creat|eIcon.; |
|000056e0| 57 69 6d 70 5f 43 72 65 | 61 74 65 49 63 6f 6e 09 |Wimp_Cre|ateIcon.|
|000056f0| 3d 20 26 34 30 30 43 32 | 0a 7b 66 63 6f 64 65 7d |= &400C2|.{fcode}|
|00005700| 7d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |} | |
|00005710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005730| 20 20 20 20 20 7b 66 73 | 74 64 7d 0a 0a 54 68 69 | {fs|td}..Thi|
|00005740| 73 20 69 73 20 6e 6f 74 | 20 6e 65 65 64 65 64 20 |s is not| needed |
|00005750| 66 6f 72 20 74 68 65 20 | 53 57 49 20 69 6e 73 74 |for the |SWI inst|
|00005760| 72 75 63 74 69 6f 6e 20 | 69 6e 20 65 78 74 41 53 |ruction |in extAS|
|00005770| 4d 2c 20 61 73 0a 65 78 | 74 41 53 4d 20 66 69 6e |M, as.ex|tASM fin|
|00005780| 64 73 20 74 68 65 20 53 | 57 49 20 69 74 73 65 6c |ds the S|WI itsel|
|00005790| 66 2c 20 73 6f 20 74 68 | 69 73 20 69 73 20 6a 75 |f, so th|is is ju|
|000057a0| 73 74 20 61 6e 20 65 78 | 61 6d 70 6c 65 2e 0a 0a |st an ex|ample...|
|000057b0| 43 6c 69 63 6b 20 3c 68 | 65 72 65 3d 3e 45 78 74 |Click <h|ere=>Ext|
|000057c0| 72 61 49 6e 73 74 72 53 | 74 72 75 63 74 4e 65 73 |raInstrS|tructNes|
|000057d0| 74 3e 20 66 6f 72 20 61 | 6e 20 65 78 61 6d 70 6c |t> for a|n exampl|
|000057e0| 65 20 6f 66 20 6e 65 73 | 74 65 64 20 73 74 72 75 |e of nes|ted stru|
|000057f0| 63 74 75 72 65 73 2e 00 | 44 41 54 41 62 01 00 00 |ctures..|DATAb...|
|00005800| 53 74 72 75 63 74 20 6e | 65 73 74 69 6e 67 0a 23 |Struct n|esting.#|
|00005810| 77 72 61 70 20 6f 66 66 | 0a 53 74 72 75 63 74 75 |wrap off|.Structu|
|00005820| 72 65 73 20 63 61 6e 20 | 61 6c 73 6f 20 62 65 20 |res can |also be |
|00005830| 6e 65 73 74 65 64 2c 20 | 73 6f 20 79 6f 75 20 63 |nested, |so you c|
|00005840| 61 6e 20 77 72 69 74 65 | 20 73 6f 6d 65 74 68 69 |an write| somethi|
|00005850| 6e 67 20 6c 69 6b 65 3a | 0a 0a 7b 66 63 6f 64 65 |ng like:|..{fcode|
|00005860| 7d 73 74 72 75 63 74 20 | 50 65 72 73 6f 6e 0a 5c |}struct |Person.\|
|00005870| 7b 0a 20 20 20 73 74 72 | 75 63 74 20 4e 61 6d 65 |{. str|uct Name|
|00005880| 0a 20 20 20 5c 7b 0a 20 | 20 20 20 20 20 2e 46 69 |. \{. | .Fi|
|00005890| 72 73 74 20 20 20 44 43 | 44 20 20 20 30 0a 20 20 |rst DC|D 0. |
|000058a0| 20 20 20 20 2e 4c 61 73 | 74 20 20 20 20 44 43 44 | .Las|t DCD|
|000058b0| 20 20 20 30 0a 20 20 20 | 7d 0a 20 20 20 2e 41 64 | 0. |}. .Ad|
|000058c0| 64 72 65 73 73 0a 7d 7b | 66 7d 0a 0a 54 68 69 73 |dress.}{|f}..This|
|000058d0| 20 63 61 6e 20 62 65 20 | 61 63 63 65 73 73 65 64 | can be |accessed|
|000058e0| 20 62 79 3a 0a 0a 7b 66 | 63 6f 64 65 7d 20 20 20 | by:..{f|code} |
|000058f0| 4c 44 52 20 20 20 52 31 | 2c 5b 52 39 2c 5c 23 50 |LDR R1|,[R9,\#P|
|00005900| 65 72 73 6f 6e 2e 4e 61 | 6d 65 2e 46 69 72 73 74 |erson.Na|me.First|
|00005910| 5d 0a 20 20 20 4c 44 52 | 20 20 20 52 32 2c 5b 52 |]. LDR| R2,[R|
|00005920| 39 2c 5c 23 50 65 72 73 | 6f 6e 2e 4e 61 6d 65 2e |9,\#Pers|on.Name.|
|00005930| 4c 61 73 74 5d 0a 20 20 | 20 4c 44 52 20 20 20 52 |Last]. | LDR R|
|00005940| 33 2c 5b 52 39 2c 5c 23 | 50 65 72 73 6f 6e 2e 41 |3,[R9,\#|Person.A|
|00005950| 64 64 72 65 73 73 5d 7b | 66 7d 00 00 44 41 54 41 |ddress]{|f}..DATA|
|00005960| 6c 01 00 00 54 45 4d 50 | 20 26 20 46 50 54 45 4d |l...TEMP| & FPTEM|
|00005970| 50 0a 23 77 72 61 70 20 | 6f 66 66 0a 4d 61 72 6b |P.#wrap |off.Mark|
|00005980| 20 61 20 72 65 67 69 73 | 74 65 72 20 61 73 20 75 | a regis|ter as u|
|00005990| 6e 75 73 65 64 2c 20 73 | 6f 20 69 74 20 63 61 6e |nused, s|o it can|
|000059a0| 20 62 65 20 75 73 65 64 | 20 61 73 20 61 20 54 65 | be used| as a Te|
|000059b0| 6d 70 52 65 67 2e 0a 0a | 53 79 6e 74 61 78 3a 09 |mpReg...|Syntax:.|
|000059c0| 5c 3c 54 45 4d 50 20 7c | 20 46 50 54 45 4d 50 3e |\<TEMP || FPTEMP>|
|000059d0| 20 20 20 52 65 67 4c 69 | 73 74 0a 57 68 65 72 65 | RegLi|st.Where|
|000059e0| 3a 09 52 65 67 6c 69 73 | 74 20 69 73 20 61 20 6c |:.Reglis|t is a l|
|000059f0| 69 73 74 20 6f 66 20 72 | 65 67 69 73 74 65 72 73 |ist of r|egisters|
|00005a00| 2c 20 6f 72 20 72 65 67 | 69 73 74 65 72 2d 72 61 |, or reg|ister-ra|
|00005a10| 6e 67 65 73 2e 0a 4e 6f | 74 69 63 65 3a 09 54 68 |nges..No|tice:.Th|
|00005a20| 65 20 63 6f 6e 74 65 6e | 74 73 20 6f 66 20 52 65 |e conten|ts of Re|
|00005a30| 67 4c 69 73 74 20 69 73 | 20 75 6e 73 61 66 65 20 |gList is| unsafe |
|00005a40| 75 6e 74 69 6c 20 69 74 | 20 69 73 0a 09 4c 4f 43 |until it| is..LOC|
|00005a50| 4b 27 65 64 20 6f 72 20 | 46 50 4c 4f 43 4b 27 65 |K'ed or |FPLOCK'e|
|00005a60| 64 20 61 67 61 69 6e 2e | 0a 0a 45 78 61 6d 70 6c |d again.|..Exampl|
|00005a70| 65 73 20 6f 66 20 75 73 | 65 3a 0a 0a 7b 66 63 6f |es of us|e:..{fco|
|00005a80| 64 65 7d 54 45 4d 50 20 | 20 20 20 20 52 30 0a 54 |de}TEMP | R0.T|
|00005a90| 45 4d 50 20 20 20 20 20 | 52 31 2c 52 32 2c 52 38 |EMP |R1,R2,R8|
|00005aa0| 2d 52 31 32 0a 46 50 54 | 45 4d 50 20 20 20 46 30 |-R12.FPT|EMP F0|
|00005ab0| 0a 46 50 54 45 4d 50 20 | 20 20 46 30 2c 46 31 2c |.FPTEMP | F0,F1,|
|00005ac0| 46 33 2d 46 37 7b 66 7d | 44 41 54 41 3f 02 00 00 |F3-F7{f}|DATA?...|
|00005ad0| 41 44 52 4c 0a 23 77 72 | 61 70 20 6f 66 66 0a 4d |ADRL.#wr|ap off.M|
|00005ae0| 69 6e 69 6d 75 6d 20 31 | 36 2d 62 69 74 20 41 44 |inimum 1|6-bit AD|
|00005af0| 52 2e 0a 0a 54 68 69 73 | 20 69 73 20 74 68 65 20 |R...This| is the |
|00005b00| 73 61 6d 65 20 61 73 20 | 3c 41 44 52 3d 3e 45 78 |same as |<ADR=>Ex|
|00005b10| 74 72 61 49 6e 73 74 72 | 41 44 52 3e 2c 20 65 78 |traInstr|ADR>, ex|
|00005b20| 63 65 70 74 20 74 68 61 | 74 20 69 74 20 61 73 73 |cept tha|t it ass|
|00005b30| 65 6d 62 6c 65 73 20 74 | 6f 0a 6d 69 6e 69 6d 75 |embles t|o.minimu|
|00005b40| 6d 20 31 36 20 62 69 74 | 20 28 74 77 6f 20 69 6e |m 16 bit| (two in|
|00005b50| 73 74 72 75 63 74 69 6f | 6e 73 29 20 28 6c 6f 6e |structio|ns) (lon|
|00005b60| 67 20 41 44 52 29 2e 20 | 49 74 27 73 20 74 68 65 |g ADR). |It's the|
|00005b70| 20 73 61 6d 65 0a 61 73 | 20 73 65 74 74 69 6e 67 | same.as| setting|
|00005b80| 20 74 68 65 20 27 46 61 | 73 74 27 20 6f 70 74 69 | the 'Fa|st' opti|
|00005b90| 6f 6e 20 66 6f 72 20 74 | 68 69 73 20 41 44 52 2e |on for t|his ADR.|
|00005ba0| 20 55 73 69 6e 67 20 74 | 68 69 73 20 66 6f 72 0a | Using t|his for.|
|00005bb0| 74 68 65 20 41 44 52 20 | 69 6e 73 74 72 75 63 74 |the ADR |instruct|
|00005bc0| 69 6f 6e 73 20 74 68 61 | 74 20 6e 65 65 64 73 20 |ions tha|t needs |
|00005bd0| 69 74 20 63 61 6e 20 72 | 65 64 75 63 65 20 74 68 |it can r|educe th|
|00005be0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 0a 70 61 73 73 |e number| of.pass|
|00005bf0| 65 73 2e 0a 0a 65 78 74 | 41 53 4d 20 77 69 6c 6c |es...ext|ASM will|
|00005c00| 20 63 6f 6e 74 69 6e 75 | 65 20 74 6f 20 61 73 73 | continu|e to ass|
|00005c10| 65 6d 62 6c 65 20 75 6e | 74 69 6c 20 74 77 6f 20 |emble un|til two |
|00005c20| 70 61 73 73 65 73 20 68 | 61 76 65 20 74 68 65 0a |passes h|ave the.|
|00005c30| 73 61 6d 65 20 6c 65 6e | 67 74 68 20 61 6e 64 20 |same len|gth and |
|00005c40| 61 6c 6c 20 76 61 72 69 | 61 62 6c 65 73 20 61 72 |all vari|ables ar|
|00005c50| 65 20 72 65 73 6f 6c 76 | 65 64 2e 20 54 68 65 72 |e resolv|ed. Ther|
|00005c60| 65 66 6f 72 65 2c 20 69 | 66 0a 79 6f 75 20 73 70 |efore, i|f.you sp|
|00005c70| 65 63 69 66 79 20 41 44 | 52 27 73 20 61 73 20 6d |ecify AD|R's as m|
|00005c80| 69 6e 69 6d 75 6d 20 31 | 36 2d 62 69 74 20 74 68 |inimum 1|6-bit th|
|00005c90| 65 6e 20 74 68 65 79 20 | 77 69 6c 6c 0a 61 75 74 |en they |will.aut|
|00005ca0| 6f 2d 65 78 70 61 6e 64 | 20 74 6f 20 74 68 61 74 |o-expand| to that|
|00005cb0| 20 74 68 65 20 66 69 72 | 73 74 20 74 69 6d 65 2c | the fir|st time,|
|00005cc0| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 6d 61 79 62 | instead| of mayb|
|00005cd0| 65 20 61 20 6c 61 74 65 | 72 0a 70 61 73 73 2c 20 |e a late|r.pass, |
|00005ce0| 69 66 20 69 74 20 75 73 | 65 73 20 61 20 66 6f 72 |if it us|es a for|
|00005cf0| 77 61 72 64 20 72 65 66 | 65 72 65 6e 63 69 6e 67 |ward ref|erencing|
|00005d00| 20 6c 61 62 65 6c 2e 00 | 44 41 54 41 b3 01 00 00 | label..|DATA....|
|00005d10| 43 6f 6e 73 74 61 6e 74 | 20 64 65 63 6c 61 72 61 |Constant| declara|
|00005d20| 74 69 6f 6e 20 65 78 61 | 6d 70 6c 65 73 0a 23 77 |tion exa|mples.#w|
|00005d30| 72 61 70 20 6f 66 66 0a | 45 78 61 6d 70 6c 65 73 |rap off.|Examples|
|00005d40| 20 6f 66 20 75 73 65 3a | 0a 0a 44 43 42 09 30 0a | of use:|..DCB.0.|
|00005d50| 44 43 42 09 31 2c 32 2c | 33 0a 44 43 42 09 22 54 |DCB.1,2,|3.DCB."T|
|00005d60| 65 78 74 22 2c 30 2c 22 | 4d 6f 72 65 20 74 65 78 |ext",0,"|More tex|
|00005d70| 74 22 2c 22 59 65 74 20 | 6d 6f 72 65 20 22 22 61 |t","Yet |more ""a|
|00005d80| 6e 64 20 69 6e 20 71 75 | 6f 74 65 73 22 22 2c 0a |nd in qu|otes"",.|
|00005d90| 09 5c 3c 31 30 3e 20 4c | 69 6e 65 66 65 65 64 22 |.\<10> L|inefeed"|
|00005da0| 20 31 30 2c 31 33 2c 30 | 0a 44 43 42 09 22 4d 6f | 10,13,0|.DCB."Mo|
|00005db0| 72 65 20 71 75 6f 74 65 | 73 20 7c 22 53 6f 6d 65 |re quote|s |"Some|
|00005dc0| 20 74 65 78 74 7c 22 2c | 20 74 68 65 20 66 6f 6c | text|",| the fol|
|00005dd0| 6c 6f 77 69 6e 67 20 69 | 73 20 74 61 6b 65 6e 0a |lowing i|s taken.|
|00005de0| 09 6c 69 74 65 72 61 6c | 6c 79 20 7c 5c 3c 31 30 |.literal|ly |\<10|
|00005df0| 3e 22 2c 22 5c 3c 53 6f | 6d 65 24 56 61 72 3e 22 |>","\<So|me$Var>"|
|00005e00| 0a 44 43 57 09 31 30 30 | 30 30 2c 32 30 30 30 30 |.DCW.100|00,20000|
|00005e10| 2c 33 30 30 30 30 2c 31 | 30 31 2c 31 30 32 2c 31 |,30000,1|01,102,1|
|00005e20| 30 33 0a 44 43 44 09 2d | 31 2c 2d 32 2c 2d 33 2c |03.DCD.-|1,-2,-3,|
|00005e30| 31 20 3c 3c 20 31 36 2c | 31 20 3c 3c 20 32 34 2c |1 << 16,|1 << 24,|
|00005e40| 31 20 3c 3c 20 33 30 0a | 44 43 44 09 4c 61 62 65 |1 << 30.|DCD.Labe|
|00005e50| 6c 5f 31 2c 4c 61 62 65 | 6c 5f 34 2d 4c 61 62 65 |l_1,Labe|l_4-Labe|
|00005e60| 6c 5f 33 2c 26 38 30 30 | 30 2b 4f 66 66 73 65 74 |l_3,&800|0+Offset|
|00005e70| 5f 74 6f 5f 73 6f 6d 65 | 74 68 69 6e 67 0a 44 43 |_to_some|thing.DC|
|00005e80| 46 53 09 31 2e 32 33 0a | 44 43 46 44 09 31 32 33 |FS.1.23.|DCFD.123|
|00005e90| 2e 34 45 31 30 0a 44 43 | 46 45 09 30 2e 30 30 31 |.4E10.DC|FE.0.001|
|00005ea0| 32 33 45 2d 32 30 0a 44 | 43 46 50 09 2d 31 2e 32 |23E-20.D|CFP.-1.2|
|00005eb0| 33 0a 44 43 46 45 50 09 | 31 32 33 00 44 41 54 41 |3.DCFEP.|123.DATA|
|00005ec0| a8 00 00 00 42 6c 6f 63 | 6b 20 64 65 63 6c 61 72 |....Bloc|k declar|
|00005ed0| 65 20 65 78 61 6d 70 6c | 65 73 0a 23 77 72 61 70 |e exampl|es.#wrap|
|00005ee0| 20 6f 66 66 0a 45 78 61 | 6d 70 6c 65 73 20 6f 66 | off.Exa|mples of|
|00005ef0| 20 75 73 65 3a 0a 0a 44 | 42 42 09 31 30 32 34 2c | use:..D|BB.1024,|
|00005f00| 26 46 46 0a 44 42 57 09 | 31 30 30 2c 25 30 31 31 |&FF.DBW.|100,%011|
|00005f10| 30 31 31 30 31 30 31 30 | 31 30 31 30 30 0a 44 42 |01101010|10100.DB|
|00005f20| 44 09 35 31 32 0a 44 42 | 46 53 09 31 30 2c 31 2e |D.512.DB|FS.10,1.|
|00005f30| 32 33 0a 44 42 46 44 09 | 34 2c 31 32 33 0a 44 42 |23.DBFD.|4,123.DB|
|00005f40| 46 45 09 31 30 30 0a 44 | 42 46 50 09 32 30 2c 31 |FE.100.D|BFP.20,1|
|00005f50| 32 33 45 31 30 0a 44 42 | 46 45 50 09 31 30 2c 31 |23E10.DB|FEP.10,1|
|00005f60| 32 33 2e 34 44 49 52 24 | 8c 00 00 00 8c 00 00 00 |23.4DIR$|........|
|00005f70| f0 5f 00 00 46 fd ff ff | 8a db 16 2d 5b 0d 00 00 |._..F...|...-[...|
|00005f80| 13 00 00 00 00 00 00 00 | 21 52 6f 6f 74 00 00 00 |........|!Root...|
|00005f90| 4c 6d 00 00 46 ff ff ff | 19 c5 16 2d 67 00 00 00 |Lm..F...|...-g...|
|00005fa0| 13 00 00 00 00 00 00 00 | 41 64 64 72 65 73 73 00 |........|Address.|
|00005fb0| b4 6d 00 00 46 ff ff ff | fd bb c5 2c 50 00 00 00 |.m..F...|...,P...|
|00005fc0| 13 00 00 00 00 00 00 00 | 43 6f 75 6e 74 00 00 00 |........|Count...|
|00005fd0| 04 6e 00 00 46 ff ff ff | ed bd c5 2c 43 00 00 00 |.n..F...|...,C...|
|00005fe0| 13 00 00 00 00 00 00 00 | 4d 65 6d 50 72 65 63 00 |........|MemPrec.|
|00005ff0| 44 41 54 41 5b 0d 00 00 | 46 50 41 31 30 20 69 6e |DATA[...|FPA10 in|
|00006000| 73 74 72 75 63 74 69 6f | 6e 73 0a 23 77 72 61 70 |structio|ns.#wrap|
|00006010| 20 6f 66 66 0a 23 70 72 | 65 66 69 78 20 46 50 41 | off.#pr|efix FPA|
|00006020| 49 6e 73 74 72 0a 46 50 | 41 31 30 20 69 6e 73 74 |Instr.FP|A10 inst|
|00006030| 72 75 63 74 69 6f 6e 73 | 0a 2d 2d 2d 2d 2d 2d 2d |ructions|.-------|
|00006040| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006050| 0a 7b 66 63 6f 64 65 7d | 4d 56 46 5c 7b 43 43 7d |.{fcode}|MVF\{CC}|
|00006060| 5c 3c 70 72 65 63 3e 5c | 7b 72 6f 75 6e 64 7d 20 |\<prec>\|{round} |
|00006070| 20 20 46 64 2c 5c 3c 46 | 6d 7c 5c 23 65 78 70 72 | Fd,\<F|m|\#expr|
|00006080| 3e 09 3b 20 46 64 20 3d | 20 46 6d 0a 7b 66 63 6f |>.; Fd =| Fm.{fco|
|00006090| 64 65 7d 4d 4e 46 5c 7b | 43 43 7d 5c 3c 70 72 65 |de}MNF\{|CC}\<pre|
|000060a0| 63 3e 5c 7b 72 6f 75 6e | 64 7d 20 20 20 46 64 2c |c>\{roun|d} Fd,|
|000060b0| 5c 3c 46 6d 7c 5c 23 65 | 78 70 72 3e 09 3b 20 46 |\<Fm|\#e|xpr>.; F|
|000060c0| 64 20 3d 20 2d 20 46 6d | 0a 7b 66 63 6f 64 65 7d |d = - Fm|.{fcode}|
|000060d0| 41 42 53 5c 7b 43 43 7d | 5c 3c 70 72 65 63 3e 5c |ABS\{CC}|\<prec>\|
|000060e0| 7b 72 6f 75 6e 64 7d 20 | 20 20 46 64 2c 5c 3c 46 |{round} | Fd,\<F|
|000060f0| 6d 7c 5c 23 65 78 70 72 | 3e 09 3b 20 46 64 20 3d |m|\#expr|>.; Fd =|
|00006100| 20 41 42 53 28 46 6d 29 | 0a 7b 66 63 6f 64 65 7d | ABS(Fm)|.{fcode}|
|00006110| 52 4e 44 5c 7b 43 43 7d | 5c 3c 70 72 65 63 3e 5c |RND\{CC}|\<prec>\|
|00006120| 7b 72 6f 75 6e 64 7d 20 | 20 20 46 64 2c 5c 3c 46 |{round} | Fd,\<F|
|00006130| 6d 7c 5c 23 65 78 70 72 | 3e 09 3b 20 46 64 20 3d |m|\#expr|>.; Fd =|
|00006140| 20 69 6e 74 65 67 65 72 | 20 76 61 6c 2e 20 6f 66 | integer| val. of|
|00006150| 20 28 46 6d 29 0a 7b 66 | 63 6f 64 65 7d 53 51 54 | (Fm).{f|code}SQT|
|00006160| 5c 7b 43 43 7d 5c 3c 70 | 72 65 63 3e 5c 7b 72 6f |\{CC}\<p|rec>\{ro|
|00006170| 75 6e 64 7d 20 20 20 46 | 64 2c 5c 3c 46 6d 7c 5c |und} F|d,\<Fm|\|
|00006180| 23 65 78 70 72 3e 09 3b | 20 46 64 20 3d 20 73 71 |#expr>.;| Fd = sq|
|00006190| 75 61 72 65 20 72 6f 6f | 74 20 6f 66 20 28 46 6d |uare roo|t of (Fm|
|000061a0| 29 0a 7b 66 63 6f 64 65 | 7d 4c 4f 47 5c 7b 43 43 |).{fcode|}LOG\{CC|
|000061b0| 7d 5c 3c 70 72 65 63 3e | 5c 7b 72 6f 75 6e 64 7d |}\<prec>|\{round}|
|000061c0| 20 20 20 46 64 2c 5c 3c | 46 6d 7c 5c 23 65 78 70 | Fd,\<|Fm|\#exp|
|000061d0| 72 3e 09 3b 20 46 64 20 | 3d 20 6c 6f 67 31 30 20 |r>.; Fd |= log10 |
|000061e0| 6f 66 20 28 46 6d 29 0a | 7b 66 63 6f 64 65 7d 4c |of (Fm).|{fcode}L|
|000061f0| 47 4e 5c 7b 43 43 7d 5c | 3c 70 72 65 63 3e 5c 7b |GN\{CC}\|<prec>\{|
|00006200| 72 6f 75 6e 64 7d 20 20 | 20 46 64 2c 5c 3c 46 6d |round} | Fd,\<Fm|
|00006210| 7c 5c 23 65 78 70 72 3e | 09 3b 20 46 64 20 3d 20 ||\#expr>|.; Fd = |
|00006220| 6c 6f 67 65 20 6f 66 20 | 28 46 6d 29 0a 7b 66 63 |loge of |(Fm).{fc|
|00006230| 6f 64 65 7d 45 58 50 5c | 7b 43 43 7d 5c 3c 70 72 |ode}EXP\|{CC}\<pr|
|00006240| 65 63 3e 5c 7b 72 6f 75 | 6e 64 7d 20 20 20 46 64 |ec>\{rou|nd} Fd|
|00006250| 2c 5c 3c 46 6d 7c 5c 23 | 65 78 70 72 3e 09 3b 20 |,\<Fm|\#|expr>.; |
|00006260| 46 64 20 3d 20 65 20 72 | 61 69 73 65 64 20 74 6f |Fd = e r|aised to|
|00006270| 20 74 68 65 0a 09 09 09 | 09 09 09 09 3b 20 20 20 | the....|....; |
|00006280| 20 20 20 70 6f 77 65 72 | 20 6f 66 20 46 6d 0a 7b | power| of Fm.{|
|00006290| 66 63 6f 64 65 7d 53 49 | 4e 5c 7b 43 43 7d 5c 3c |fcode}SI|N\{CC}\<|
|000062a0| 70 72 65 63 3e 5c 7b 72 | 6f 75 6e 64 7d 20 20 20 |prec>\{r|ound} |
|000062b0| 46 64 2c 5c 3c 46 6d 7c | 5c 23 65 78 70 72 3e 09 |Fd,\<Fm||\#expr>.|
|000062c0| 3b 20 46 64 20 3d 20 73 | 69 6e 65 20 6f 66 20 28 |; Fd = s|ine of (|
|000062d0| 46 6d 29 0a 7b 66 63 6f | 64 65 7d 43 4f 53 5c 7b |Fm).{fco|de}COS\{|
|000062e0| 43 43 7d 5c 3c 70 72 65 | 63 3e 5c 7b 72 6f 75 6e |CC}\<pre|c>\{roun|
|000062f0| 64 7d 20 20 20 46 64 2c | 5c 3c 46 6d 7c 5c 23 65 |d} Fd,|\<Fm|\#e|
|00006300| 78 70 72 3e 09 3b 20 46 | 64 20 3d 20 63 6f 73 69 |xpr>.; F|d = cosi|
|00006310| 6e 65 20 6f 66 20 28 46 | 6d 29 0a 7b 66 63 6f 64 |ne of (F|m).{fcod|
|00006320| 65 7d 54 41 4e 5c 7b 43 | 43 7d 5c 3c 70 72 65 63 |e}TAN\{C|C}\<prec|
|00006330| 3e 5c 7b 72 6f 75 6e 64 | 7d 20 20 20 46 64 2c 5c |>\{round|} Fd,\|
|00006340| 3c 46 6d 7c 5c 23 65 78 | 70 72 3e 09 3b 20 46 64 |<Fm|\#ex|pr>.; Fd|
|00006350| 20 3d 20 74 61 6e 67 65 | 6e 74 20 6f 66 20 28 46 | = tange|nt of (F|
|00006360| 6d 29 0a 7b 66 63 6f 64 | 65 7d 41 53 4e 5c 7b 43 |m).{fcod|e}ASN\{C|
|00006370| 43 7d 5c 3c 70 72 65 63 | 3e 5c 7b 72 6f 75 6e 64 |C}\<prec|>\{round|
|00006380| 7d 20 20 20 46 64 2c 5c | 3c 46 6d 7c 5c 23 65 78 |} Fd,\|<Fm|\#ex|
|00006390| 70 72 3e 09 3b 20 46 64 | 20 3d 20 61 72 63 2d 73 |pr>.; Fd| = arc-s|
|000063a0| 69 6e 65 20 6f 66 20 28 | 46 6d 29 0a 7b 66 63 6f |ine of (|Fm).{fco|
|000063b0| 64 65 7d 41 43 53 5c 7b | 43 43 7d 5c 3c 70 72 65 |de}ACS\{|CC}\<pre|
|000063c0| 63 3e 5c 7b 72 6f 75 6e | 64 7d 20 20 20 46 64 2c |c>\{roun|d} Fd,|
|000063d0| 5c 3c 46 6d 7c 5c 23 65 | 78 70 72 3e 09 3b 20 46 |\<Fm|\#e|xpr>.; F|
|000063e0| 64 20 3d 20 61 72 63 2d | 63 6f 73 69 6e 65 20 6f |d = arc-|cosine o|
|000063f0| 66 20 28 46 6d 29 0a 7b | 66 63 6f 64 65 7d 41 54 |f (Fm).{|fcode}AT|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.