home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / assembler / armmaker < prev    next >
ArcFS Archive  |  1995-10-01  |  92.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: ArcFS Archive (archive/arcFS).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert ArcFS Archive (archive/arcFS) magic Supported
100% file RISC OS archive (ArcFS format) default
99% file data default
100% TrID Acorn ArcFS Archive default
100% gt2 Kopftext: 'Archive' default (weak)
100% detectItEasy Archive: ArcFS default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 41 72 63 68 69 76 65 00 | 84 03 00 00 e4 03 00 00 |Archive.|........|
|00000010| 28 00 00 00 64 00 00 00 | 00 00 00 00 00 00 00 00 |(...d...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 82 21 41 52 4d 6d 61 6b | 65 72 00 00 ff ff ff ff |.!ARMmak|er......|
|00000070| 45 fd ff ff 88 d7 44 87 | 00 00 00 00 ff ff ff ff |E.....D.|........|
|00000080| 60 03 00 80 82 21 42 6f | 6f 74 00 00 44 fd ff ff |`....!Bo|ot..D...|
|00000090| 9c 00 00 00 45 eb ff ff | f3 27 42 82 03 00 13 f3 |....E...|.'B.....|
|000000a0| 9c 00 00 00 24 00 00 00 | 82 21 48 65 6c 70 00 00 |....$...|.!Help..|
|000000b0| 44 fd ff ff bb 01 00 00 | 45 ff ff ff 13 15 26 73 |D.......|E.....&s|
|000000c0| 03 00 74 e2 bb 01 00 00 | e4 00 00 00 82 21 52 75 |..t.....|.....!Ru|
|000000d0| 6e 00 00 00 44 fd ff ff | de 03 00 00 45 eb ff ff |n...D...|....E...|
|000000e0| c5 29 42 82 03 00 7b d4 | de 03 00 00 c3 02 00 00 |.)B...{.|........|
|000000f0| 82 21 53 65 74 75 70 00 | 44 fd ff ff 1a 01 00 00 |.!Setup.|D.......|
|00000100| 45 eb ff ff aa 67 23 73 | 03 00 01 90 1a 01 00 00 |E....g#s|........|
|00000110| c5 06 00 00 82 21 53 70 | 72 69 74 65 73 00 ff ff |.....!Sp|rites...|
|00000120| e4 03 00 00 45 f9 ff ff | 1a 6f 23 73 03 00 5c ca |....E...|.o#s..\.|
|00000130| e4 03 00 00 03 08 00 00 | 82 41 52 4d 6d 61 6b 65 |........|.ARMmake|
|00000140| 44 4f 58 00 6b 70 00 00 | 45 ff ff ff 6b e5 2f 82 |DOX.kp..|E...k./.|
|00000150| 03 00 03 34 6b 70 00 00 | 0b 0c 00 00 82 41 52 4d |...4kp..|.....ARM|
|00000160| 6d 61 6b 65 72 00 ff ff | 2f 6d 00 00 45 f8 ff ff |maker...|/m..E...|
|00000170| 7c 89 35 82 03 00 a3 36 | 2f 6d 00 00 9a 7c 00 00 ||.5....6|/m...|..|
|00000180| 82 44 65 73 63 00 00 00 | 44 fd ff ff 8f 05 00 00 |.Desc...|D.......|
|00000190| 45 ff ff ff 03 c2 35 82 | 03 00 45 ec 8f 05 00 00 |E.....5.|..E.....|
|000001a0| ed e9 00 00 82 68 00 79 | 00 72 00 00 44 fd ff ff |.....h.y|.r..D...|
|000001b0| ff ff ff ff 45 fd ff ff | 4b db 44 87 00 00 00 00 |....E...|K.D.....|
|000001c0| ff ff ff ff d4 01 00 80 | 82 66 73 75 74 69 6c 73 |........|.fsutils|
|000001d0| 00 00 00 00 99 09 00 00 | 45 ff ff ff 16 f5 b8 75 |........|E......u|
|000001e0| 03 00 3c cc 99 09 00 00 | a0 ef 00 00 82 75 6e 69 |..<.....|.....uni|
|000001f0| 78 74 69 6d 65 00 00 00 | ac 02 00 00 45 ff ff ff |xtime...|....E...|
|00000200| cd 7c c2 84 03 00 9a d2 | ac 02 00 00 5d f9 00 00 |.|......|....]...|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 40 02 00 00 82 69 6e 63 | 00 72 00 00 44 fd ff ff |@....inc|.r..D...|
|00000240| ff ff ff ff 45 fd ff ff | f8 db 44 87 00 00 00 00 |....E...|..D.....|
|00000250| ff ff ff ff 64 02 00 80 | 82 41 50 43 53 2d 52 00 |....d...|.APCS-R.|
|00000260| 00 00 00 00 88 02 00 00 | 45 ff ff ff 50 7f 5e 7c |........|E...P.^||
|00000270| 03 00 74 e3 88 02 00 00 | 2d fc 00 00 82 41 52 4d |..t.....|-....ARM|
|00000280| 50 53 52 00 00 00 00 00 | 06 01 00 00 45 ff ff ff |PSR.....|....E...|
|00000290| 79 09 b3 75 03 00 e7 7b | 06 01 00 00 d9 fe 00 00 |y..u...{|........|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 40 02 00 00 82 4d 65 73 | 73 61 67 65 73 00 ff ff |@....Mes|sages...|
|000002d0| bd 0a 00 00 45 ff ff ff | f5 7a 23 73 03 00 fa 82 |....E...|.z#s....|
|000002e0| bd 0a 00 00 03 00 01 00 | 82 6f 00 79 00 72 00 00 |........|.o.y.r..|
|000002f0| 44 fd ff ff ff ff ff ff | 45 fd ff ff 61 dd 44 87 |D.......|E...a.D.|
|00000300| 00 00 00 00 ff ff ff ff | f4 02 00 80 82 41 52 4d |........|.....ARM|
|00000310| 6c 69 62 00 00 00 00 00 | 0c 59 00 00 45 fd ff ff |lib.....|.Y..E...|
|00000320| 66 3e d2 83 03 00 71 fc | 0c 59 00 00 e4 0a 01 00 |f>....q.|.Y......|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 40 02 00 00 82 52 65 61 | 64 4d 45 00 44 fd ff ff |@....Rea|dME.D...|
|00000360| 5f 01 00 00 45 ff ff ff | 6c 84 9f 87 03 00 67 0e |_...E...|l.....g.|
|00000370| 5f 01 00 00 14 64 01 00 | 82 54 65 6d 70 6c 61 74 |_....d..|.Templat|
|00000380| 65 73 00 ff 4a 0a 00 00 | 45 ec ff ff 03 10 26 73 |es..J...|E.....&s|
|00000390| 13 00 c8 dd 4a 0a 00 00 | 97 65 01 00 00 62 65 79 |....J...|.e...bey|
|000003a0| 00 72 00 00 44 fd ff ff | 3f 77 e1 cf 00 08 00 00 |.r..D...|?w......|
|000003b0| 00 00 00 00 ff ff ff ff | 02 00 f8 00 9e b6 09 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 40 02 00 00 46 69 6c 65 | 44 61 74 61 82 21 42 6f |@...File|Data.!Bo|
|000003f0| 6f 74 00 00 44 fd ff ff | 9c 00 00 00 45 eb ff ff |ot..D...|....E...|
|00000400| f3 27 42 82 03 00 13 f3 | 49 66 20 22 3c 41 52 4d |.'B.....|If "<ARM|
|00000410| 24 50 61 74 68 3e 22 3d | 22 22 20 54 68 65 6e 20 |$Path>"=|"" Then |
|00000420| 53 65 74 20 41 52 4d 24 | 50 61 74 68 20 3c 4f 62 |Set ARM$|Path <Ob|
|00000430| 65 79 24 44 69 72 3e 2e | 0a 53 65 74 20 41 52 4d |ey$Dir>.|.Set ARM|
|00000440| 6d 61 6b 65 72 24 44 69 | 72 20 3c 4f 62 65 79 24 |maker$Di|r <Obey$|
|00000450| 44 69 72 3e 0a 53 65 74 | 20 41 6c 69 61 73 24 41 |Dir>.Set| Alias$A|
|00000460| 52 4d 6d 61 6b 65 72 20 | 3c 41 52 4d 6d 61 6b 65 |RMmaker |<ARMmake|
|00000470| 72 24 44 69 72 3e 2e 41 | 52 4d 6d 61 6b 65 72 20 |r$Dir>.A|RMmaker |
|00000480| 25 25 2a 30 0a 49 63 6f | 6e 53 70 72 69 74 65 73 |%%*0.Ico|nSprites|
|00000490| 20 3c 4f 62 65 79 24 44 | 69 72 3e 2e 21 53 70 72 | <Obey$D|ir>.!Spr|
|000004a0| 69 74 65 73 46 69 6c 65 | 44 61 74 61 82 21 48 65 |itesFile|Data.!He|
|000004b0| 6c 70 00 00 44 fd ff ff | bb 01 00 00 45 ff ff ff |lp..D...|....E...|
|000004c0| 13 15 26 73 03 00 74 e2 | 20 20 20 20 41 52 4d 6d |..&s..t.| ARMm|
|000004d0| 61 6b 65 72 0a 20 20 20 | 20 7e 7e 7e 7e 7e 7e 7e |aker. | ~~~~~~~|
|000004e0| 7e 0a 20 20 20 20 50 75 | 72 70 6f 73 65 3a 20 20 |~. Pu|rpose: |
|000004f0| 41 52 4d 20 63 6f 64 65 | 20 61 73 73 65 6d 62 6c |ARM code| assembl|
|00000500| 65 72 0a 20 20 20 20 0a | 20 20 20 20 53 65 74 75 |er. .| Setu|
|00000510| 70 3a 0a 20 20 20 20 20 | 20 20 49 63 6f 6e 20 20 |p:. | Icon |
|00000520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 41 63 | | Ac|
|00000530| 74 69 6f 6e 2f 4d 65 61 | 6e 69 6e 67 20 20 20 20 |tion/Mea|ning |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 20 20 44 65 66 61 75 | 6c 74 0a 20 20 20 20 20 | Defau|lt. |
|00000560| 20 20 2d 2d 2d 2d 20 20 | 20 20 20 20 20 20 20 20 | ---- | |
|00000570| 20 20 20 20 20 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | --|--------|
|00000580| 2d 2d 2d 2d 20 20 20 20 | 20 20 20 20 20 20 20 20 |---- | |
|00000590| 20 20 20 20 20 20 20 20 | 20 20 20 2d 2d 2d 2d 2d | | -----|
|000005a0| 2d 2d 0a 20 20 20 20 20 | 20 20 53 6f 75 72 63 65 |--. | Source|
|000005b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 4e 61 | | Na|
|000005c0| 6d 65 20 6f 66 20 73 6f | 75 72 63 65 20 63 6f 64 |me of so|urce cod|
|000005d0| 65 20 74 6f 20 62 65 20 | 20 20 20 20 20 20 20 20 |e to be | |
|000005e0| 20 20 20 20 20 6e 69 6c | 0a 20 20 20 20 20 20 20 | nil|. |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000600| 20 20 20 20 61 73 73 65 | 6d 62 6c 65 64 0a 20 20 | asse|mbled. |
|00000610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000620| 20 20 20 20 20 20 20 20 | 20 28 74 79 70 65 64 20 | | (typed |
|00000630| 6f 72 20 64 72 61 67 67 | 65 64 29 0a 20 20 20 20 |or dragg|ed). |
|00000640| 20 20 20 54 68 72 6f 77 | 62 61 63 6b 20 20 20 20 | Throw|back |
|00000650| 20 20 20 20 20 20 20 44 | 69 73 70 6c 61 79 20 65 | D|isplay e|
|00000660| 72 72 6f 72 73 20 6f 6e | 20 64 65 73 6b 74 6f 70 |rrors on| desktop|
|00000670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6f 6e | | on|
|00000680| 0a 0a 0a 46 69 6c 65 44 | 61 74 61 82 21 52 75 6e |...FileD|ata.!Run|
|00000690| 00 00 00 44 fd ff ff de | 03 00 00 45 eb ff ff c5 |...D....|...E....|
|000006a0| 29 42 82 03 00 7b d4 49 | 66 20 22 3c 53 79 73 74 |)B...{.I|f "<Syst|
|000006b0| 65 6d 24 50 61 74 68 3e | 22 20 3d 20 22 22 20 54 |em$Path>|" = "" T|
|000006c0| 68 65 6e 20 45 72 72 6f | 72 20 30 20 53 79 73 74 |hen Erro|r 0 Syst|
|000006d0| 65 6d 20 72 65 73 6f 75 | 72 63 65 73 20 63 61 6e |em resou|rces can|
|000006e0| 6e 6f 74 20 62 65 20 66 | 6f 75 6e 64 0a 57 69 6d |not be f|ound.Wim|
|000006f0| 70 53 6c 6f 74 20 2d 4d | 69 6e 20 31 32 38 6b 20 |pSlot -M|in 128k |
|00000700| 2d 4d 61 78 20 31 32 38 | 6b 0a 49 63 6f 6e 53 70 |-Max 128|k.IconSp|
|00000710| 72 69 74 65 73 20 3c 4f | 62 65 79 24 44 69 72 3e |rites <O|bey$Dir>|
|00000720| 2e 21 53 70 72 69 74 65 | 73 0a 53 65 74 20 41 52 |.!Sprite|s.Set AR|
|00000730| 4d 6d 61 6b 65 72 24 44 | 69 72 20 3c 4f 62 65 79 |Mmaker$D|ir <Obey|
|00000740| 24 44 69 72 3e 0a 49 66 | 20 22 3c 41 52 4d 24 50 |$Dir>.If| "<ARM$P|
|00000750| 61 74 68 3e 22 3d 22 22 | 20 54 68 65 6e 20 53 65 |ath>"=""| Then Se|
|00000760| 74 20 41 52 4d 24 50 61 | 74 68 20 3c 4f 62 65 79 |t ARM$Pa|th <Obey|
|00000770| 24 44 69 72 3e 2e 0a 52 | 4d 45 6e 73 75 72 65 20 |$Dir>..R|MEnsure |
|00000780| 46 50 45 6d 75 6c 61 74 | 6f 72 20 30 20 52 4d 4c |FPEmulat|or 0 RML|
|00000790| 6f 61 64 20 53 79 73 74 | 65 6d 3a 6d 6f 64 75 6c |oad Syst|em:modul|
|000007a0| 65 73 2e 66 70 65 6d 75 | 6c 61 74 6f 72 0a 52 4d |es.fpemu|lator.RM|
|000007b0| 45 6e 73 75 72 65 20 46 | 50 45 6d 75 6c 61 74 6f |Ensure F|PEmulato|
|000007c0| 72 20 32 2e 38 30 20 45 | 72 72 6f 72 20 59 6f 75 |r 2.80 E|rror You|
|000007d0| 20 6e 65 65 64 20 46 50 | 45 6d 75 6c 61 74 6f 72 | need FP|Emulator|
|000007e0| 20 32 2e 38 30 20 74 6f | 20 72 75 6e 20 21 41 52 | 2.80 to| run !AR|
|000007f0| 4d 6d 61 6b 65 72 0a 52 | 4d 45 6e 73 75 72 65 20 |Mmaker.R|MEnsure |
|00000800| 53 68 61 72 65 64 43 4c | 69 62 72 61 72 79 20 30 |SharedCL|ibrary 0|
|00000810| 20 53 79 73 74 65 6d 3a | 6d 6f 64 75 6c 65 73 2e | System:|modules.|
|00000820| 63 6c 69 62 0a 52 4d 45 | 6e 73 75 72 65 20 53 68 |clib.RME|nsure Sh|
|00000830| 61 72 65 64 43 4c 69 62 | 72 61 72 79 20 33 2e 37 |aredCLib|rary 3.7|
|00000840| 35 20 45 72 72 6f 72 20 | 59 6f 75 20 6e 65 65 64 |5 Error |You need|
|00000850| 20 43 6c 69 62 20 33 2e | 37 35 20 74 6f 20 72 75 | Clib 3.|75 to ru|
|00000860| 6e 20 21 41 52 4d 6d 61 | 6b 65 72 0a 52 4d 45 6e |n !ARMma|ker.RMEn|
|00000870| 73 75 72 65 20 46 72 6f | 6e 74 45 6e 64 20 30 20 |sure Fro|ntEnd 0 |
|00000880| 53 79 73 74 65 6d 3a 6d | 6f 64 75 6c 65 73 2e 66 |System:m|odules.f|
|00000890| 72 6f 6e 74 65 6e 64 0a | 52 4d 45 6e 73 75 72 65 |rontend.|RMEnsure|
|000008a0| 20 46 72 6f 6e 74 65 6e | 64 20 31 2e 31 33 20 45 | Fronten|d 1.13 E|
|000008b0| 72 72 6f 72 20 59 6f 75 | 20 6e 65 65 64 20 76 65 |rror You| need ve|
|000008c0| 72 73 69 6f 6e 20 31 2e | 31 33 20 6f 66 20 74 68 |rsion 1.|13 of th|
|000008d0| 65 20 46 72 6f 6e 74 45 | 6e 64 20 6d 6f 64 75 6c |e FrontE|nd modul|
|000008e0| 65 20 74 6f 20 72 75 6e | 20 21 41 52 4d 6d 61 6b |e to run| !ARMmak|
|000008f0| 65 72 0a 52 4d 45 6e 73 | 75 72 65 20 54 61 73 6b |er.RMEns|ure Task|
|00000900| 57 69 6e 64 6f 77 20 30 | 20 53 79 73 74 65 6d 3a |Window 0| System:|
|00000910| 6d 6f 64 75 6c 65 73 2e | 74 61 73 6b 0a 52 4d 45 |modules.|task.RME|
|00000920| 6e 73 75 72 65 20 54 61 | 73 6b 57 69 6e 64 6f 77 |nsure Ta|skWindow|
|00000930| 20 30 2e 32 39 20 45 72 | 72 6f 72 20 59 6f 75 20 | 0.29 Er|ror You |
|00000940| 6e 65 65 64 20 76 65 72 | 73 69 6f 6e 20 30 2e 32 |need ver|sion 0.2|
|00000950| 39 20 6f 66 20 74 68 65 | 20 74 61 73 6b 77 69 6e |9 of the| taskwin|
|00000960| 64 6f 77 20 6d 6f 64 75 | 6c 65 20 74 6f 20 72 75 |dow modu|le to ru|
|00000970| 6e 20 21 41 52 4d 6d 61 | 6b 65 72 0a 52 4d 45 6e |n !ARMma|ker.RMEn|
|00000980| 73 75 72 65 20 44 44 45 | 55 74 69 6c 73 20 30 20 |sure DDE|Utils 0 |
|00000990| 53 79 73 74 65 6d 3a 6d | 6f 64 75 6c 65 73 2e 64 |System:m|odules.d|
|000009a0| 64 65 75 74 69 6c 73 0a | 52 4d 45 6e 73 75 72 65 |deutils.|RMEnsure|
|000009b0| 20 44 44 45 55 74 69 6c | 73 20 31 2e 35 30 20 45 | DDEUtil|s 1.50 E|
|000009c0| 72 72 6f 72 20 59 6f 75 | 20 6e 65 65 64 20 76 65 |rror You| need ve|
|000009d0| 72 73 69 6f 6e 20 31 2e | 35 30 20 6f 66 20 74 68 |rsion 1.|50 of th|
|000009e0| 65 20 44 44 45 55 74 69 | 6c 73 20 6d 6f 64 75 6c |e DDEUti|ls modul|
|000009f0| 65 20 74 6f 20 72 75 6e | 20 21 41 52 4d 6d 61 6b |e to run| !ARMmak|
|00000a00| 65 72 0a 53 65 74 20 41 | 6c 69 61 73 24 41 52 4d |er.Set A|lias$ARM|
|00000a10| 6d 61 6b 65 72 20 3c 41 | 52 4d 6d 61 6b 65 72 24 |maker <A|RMmaker$|
|00000a20| 44 69 72 3e 2e 41 52 4d | 6d 61 6b 65 72 20 25 25 |Dir>.ARM|maker %%|
|00000a30| 2a 30 0a 57 69 6d 70 53 | 6c 6f 74 20 2d 4d 69 6e |*0.WimpS|lot -Min|
|00000a40| 20 36 34 6b 20 2d 4d 61 | 78 20 36 34 6b 0a 46 72 | 64k -Ma|x 64k.Fr|
|00000a50| 6f 6e 74 45 6e 64 5f 53 | 74 61 72 74 20 2d 61 70 |ontEnd_S|tart -ap|
|00000a60| 70 20 41 52 4d 6d 61 6b | 65 72 20 2d 64 65 73 63 |p ARMmak|er -desc|
|00000a70| 20 3c 41 52 4d 6d 61 6b | 65 72 24 44 69 72 3e 2e | <ARMmak|er$Dir>.|
|00000a80| 64 65 73 63 0a 46 69 6c | 65 44 61 74 61 82 21 53 |desc.Fil|eData.!S|
|00000a90| 65 74 75 70 00 44 fd ff | ff 1a 01 00 00 45 eb ff |etup.D..|.....E..|
|00000aa0| ff aa 67 23 73 03 00 01 | 90 2a 53 65 74 20 41 52 |..g#s...|.*Set AR|
|00000ab0| 4d 6d 61 6b 65 72 24 44 | 69 72 20 3c 4f 62 65 79 |Mmaker$D|ir <Obey|
|00000ac0| 24 44 69 72 3e 0a 2a 52 | 4d 45 6e 73 75 72 65 20 |$Dir>.*R|MEnsure |
|00000ad0| 46 72 6f 6e 74 45 6e 64 | 20 30 20 53 79 73 74 65 |FrontEnd| 0 Syste|
|00000ae0| 6d 3a 6d 6f 64 75 6c 65 | 73 2e 66 72 6f 6e 74 65 |m:module|s.fronte|
|00000af0| 6e 64 0a 2a 52 4d 45 6e | 73 75 72 65 20 46 72 6f |nd.*RMEn|sure Fro|
|00000b00| 6e 74 65 6e 64 20 31 2e | 31 33 20 45 72 72 6f 72 |ntend 1.|13 Error|
|00000b10| 20 59 6f 75 20 6e 65 65 | 64 20 76 65 72 73 69 6f | You nee|d versio|
|00000b20| 6e 20 31 2e 31 33 20 6f | 66 20 74 68 65 20 46 72 |n 1.13 o|f the Fr|
|00000b30| 6f 6e 74 45 6e 64 20 6d | 6f 64 75 6c 65 20 74 6f |ontEnd m|odule to|
|00000b40| 20 73 65 74 20 74 68 65 | 20 41 52 4d 6d 61 6b 65 | set the| ARMmake|
|00000b50| 72 20 6f 70 74 69 6f 6e | 73 20 66 72 6f 6d 20 4d |r option|s from M|
|00000b60| 61 6b 65 0a 2a 57 69 6d | 70 53 6c 6f 74 20 2d 6d |ake.*Wim|pSlot -m|
|00000b70| 69 6e 20 31 36 6b 20 2d | 6d 61 78 20 31 36 6b 0a |in 16k -|max 16k.|
|00000b80| 2a 46 72 6f 6e 74 45 6e | 64 5f 53 65 74 55 70 20 |*FrontEn|d_SetUp |
|00000b90| 2d 61 70 70 20 25 30 20 | 2d 64 65 73 63 20 25 31 |-app %0 |-desc %1|
|00000ba0| 20 2d 74 61 73 6b 20 25 | 32 20 2d 68 61 6e 64 6c | -task %|2 -handl|
|00000bb0| 65 20 25 33 20 2d 74 6f | 6f 6c 66 6c 61 67 73 20 |e %3 -to|olflags |
|00000bc0| 25 34 0a 46 69 6c 65 44 | 61 74 61 82 21 53 70 72 |%4.FileD|ata.!Spr|
|00000bd0| 69 74 65 73 00 ff ff e4 | 03 00 00 45 f9 ff ff 1a |ites....|...E....|
|00000be0| 6f 23 73 03 00 5c ca 02 | 00 00 00 10 00 00 00 e8 |o#s..\..|........|
|00000bf0| 03 00 00 d4 02 00 00 21 | 61 72 6d 6d 61 6b 65 72 |.......!|armmaker|
|00000c00| 00 00 00 04 00 00 00 10 | 00 00 00 00 00 00 00 07 |........|........|
|00000c10| 00 00 00 2c 00 00 00 80 | 01 00 00 0c 00 00 00 00 |...,....|........|
|00000c20| 20 00 95 be be 7b 00 40 | 33 07 00 34 73 00 02 00 | ....{.@|3..4s...|
|00000c30| 00 00 00 70 20 50 e9 eb | eb bb 07 34 33 07 00 34 |...p P..|...43..4|
|00000c40| 33 07 02 07 00 00 00 00 | 20 50 e9 be be be 27 34 |3.......| P....'4|
|00000c50| 33 43 44 33 33 07 02 00 | 00 00 00 70 20 50 e9 eb |3CD33...|...p P..|
|00000c60| eb bb 07 00 34 33 33 33 | 07 00 02 07 00 00 00 00 |....4333|........|
|00000c70| 20 50 e9 be be be 37 02 | 00 24 32 07 40 02 02 00 | P....7.|.$2.@...|
|00000c80| 00 00 00 70 20 00 95 ee | eb 7b 00 00 00 24 32 07 |...p ...|.{...$2.|
|00000c90| 00 00 02 07 00 00 00 00 | 20 00 95 be be 7b 01 22 |........| ....{."|
|00000ca0| 02 24 32 07 31 01 02 00 | 00 00 00 70 20 00 50 e9 |.$2.1...|...p .P.|
|00000cb0| bb 07 00 00 00 24 32 07 | 00 00 02 06 00 00 00 00 |.....$2.|........|
|00000cc0| 20 30 30 31 25 10 20 21 | 00 24 32 17 31 00 02 00 | 001%. !|.$2.1...|
|00000cd0| 00 00 00 70 20 00 00 30 | 05 00 00 00 00 24 32 07 |...p ..0|.....$2.|
|00000ce0| 00 00 02 07 00 00 00 00 | 20 20 13 31 25 10 32 01 |........| .1%.2.|
|00000cf0| 01 24 32 17 32 00 02 00 | 00 00 00 70 20 10 22 32 |.$2.2...|...p ."2|
|00000d00| 05 00 00 00 00 24 32 07 | 00 00 02 07 00 00 00 00 |.....$2.|........|
|00000d10| 20 03 00 30 05 22 00 01 | 10 24 32 07 10 01 02 00 | ..0."..|.$2.....|
|00000d20| 00 00 00 10 03 00 07 30 | 05 00 20 00 34 33 33 33 |.......0|.. .4333|
|00000d30| 07 00 02 31 00 00 00 03 | 00 00 07 34 43 00 00 34 |...1....|...4C..4|
|00000d40| 33 43 44 33 33 17 32 00 | 00 00 00 00 00 07 ee 43 |3CD33.2.|.......C|
|00000d50| 34 00 00 34 33 07 00 34 | 33 05 00 00 00 00 00 00 |4..43..4|3.......|
|00000d60| e0 ee ee 42 24 00 00 40 | 33 07 00 34 53 00 00 00 |...B$..@|3..4S...|
|00000d70| 00 00 00 ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000d80| ff ff ff ff 00 00 00 ff | ff ff ff ff ff ff ff ff |........|........|
|00000d90| ff ff ff ff ff ff ff ff | 00 00 00 ff ff ff ff ff |........|........|
|00000da0| ff ff ff ff ff ff ff ff | ff ff ff ff 00 00 00 ff |........|........|
|00000db0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000dc0| 00 00 00 ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000dd0| ff ff ff ff 00 00 00 ff | ff ff ff ff ff ff ff ff |........|........|
|00000de0| ff ff ff ff ff ff ff ff | 00 00 00 ff ff ff ff ff |........|........|
|00000df0| ff ff ff ff ff ff ff ff | ff ff ff ff 00 00 00 ff |........|........|
|00000e00| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000e10| 00 00 00 ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000e20| ff ff ff ff 00 00 00 ff | ff ff ff ff ff ff ff ff |........|........|
|00000e30| ff ff ff ff ff ff ff ff | 00 00 00 ff ff ff ff ff |........|........|
|00000e40| ff ff ff ff ff ff ff ff | ff ff ff ff 00 00 00 ff |........|........|
|00000e50| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000e60| 00 00 00 ff ff 0f 00 f0 | 0f ff ff ff ff ff ff ff |........|........|
|00000e70| ff ff ff ff 00 00 00 ff | 0f 00 00 f0 0f 00 f0 ff |........|........|
|00000e80| ff ff ff ff ff ff ff ff | 00 00 00 0f 00 00 00 ff |........|........|
|00000e90| ff 00 00 ff ff ff ff ff | ff ff ff 00 00 00 00 00 |........|........|
|00000ea0| 00 00 00 ff ff 00 00 ff | ff 0f 00 ff ff 0f 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 f0 | 0f 00 00 f0 ff 0f 00 ff |........|........|
|00000ec0| ff 00 00 00 00 00 00 04 | 01 00 00 73 6d 21 61 72 |........|...sm!ar|
|00000ed0| 6d 6d 61 6b 65 72 00 02 | 00 00 00 08 00 00 00 00 |mmaker..|........|
|00000ee0| 00 00 00 03 00 00 00 2c | 00 00 00 98 00 00 00 0c |.......,|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 02 |........|........|
|00000f00| ee 0e 30 03 30 03 03 00 | 00 00 00 02 ee 0e 30 33 |..0.0...|......03|
|00000f10| 33 03 00 00 00 00 00 02 | ee 0e 00 20 03 00 03 00 |3.......|... ....|
|00000f20| 00 00 00 02 ee 0e 00 20 | 03 00 00 00 00 00 00 02 |....... |........|
|00000f30| 30 00 00 20 03 00 03 00 | 00 00 00 12 32 00 00 20 |0.. ....|....2.. |
|00000f40| 03 00 00 00 00 00 00 00 | 30 00 32 33 33 03 30 00 |........|0.233.0.|
|00000f50| 00 00 00 00 40 03 30 03 | 30 03 00 00 00 00 00 00 |....@.0.|0.......|
|00000f60| 00 00 00 00 00 00 00 f0 | ff ff ff ff ff ff ff ff |........|........|
|00000f70| ff ff ff f0 ff ff ff ff | ff ff ff ff ff ff ff f0 |........|........|
|00000f80| ff ff ff ff ff ff ff ff | ff ff ff f0 ff ff ff ff |........|........|
|00000f90| ff ff ff ff ff ff ff f0 | ff ff ff ff ff ff ff ff |........|........|
|00000fa0| ff ff ff f0 ff ff ff ff | ff 00 f0 ff ff ff ff f0 |........|........|
|00000fb0| ff ff ff 00 f0 00 ff ff | ff ff ff f0 ff ff ff 00 |........|........|
|00000fc0| f0 0f f0 0f f0 0f 00 f0 | ff ff ff 46 69 6c 65 44 |........|...FileD|
|00000fd0| 61 74 61 82 41 52 4d 6d | 61 6b 65 44 4f 58 00 6b |ata.ARMm|akeDOX.k|
|00000fe0| 70 00 00 45 ff ff ff 6b | e5 2f 82 03 00 03 34 41 |p..E...k|./....4A|
|00000ff0| 52 4d 6d 61 6b 65 72 0a | 41 6e 20 41 52 4d 20 61 |RMmaker.|An ARM a|
|00001000| 73 73 65 6d 62 6c 65 72 | 2c 20 69 6e 63 6c 75 64 |ssembler|, includ|
|00001010| 69 6e 67 20 41 4f 46 20 | 61 6e 64 20 66 6c 6f 61 |ing AOF |and floa|
|00001020| 74 69 6e 67 20 70 6f 69 | 6e 74 20 61 73 73 65 6d |ting poi|nt assem|
|00001030| 62 6c 79 0a 28 43 29 20 | 53 74 65 76 65 6e 20 48 |bly.(C) |Steven H|
|00001040| 61 73 6c 61 6d 20 31 39 | 39 34 0a 2d 2d 2d 2d 2d |aslam 19|94.-----|
|00001050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001070| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001080| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001090| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 54 68 69 73 20 70 72 |--------|.This pr|
|000010a0| 6f 67 72 61 6d 20 6d 61 | 79 20 62 65 20 75 73 65 |ogram ma|y be use|
|000010b0| 64 20 77 69 74 68 20 41 | 63 6f 72 6e 20 43 6f 6d |d with A|corn Com|
|000010c0| 70 75 74 65 72 73 27 20 | 44 65 73 6b 74 6f 70 20 |puters' |Desktop |
|000010d0| 44 65 76 65 6c 6f 70 6d | 65 6e 74 0a 45 6e 76 69 |Developm|ent.Envi|
|000010e0| 72 6f 6e 6d 65 6e 74 2c | 20 62 75 74 20 6d 61 79 |ronment,| but may|
|000010f0| 20 61 6c 73 6f 20 62 65 | 20 75 73 65 64 20 61 73 | also be| used as|
|00001100| 20 61 20 73 74 61 6e 64 | 61 6c 6f 6e 65 20 66 6f | a stand|alone fo|
|00001110| 72 20 61 6e 79 20 73 75 | 69 74 61 62 6c 65 0a 61 |r any su|itable.a|
|00001120| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 65 2e 67 2e |pplicati|on, e.g.|
|00001130| 20 41 4e 53 49 20 43 20 | 72 65 6c 65 61 73 65 20 | ANSI C |release |
|00001140| 33 2e 20 49 74 20 6d 61 | 79 20 61 6c 73 6f 20 62 |3. It ma|y also b|
|00001150| 65 20 75 73 65 64 20 74 | 6f 20 61 73 73 65 6d 62 |e used t|o assemb|
|00001160| 6c 65 20 63 6f 64 65 20 | 74 6f 0a 72 75 6e 20 66 |le code |to.run f|
|00001170| 72 6f 6d 20 52 69 73 63 | 4f 53 20 77 69 74 68 6f |rom Risc|OS witho|
|00001180| 75 74 20 6f 74 68 65 72 | 20 73 75 70 70 6f 72 74 |ut other| support|
|00001190| 69 6e 67 20 70 72 6f 67 | 72 61 6d 73 2e 0a 2d 2d |ing prog|rams..--|
|000011a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 41 6c 6c 20 |--------|---.All |
|000011f0| 6f 66 20 74 68 65 20 70 | 72 6f 67 72 61 6d 20 63 |of the p|rogram c|
|00001200| 6f 64 65 20 77 61 73 20 | 77 72 69 74 74 65 6e 20 |ode was |written |
|00001210| 62 79 20 53 74 65 76 65 | 6e 20 48 61 73 6c 61 6d |by Steve|n Haslam|
|00001220| 2e 0a 46 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |..Floati|ng point|
|00001230| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 20 66 6f 72 | instruc|tion for|
|00001240| 6d 61 74 20 64 65 64 75 | 63 65 64 20 66 72 6f 6d |mat dedu|ced from|
|00001250| 20 42 41 53 49 43 20 6c | 69 62 72 61 72 79 20 62 | BASIC l|ibrary b|
|00001260| 79 20 54 4a 20 43 68 61 | 70 70 65 6c 6c 0a 43 6f |y TJ Cha|ppell.Co|
|00001270| 70 72 6f 63 65 73 73 6f | 72 20 61 6e 64 20 53 57 |processo|r and SW|
|00001280| 50 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 20 66 6f |P instru|ction fo|
|00001290| 72 6d 61 74 20 64 65 64 | 75 63 65 64 20 66 72 6f |rmat ded|uced fro|
|000012a0| 6d 20 21 41 53 20 62 79 | 20 4e 69 6b 6c 61 73 20 |m !AS by| Niklas |
|000012b0| 52 f6 6a 65 6d 6f 0a 4d | 79 20 74 68 61 6e 6b 73 |R.jemo.M|y thanks|
|000012c0| 20 74 6f 20 74 68 65 73 | 65 20 61 75 74 68 6f 72 | to thes|e author|
|000012d0| 73 2e 0a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |s..-----|--------|
|000012e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001320| 0a 41 52 4d 6d 61 6b 65 | 72 20 69 73 20 22 46 72 |.ARMmake|r is "Fr|
|00001330| 65 65 57 61 72 65 22 3a | 20 69 74 73 20 63 6f 70 |eeWare":| its cop|
|00001340| 79 69 6e 67 20 61 6e 64 | 20 64 69 73 74 72 69 62 |ying and| distrib|
|00001350| 75 74 69 6f 6e 20 61 72 | 65 20 70 65 72 6d 69 74 |ution ar|e permit|
|00001360| 74 65 64 20 70 72 6f 76 | 69 64 65 64 0a 74 68 61 |ted prov|ided.tha|
|00001370| 74 20 6e 6f 20 70 72 6f | 66 69 74 20 69 73 20 62 |t no pro|fit is b|
|00001380| 65 69 6e 67 20 6d 61 64 | 65 3a 20 73 65 65 20 74 |eing mad|e: see t|
|00001390| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 66 69 |he end o|f the fi|
|000013a0| 6c 65 20 66 6f 72 20 64 | 65 74 61 69 6c 73 2e 0a |le for d|etails..|
|000013b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 0a 50 |--------|-----..P|
|00001400| 72 6f 67 72 61 6d 6d 65 | 72 73 20 77 69 6c 6c 20 |rogramme|rs will |
|00001410| 62 65 20 61 77 61 72 65 | 20 6f 66 20 74 68 65 20 |be aware| of the |
|00001420| 41 52 4d 20 61 73 73 65 | 6d 62 6c 65 72 20 62 75 |ARM asse|mbler bu|
|00001430| 69 6c 74 20 69 6e 74 6f | 20 42 42 43 20 42 41 53 |ilt into| BBC BAS|
|00001440| 49 43 2e 20 48 6f 77 65 | 76 65 72 2c 0a 74 68 69 |IC. Howe|ver,.thi|
|00001450| 73 20 61 73 73 65 6d 62 | 6c 65 72 20 68 61 73 20 |s assemb|ler has |
|00001460| 6c 69 6d 69 74 61 74 69 | 6f 6e 73 2c 20 69 6e 63 |limitati|ons, inc|
|00001470| 6c 75 64 69 6e 67 2c 20 | 62 75 74 20 6e 6f 74 20 |luding, |but not |
|00001480| 6c 69 6d 69 74 65 64 20 | 74 6f 3a 0a 0a 20 20 20 |limited |to:.. |
|00001490| 49 6e 61 62 69 6c 69 74 | 79 20 74 6f 20 65 78 70 |Inabilit|y to exp|
|000014a0| 6f 72 74 20 74 6f 20 41 | 4f 46 20 66 69 6c 65 73 |ort to A|OF files|
|000014b0| 3a 20 66 6f 72 20 75 73 | 65 20 77 69 74 68 20 43 |: for us|e with C|
|000014c0| 2c 20 50 61 73 63 61 6c | 20 6f 72 20 76 65 72 79 |, Pascal| or very|
|000014d0| 20 6c 61 72 67 65 0a 6d | 61 63 68 69 6e 65 20 63 | large.m|achine c|
|000014e0| 6f 64 65 20 70 72 6f 6a | 65 63 74 73 2e 0a 20 20 |ode proj|ects.. |
|000014f0| 20 46 6c 6f 61 74 69 6e | 67 20 70 6f 69 6e 74 2f | Floatin|g point/|
|00001500| 63 6f 70 72 6f 63 65 73 | 73 6f 72 20 66 75 6e 63 |coproces|sor func|
|00001510| 74 69 6f 6e 73 20 6e 6f | 74 20 62 75 69 6c 74 20 |tions no|t built |
|00001520| 69 6e 2e 0a 20 20 20 52 | 61 6e 67 65 20 6f 66 20 |in.. R|ange of |
|00001530| 41 44 52 20 6c 69 6d 69 | 74 65 64 20 74 6f 20 73 |ADR limi|ted to s|
|00001540| 69 6e 67 6c 65 2d 69 6e | 73 74 72 75 63 74 69 6f |ingle-in|structio|
|00001550| 6e 20 63 61 70 61 62 69 | 6c 69 74 79 0a 0a 4f 66 |n capabi|lity..Of|
|00001560| 20 63 6f 75 72 73 65 2c | 20 69 66 20 79 6f 75 20 | course,| if you |
|00001570| 77 61 6e 74 20 61 20 44 | 44 45 20 61 73 73 65 6d |want a D|DE assem|
|00001580| 62 6c 65 72 20 77 69 74 | 68 20 61 6c 6c 20 74 68 |bler wit|h all th|
|00001590| 65 20 66 65 61 74 75 72 | 65 73 2c 20 79 6f 75 20 |e featur|es, you |
|000015a0| 63 61 6e 20 62 75 79 0a | 41 63 6f 72 6e 27 73 20 |can buy.|Acorn's |
|000015b0| 6f 77 6e 20 44 65 73 6b | 74 6f 70 20 41 73 73 65 |own Desk|top Asse|
|000015c0| 6d 62 6c 65 72 2e 20 41 | 20 73 6e 69 70 3b 20 63 |mbler. A| snip; c|
|000015d0| 6f 73 74 73 20 3e 3d a3 | 31 30 30 2c 20 49 20 62 |osts >=.|100, I b|
|000015e0| 65 6c 69 65 76 65 2e 20 | 42 79 0a 63 6f 6d 70 61 |elieve. |By.compa|
|000015f0| 72 69 73 6f 6e 2c 20 41 | 52 4d 6d 61 6b 65 72 20 |rison, A|RMmaker |
|00001600| 69 73 20 2a 46 52 45 45 | 2a 20 28 73 65 65 20 65 |is *FREE|* (see e|
|00001610| 6e 64 20 6f 66 20 66 69 | 6c 65 20 66 6f 72 20 64 |nd of fi|le for d|
|00001620| 65 74 61 69 6c 73 29 2e | 0a 0a 41 52 4d 6d 61 6b |etails).|..ARMmak|
|00001630| 65 72 20 69 73 20 6e 6f | 74 20 61 20 6d 65 67 61 |er is no|t a mega|
|00001640| 2d 61 73 73 65 6d 62 6c | 65 72 2e 20 49 74 27 73 |-assembl|er. It's|
|00001650| 20 61 6e 20 61 73 73 65 | 6d 62 6c 65 72 20 22 77 | an asse|mbler "w|
|00001660| 68 61 74 20 49 20 77 72 | 6f 74 65 22 20 74 6f 20 |hat I wr|ote" to |
|00001670| 63 6f 76 65 72 0a 74 68 | 65 20 70 6f 69 6e 74 73 |cover.th|e points|
|00001680| 20 61 62 6f 76 65 20 28 | 61 6c 74 68 6f 75 67 68 | above (|although|
|00001690| 20 61 6c 6c 20 62 75 74 | 20 41 4f 46 20 65 78 70 | all but| AOF exp|
|000016a0| 6f 72 74 20 63 61 6e 20 | 62 65 20 68 61 6e 64 6c |ort can |be handl|
|000016b0| 65 64 20 28 6a 75 73 74 | 20 61 62 6f 75 74 29 20 |ed (just| about) |
|000016c0| 69 6e 0a 42 41 53 49 43 | 29 2e 20 49 74 20 77 61 |in.BASIC|). It wa|
|000016d0| 73 20 77 72 69 74 74 65 | 6e 20 61 66 74 65 72 20 |s writte|n after |
|000016e0| 49 20 67 6f 74 20 66 65 | 64 20 75 70 20 77 69 74 |I got fe|d up wit|
|000016f0| 68 20 22 54 4c 41 22 2c | 20 61 6e 6f 74 68 65 72 |h "TLA",| another|
|00001700| 20 50 44 20 41 4f 46 0a | 61 73 73 65 6d 62 6c 65 | PD AOF.|assemble|
|00001710| 72 20 28 6f 6b 2c 20 62 | 75 74 20 6e 6f 20 66 6c |r (ok, b|ut no fl|
|00001720| 6f 61 74 69 6e 67 2d 70 | 6f 69 6e 74 2c 20 6e 61 |oating-p|oint, na|
|00001730| 73 74 79 20 73 79 6e 74 | 61 78 20 28 49 4d 48 4f |sty synt|ax (IMHO|
|00001740| 29 2c 20 49 20 6b 65 65 | 70 20 6c 6f 73 69 6e 67 |), I kee|p losing|
|00001750| 20 74 68 65 0a 64 6f 63 | 75 6d 65 6e 74 61 74 69 | the.doc|umentati|
|00001760| 6f 6e 2c 20 6e 6f 20 74 | 68 72 6f 77 62 61 63 6b |on, no t|hrowback|
|00001770| 20 26 63 2e 20 26 63 2e | 29 0a 0a 42 61 73 69 63 | &c. &c.|)..Basic|
|00001780| 61 6c 6c 79 2c 20 41 52 | 4d 6d 61 6b 65 72 20 63 |ally, AR|Mmaker c|
|00001790| 61 6e 3a 0a 0a 20 20 20 | 52 65 61 64 20 61 6e 20 |an:.. |Read an |
|000017a0| 61 73 73 65 6d 62 6c 79 | 20 6c 69 73 74 69 6e 67 |assembly| listing|
|000017b0| 20 66 72 6f 6d 20 6f 6e | 65 20 6f 72 20 6d 6f 72 | from on|e or mor|
|000017c0| 65 20 66 69 6c 65 73 20 | 28 75 73 69 6e 67 20 74 |e files |(using t|
|000017d0| 68 65 20 49 4e 43 4c 55 | 44 45 20 63 6f 6d 6d 61 |he INCLU|DE comma|
|000017e0| 6e 64 0a 74 6f 20 72 65 | 61 64 20 66 72 6f 6d 20 |nd.to re|ad from |
|000017f0| 61 20 64 69 66 66 65 72 | 65 6e 74 20 66 69 6c 65 |a differ|ent file|
|00001800| 29 2e 0a 20 20 20 41 73 | 73 65 6d 62 6c 65 20 74 |).. As|semble t|
|00001810| 68 65 20 63 6f 64 65 2c | 20 6f 66 66 65 72 69 6e |he code,| offerin|
|00001820| 67 20 66 65 61 74 75 72 | 65 73 20 73 75 63 68 20 |g featur|es such |
|00001830| 61 73 20 6d 61 63 72 6f | 20 65 78 70 61 6e 73 69 |as macro| expansi|
|00001840| 6f 6e 2c 20 73 79 6d 62 | 6f 6c 0a 69 6d 70 6f 72 |on, symb|ol.impor|
|00001850| 74 20 61 6e 64 20 65 78 | 70 6f 72 74 20 28 77 69 |t and ex|port (wi|
|00001860| 74 68 20 41 4f 46 29 2c | 20 72 65 67 69 73 74 65 |th AOF),| registe|
|00001870| 72 20 62 69 6e 64 69 6e | 67 73 2c 20 6d 75 6c 74 |r bindin|gs, mult|
|00001880| 69 70 6c 65 20 61 72 65 | 61 73 20 28 41 4f 46 29 |iple are|as (AOF)|
|00001890| 2c 0a 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |,.floati|ng point|
|000018a0| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 2c 20 6c | instruc|tions, l|
|000018b0| 6f 63 61 6c 20 6c 61 62 | 65 6c 73 20 26 63 2e 0a |ocal lab|els &c..|
|000018c0| 20 20 20 52 65 70 6f 72 | 74 20 65 72 72 6f 72 73 | Repor|t errors|
|000018d0| 20 69 6e 20 61 20 76 61 | 67 75 65 6c 79 20 73 65 | in a va|guely se|
|000018e0| 6e 73 69 62 6c 65 20 6d | 61 6e 6e 65 72 20 28 6d |nsible m|anner (m|
|000018f0| 72 65 20 64 65 74 61 69 | 6c 65 64 20 6d 65 73 73 |re detai|led mess|
|00001900| 61 67 65 73 20 74 68 61 | 6e 0a 77 69 74 68 20 74 |ages tha|n.with t|
|00001910| 68 65 20 42 41 53 49 43 | 20 61 73 73 65 6d 62 6c |he BASIC| assembl|
|00001920| 65 72 20 6d 6f 73 74 20 | 6f 66 20 74 68 65 20 74 |er most |of the t|
|00001930| 69 6d 65 29 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |ime), in|cluding |
|00001940| 76 69 61 20 74 68 65 20 | 22 74 68 72 6f 77 62 61 |via the |"throwba|
|00001950| 63 6b 22 0a 6d 65 63 68 | 61 6e 69 73 6d 20 77 68 |ck".mech|anism wh|
|00001960| 65 72 65 20 65 72 72 6f | 72 73 20 61 72 65 20 73 |ere erro|rs are s|
|00001970| 65 6e 74 20 74 6f 20 79 | 6f 75 72 20 74 65 78 74 |ent to y|our text|
|00001980| 20 65 64 69 74 6f 72 0a | 28 53 72 63 45 64 69 74 | editor.|(SrcEdit|
|00001990| 2f 53 74 72 6f 6e 67 45 | 44 2f 5a 61 70 2f 44 65 |/StrongE|D/Zap/De|
|000019a0| 73 6b 45 64 69 74 20 26 | 63 2e 29 0a 20 20 20 45 |skEdit &|c.). E|
|000019b0| 78 70 6f 72 74 20 74 68 | 65 20 61 73 73 65 6d 62 |xport th|e assemb|
|000019c0| 6c 65 64 20 6d 61 63 68 | 69 6e 65 20 63 6f 64 65 |led mach|ine code|
|000019d0| 20 74 6f 20 61 6e 79 20 | 6f 66 20 74 68 65 20 73 | to any |of the s|
|000019e0| 74 61 6e 64 61 72 64 20 | 63 6f 64 65 20 66 6f 72 |tandard |code for|
|000019f0| 6d 61 74 73 20 6f 6e 0a | 52 69 73 63 2d 4f 53 3b |mats on.|Risc-OS;|
|00001a00| 20 69 2e 65 2e 20 73 74 | 72 61 69 67 68 74 20 63 | i.e. st|raight c|
|00001a10| 6f 64 65 20 77 69 74 68 | 20 74 79 70 65 73 20 55 |ode with| types U|
|00001a20| 74 69 6c 69 74 79 2c 20 | 4d 6f 64 75 6c 65 2c 20 |tility, |Module, |
|00001a30| 41 62 73 6f 6c 75 74 65 | 2c 20 63 6f 64 65 20 77 |Absolute|, code w|
|00001a40| 69 74 68 0a 6c 6f 61 64 | 2f 65 78 65 63 75 74 69 |ith.load|/executi|
|00001a50| 6f 6e 20 61 64 64 72 65 | 73 73 65 73 20 73 65 74 |on addre|sses set|
|00001a60| 20 64 69 72 65 63 74 6c | 79 2c 20 6f 72 20 41 4f | directl|y, or AO|
|00001a70| 46 20 28 77 72 69 74 74 | 65 6e 20 61 73 20 61 20 |F (writt|en as a |
|00001a80| 44 61 74 61 2d 74 79 70 | 65 20 66 69 6c 65 29 2e |Data-typ|e file).|
|00001a90| 0a 0a 41 52 4d 6d 61 6b | 65 72 20 69 73 20 73 75 |..ARMmak|er is su|
|00001aa0| 70 70 6c 69 65 64 20 61 | 73 20 61 20 44 44 45 20 |pplied a|s a DDE |
|00001ab0| 74 6f 6f 6c 2c 20 74 68 | 65 20 61 70 70 6c 69 63 |tool, th|e applic|
|00001ac0| 61 74 69 6f 6e 20 21 41 | 52 4d 6d 61 6b 65 72 2e |ation !A|RMmaker.|
|00001ad0| 20 54 68 69 73 0a 61 70 | 70 6c 69 63 61 74 69 6f | This.ap|plicatio|
|00001ae0| 6e 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 61 |n contai|ns the a|
|00001af0| 63 74 75 61 6c 20 70 72 | 6f 67 72 61 6d 2c 20 61 |ctual pr|ogram, a|
|00001b00| 6e 64 20 69 6e 63 6c 75 | 64 65 73 20 73 6f 6d 65 |nd inclu|des some|
|00001b10| 20 73 74 61 6e 64 61 72 | 64 0a 64 65 66 69 6e 69 | standar|d.defini|
|00001b20| 74 69 6f 6e 73 20 74 68 | 61 74 20 63 61 6e 20 62 |tions th|at can b|
|00001b30| 65 20 69 6e 63 6c 75 64 | 65 64 20 69 6e 74 6f 20 |e includ|ed into |
|00001b40| 79 6f 75 72 20 73 6f 75 | 72 63 65 20 66 69 6c 65 |your sou|rce file|
|00001b50| 2e 0a 0a 41 52 4d 6d 61 | 6b 65 72 20 61 6e 64 20 |...ARMma|ker and |
|00001b60| 74 68 65 20 44 44 45 0a | 3d 3d 3d 3d 3d 3d 3d 3d |the DDE.|========|
|00001b70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0a 0a 49 66 |========|====..If|
|00001b80| 20 79 6f 75 20 69 6e 74 | 65 6e 64 20 74 6f 20 75 | you int|end to u|
|00001b90| 73 65 20 41 52 4d 6d 61 | 6b 65 72 20 77 69 74 68 |se ARMma|ker with|
|00001ba0| 20 74 68 65 20 44 44 45 | 2c 20 74 68 65 6e 20 79 | the DDE|, then y|
|00001bb0| 6f 75 20 77 69 6c 6c 20 | 77 61 6e 74 20 74 6f 20 |ou will |want to |
|00001bc0| 63 6f 70 79 20 74 68 65 | 0a 21 41 52 4d 6d 61 6b |copy the|.!ARMmak|
|00001bd0| 65 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |er appli|cation i|
|00001be0| 6e 74 6f 20 79 6f 75 72 | 20 44 44 45 20 64 69 72 |nto your| DDE dir|
|00001bf0| 65 63 74 6f 72 79 2c 20 | 61 6c 6f 6e 67 20 77 69 |ectory, |along wi|
|00001c00| 74 68 20 21 43 43 2c 20 | 21 4c 69 6e 6b 20 61 6e |th !CC, |!Link an|
|00001c10| 64 20 73 6f 0a 6f 6e 2e | 20 59 6f 75 20 63 61 6e |d so.on.| You can|
|00001c20| 20 61 64 64 20 41 52 4d | 6d 61 6b 65 72 20 61 73 | add ARM|maker as|
|00001c30| 20 61 20 74 6f 6f 6c 20 | 74 6f 20 21 4d 61 6b 65 | a tool |to !Make|
|00001c40| 2e 20 4c 6f 61 64 20 74 | 68 65 20 66 69 6c 65 0a |. Load t|he file.|
|00001c50| 22 21 4d 61 6b 65 2e 63 | 68 6f 69 63 65 73 2e 74 |"!Make.c|hoices.t|
|00001c60| 6f 6f 6c 73 22 20 61 6e | 64 20 67 6f 20 74 6f 20 |ools" an|d go to |
|00001c70| 74 68 65 20 62 6f 74 74 | 6f 6d 20 6f 66 20 74 68 |the bott|om of th|
|00001c80| 65 20 66 69 6c 65 2e 20 | 4e 6f 77 20 61 64 64 20 |e file. |Now add |
|00001c90| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 0a 73 69 |the foll|owing.si|
|00001ca0| 78 20 6c 69 6e 65 73 20 | 74 6f 20 74 68 65 20 65 |x lines |to the e|
|00001cb0| 6e 64 20 6f 66 20 74 68 | 65 20 66 69 6c 65 3a 0a |nd of th|e file:.|
|00001cc0| 0a 41 52 4d 6d 61 6b 65 | 72 0a 61 72 6d 0a 2d 64 |.ARMmake|r.arm.-d|
|00001cd0| 20 21 44 65 70 65 6e 64 | 20 2d 74 0a 41 52 4d 6d | !Depend| -t.ARMm|
|00001ce0| 61 6b 65 72 20 24 28 41 | 52 4d 6d 61 6b 65 72 66 |aker $(A|RMmakerf|
|00001cf0| 6c 61 67 73 29 20 2d 6f | 20 24 40 20 24 3c 0a 3c |lags) -o| $@ $<.<|
|00001d00| 41 52 4d 6d 61 6b 65 72 | 24 44 69 72 3e 2e 44 65 |ARMmaker|$Dir>.De|
|00001d10| 73 63 0a 3c 41 52 4d 6d | 61 6b 65 72 24 44 69 72 |sc.<ARMm|aker$Dir|
|00001d20| 3e 2e 21 53 65 74 75 70 | 0a 0a 52 65 73 61 76 65 |>.!Setup|..Resave|
|00001d30| 20 74 68 65 20 66 69 6c | 65 2e 20 59 6f 75 20 77 | the fil|e. You w|
|00001d40| 69 6c 6c 20 68 61 76 65 | 20 74 6f 20 71 75 69 74 |ill have| to quit|
|00001d50| 20 21 4d 61 6b 65 20 61 | 6e 64 20 72 65 2d 72 75 | !Make a|nd re-ru|
|00001d60| 6e 20 69 74 20 62 65 66 | 6f 72 65 20 79 6f 75 20 |n it bef|ore you |
|00001d70| 63 61 6e 20 75 73 65 0a | 74 68 65 20 6e 65 77 20 |can use.|the new |
|00001d80| 6f 70 74 69 6f 6e 2e 20 | 41 52 4d 6d 61 6b 65 72 |option. |ARMmaker|
|00001d90| 20 66 69 6c 65 73 20 73 | 68 6f 75 6c 64 20 67 6f | files s|hould go|
|00001da0| 20 69 6e 20 61 20 64 69 | 72 65 63 74 6f 72 79 20 | in a di|rectory |
|00001db0| 63 61 6c 6c 65 64 20 22 | 61 72 6d 22 20 28 69 6e |called "|arm" (in|
|00001dc0| 20 74 68 65 0a 73 61 6d | 65 20 64 69 72 65 63 74 | the.sam|e direct|
|00001dd0| 6f 72 79 20 61 73 20 22 | 63 22 2c 20 22 6f 22 20 |ory as "|c", "o" |
|00001de0| 61 6e 64 20 22 68 22 29 | 20 74 6f 20 62 65 20 61 |and "h")| to be a|
|00001df0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 72 65 63 |utomatic|ally rec|
|00001e00| 6f 67 6e 69 73 65 64 20 | 61 73 0a 41 52 4d 6d 61 |ognised |as.ARMma|
|00001e10| 6b 65 72 20 73 6f 75 72 | 63 65 20 66 69 6c 65 73 |ker sour|ce files|
|00001e20| 2e 0a 0a 41 52 4d 6d 61 | 6b 65 72 20 77 69 74 68 |...ARMma|ker with|
|00001e30| 6f 75 74 20 74 68 65 20 | 44 44 45 0a 3d 3d 3d 3d |out the |DDE.====|
|00001e40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001e50| 3d 3d 3d 3d 0a 0a 54 68 | 65 20 21 41 52 4d 6d 61 |====..Th|e !ARMma|
|00001e60| 6b 65 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |ker appl|ication |
|00001e70| 64 65 66 69 6e 65 73 20 | 61 6e 20 61 6c 69 61 73 |defines |an alias|
|00001e80| 20 74 6f 20 72 75 6e 20 | 74 68 65 20 41 52 4d 6d | to run |the ARMm|
|00001e90| 61 6b 65 72 20 65 78 65 | 63 75 74 61 62 6c 65 0a |aker exe|cutable.|
|00001ea0| 66 72 6f 6d 20 69 6e 73 | 69 64 65 20 69 74 73 65 |from ins|ide itse|
|00001eb0| 6c 66 20 77 68 65 6e 65 | 76 65 72 20 74 68 65 20 |lf whene|ver the |
|00001ec0| 63 6f 6d 6d 61 6e 64 20 | 22 61 72 6d 6d 61 6b 65 |command |"armmake|
|00001ed0| 72 22 20 69 73 20 65 78 | 65 63 75 74 65 64 2c 20 |r" is ex|ecuted, |
|00001ee0| 65 2e 67 2e 20 66 72 6f | 6d 20 61 0a 6d 61 6b 65 |e.g. fro|m a.make|
|00001ef0| 66 69 6c 65 2e 0a 0a 54 | 68 65 20 63 6f 6d 6d 61 |file...T|he comma|
|00001f00| 6e 64 20 74 6f 20 61 73 | 73 65 6d 62 6c 65 20 61 |nd to as|semble a|
|00001f10| 20 66 69 6c 65 20 69 73 | 3a 0a 0a 20 20 20 61 72 | file is|:.. ar|
|00001f20| 6d 6d 61 6b 65 72 20 3c | 66 69 6c 65 6e 61 6d 65 |mmaker <|filename|
|00001f30| 3e 20 5b 2d 6f 20 3c 6f | 75 74 70 75 74 66 69 6c |> [-o <o|utputfil|
|00001f40| 65 3e 5d 5b 2d 74 5d 0a | 0a 54 68 65 20 22 2d 74 |e>][-t].|.The "-t|
|00001f50| 22 20 6f 70 74 69 6f 6e | 20 65 6e 61 62 6c 65 73 |" option| enables|
|00001f60| 20 74 68 72 6f 77 62 61 | 63 6b 2e 0a 41 20 64 65 | throwba|ck..A de|
|00001f70| 66 61 75 6c 74 20 77 69 | 6c 6c 20 62 65 20 75 73 |fault wi|ll be us|
|00001f80| 65 64 20 69 66 20 74 68 | 65 20 22 2d 6f 22 20 6f |ed if th|e "-o" o|
|00001f90| 70 74 69 6f 6e 20 69 73 | 20 6f 6d 69 74 74 65 64 |ption is| omitted|
|00001fa0| 2c 20 62 75 74 20 79 6f | 75 20 77 69 6c 6c 20 62 |, but yo|u will b|
|00001fb0| 65 20 77 61 72 6e 65 64 | 2e 0a 0a 41 52 4d 6d 61 |e warned|...ARMma|
|00001fc0| 6b 65 72 20 6f 74 68 65 | 72 20 64 65 74 61 69 6c |ker othe|r detail|
|00001fd0| 73 0a 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |s.======|========|
|00001fe0| 3d 3d 3d 3d 3d 3d 3d 3d | 0a 0a 41 52 4d 6d 61 6b |========|..ARMmak|
|00001ff0| 65 72 20 69 73 20 61 20 | 6f 6e 65 2d 70 61 73 73 |er is a |one-pass|
|00002000| 20 61 73 73 65 6d 62 6c | 65 72 2e 20 54 68 65 72 | assembl|er. Ther|
|00002010| 65 66 6f 72 65 2c 20 77 | 68 65 6e 20 79 6f 75 20 |efore, w|hen you |
|00002020| 75 73 65 20 61 20 73 79 | 6d 62 6f 6c 20 74 68 61 |use a sy|mbol tha|
|00002030| 74 20 69 73 6e 27 74 0a | 75 6e 64 65 72 73 74 6f |t isn't.|understo|
|00002040| 6f 64 2c 20 41 52 4d 6d | 61 6b 65 72 20 72 65 6d |od, ARMm|aker rem|
|00002050| 65 6d 62 65 72 73 20 74 | 68 65 20 72 65 66 65 72 |embers t|he refer|
|00002060| 65 6e 63 65 2e 20 57 68 | 65 6e 20 79 6f 75 20 66 |ence. Wh|en you f|
|00002070| 69 6e 61 6c 6c 79 20 64 | 65 66 69 6e 65 20 74 68 |inally d|efine th|
|00002080| 65 0a 73 79 6d 62 6f 6c | 2c 20 61 6c 6c 20 74 68 |e.symbol|, all th|
|00002090| 65 20 72 65 66 65 72 65 | 6e 63 65 73 20 61 72 65 |e refere|nces are|
|000020a0| 20 70 75 74 20 69 6e 74 | 6f 20 74 68 65 20 63 6f | put int|o the co|
|000020b0| 64 65 20 28 72 65 6c 6f | 63 61 74 65 20 62 72 61 |de (relo|cate bra|
|000020c0| 6e 63 68 65 73 2c 20 41 | 44 52 73 0a 26 63 2e 29 |nches, A|DRs.&c.)|
|000020d0| 20 61 6e 64 20 74 68 65 | 6e 20 64 65 61 63 74 69 | and the|n deacti|
|000020e0| 76 61 74 65 64 2e 0a 0a | 4f 6e 65 20 70 6f 69 6e |vated...|One poin|
|000020f0| 74 20 69 73 20 74 68 61 | 74 20 69 66 20 79 6f 75 |t is tha|t if you|
|00002100| 20 64 6f 20 61 6e 20 41 | 44 52 20 61 73 20 61 20 | do an A|DR as a |
|00002110| 66 6f 72 77 61 72 64 20 | 72 65 66 65 72 65 6e 63 |forward |referenc|
|00002120| 65 2c 20 61 6e 64 20 74 | 68 65 6e 20 77 68 65 6e |e, and t|hen when|
|00002130| 20 74 68 65 0a 73 79 6d | 62 6f 6c 20 69 73 20 64 | the.sym|bol is d|
|00002140| 65 66 69 6e 65 64 20 69 | 74 27 73 20 6f 75 74 20 |efined i|t's out |
|00002150| 6f 66 20 72 61 6e 67 65 | 2c 20 69 74 20 77 69 6c |of range|, it wil|
|00002160| 6c 20 6f 6e 6c 79 20 62 | 65 20 64 65 74 65 63 74 |l only b|e detect|
|00002170| 65 64 20 61 74 20 74 68 | 65 20 73 79 6d 62 6f 6c |ed at th|e symbol|
|00002180| 0a 64 65 66 69 6e 69 74 | 69 6f 6e 2e 20 48 6f 77 |.definit|ion. How|
|00002190| 65 76 65 72 2c 20 41 52 | 4d 6d 61 6b 65 72 20 57 |ever, AR|Mmaker W|
|000021a0| 49 4c 4c 20 74 65 6c 6c | 20 79 6f 75 20 74 68 65 |ILL tell| you the|
|000021b0| 20 6c 69 6e 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 | line nu|mber of |
|000021c0| 74 68 65 20 72 65 66 65 | 72 65 6e 63 65 0a 74 68 |the refe|rence.th|
|000021d0| 61 74 20 63 61 6e 6e 6f | 74 20 62 65 20 72 65 73 |at canno|t be res|
|000021e0| 6f 6c 76 65 64 3a 20 62 | 75 74 20 79 6f 75 72 20 |olved: b|ut your |
|000021f0| 74 68 72 6f 77 62 61 63 | 6b 20 77 69 6e 64 6f 77 |throwbac|k window|
|00002200| 20 77 69 6c 6c 20 6e 6f | 74 20 6e 65 63 65 73 73 | will no|t necess|
|00002210| 61 72 69 6c 79 20 68 61 | 76 65 0a 74 68 65 20 6c |arily ha|ve.the l|
|00002220| 69 6e 65 20 6e 75 6d 62 | 65 72 73 20 69 73 20 6d |ine numb|ers is m|
|00002230| 6f 6e 6f 74 6f 6e 69 63 | 61 6c 6c 79 20 61 73 63 |onotonic|ally asc|
|00002240| 65 6e 64 69 6e 67 20 6f | 72 64 65 72 21 20 59 6f |ending o|rder! Yo|
|00002250| 75 20 68 61 76 65 20 62 | 65 65 6e 20 77 61 72 6e |u have b|een warn|
|00002260| 65 64 21 0a 0a 41 52 4d | 6d 61 6b 65 72 20 73 6f |ed!..ARM|maker so|
|00002270| 75 72 63 65 20 66 69 6c | 65 73 0a 3d 3d 3d 3d 3d |urce fil|es.=====|
|00002280| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002290| 0a 0a 41 52 4d 6d 61 6b | 65 72 20 73 6f 75 72 63 |..ARMmak|er sourc|
|000022a0| 65 20 66 69 6c 65 73 20 | 64 69 66 66 65 72 20 67 |e files |differ g|
|000022b0| 72 65 61 74 6c 79 20 66 | 72 6f 6d 20 42 41 53 49 |reatly f|rom BASI|
|000022c0| 43 20 73 6f 75 72 63 65 | 20 63 6f 64 65 2c 20 62 |C source| code, b|
|000022d0| 65 69 6e 67 20 6d 6f 64 | 65 6c 6c 65 64 0a 6d 6f |eing mod|elled.mo|
|000022e0| 72 65 20 6f 6e 20 74 68 | 65 20 44 65 73 6b 74 6f |re on th|e Deskto|
|000022f0| 70 20 41 73 73 65 6d 62 | 6c 65 72 2c 20 69 74 73 |p Assemb|ler, its|
|00002300| 65 6c 66 20 6d 6f 64 65 | 6c 6c 65 64 20 6f 6e 20 |elf mode|lled on |
|00002310| 74 68 65 20 61 63 63 65 | 70 74 65 64 20 6c 61 79 |the acce|pted lay|
|00002320| 6f 75 74 73 20 6f 66 0a | 61 73 73 65 6d 62 6c 65 |outs of.|assemble|
|00002330| 72 20 63 6f 64 65 20 6f | 6e 20 6f 74 68 65 72 20 |r code o|n other |
|00002340| 70 6c 61 74 66 6f 72 6d | 73 20 28 70 74 75 69 21 |platform|s (ptui!|
|00002350| 29 2e 0a 0a 41 74 20 61 | 6e 79 20 70 6f 69 6e 74 |)...At a|ny point|
|00002360| 20 69 6e 20 74 68 65 20 | 66 69 6c 65 2c 20 61 20 | in the |file, a |
|00002370| 73 65 6d 69 63 6f 6c 6f | 6e 20 28 27 3b 27 29 20 |semicolo|n (';') |
|00002380| 69 6e 64 69 63 61 74 65 | 73 20 61 20 63 6f 6d 6d |indicate|s a comm|
|00002390| 65 6e 74 2c 20 73 74 61 | 72 74 69 6e 67 20 61 74 |ent, sta|rting at|
|000023a0| 0a 61 6e 64 20 69 6e 63 | 6c 75 64 69 6e 67 20 74 |.and inc|luding t|
|000023b0| 68 65 20 73 65 6d 69 63 | 6f 6c 6f 6e 20 75 70 20 |he semic|olon up |
|000023c0| 74 6f 20 61 6e 64 20 65 | 78 63 6c 75 64 69 6e 67 |to and e|xcluding|
|000023d0| 20 74 68 65 20 65 6e 64 | 2d 6f 66 2d 6c 69 6e 65 | the end|-of-line|
|000023e0| 20 63 68 61 72 61 63 74 | 65 72 2e 0a 0a 49 66 20 | charact|er...If |
|000023f0| 74 68 65 20 66 69 72 73 | 74 20 63 68 61 72 61 63 |the firs|t charac|
|00002400| 74 65 72 20 6f 6e 20 61 | 20 6c 69 6e 65 20 69 73 |ter on a| line is|
|00002410| 20 6e 6f 74 20 61 20 73 | 70 61 63 65 20 6f 72 20 | not a s|pace or |
|00002420| 61 20 74 61 62 20 28 63 | 6f 6c 6c 65 63 74 69 76 |a tab (c|ollectiv|
|00002430| 65 6c 79 20 63 61 6c 6c | 65 64 0a 22 77 68 69 74 |ely call|ed."whit|
|00002440| 65 73 70 61 63 65 22 29 | 20 74 68 65 6e 20 69 74 |espace")| then it|
|00002450| 20 69 73 20 74 68 65 20 | 73 74 61 72 74 20 6f 66 | is the |start of|
|00002460| 20 61 20 6c 61 62 65 6c | 2e 20 4e 6f 74 69 63 65 | a label|. Notice|
|00002470| 20 74 68 61 74 20 6c 61 | 62 65 6c 73 20 61 72 65 | that la|bels are|
|00002480| 20 6e 6f 74 0a 70 72 65 | 63 65 64 65 64 20 62 79 | not.pre|ceded by|
|00002490| 20 61 20 63 68 61 72 61 | 63 74 65 72 20 28 75 6e | a chara|cter (un|
|000024a0| 6c 69 6b 65 20 42 41 53 | 49 43 29 20 61 6e 64 20 |like BAS|IC) and |
|000024b0| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 73 75 66 66 |must not| be suff|
|000024c0| 69 78 65 64 20 77 69 74 | 68 20 61 0a 63 68 61 72 |ixed wit|h a.char|
|000024d0| 61 63 74 65 72 20 28 75 | 6e 6c 69 6b 65 20 54 4c |acter (u|nlike TL|
|000024e0| 41 29 2e 0a 0a 54 68 65 | 20 73 74 61 72 74 20 6f |A)...The| start o|
|000024f0| 66 20 74 68 65 20 6c 69 | 6e 65 20 69 73 20 63 61 |f the li|ne is ca|
|00002500| 6c 6c 65 64 20 74 68 65 | 20 6c 61 62 65 6c 20 22 |lled the| label "|
|00002510| 66 69 65 6c 64 22 2e 0a | 0a 41 66 74 65 72 20 74 |field"..|.After t|
|00002520| 68 65 20 6c 61 62 65 6c | 20 66 69 65 6c 64 20 69 |he label| field i|
|00002530| 73 20 74 68 65 20 22 69 | 6e 73 74 72 75 63 74 69 |s the "i|nstructi|
|00002540| 6f 6e 2f 64 69 72 65 63 | 74 69 76 65 20 66 69 65 |on/direc|tive fie|
|00002550| 6c 64 22 2e 20 54 68 69 | 73 20 69 73 20 73 65 70 |ld". Thi|s is sep|
|00002560| 61 72 61 74 65 64 0a 66 | 72 6f 6d 20 74 68 65 20 |arated.f|rom the |
|00002570| 6c 61 62 65 6c 20 66 69 | 65 6c 64 20 62 79 20 77 |label fi|eld by w|
|00002580| 68 69 74 65 73 70 61 63 | 65 2e 20 54 68 69 73 20 |hitespac|e. This |
|00002590| 66 69 65 6c 64 20 6d 69 | 67 68 74 20 62 65 20 66 |field mi|ght be f|
|000025a0| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 61 0a 22 70 61 |ollowed |by a."pa|
|000025b0| 72 61 6d 65 74 65 72 20 | 66 69 65 6c 64 22 20 28 |rameter |field" (|
|000025c0| 73 65 70 61 72 61 74 65 | 64 2c 20 61 67 61 69 6e |separate|d, again|
|000025d0| 2c 20 62 79 20 77 68 69 | 74 65 73 70 61 63 65 29 |, by whi|tespace)|
|000025e0| 2e 0a 0a 4c 65 74 27 73 | 20 73 65 65 20 68 6f 77 |...Let's| see how|
|000025f0| 20 74 68 61 74 20 6c 6f | 6f 6b 73 20 69 6e 20 70 | that lo|oks in p|
|00002600| 72 61 63 74 69 63 65 2e | 20 54 68 69 73 20 69 73 |ractice.| This is|
|00002610| 20 61 6e 20 65 78 61 6d | 70 6c 65 20 77 69 74 68 | an exam|ple with|
|00002620| 20 61 6c 6c 20 74 68 72 | 65 65 0a 66 69 65 6c 64 | all thr|ee.field|
|00002630| 73 3a 0a 0a 6c 6f 6f 70 | 20 20 20 20 20 20 20 20 |s:..loop| |
|00002640| 20 20 20 4d 4f 56 20 20 | 20 52 30 2c 20 23 30 20 | MOV | R0, #0 |
|00002650| 20 20 20 20 20 3b 20 54 | 68 69 73 20 69 73 20 61 | ; T|his is a|
|00002660| 20 63 6f 6d 6d 65 6e 74 | 0a 0a 42 65 63 61 75 73 | comment|..Becaus|
|00002670| 65 20 22 6c 6f 6f 70 22 | 20 69 73 20 72 69 67 68 |e "loop"| is righ|
|00002680| 74 20 61 74 20 74 68 65 | 20 73 74 61 72 74 20 6f |t at the| start o|
|00002690| 66 20 74 68 65 20 6c 69 | 6e 65 2c 20 69 74 27 73 |f the li|ne, it's|
|000026a0| 20 61 20 6c 61 62 65 6c | 20 64 65 66 69 6e 69 74 | a label| definit|
|000026b0| 69 6f 6e 2e 0a 41 52 4d | 6d 61 6b 65 72 20 64 65 |ion..ARM|maker de|
|000026c0| 66 69 6e 65 73 20 61 20 | 73 79 6d 62 6f 6c 20 63 |fines a |symbol c|
|000026d0| 61 6c 6c 65 64 20 22 6c | 6f 6f 70 22 20 61 6e 64 |alled "l|oop" and|
|000026e0| 20 73 65 74 73 20 69 74 | 20 74 6f 20 70 6f 69 6e | sets it| to poin|
|000026f0| 74 20 74 6f 20 74 68 65 | 20 63 75 72 72 65 6e 74 |t to the| current|
|00002700| 0a 70 6f 73 69 74 69 6f | 6e 20 69 6e 20 74 68 65 |.positio|n in the|
|00002710| 20 66 69 6c 65 2e 20 59 | 6f 75 20 63 61 6e 27 74 | file. Y|ou can't|
|00002720| 20 68 61 76 65 20 61 6e | 6f 74 68 65 72 20 73 79 | have an|other sy|
|00002730| 6d 62 6f 6c 20 63 61 6c | 6c 65 64 20 22 6c 6f 6f |mbol cal|led "loo|
|00002740| 70 22 3b 20 69 66 20 79 | 6f 75 0a 77 61 6e 74 20 |p"; if y|ou.want |
|00002750| 6c 6f 74 73 20 6f 66 20 | 6c 6f 6f 70 73 20 69 6e |lots of |loops in|
|00002760| 20 79 6f 75 72 20 63 6f | 64 65 2c 20 75 73 65 20 | your co|de, use |
|00002770| 6c 6f 63 61 6c 20 6c 61 | 62 65 6c 73 20 28 73 65 |local la|bels (se|
|00002780| 65 20 62 65 6c 6f 77 29 | 20 6f 72 20 63 61 6c 6c |e below)| or call|
|00002790| 20 74 68 65 6d 0a 61 6c | 6c 20 73 6f 6d 65 74 68 | them.al|l someth|
|000027a0| 69 6e 67 20 64 69 66 66 | 65 72 65 6e 74 20 28 6d |ing diff|erent (m|
|000027b0| 69 6e 64 2d 62 6f 67 67 | 6c 69 6e 67 21 29 2e 0a |ind-bogg|ling!)..|
|000027c0| 0a 54 68 65 20 69 6e 73 | 74 72 75 63 74 69 6f 6e |.The ins|truction|
|000027d0| 20 66 69 65 6c 64 20 69 | 73 20 22 4d 4f 56 22 2c | field i|s "MOV",|
|000027e0| 20 77 68 69 63 68 20 79 | 6f 75 20 73 68 6f 75 6c | which y|ou shoul|
|000027f0| 64 20 72 65 63 6f 67 6e | 69 73 65 20 61 73 20 61 |d recogn|ise as a|
|00002800| 6e 20 41 52 4d 0a 69 6e | 73 74 72 75 63 74 69 6f |n ARM.in|structio|
|00002810| 6e 2e 20 54 68 65 20 70 | 61 72 61 6d 65 74 65 72 |n. The p|arameter|
|00002820| 73 20 66 69 65 6c 64 20 | 69 73 20 22 52 30 2c 20 |s field |is "R0, |
|00002830| 23 30 22 2e 20 54 68 65 | 20 63 6f 6d 6d 65 6e 74 |#0". The| comment|
|00002840| 20 69 73 20 73 74 72 69 | 70 70 65 64 20 6f 66 66 | is stri|pped off|
|00002850| 0a 62 65 66 6f 72 65 20 | 74 68 65 20 66 69 65 6c |.before |the fiel|
|00002860| 64 73 20 61 72 65 20 6c | 6f 6f 6b 65 64 20 61 74 |ds are l|ooked at|
|00002870| 2e 0a 0a 53 6f 2c 20 74 | 68 69 73 20 6c 69 6e 65 |...So, t|his line|
|00002880| 20 77 69 6c 6c 20 64 65 | 66 69 6e 65 20 61 20 6c | will de|fine a l|
|00002890| 61 62 65 6c 2c 20 63 61 | 6c 6c 65 64 20 22 6c 6f |abel, ca|lled "lo|
|000028a0| 6f 70 22 2e 20 54 68 65 | 20 66 69 72 73 74 20 69 |op". The| first i|
|000028b0| 6e 73 74 72 75 63 74 69 | 6f 6e 20 6f 66 0a 74 68 |nstructi|on of.th|
|000028c0| 65 20 6c 6f 6f 70 20 77 | 69 6c 6c 20 62 65 20 22 |e loop w|ill be "|
|000028d0| 4d 4f 56 20 52 30 2c 20 | 23 30 22 2e 0a 0a 48 65 |MOV R0, |#0"...He|
|000028e0| 72 65 20 69 73 20 61 20 | 73 69 6c 6c 79 20 63 68 |re is a |silly ch|
|000028f0| 75 6e 6b 20 6f 66 20 63 | 6f 64 65 3a 0a 0a 6c 61 |unk of c|ode:..la|
|00002900| 62 65 6c 31 20 20 20 20 | 20 20 20 20 20 53 54 4d |bel1 | STM|
|00002910| 46 44 20 20 20 20 52 31 | 33 21 2c 20 7b 52 31 34 |FD R1|3!, {R14|
|00002920| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|00002930| 20 4d 4f 56 20 20 20 20 | 20 20 52 30 2c 20 23 33 | MOV | R0, #3|
|00002940| 32 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |2. | |
|00002950| 20 4d 4f 56 20 20 20 20 | 20 20 52 31 2c 20 23 31 | MOV | R1, #1|
|00002960| 32 37 0a 6c 6f 6f 70 20 | 20 20 20 20 20 20 20 20 |27.loop | |
|00002970| 20 20 53 57 49 20 20 20 | 20 20 20 22 4f 53 5f 57 | SWI | "OS_W|
|00002980| 72 69 74 65 43 22 0a 20 | 20 20 20 20 20 20 20 20 |riteC". | |
|00002990| 20 20 20 20 20 20 41 44 | 44 20 20 20 20 20 20 52 | AD|D R|
|000029a0| 30 2c 20 52 30 2c 20 23 | 31 0a 20 20 20 20 20 20 |0, R0, #|1. |
|000029b0| 20 20 20 20 20 20 20 20 | 20 43 4d 50 20 20 20 20 | | CMP |
|000029c0| 20 20 52 30 2c 20 52 31 | 0a 20 20 20 20 20 20 20 | R0, R1|. |
|000029d0| 20 20 20 20 20 20 20 20 | 41 44 44 45 51 20 20 20 | |ADDEQ |
|000029e0| 20 52 30 2c 20 52 30 2c | 20 23 31 0a 20 20 20 20 | R0, R0,| #1. |
|000029f0| 20 20 20 20 20 20 20 20 | 20 20 20 43 4d 50 20 20 | | CMP |
|00002a00| 20 20 20 20 52 30 2c 20 | 23 32 35 36 0a 20 20 20 | R0, |#256. |
|00002a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 42 4e 45 20 | | BNE |
|00002a20| 20 20 20 20 20 6c 6f 6f | 70 0a 20 20 20 20 20 20 | loo|p. |
|00002a30| 20 20 20 20 20 20 20 20 | 20 4c 44 4d 46 44 20 20 | | LDMFD |
|00002a40| 20 20 52 31 33 21 2c 20 | 7b 50 43 7d 5e 0a 0a 54 | R13!, |{PC}^..T|
|00002a50| 72 79 20 64 65 63 69 64 | 69 6e 67 20 77 68 61 74 |ry decid|ing what|
|00002a60| 20 74 68 69 73 20 70 69 | 65 63 65 20 6f 66 20 63 | this pi|ece of c|
|00002a70| 6f 64 65 20 64 6f 65 73 | 2c 20 61 6e 64 20 77 68 |ode does|, and wh|
|00002a80| 61 74 20 41 52 4d 6d 61 | 6b 65 72 20 64 6f 65 73 |at ARMma|ker does|
|00002a90| 20 77 68 65 6e 20 69 74 | 0a 61 73 73 65 6d 62 6c | when it|.assembl|
|00002aa0| 65 73 20 69 74 2e 0a 0a | 49 74 20 69 73 20 70 65 |es it...|It is pe|
|00002ab0| 72 66 65 63 74 6c 79 20 | 4f 4b 20 74 6f 20 68 61 |rfectly |OK to ha|
|00002ac0| 76 65 20 6a 75 73 74 20 | 61 20 6c 61 62 65 6c 20 |ve just |a label |
|00002ad0| 6f 6e 20 61 20 6c 69 6e | 65 2c 20 61 6e 64 20 6e |on a lin|e, and n|
|00002ae0| 6f 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 2e 20 53 |o instru|ction. S|
|00002af0| 6f 2c 0a 72 65 70 6c 61 | 63 69 6e 67 20 74 68 65 |o,.repla|cing the|
|00002b00| 20 33 72 64 20 74 6f 20 | 35 74 68 20 6c 69 6e 65 | 3rd to |5th line|
|00002b10| 73 20 6f 66 20 74 68 65 | 20 61 62 6f 76 65 20 63 |s of the| above c|
|00002b20| 6f 64 65 20 77 69 74 68 | 20 74 68 65 20 66 6f 6c |ode with| the fol|
|00002b30| 6c 6f 77 69 6e 67 20 66 | 6f 75 72 20 77 69 6c 6c |lowing f|our will|
|00002b40| 0a 61 63 74 75 61 6c 6c | 79 20 68 61 76 65 20 6e |.actuall|y have n|
|00002b50| 6f 20 65 66 66 65 63 74 | 20 6f 6e 20 74 68 65 20 |o effect| on the |
|00002b60| 66 69 6e 69 73 68 65 64 | 20 6d 61 63 68 69 6e 65 |finished| machine|
|00002b70| 20 63 6f 64 65 3a 0a 0a | 20 20 20 20 20 20 20 20 | code:..| |
|00002b80| 20 20 20 20 20 20 20 4d | 4f 56 20 20 20 20 20 20 | M|OV |
|00002b90| 52 31 2c 20 23 31 32 37 | 0a 6c 6f 6f 70 0a 20 20 |R1, #127|.loop. |
|00002ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 53 57 49 | | SWI|
|00002bb0| 20 20 20 20 20 20 22 4f | 53 5f 57 72 69 74 65 43 | "O|S_WriteC|
|00002bc0| 22 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |". | |
|00002bd0| 20 41 44 44 20 20 20 20 | 20 20 52 30 2c 20 52 30 | ADD | R0, R0|
|00002be0| 2c 20 23 31 0a 0a 41 73 | 20 77 65 6c 6c 20 61 73 |, #1..As| well as|
|00002bf0| 20 6d 61 63 68 69 6e 65 | 20 63 6f 64 65 20 69 6e | machine| code in|
|00002c00| 73 74 72 75 63 74 69 6f | 6e 73 2c 20 74 68 65 72 |structio|ns, ther|
|00002c10| 65 20 61 72 65 20 22 64 | 69 72 65 63 74 69 76 65 |e are "d|irective|
|00002c20| 73 22 20 28 61 73 20 6f | 70 70 6f 73 65 64 20 74 |s" (as o|pposed t|
|00002c30| 6f 0a 69 6e 73 74 72 75 | 63 74 69 6f 6e 73 29 20 |o.instru|ctions) |
|00002c40| 74 68 61 74 20 61 72 65 | 20 70 72 6f 63 65 73 73 |that are| process|
|00002c50| 65 64 20 62 79 20 41 52 | 4d 6d 61 6b 65 72 2e 20 |ed by AR|Mmaker. |
|00002c60| 54 68 65 73 65 20 6d 61 | 79 20 70 72 6f 64 75 63 |These ma|y produc|
|00002c70| 65 20 6f 75 74 70 75 74 | 0a 64 69 72 65 63 74 6c |e output|.directl|
|00002c80| 79 2c 20 6f 72 20 6d 61 | 79 20 61 66 66 65 63 74 |y, or ma|y affect|
|00002c90| 20 69 74 20 69 6e 20 73 | 6f 6d 65 20 6d 6f 72 65 | it in s|ome more|
|00002ca0| 20 73 75 62 74 6c 65 20 | 77 61 79 2e 0a 0a 45 76 | subtle |way...Ev|
|00002cb0| 65 72 79 20 70 72 6f 70 | 65 72 6c 79 2d 77 72 69 |ery prop|erly-wri|
|00002cc0| 74 74 65 6e 20 73 6f 75 | 72 63 65 20 66 69 6c 65 |tten sou|rce file|
|00002cd0| 20 77 69 6c 6c 20 68 61 | 76 65 20 73 6f 6d 65 20 | will ha|ve some |
|00002ce0| 64 69 72 65 63 74 69 76 | 65 73 2c 20 63 65 72 74 |directiv|es, cert|
|00002cf0| 61 69 6e 6c 79 20 61 74 | 0a 74 68 65 20 74 6f 70 |ainly at|.the top|
|00002d00| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 2e 20 59 6f | of the |file. Yo|
|00002d10| 75 20 6f 75 67 68 74 20 | 74 6f 20 68 61 76 65 20 |u ought |to have |
|00002d20| 61 20 64 69 72 65 63 74 | 69 76 65 20 74 65 6c 6c |a direct|ive tell|
|00002d30| 69 6e 67 20 41 52 4d 6d | 61 6b 65 72 20 77 68 61 |ing ARMm|aker wha|
|00002d40| 74 20 74 79 70 65 0a 6f | 66 20 66 69 6c 65 20 79 |t type.o|f file y|
|00002d50| 6f 75 20 61 72 65 20 6d | 61 6b 69 6e 67 2c 20 66 |ou are m|aking, f|
|00002d60| 6f 72 20 65 78 61 6d 70 | 6c 65 2e 0a 0a 54 68 65 |or examp|le...The|
|00002d70| 20 66 69 72 73 74 20 64 | 69 72 65 63 74 69 76 65 | first d|irective|
|00002d80| 20 74 68 61 74 20 49 27 | 6c 6c 20 73 68 6f 77 20 | that I'|ll show |
|00002d90| 79 6f 75 20 69 73 20 63 | 61 6c 6c 65 64 20 22 4f |you is c|alled "O|
|00002da0| 55 54 50 55 54 22 2e 20 | 59 6f 75 20 75 73 65 20 |UTPUT". |You use |
|00002db0| 69 74 20 6a 75 73 74 0a | 6c 69 6b 65 20 61 6e 20 |it just.|like an |
|00002dc0| 69 6e 73 74 72 75 63 74 | 69 6f 6e 20 63 61 6c 6c |instruct|ion call|
|00002dd0| 65 64 20 4f 55 54 50 55 | 54 2c 20 65 78 63 65 70 |ed OUTPU|T, excep|
|00002de0| 74 20 74 68 61 74 20 79 | 6f 75 20 63 61 6e 27 74 |t that y|ou can't|
|00002df0| 20 75 73 65 20 69 74 20 | 6f 6e 20 74 68 65 20 73 | use it |on the s|
|00002e00| 61 6d 65 0a 6c 69 6e 65 | 20 61 73 20 61 20 6c 61 |ame.line| as a la|
|00002e10| 62 65 6c 2c 20 77 68 69 | 63 68 20 77 6f 75 6c 64 |bel, whi|ch would|
|00002e20| 6e 27 74 20 62 65 20 76 | 65 72 79 20 75 73 65 66 |n't be v|ery usef|
|00002e30| 75 6c 20 61 6e 79 77 61 | 79 2e 0a 0a 4f 55 54 50 |ul anywa|y...OUTP|
|00002e40| 55 54 20 69 73 20 74 6f | 20 73 70 65 63 69 66 79 |UT is to| specify|
|00002e50| 20 77 68 61 74 20 6b 69 | 6e 64 20 6f 66 20 66 69 | what ki|nd of fi|
|00002e60| 6c 65 20 79 6f 75 20 61 | 72 65 20 6d 61 6b 69 6e |le you a|re makin|
|00002e70| 67 3b 20 79 6f 75 20 67 | 69 76 65 20 69 74 20 6f |g; you g|ive it o|
|00002e80| 6e 65 0a 70 61 72 61 6d | 65 74 65 72 2c 20 77 68 |ne.param|eter, wh|
|00002e90| 69 63 68 20 6d 61 79 20 | 62 65 20 6f 6e 65 20 6f |ich may |be one o|
|00002ea0| 66 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 3a |f the fo|llowing:|
|00002eb0| 0a 0a 20 20 20 20 20 20 | 41 42 53 4f 4c 55 54 45 |.. |ABSOLUTE|
|00002ec0| 20 20 20 20 43 6f 64 65 | 20 74 68 61 74 20 6c 6f | Code| that lo|
|00002ed0| 61 64 73 20 74 6f 20 61 | 6e 64 20 73 74 61 72 74 |ads to a|nd start|
|00002ee0| 73 20 61 74 20 61 64 64 | 72 65 73 73 20 26 38 30 |s at add|ress &80|
|00002ef0| 30 30 2c 20 74 79 70 65 | 20 26 46 46 38 2e 0a 20 |00, type| &FF8.. |
|00002f00| 20 20 20 20 20 4d 4f 44 | 55 4c 45 20 20 20 20 20 | MOD|ULE |
|00002f10| 20 41 20 72 65 6c 6f 63 | 61 74 61 62 6c 65 20 6d | A reloc|atable m|
|00002f20| 6f 64 75 6c 65 2c 20 74 | 79 70 65 20 26 46 46 41 |odule, t|ype &FFA|
|00002f30| 2c 20 77 69 74 68 20 61 | 20 73 70 65 63 69 61 6c |, with a| special|
|00002f40| 20 68 65 61 64 65 72 2e | 0a 20 20 20 20 20 20 55 | header.|. U|
|00002f50| 54 49 4c 49 54 59 20 20 | 20 20 20 54 72 61 6e 73 |TILITY | Trans|
|00002f60| 69 65 6e 74 20 63 6f 64 | 65 20 74 68 61 74 20 69 |ient cod|e that i|
|00002f70| 73 20 6d 75 73 74 20 62 | 65 20 63 6f 6d 70 6c 65 |s must b|e comple|
|00002f80| 74 65 6c 79 20 72 65 6c | 6f 63 61 74 61 62 6c 65 |tely rel|ocatable|
|00002f90| 2c 20 74 79 70 65 0a 26 | 46 46 43 2e 0a 20 20 20 |, type.&|FFC.. |
|00002fa0| 20 20 20 41 4f 46 20 20 | 20 20 20 20 20 20 20 41 | AOF | A|
|00002fb0| 63 6f 72 6e 20 4f 62 6a | 65 63 74 20 46 69 6c 65 |corn Obj|ect File|
|00002fc0| 2c 20 61 6e 20 69 6e 70 | 75 74 20 66 69 6c 65 20 |, an inp|ut file |
|00002fd0| 74 68 61 74 20 69 73 20 | 73 65 6e 74 20 74 6f 20 |that is |sent to |
|00002fe0| 22 6c 69 6e 6b 22 2c 0a | 61 6e 64 20 63 6f 6e 74 |"link",.|and cont|
|00002ff0| 61 69 6e 73 20 66 75 6e | 63 74 69 6f 6e 73 20 74 |ains fun|ctions t|
|00003000| 68 61 74 20 63 61 6e 20 | 62 65 20 73 68 61 72 65 |hat can |be share|
|00003010| 64 20 77 69 74 68 20 43 | 20 6f 72 20 50 61 73 63 |d with C| or Pasc|
|00003020| 61 6c 20 70 72 6f 67 72 | 61 6d 73 2e 0a 20 20 20 |al progr|ams.. |
|00003030| 20 20 20 44 49 52 45 43 | 54 20 20 20 20 20 20 22 | DIREC|T "|
|00003040| 44 69 72 65 63 74 6c 79 | 20 65 78 65 63 75 74 61 |Directly| executa|
|00003050| 62 6c 65 22 20 63 6f 64 | 65 20 74 68 61 74 20 6c |ble" cod|e that l|
|00003060| 6f 61 64 73 20 74 6f 20 | 61 20 73 70 65 63 69 66 |oads to |a specif|
|00003070| 69 63 20 61 72 65 61 20 | 6f 66 0a 6d 65 6d 6f 72 |ic area |of.memor|
|00003080| 79 20 61 6e 64 20 73 74 | 61 72 74 73 20 61 74 20 |y and st|arts at |
|00003090| 73 6f 6d 65 20 75 73 65 | 72 2d 73 70 65 63 69 66 |some use|r-specif|
|000030a0| 69 65 64 20 70 6f 69 6e | 74 20 77 69 74 68 69 6e |ied poin|t within|
|000030b0| 20 6d 65 6d 6f 72 79 2e | 20 41 6c 73 6f 20 63 61 | memory.| Also ca|
|000030c0| 6c 6c 65 64 0a 22 75 6e | 74 79 70 65 64 22 20 66 |lled."un|typed" f|
|000030d0| 69 6c 65 73 2c 20 73 69 | 6e 63 65 20 74 68 65 79 |iles, si|nce they|
|000030e0| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 61 20 73 74 | don't h|ave a st|
|000030f0| 61 6e 64 61 72 64 20 66 | 69 6c 65 74 79 70 65 2e |andard f|iletype.|
|00003100| 0a 0a 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |..For ex|ample, t|
|00003110| 6f 20 74 65 6c 6c 20 41 | 52 4d 6d 61 6b 65 72 20 |o tell A|RMmaker |
|00003120| 74 68 61 74 20 79 6f 75 | 20 61 72 65 20 77 72 69 |that you| are wri|
|00003130| 74 69 6e 67 20 61 6e 20 | 22 41 62 73 6f 6c 75 74 |ting an |"Absolut|
|00003140| 65 22 20 66 69 6c 65 2c | 20 79 6f 75 0a 77 6f 75 |e" file,| you.wou|
|00003150| 6c 64 20 68 61 76 65 20 | 74 68 69 73 20 6c 69 6e |ld have |this lin|
|00003160| 65 20 61 74 20 74 68 65 | 20 74 6f 70 20 6f 66 20 |e at the| top of |
|00003170| 79 6f 75 72 20 66 69 6c | 65 3a 0a 0a 20 20 20 20 |your fil|e:.. |
|00003180| 20 20 20 20 20 20 20 20 | 4f 55 54 50 55 54 20 20 | |OUTPUT |
|00003190| 20 41 42 53 4f 4c 55 54 | 45 0a 0a 54 6f 20 22 69 | ABSOLUT|E..To "i|
|000031a0| 6e 63 6c 75 64 65 22 20 | 61 6e 6f 74 68 65 72 20 |nclude" |another |
|000031b0| 66 69 6c 65 20 69 6e 73 | 69 64 65 20 79 6f 75 72 |file ins|ide your|
|000031c0| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 20 28 69 2e | source |file (i.|
|000031d0| 65 2e 20 67 6f 20 70 72 | 6f 63 65 73 73 20 61 6e |e. go pr|ocess an|
|000031e0| 6f 74 68 65 72 0a 66 69 | 6c 65 20 61 6e 64 20 74 |other.fi|le and t|
|000031f0| 68 65 6e 20 63 6f 6d 65 | 20 62 61 63 6b 20 74 6f |hen come| back to|
|00003200| 20 74 68 65 20 6f 6e 65 | 20 62 65 66 6f 72 65 29 | the one| before)|
|00003210| 2c 20 75 73 65 20 74 68 | 65 20 22 49 4e 43 4c 55 |, use th|e "INCLU|
|00003220| 44 45 22 20 64 69 72 65 | 63 74 69 76 65 2e 20 47 |DE" dire|ctive. G|
|00003230| 69 76 65 0a 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |ive.the |name of |
|00003240| 74 68 65 20 66 69 6c 65 | 20 61 73 20 61 20 70 61 |the file| as a pa|
|00003250| 72 61 6d 65 74 65 72 2e | 20 41 52 4d 6d 61 6b 65 |rameter.| ARMmake|
|00003260| 72 20 77 69 6c 6c 20 66 | 69 72 73 74 20 6c 6f 6f |r will f|irst loo|
|00003270| 6b 20 69 6e 20 74 68 65 | 20 6c 6f 63 61 6c 69 74 |k in the| localit|
|00003280| 79 0a 6f 66 20 74 68 65 | 20 73 6f 75 72 63 65 20 |y.of the| source |
|00003290| 66 69 6c 65 2c 20 61 6e | 64 20 74 68 65 6e 20 6f |file, an|d then o|
|000032a0| 6e 20 41 52 4d 24 50 61 | 74 68 2e 0a 0a 20 20 20 |n ARM$Pa|th... |
|000032b0| 20 20 20 20 20 20 20 20 | 20 49 4e 43 4c 55 44 45 | | INCLUDE|
|000032c0| 20 20 69 6e 63 2e 41 50 | 43 53 2d 52 0a 0a 49 66 | inc.AP|CS-R..If|
|000032d0| 20 79 6f 75 20 61 72 65 | 20 77 72 69 74 69 6e 67 | you are| writing|
|000032e0| 20 61 6e 20 41 4f 46 20 | 66 69 6c 65 2c 20 79 6f | an AOF |file, yo|
|000032f0| 75 20 77 69 6c 6c 20 6e | 65 65 64 20 74 6f 20 64 |u will n|eed to d|
|00003300| 65 63 6c 61 72 65 20 61 | 6e 20 61 72 65 61 2e 20 |eclare a|n area. |
|00003310| 41 6c 6c 20 6f 62 6a 65 | 63 74 0a 66 69 6c 65 73 |All obje|ct.files|
|00003320| 20 61 72 65 20 73 65 70 | 61 72 61 74 65 64 20 69 | are sep|arated i|
|00003330| 6e 74 6f 20 61 72 65 61 | 73 2e 20 4d 6f 73 74 20 |nto area|s. Most |
|00003340| 68 61 76 65 20 74 77 6f | 3a 20 6f 6e 65 20 66 6f |have two|: one fo|
|00003350| 72 20 63 6f 64 65 2c 20 | 61 6e 64 20 6f 6e 65 20 |r code, |and one |
|00003360| 66 6f 72 0a 64 61 74 61 | 2e 0a 0a 41 72 65 61 73 |for.data|...Areas|
|00003370| 20 61 6c 6c 20 68 61 76 | 65 20 6e 61 6d 65 73 2c | all hav|e names,|
|00003380| 20 77 68 69 63 68 20 61 | 72 65 20 75 6e 69 71 75 | which a|re uniqu|
|00003390| 65 20 77 69 74 68 69 6e | 20 61 6e 20 6f 62 6a 65 |e within| an obje|
|000033a0| 63 74 20 66 69 6c 65 2c | 20 61 6e 64 20 6c 6f 63 |ct file,| and loc|
|000033b0| 61 6c 20 74 6f 0a 69 74 | 2e 20 54 68 65 79 20 61 |al to.it|. They a|
|000033c0| 72 65 20 6e 6f 72 6d 61 | 6c 6c 79 20 22 3c 6c 61 |re norma|lly "<la|
|000033d0| 6e 67 3e 24 24 43 6f 64 | 65 22 20 61 6e 64 20 22 |ng>$$Cod|e" and "|
|000033e0| 3c 6c 61 6e 67 3e 24 24 | 44 61 74 61 22 3a 20 43 |<lang>$$|Data": C|
|000033f0| 20 63 72 65 61 74 65 73 | 20 61 72 65 61 73 0a 63 | creates| areas.c|
|00003400| 61 6c 6c 65 64 20 22 43 | 24 24 43 6f 64 65 22 20 |alled "C|$$Code" |
|00003410| 61 6e 64 20 22 43 24 24 | 44 61 74 61 22 2c 20 66 |and "C$$|Data", f|
|00003420| 6f 72 20 65 78 61 6d 70 | 6c 65 2e 0a 0a 55 73 65 |or examp|le...Use|
|00003430| 20 74 68 65 20 22 41 52 | 45 41 22 20 64 69 72 65 | the "AR|EA" dire|
|00003440| 63 74 69 76 65 20 74 6f | 20 64 65 63 6c 61 72 65 |ctive to| declare|
|00003450| 20 61 6e 20 61 72 65 61 | 2e 20 59 6f 75 20 6d 75 | an area|. You mu|
|00003460| 73 74 20 67 69 76 65 20 | 74 68 65 20 61 72 65 61 |st give |the area|
|00003470| 73 20 6e 61 6d 65 2c 0a | 61 6e 64 20 73 6f 6d 65 |s name,.|and some|
|00003480| 20 66 6c 61 67 73 20 74 | 65 6c 6c 69 6e 67 20 41 | flags t|elling A|
|00003490| 52 4d 6d 61 6b 65 72 20 | 28 61 6e 64 20 74 68 65 |RMmaker |(and the|
|000034a0| 72 65 66 6f 72 65 20 6c | 69 6e 6b 29 20 61 62 6f |refore l|ink) abo|
|000034b0| 75 74 20 74 68 65 20 61 | 72 65 61 2e 0a 0a 47 65 |ut the a|rea...Ge|
|000034c0| 6e 65 72 61 6c 6c 79 2c | 20 79 6f 75 20 77 69 6c |nerally,| you wil|
|000034d0| 6c 20 6f 6e 6c 79 20 6e | 65 65 64 20 74 77 6f 2c |l only n|eed two,|
|000034e0| 20 6f 72 20 6d 61 79 62 | 65 20 74 68 72 65 65 20 | or mayb|e three |
|000034f0| 6b 69 6e 64 73 20 6f 66 | 20 61 72 65 61 73 2e 20 |kinds of| areas. |
|00003500| 54 68 65 20 66 69 72 73 | 74 0a 6b 69 6e 64 2c 20 |The firs|t.kind, |
|00003510| 61 20 63 6f 64 65 20 61 | 72 65 61 2c 20 69 73 20 |a code a|rea, is |
|00003520| 64 65 66 69 6e 65 64 20 | 6c 69 6b 65 20 74 68 69 |defined |like thi|
|00003530| 73 3a 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |s:.. | |
|00003540| 41 52 45 41 20 20 20 20 | 20 41 52 4d 24 24 43 6f |AREA | ARM$$Co|
|00003550| 64 65 3a 43 4f 44 45 2c | 52 45 41 44 4f 4e 4c 59 |de:CODE,|READONLY|
|00003560| 0a 0a 41 20 64 61 74 61 | 20 61 72 65 61 20 69 73 |..A data| area is|
|00003570| 20 64 65 66 69 6e 65 64 | 20 6c 69 6b 65 20 74 68 | defined| like th|
|00003580| 69 73 3a 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |is:.. | |
|00003590| 20 41 52 45 41 20 20 20 | 20 20 41 52 4d 24 24 44 | AREA | ARM$$D|
|000035a0| 61 74 61 3a 44 41 54 41 | 0a 0a 54 68 65 20 74 68 |ata:DATA|..The th|
|000035b0| 69 72 64 20 6b 69 6e 64 | 20 6f 66 20 61 72 65 61 |ird kind| of area|
|000035c0| 20 69 73 20 61 20 7a 65 | 72 6f 2d 69 6e 69 74 69 | is a ze|ro-initi|
|000035d0| 61 6c 69 73 65 64 20 61 | 72 65 61 2e 20 54 68 69 |alised a|rea. Thi|
|000035e0| 73 20 69 73 20 73 6c 69 | 67 68 74 6c 79 20 64 69 |s is sli|ghtly di|
|000035f0| 66 66 65 72 65 6e 74 0a | 69 6e 20 74 68 61 74 20 |fferent.|in that |
|00003600| 79 6f 75 20 63 61 6e 27 | 74 20 70 75 74 20 63 6f |you can'|t put co|
|00003610| 64 65 20 69 6e 20 61 20 | 7a 65 72 6f 2d 69 6e 69 |de in a |zero-ini|
|00003620| 74 69 61 6c 69 73 65 64 | 20 61 72 65 61 2c 20 6f |tialised| area, o|
|00003630| 62 76 69 6f 75 73 6c 79 | 2e 20 49 6e 73 74 65 61 |bviously|. Instea|
|00003640| 64 2c 0a 79 6f 75 20 6d | 75 73 74 20 67 69 76 65 |d,.you m|ust give|
|00003650| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|00003660| 20 61 72 65 61 20 69 6e | 20 74 68 65 20 64 65 63 | area in| the dec|
|00003670| 6c 61 72 61 74 69 6f 6e | 2c 20 6c 69 6b 65 20 74 |laration|, like t|
|00003680| 68 69 73 3a 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |his:.. | |
|00003690| 20 20 41 52 45 41 20 20 | 20 20 20 41 52 4d 24 24 | AREA | ARM$$|
|000036a0| 5a 49 44 61 74 61 3a 44 | 41 54 41 2c 5a 49 4e 49 |ZIData:D|ATA,ZINI|
|000036b0| 54 2c 53 49 5a 45 3d 35 | 31 32 0a 0a 77 68 65 72 |T,SIZE=5|12..wher|
|000036c0| 65 20 35 31 32 20 69 73 | 20 72 65 70 6c 61 63 65 |e 512 is| replace|
|000036d0| 64 20 62 79 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |d by the| size of|
|000036e0| 20 74 68 65 20 7a 65 72 | 6f 2d 69 6e 69 74 69 61 | the zer|o-initia|
|000036f0| 6c 69 73 65 64 20 64 61 | 74 61 20 79 6f 75 20 77 |lised da|ta you w|
|00003700| 61 6e 74 0a 69 6e 63 6c | 75 64 65 64 2e 0a 0a 41 |ant.incl|uded...A|
|00003710| 6e 20 69 6d 70 6f 72 74 | 61 6e 74 20 66 65 61 74 |n import|ant feat|
|00003720| 75 72 65 20 6f 66 20 41 | 4f 46 20 66 69 6c 65 73 |ure of A|OF files|
|00003730| 20 69 73 20 69 6d 70 6f | 72 74 69 6e 67 20 61 6e | is impo|rting an|
|00003740| 64 20 65 78 70 6f 72 74 | 69 6e 67 20 73 79 6d 62 |d export|ing symb|
|00003750| 6f 6c 73 20 62 65 74 77 | 65 65 6e 0a 64 69 66 66 |ols betw|een.diff|
|00003760| 65 72 65 6e 74 20 6f 62 | 6a 65 63 74 20 66 69 6c |erent ob|ject fil|
|00003770| 65 73 2e 20 42 75 74 20 | 79 6f 75 20 6d 75 73 74 |es. But |you must|
|00003780| 20 74 65 6c 6c 20 41 52 | 4d 6d 61 6b 65 72 20 74 | tell AR|Mmaker t|
|00003790| 6f 20 64 6f 20 74 68 69 | 73 2e 20 49 66 20 79 6f |o do thi|s. If yo|
|000037a0| 75 20 77 61 6e 74 20 74 | 6f 0a 75 73 65 20 74 68 |u want t|o.use th|
|000037b0| 65 20 73 79 6d 62 6f 6c | 20 22 70 72 69 6e 74 66 |e symbol| "printf|
|000037c0| 22 20 69 6e 20 79 6f 75 | 72 20 6d 61 63 68 69 6e |" in you|r machin|
|000037d0| 65 20 63 6f 64 65 20 66 | 75 6e 63 74 69 6f 6e 2c |e code f|unction,|
|000037e0| 20 79 6f 75 20 6d 75 73 | 74 20 74 65 6c 6c 20 41 | you mus|t tell A|
|000037f0| 52 4d 6d 61 6b 65 72 0a | 74 6f 20 69 6d 70 6f 72 |RMmaker.|to impor|
|00003800| 74 20 69 74 2c 20 75 73 | 69 6e 67 20 74 68 65 20 |t it, us|ing the |
|00003810| 22 49 4d 50 4f 52 54 22 | 20 64 69 72 65 63 74 69 |"IMPORT"| directi|
|00003820| 76 65 3a 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ve:.. | |
|00003830| 20 49 4d 50 4f 52 54 20 | 20 20 70 72 69 6e 74 66 | IMPORT | printf|
|00003840| 0a 0a 53 69 6d 69 6c 61 | 72 6c 79 2c 20 69 66 20 |..Simila|rly, if |
|00003850| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 75 73 65 20 |you want| to use |
|00003860| 61 20 6d 61 63 68 69 6e | 65 20 63 6f 64 65 20 66 |a machin|e code f|
|00003870| 75 6e 63 74 69 6f 6e 20 | 28 65 2e 67 2e 20 22 61 |unction |(e.g. "a|
|00003880| 72 6d 66 75 6e 63 22 29 | 0a 6f 75 74 73 69 64 65 |rmfunc")|.outside|
|00003890| 20 79 6f 75 72 20 6f 62 | 6a 65 63 74 20 66 69 6c | your ob|ject fil|
|000038a0| 65 20 28 65 2e 67 2e 20 | 66 72 6f 6d 20 61 20 43 |e (e.g. |from a C|
|000038b0| 20 70 72 6f 67 72 61 6d | 29 2c 20 79 6f 75 20 6d | program|), you m|
|000038c0| 75 73 74 20 74 65 6c 6c | 20 41 52 4d 6d 61 6b 65 |ust tell| ARMmake|
|000038d0| 72 20 74 6f 0a 65 78 70 | 6f 72 74 20 69 74 2c 20 |r to.exp|ort it, |
|000038e0| 75 73 69 6e 67 20 74 68 | 65 20 22 45 58 50 4f 52 |using th|e "EXPOR|
|000038f0| 54 22 20 64 69 72 65 63 | 74 69 76 65 3a 0a 0a 20 |T" direc|tive:.. |
|00003900| 20 20 20 20 20 20 20 20 | 20 20 20 45 58 50 4f 52 | | EXPOR|
|00003910| 54 20 20 20 61 72 6d 66 | 75 6e 63 0a 0a 54 68 65 |T armf|unc..The|
|00003920| 72 65 20 61 72 65 20 6c | 69 6d 69 74 73 20 6f 6e |re are l|imits on|
|00003930| 20 77 68 61 74 20 79 6f | 75 20 63 61 6e 20 64 6f | what yo|u can do|
|00003940| 20 77 68 65 6e 20 75 73 | 69 6e 67 20 69 6d 70 6f | when us|ing impo|
|00003950| 72 74 65 64 20 73 79 6d | 62 6f 6c 73 2e 20 59 6f |rted sym|bols. Yo|
|00003960| 75 20 63 61 6e 0a 61 6c | 77 61 79 73 20 62 72 61 |u can.al|ways bra|
|00003970| 6e 63 68 20 73 74 72 61 | 69 67 68 74 20 74 6f 20 |nch stra|ight to |
|00003980| 61 6e 20 69 6d 70 6f 72 | 74 65 64 20 73 79 6d 62 |an impor|ted symb|
|00003990| 6f 6c 3a 20 6e 6f 20 70 | 72 6f 62 6c 65 6d 2e 20 |ol: no p|roblem. |
|000039a0| 42 75 74 20 79 6f 75 20 | 63 61 6e 27 74 20 75 73 |But you |can't us|
|000039b0| 65 0a 69 74 20 64 69 72 | 65 63 74 6c 79 20 77 69 |e.it dir|ectly wi|
|000039c0| 74 68 20 41 44 52 20 6f | 72 20 4c 44 52 2e 20 46 |th ADR o|r LDR. F|
|000039d0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 69 66 20 79 |or examp|le, if y|
|000039e0| 6f 75 27 76 65 20 69 6d | 70 6f 72 74 65 64 20 70 |ou've im|ported p|
|000039f0| 72 69 6e 74 66 20 61 73 | 20 61 62 6f 76 65 2c 0a |rintf as| above,.|
|00003a00| 74 68 65 6e 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |then.. | |
|00003a10| 20 20 42 4c 20 20 20 20 | 20 20 20 70 72 69 6e 74 | BL | print|
|00003a20| 66 0a 0a 77 69 6c 6c 20 | 77 6f 72 6b 20 62 75 74 |f..will |work but|
|00003a30| 0a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 41 44 |.. | AD|
|00003a40| 52 20 20 20 20 20 20 52 | 31 32 2c 20 70 72 69 6e |R R|12, prin|
|00003a50| 74 66 0a 0a 77 69 6c 6c | 20 6e 6f 74 2e 20 57 68 |tf..will| not. Wh|
|00003a60| 61 74 20 79 6f 75 20 63 | 61 6e 20 64 6f 2c 20 68 |at you c|an do, h|
|00003a70| 6f 77 65 76 65 72 2c 20 | 69 73 20 73 74 6f 72 65 |owever, |is store|
|00003a80| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 | the add|ress of |
|00003a90| 70 72 69 6e 74 66 20 69 | 6e 73 69 64 65 0a 79 6f |printf i|nside.yo|
|00003aa0| 75 72 20 63 6f 64 65 20 | 61 72 65 61 2c 20 61 6e |ur code |area, an|
|00003ab0| 64 20 6c 6f 61 64 20 74 | 68 61 74 2e 20 46 6f 72 |d load t|hat. For|
|00003ac0| 20 74 68 69 73 2c 20 75 | 73 65 20 74 68 65 20 22 | this, u|se the "|
|00003ad0| 44 43 44 22 20 64 69 72 | 65 63 74 69 76 65 2c 20 |DCD" dir|ective, |
|00003ae0| 77 68 69 63 68 20 69 73 | 20 61 0a 62 69 74 20 6c |which is| a.bit l|
|00003af0| 69 6b 65 20 42 41 53 49 | 43 27 73 20 45 51 55 44 |ike BASI|C's EQUD|
|00003b00| 2e 0a 0a 70 72 69 6e 74 | 66 5f 70 74 72 20 20 44 |...print|f_ptr D|
|00003b10| 43 44 20 20 20 20 20 20 | 70 72 69 6e 74 66 0a 3b |CD |printf.;|
|00003b20| 20 41 6e 64 20 6c 61 74 | 65 72 20 6f 6e 2e 2e 2e | And lat|er on...|
|00003b30| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 4c 44 52 |. | LDR|
|00003b40| 20 20 20 20 20 20 52 31 | 32 2c 20 70 72 69 6e 74 | R1|2, print|
|00003b50| 66 5f 70 74 72 0a 0a 54 | 68 65 20 73 61 6d 65 20 |f_ptr..T|he same |
|00003b60| 74 68 69 6e 67 20 65 76 | 65 6e 20 6f 63 63 75 72 |thing ev|en occur|
|00003b70| 73 20 77 68 65 6e 20 61 | 63 63 65 73 73 69 6e 67 |s when a|ccessing|
|00003b80| 20 64 61 74 61 20 66 72 | 6f 6d 20 79 6f 75 72 20 | data fr|om your |
|00003b90| 64 61 74 61 20 61 72 65 | 61 3a 20 69 74 20 63 61 |data are|a: it ca|
|00003ba0| 6e 27 74 0a 62 65 20 61 | 63 63 65 73 73 65 64 20 |n't.be a|ccessed |
|00003bb0| 64 69 72 65 63 74 6c 79 | 20 75 73 69 6e 67 20 41 |directly| using A|
|00003bc0| 44 52 20 6f 72 20 4c 44 | 52 21 20 59 6f 75 20 63 |DR or LD|R! You c|
|00003bd0| 61 6e 20 65 69 74 68 65 | 72 20 68 61 76 65 20 61 |an eithe|r have a|
|00003be0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 0a 65 76 65 72 | pointer| to.ever|
|00003bf0| 79 74 68 69 6e 67 2c 20 | 6f 72 20 79 6f 75 20 63 |ything, |or you c|
|00003c00| 61 6e 20 6a 75 73 74 20 | 73 74 6f 72 65 20 61 20 |an just |store a |
|00003c10| 70 6f 69 6e 74 65 72 20 | 74 6f 20 79 6f 75 72 20 |pointer |to your |
|00003c20| 64 61 74 61 20 61 72 65 | 61 2c 20 61 6e 64 20 61 |data are|a, and a|
|00003c30| 64 64 20 6f 66 66 73 65 | 74 0a 74 6f 20 74 68 61 |dd offse|t.to tha|
|00003c40| 74 2c 20 65 2e 67 2e 3a | 0a 0a 64 61 74 61 5f 70 |t, e.g.:|..data_p|
|00003c50| 74 72 20 20 20 20 44 43 | 44 20 20 20 20 20 20 41 |tr DC|D A|
|00003c60| 52 4d 24 24 44 61 74 61 | 20 20 20 20 20 20 3b 20 |RM$$Data| ; |
|00003c70| 41 52 4d 6d 61 6b 65 72 | 20 64 65 66 69 6e 65 73 |ARMmaker| defines|
|00003c80| 20 74 68 69 73 20 6c 61 | 62 65 6c 20 66 6f 72 20 | this la|bel for |
|00003c90| 79 6f 75 0a 3b 20 57 68 | 65 6e 20 79 6f 75 20 6e |you.; Wh|en you n|
|00003ca0| 65 65 64 20 64 61 74 61 | 2e 2e 2e 0a 20 20 20 20 |eed data|.... |
|00003cb0| 20 20 20 20 20 20 20 20 | 4c 44 52 20 20 20 20 20 | |LDR |
|00003cc0| 20 52 31 32 2c 20 64 61 | 74 61 5f 70 74 72 0a 20 | R12, da|ta_ptr. |
|00003cd0| 20 20 20 20 20 20 20 20 | 20 20 20 4c 44 52 20 20 | | LDR |
|00003ce0| 20 20 20 20 52 31 32 2c | 20 5b 64 61 74 61 5f 70 | R12,| [data_p|
|00003cf0| 74 72 2c 20 23 64 61 74 | 61 5f 6f 66 66 73 65 74 |tr, #dat|a_offset|
|00003d00| 5d 0a 0a 59 6f 75 20 63 | 6f 75 6c 64 20 65 76 65 |]..You c|ould eve|
|00003d10| 6e 20 75 73 65 20 74 68 | 65 20 6d 61 63 72 6f 20 |n use th|e macro |
|00003d20| 66 61 63 69 6c 69 74 65 | 73 20 6f 66 20 41 52 4d |facilite|s of ARM|
|00003d30| 6d 61 6b 65 72 20 74 6f | 20 64 6f 20 74 68 69 73 |maker to| do this|
|00003d40| 20 6d 6f 72 65 20 65 61 | 73 69 6c 79 0a 28 73 65 | more ea|sily.(se|
|00003d50| 65 20 62 65 6c 6f 77 29 | 2e 0a 0a 4e 6f 77 2c 20 |e below)|...Now, |
|00003d60| 49 27 6c 6c 20 65 78 70 | 6c 61 69 6e 20 74 68 65 |I'll exp|lain the|
|00003d70| 20 22 44 43 2e 2e 2e 22 | 20 64 69 72 65 63 74 69 | "DC..."| directi|
|00003d80| 76 65 73 20 69 6e 20 6d | 6f 72 65 20 64 65 74 61 |ves in m|ore deta|
|00003d90| 69 6c 2e 20 54 68 65 73 | 65 20 61 72 65 20 66 6f |il. Thes|e are fo|
|00003da0| 72 0a 73 74 6f 72 69 6e | 67 20 44 61 74 61 20 43 |r.storin|g Data C|
|00003db0| 6f 6e 73 74 61 6e 74 73 | 20 69 6e 20 74 68 65 20 |onstants| in the |
|00003dc0| 6f 75 74 70 75 74 2c 20 | 61 6e 64 20 61 72 65 20 |output, |and are |
|00003dd0| 6c 69 6b 65 20 42 41 53 | 49 43 27 73 20 45 51 55 |like BAS|IC's EQU|
|00003de0| 42 2c 20 45 51 55 44 2c | 20 45 51 55 57 2c 0a 45 |B, EQUD,| EQUW,.E|
|00003df0| 51 55 53 20 26 63 2e 20 | 77 69 74 68 20 74 68 65 |QUS &c. |with the|
|00003e00| 20 61 64 64 69 74 69 6f | 6e 20 61 6c 73 6f 20 6f | additio|n also o|
|00003e10| 66 20 22 44 43 46 22 20 | 28 74 68 65 72 65 20 69 |f "DCF" |(there i|
|00003e20| 73 20 6e 6f 20 45 51 55 | 46 29 2e 0a 0a 44 43 44 |s no EQU|F)...DCD|
|00003e30| 20 73 74 6f 72 65 73 20 | 61 20 33 32 2d 62 69 74 | stores |a 32-bit|
|00003e40| 20 76 61 6c 75 65 2c 20 | 61 6e 64 20 63 61 6e 20 | value, |and can |
|00003e50| 61 6c 73 6f 20 73 74 6f | 72 65 20 68 61 76 65 20 |also sto|re have |
|00003e60| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 61 6e 20 |the valu|e of an |
|00003e70| 69 6d 70 6f 72 74 65 64 | 0a 73 79 6d 62 6f 6c 20 |imported|.symbol |
|00003e80| 61 64 64 65 64 20 74 6f | 20 69 74 20 64 75 72 69 |added to| it duri|
|00003e90| 6e 67 20 6c 69 6e 6b 69 | 6e 67 2e 0a 44 43 57 20 |ng linki|ng..DCW |
|00003ea0| 73 74 6f 72 65 73 20 61 | 20 31 36 2d 62 69 74 20 |stores a| 16-bit |
|00003eb0| 76 61 6c 75 65 2c 20 77 | 68 69 63 68 20 6d 75 73 |value, w|hich mus|
|00003ec0| 74 20 62 65 20 61 20 63 | 6f 6e 73 74 61 6e 74 2e |t be a c|onstant.|
|00003ed0| 0a 44 43 42 20 73 74 6f | 72 65 73 20 61 6e 20 38 |.DCB sto|res an 8|
|00003ee0| 2d 62 69 74 20 76 61 6c | 75 65 2c 20 77 68 69 63 |-bit val|ue, whic|
|00003ef0| 68 20 6d 75 73 74 20 62 | 65 20 61 20 63 6f 6e 73 |h must b|e a cons|
|00003f00| 74 61 6e 74 2e 0a 44 43 | 53 20 73 74 6f 72 65 73 |tant..DC|S stores|
|00003f10| 20 61 20 73 74 72 69 6e | 67 2e 20 49 74 20 64 6f | a strin|g. It do|
|00003f20| 65 73 20 6e 6f 74 20 73 | 74 6f 72 65 20 61 20 74 |es not s|tore a t|
|00003f30| 65 72 6d 69 6e 61 74 6f | 72 2e 0a 44 43 46 53 20 |erminato|r..DCFS |
|00003f40| 73 74 6f 72 65 73 20 61 | 20 73 69 6e 67 6c 65 2d |stores a| single-|
|00003f50| 70 72 65 63 69 73 69 6f | 6e 20 66 6c 6f 61 74 69 |precisio|n floati|
|00003f60| 6e 67 20 70 6f 69 6e 74 | 20 6e 75 6d 62 65 72 2e |ng point| number.|
|00003f70| 0a 44 43 46 44 20 73 74 | 6f 72 65 73 20 61 20 64 |.DCFD st|ores a d|
|00003f80| 6f 75 62 6c 65 2d 70 72 | 65 63 69 73 69 6f 6e 20 |ouble-pr|ecision |
|00003f90| 66 6c 6f 61 74 69 6e 67 | 20 70 6f 69 6e 74 20 6e |floating| point n|
|00003fa0| 75 6d 62 65 72 2e 0a 53 | 74 6f 72 69 6e 67 20 65 |umber..S|toring e|
|00003fb0| 78 74 65 6e 64 65 64 2d | 70 72 65 63 69 73 69 6f |xtended-|precisio|
|00003fc0| 6e 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |n floati|ng point|
|00003fd0| 20 6e 75 6d 62 65 72 73 | 20 69 73 20 6e 6f 74 20 | numbers| is not |
|00003fe0| 69 6d 70 6c 65 6d 65 6e | 74 65 64 2e 0a 0a 54 68 |implemen|ted...Th|
|00003ff0| 65 73 65 20 64 69 72 65 | 63 74 69 76 65 73 20 6d |ese dire|ctives m|
|00004000| 61 79 20 74 61 6b 65 20 | 6d 75 6c 74 69 70 6c 65 |ay take |multiple|
|00004010| 20 76 61 6c 75 65 73 20 | 73 65 70 61 72 61 74 65 | values |separate|
|00004020| 64 20 62 79 20 63 6f 6d | 6d 61 73 20 74 6f 20 73 |d by com|mas to s|
|00004030| 61 76 65 20 73 70 61 63 | 65 2e 0a 46 6f 72 20 65 |ave spac|e..For e|
|00004040| 78 61 6d 70 6c 65 2c 20 | 74 6f 20 73 74 6f 72 65 |xample, |to store|
|00004050| 20 74 68 72 65 65 20 33 | 32 2d 62 69 74 20 77 6f | three 3|2-bit wo|
|00004060| 72 64 73 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 30 |rds cont|aining 0|
|00004070| 20 79 6f 75 20 63 61 6e | 20 77 72 69 74 65 3a 0a | you can| write:.|
|00004080| 0a 20 20 20 20 20 20 20 | 20 20 44 43 44 20 20 20 |. | DCD |
|00004090| 30 2c 20 30 2c 20 30 0a | 0a 41 66 74 65 72 20 79 |0, 0, 0.|.After y|
|000040a0| 6f 75 27 76 65 20 75 73 | 65 64 20 44 43 42 2c 20 |ou've us|ed DCB, |
|000040b0| 44 43 57 20 6f 72 20 44 | 43 53 20 79 6f 75 20 6d |DCW or D|CS you m|
|000040c0| 61 79 20 77 61 6e 74 20 | 74 6f 20 77 6f 72 64 2d |ay want |to word-|
|000040d0| 61 6c 69 67 6e 20 74 68 | 65 20 63 75 72 72 65 6e |align th|e curren|
|000040e0| 74 20 61 72 65 61 0a 6f | 66 66 73 65 74 2e 20 55 |t area.o|ffset. U|
|000040f0| 73 65 20 74 68 65 20 22 | 41 4c 49 47 4e 22 20 64 |se the "|ALIGN" d|
|00004100| 69 72 65 63 74 69 76 65 | 2e 20 59 6f 75 20 63 61 |irective|. You ca|
|00004110| 6e 20 61 6c 69 67 6e 20 | 74 68 65 20 6f 66 66 73 |n align |the offs|
|00004120| 65 74 20 74 6f 20 61 6e | 79 20 6d 75 6c 74 69 70 |et to an|y multip|
|00004130| 6c 65 2c 0a 6e 6f 74 20 | 6e 65 63 65 73 73 61 72 |le,.not |necessar|
|00004140| 69 6c 79 20 61 20 70 6f | 77 65 72 20 6f 66 20 32 |ily a po|wer of 2|
|00004150| 20 28 61 6c 74 68 6f 75 | 67 68 20 74 68 69 73 20 | (althou|gh this |
|00004160| 69 73 20 6e 6f 74 20 62 | 72 69 6c 6c 69 61 6e 74 |is not b|rilliant|
|00004170| 6c 79 20 75 73 65 66 75 | 6c 29 20 62 79 0a 67 69 |ly usefu|l) by.gi|
|00004180| 76 69 6e 67 20 74 68 65 | 20 6d 75 6c 74 69 70 6c |ving the| multipl|
|00004190| 65 20 61 73 20 61 20 70 | 61 72 61 6d 65 74 65 72 |e as a p|arameter|
|000041a0| 2e 20 49 66 20 79 6f 75 | 20 6f 6d 69 74 20 74 68 |. If you| omit th|
|000041b0| 65 20 70 61 72 61 6d 65 | 74 65 72 2c 20 22 34 22 |e parame|ter, "4"|
|000041c0| 20 69 73 0a 61 73 73 75 | 6d 65 64 2e 20 65 2e 67 | is.assu|med. e.g|
|000041d0| 2e 3a 0a 20 20 20 20 20 | 20 20 20 20 41 4c 49 47 |.:. | ALIG|
|000041e0| 4e 20 38 20 20 3b 20 61 | 6c 69 67 6e 20 74 6f 20 |N 8 ; a|lign to |
|000041f0| 64 6f 75 62 6c 65 20 77 | 6f 72 64 20 62 6f 75 6e |double w|ord boun|
|00004200| 64 61 72 79 0a 0a 59 6f | 75 20 63 61 6e 20 72 65 |dary..Yo|u can re|
|00004210| 73 65 72 76 65 20 61 20 | 62 6c 6f 63 6b 20 6f 66 |serve a |block of|
|00004220| 20 6d 65 6d 6f 72 79 20 | 75 73 69 6e 67 20 74 68 | memory |using th|
|00004230| 65 20 22 42 4c 4f 43 4b | 22 20 64 69 72 65 63 74 |e "BLOCK|" direct|
|00004240| 69 76 65 20 61 6e 64 20 | 67 69 76 69 6e 67 20 61 |ive and |giving a|
|00004250| 0a 73 69 7a 65 2e 20 59 | 6f 75 20 63 61 6e 20 61 |.size. Y|ou can a|
|00004260| 6c 73 6f 20 67 69 76 65 | 20 61 20 62 79 74 65 20 |lso give| a byte |
|00004270| 74 6f 20 66 69 6c 6c 20 | 74 68 65 20 62 6c 6f 63 |to fill |the bloc|
|00004280| 6b 20 77 69 74 68 2e 20 | 45 78 61 6d 70 6c 65 73 |k with. |Examples|
|00004290| 3a 0a 20 20 20 20 20 20 | 20 20 20 42 4c 4f 43 4b |:. | BLOCK|
|000042a0| 20 31 30 32 34 20 20 20 | 20 20 20 20 20 3b 20 31 | 1024 | ; 1|
|000042b0| 6b 20 6f 66 20 7a 65 72 | 6f 65 73 0a 20 20 20 20 |k of zer|oes. |
|000042c0| 20 20 20 20 20 42 4c 4f | 43 4b 20 35 31 32 2c 20 | BLO|CK 512, |
|000042d0| 26 66 66 20 20 20 20 3b | 20 30 2e 35 6b 20 6f 66 |&ff ;| 0.5k of|
|000042e0| 20 31 27 73 0a 0a 59 6f | 75 20 63 61 6e 20 61 6c | 1's..Yo|u can al|
|000042f0| 73 6f 20 6d 6f 76 65 20 | 75 70 20 74 6f 20 61 20 |so move |up to a |
|00004300| 73 70 65 63 69 66 69 63 | 20 6f 66 66 73 65 74 20 |specific| offset |
|00004310| 66 72 6f 6d 20 74 68 65 | 20 73 74 61 72 74 20 6f |from the| start o|
|00004320| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 61 72 |f the cu|rrent ar|
|00004330| 65 61 2e 0a 54 6f 20 64 | 6f 20 74 68 69 73 2c 20 |ea..To d|o this, |
|00004340| 75 73 65 20 74 68 65 20 | 4f 46 46 53 45 54 20 64 |use the |OFFSET d|
|00004350| 69 72 65 63 74 69 76 65 | 20 67 69 76 69 6e 67 20 |irective| giving |
|00004360| 74 68 65 20 6f 66 66 73 | 65 74 20 79 6f 75 20 77 |the offs|et you w|
|00004370| 69 73 68 20 74 6f 20 6d | 6f 76 65 20 74 6f 2e 0a |ish to m|ove to..|
|00004380| 41 6e 20 65 72 72 6f 72 | 20 77 69 6c 6c 20 62 65 |An error| will be|
|00004390| 20 72 65 70 6f 72 74 65 | 64 20 69 66 20 79 6f 75 | reporte|d if you|
|000043a0| 20 61 72 65 20 61 6c 72 | 65 61 64 79 20 70 61 73 | are alr|eady pas|
|000043b0| 74 20 74 68 61 74 20 6f | 66 66 73 65 74 2e 20 65 |t that o|ffset. e|
|000043c0| 2e 67 2e 3a 0a 0a 20 20 | 20 20 20 20 20 20 20 4f |.g.:.. | O|
|000043d0| 46 46 53 45 54 20 26 31 | 30 30 20 20 20 20 20 20 |FFSET &1|00 |
|000043e0| 20 3b 20 4d 6f 76 65 20 | 74 6f 20 6f 66 66 73 65 | ; Move |to offse|
|000043f0| 74 20 32 35 36 20 69 6e | 20 61 72 65 61 0a 6c 61 |t 256 in| area.la|
|00004400| 62 65 6c 20 20 20 20 4f | 46 46 53 45 54 20 26 31 |bel O|FFSET &1|
|00004410| 38 30 20 20 20 20 20 20 | 20 3b 20 53 65 74 20 6c |80 | ; Set l|
|00004420| 61 62 65 6c 20 74 6f 20 | 6f 66 66 73 65 74 20 33 |abel to |offset 3|
|00004430| 38 34 2c 20 61 73 73 65 | 6d 62 6c 65 20 61 74 20 |84, asse|mble at |
|00004440| 33 38 34 20 74 6f 6f 2e | 0a 0a 46 69 6e 61 6c 6c |384 too.|..Finall|
|00004450| 79 2c 20 62 65 66 6f 72 | 65 20 49 20 6c 65 74 20 |y, befor|e I let |
|00004460| 74 68 65 20 72 65 66 65 | 72 65 6e 63 65 20 73 65 |the refe|rence se|
|00004470| 63 74 69 6f 6e 20 6f 75 | 74 20 6f 66 20 69 74 73 |ction ou|t of its|
|00004480| 20 63 61 67 65 2c 20 68 | 65 72 65 27 73 20 61 6e | cage, h|ere's an|
|00004490| 0a 65 78 61 6d 70 6c 65 | 20 43 2f 41 52 4d 20 63 |.example| C/ARM c|
|000044a0| 6f 64 65 20 70 72 6f 67 | 72 61 6d 3a 0a 0a 61 72 |ode prog|ram:..ar|
|000044b0| 6d 2e 61 72 6d 63 6f 64 | 65 3a 0a 0a 20 20 20 20 |m.armcod|e:.. |
|000044c0| 20 20 20 20 20 20 20 20 | 20 20 20 4f 55 54 50 55 | | OUTPU|
|000044d0| 54 20 20 20 41 4f 46 0a | 20 20 20 20 20 20 20 20 |T AOF.| |
|000044e0| 20 20 20 20 20 20 20 49 | 4e 43 4c 55 44 45 20 20 | I|NCLUDE |
|000044f0| 41 50 43 53 2d 52 2e 69 | 6e 63 0a 0a 20 20 20 20 |APCS-R.i|nc.. |
|00004500| 20 20 20 20 20 20 20 20 | 20 20 20 41 52 45 41 20 | | AREA |
|00004510| 20 20 20 20 41 52 4d 24 | 24 43 6f 64 65 3a 43 4f | ARM$|$Code:CO|
|00004520| 44 45 2c 52 45 41 44 4f | 4e 4c 59 0a 0a 20 20 20 |DE,READO|NLY.. |
|00004530| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 58 50 4f | | EXPO|
|00004540| 52 54 20 20 20 61 72 6d | 66 75 6e 63 0a 20 20 20 |RT arm|func. |
|00004550| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 4d 50 4f | | IMPO|
|00004560| 52 54 20 20 20 41 52 4d | 24 73 74 61 63 6b 5f 6f |RT ARM|$stack_o|
|00004570| 76 65 72 66 6c 6f 77 0a | 20 20 20 20 20 20 20 20 |verflow.| |
|00004580| 20 20 20 20 20 20 20 45 | 58 50 4f 52 54 20 20 20 | E|XPORT |
|00004590| 66 6c 6f 61 74 6f 75 74 | 0a 0a 20 20 20 20 20 20 |floatout|.. |
|000045a0| 20 20 20 20 20 20 20 20 | 20 46 4e 41 4d 45 20 20 | | FNAME |
|000045b0| 20 20 22 61 72 6d 66 75 | 6e 63 22 0a 61 72 6d 66 | "armfu|nc".armf|
|000045c0| 75 6e 63 20 20 20 20 20 | 20 20 20 4d 4f 56 20 20 |unc | MOV |
|000045d0| 20 20 20 20 69 70 2c 20 | 73 70 0a 20 20 20 20 20 | ip, |sp. |
|000045e0| 20 20 20 20 20 20 20 20 | 20 20 53 54 4d 44 42 20 | | STMDB |
|000045f0| 20 20 20 73 70 21 2c 20 | 7b 66 70 2c 20 69 70 2c | sp!, |{fp, ip,|
|00004600| 20 6c 72 2c 20 70 63 7d | 0a 20 20 20 20 20 20 20 | lr, pc}|. |
|00004610| 20 20 20 20 20 20 20 20 | 53 55 42 20 20 20 20 20 | |SUB |
|00004620| 20 66 70 2c 20 69 70 2c | 20 23 34 0a 20 20 20 20 | fp, ip,| #4. |
|00004630| 20 20 20 20 20 20 20 20 | 20 20 20 43 4d 50 53 20 | | CMPS |
|00004640| 20 20 20 20 73 70 2c 20 | 73 6c 0a 20 20 20 20 20 | sp, |sl. |
|00004650| 20 20 20 20 20 20 20 20 | 20 20 42 4c 4c 54 20 20 | | BLLT |
|00004660| 20 20 20 41 52 4d 24 73 | 74 61 63 6b 5f 6f 76 65 | ARM$s|tack_ove|
|00004670| 72 66 6c 6f 77 0a 0a 20 | 20 20 20 20 20 20 20 20 |rflow.. | |
|00004680| 20 20 20 20 20 20 45 58 | 50 44 20 20 20 20 20 66 | EX|PD f|
|00004690| 30 2c 20 23 31 2e 30 0a | 20 20 20 20 20 20 20 20 |0, #1.0.| |
|000046a0| 20 20 20 20 20 20 20 53 | 54 46 44 20 20 20 20 20 | S|TFD |
|000046b0| 66 30 2c 20 66 6c 6f 61 | 74 6f 75 74 0a 0a 20 20 |f0, floa|tout.. |
|000046c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 4c 44 4d | | LDM|
|000046d0| 44 42 20 20 20 20 66 70 | 2c 20 7b 66 70 2c 20 73 |DB fp|, {fp, s|
|000046e0| 70 2c 20 70 63 7d 5e 0a | 0a 66 6c 6f 61 74 6f 75 |p, pc}^.|.floatou|
|000046f0| 74 20 20 20 20 20 20 20 | 44 43 46 44 20 20 20 20 |t |DCFD |
|00004700| 20 30 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 0. | |
|00004710| 20 20 3b 20 45 4f 46 0a | 0a 63 2e 63 63 6f 64 65 | ; EOF.|.c.ccode|
|00004720| 3a 0a 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |:..#incl|ude <std|
|00004730| 69 6f 2e 68 3e 0a 0a 65 | 78 74 65 72 6e 20 20 20 |io.h>..e|xtern |
|00004740| 76 6f 69 64 20 20 61 72 | 6d 66 75 6e 63 20 28 76 |void ar|mfunc (v|
|00004750| 6f 69 64 29 3b 0a 65 78 | 74 65 72 6e 20 20 20 64 |oid);.ex|tern d|
|00004760| 6f 75 62 6c 65 20 20 20 | 66 6c 6f 61 74 6f 75 74 |ouble |floatout|
|00004770| 3b 0a 0a 69 6e 74 20 20 | 20 6d 61 69 6e 20 28 76 |;..int | main (v|
|00004780| 6f 69 64 29 0a 7b 0a 20 | 20 20 61 72 6d 66 75 6e |oid).{. | armfun|
|00004790| 63 28 29 3b 0a 0a 20 20 | 20 70 72 69 6e 74 66 20 |c();.. | printf |
|000047a0| 28 22 54 68 65 20 76 61 | 6c 75 65 20 6f 66 20 65 |("The va|lue of e|
|000047b0| 20 69 73 20 25 67 5c 6e | 22 2c 20 66 6c 6f 61 74 | is %g\n|", float|
|000047c0| 6f 75 74 29 3b 0a 7d 0a | 0a 2f 2a 20 45 4f 46 20 |out);.}.|./* EOF |
|000047d0| 2a 2f 0a 0a 52 65 6d 65 | 6d 62 65 72 3a 20 74 6f |*/..Reme|mber: to|
|000047e0| 20 61 73 73 65 6d 62 6c | 65 20 74 68 65 20 66 69 | assembl|e the fi|
|000047f0| 6c 65 20 75 73 65 20 22 | 61 72 6d 6d 61 6b 65 72 |le use "|armmaker|
|00004800| 20 61 72 6d 2e 61 72 6d | 63 6f 64 65 20 2d 6f 20 | arm.arm|code -o |
|00004810| 6f 2e 61 72 6d 63 6f 64 | 65 20 2d 74 22 20 6f 72 |o.armcod|e -t" or|
|00004820| 0a 75 73 65 20 21 41 52 | 4d 6d 61 6b 65 72 20 6f |.use !AR|Mmaker o|
|00004830| 72 20 21 4d 61 6b 65 20 | 69 66 20 79 6f 75 20 68 |r !Make |if you h|
|00004840| 61 76 65 20 74 68 65 20 | 44 44 45 2e 20 4c 69 6e |ave the |DDE. Lin|
|00004850| 6b 20 74 68 65 20 66 69 | 6c 65 73 20 77 69 74 68 |k the fi|les with|
|00004860| 20 22 43 3a 6f 2e 73 74 | 75 62 73 22 0a 61 6e 64 | "C:o.st|ubs".and|
|00004870| 20 22 41 52 4d 3a 6f 2e | 41 52 4d 6c 69 62 22 2e | "ARM:o.|ARMlib".|
|00004880| 0a 0a 52 45 46 45 52 45 | 4e 43 45 20 53 45 43 54 |..REFERE|NCE SECT|
|00004890| 49 4f 4e 0a 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ION.====|========|
|000048a0| 3d 3d 3d 3d 3d 0a 0a 45 | 78 70 72 65 73 73 69 6f |=====..E|xpressio|
|000048b0| 6e 20 65 76 61 6c 75 61 | 74 69 6f 6e 0a 3d 3d 3d |n evalua|tion.===|
|000048c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000048d0| 3d 3d 0a 0a 45 78 70 72 | 65 73 73 69 6f 6e 73 20 |==..Expr|essions |
|000048e0| 61 72 65 20 73 69 6d 69 | 6c 61 72 20 74 6f 20 42 |are simi|lar to B|
|000048f0| 41 53 49 43 27 73 20 65 | 78 70 72 65 73 73 69 6f |ASIC's e|xpressio|
|00004900| 6e 73 2c 20 69 6e 20 74 | 68 65 20 6e 61 6d 69 6e |ns, in t|he namin|
|00004910| 67 20 6f 66 20 6f 70 65 | 72 61 74 6f 72 73 0a 61 |g of ope|rators.a|
|00004920| 6e 64 20 73 6f 20 6f 6e | 2e 20 54 68 65 20 6f 70 |nd so on|. The op|
|00004930| 65 72 61 74 6f 72 20 74 | 79 70 65 73 2c 20 69 6e |erator t|ypes, in|
|00004940| 20 61 73 63 65 6e 64 69 | 6e 67 20 70 72 69 6f 72 | ascendi|ng prior|
|00004950| 69 74 79 2c 20 61 72 65 | 3a 0a 0a 20 20 20 43 6f |ity, are|:.. Co|
|00004960| 6e 64 69 74 69 6f 6e 61 | 6c 0a 20 20 20 42 69 74 |nditiona|l. Bit|
|00004970| 77 69 73 65 0a 20 20 20 | 53 68 69 66 74 0a 20 20 |wise. |Shift. |
|00004980| 20 41 64 64 69 74 69 6f | 6e 0a 20 20 20 4d 75 6c | Additio|n. Mul|
|00004990| 74 69 70 6c 69 63 61 74 | 69 6f 6e 0a 20 20 20 55 |tiplicat|ion. U|
|000049a0| 6e 61 72 79 0a 20 20 20 | 50 72 69 6d 61 72 79 0a |nary. |Primary.|
|000049b0| 0a 43 6f 6e 64 69 74 69 | 6f 6e 61 6c 20 69 73 2c |.Conditi|onal is,|
|000049c0| 20 69 6e 20 66 61 63 74 | 2c 20 74 68 65 20 27 3f | in fact|, the '?|
|000049d0| 27 20 6f 70 65 72 61 74 | 6f 72 20 66 72 6f 6d 20 |' operat|or from |
|000049e0| 43 2e 20 49 74 20 69 73 | 20 61 20 74 65 72 6e 61 |C. It is| a terna|
|000049f0| 72 79 20 6f 70 65 72 61 | 74 6f 72 2e 0a 49 74 73 |ry opera|tor..Its|
|00004a00| 20 73 79 6e 74 61 78 20 | 69 73 20 22 3c 65 78 70 | syntax |is "<exp|
|00004a10| 72 3e 20 3f 20 3c 63 68 | 6f 69 63 65 31 3e 20 3a |r> ? <ch|oice1> :|
|00004a20| 20 3c 63 68 6f 69 63 65 | 32 3e 22 2e 20 49 66 20 | <choice|2>". If |
|00004a30| 3c 65 78 70 72 3e 20 69 | 73 20 6e 6f 6e 2d 7a 65 |<expr> i|s non-ze|
|00004a40| 72 6f 2c 20 74 68 65 6e | 0a 74 68 65 20 76 61 6c |ro, then|.the val|
|00004a50| 75 65 20 6f 66 20 74 68 | 65 20 65 78 70 72 65 73 |ue of th|e expres|
|00004a60| 73 69 6f 6e 20 69 73 20 | 3c 63 68 6f 69 63 65 31 |sion is |<choice1|
|00004a70| 3e 2c 20 6f 74 68 65 72 | 77 69 73 65 20 69 74 20 |>, other|wise it |
|00004a80| 69 73 20 3c 63 68 6f 69 | 63 65 32 3e 2e 20 59 6f |is <choi|ce2>. Yo|
|00004a90| 75 20 77 69 6c 6c 0a 62 | 65 20 77 61 72 6e 65 64 |u will.b|e warned|
|00004aa0| 20 69 66 20 3c 63 68 6f | 69 63 65 31 3e 20 61 6e | if <cho|ice1> an|
|00004ab0| 64 20 3c 63 68 6f 69 63 | 65 32 3e 20 68 61 76 65 |d <choic|e2> have|
|00004ac0| 20 64 69 66 66 65 72 65 | 6e 74 20 74 79 70 65 73 | differe|nt types|
|00004ad0| 2e 0a 0a 42 69 74 77 69 | 73 65 20 63 6f 6d 70 72 |...Bitwi|se compr|
|00004ae0| 69 73 65 73 20 62 69 74 | 77 69 73 65 20 41 4e 44 |ises bit|wise AND|
|00004af0| 2c 20 4f 52 20 61 6e 64 | 20 65 78 63 6c 75 73 69 |, OR and| exclusi|
|00004b00| 76 65 2d 4f 52 2e 20 54 | 68 65 79 20 61 72 65 20 |ve-OR. T|hey are |
|00004b10| 6e 61 6d 65 64 20 22 41 | 4e 44 22 2c 0a 22 4f 52 |named "A|ND",."OR|
|00004b20| 22 20 61 6e 64 20 22 45 | 4f 52 22 2c 20 6a 75 73 |" and "E|OR", jus|
|00004b30| 74 20 6c 69 6b 65 20 42 | 41 53 49 43 2c 20 65 2e |t like B|ASIC, e.|
|00004b40| 67 2e 20 22 33 20 4f 52 | 20 35 22 20 6f 72 20 22 |g. "3 OR| 5" or "|
|00004b50| 32 20 45 4f 52 20 28 33 | 20 41 4e 44 20 31 29 22 |2 EOR (3| AND 1)"|
|00004b60| 2e 0a 0a 53 68 69 66 74 | 20 6f 70 65 72 61 74 6f |...Shift| operato|
|00004b70| 72 73 20 61 72 65 20 6c | 6f 67 69 63 61 6c 20 73 |rs are l|ogical s|
|00004b80| 68 69 66 74 20 6c 65 66 | 74 20 61 6e 64 20 72 69 |hift lef|t and ri|
|00004b90| 67 68 74 2c 20 63 61 6c | 6c 65 64 20 22 3c 3c 22 |ght, cal|led "<<"|
|00004ba0| 20 61 6e 64 20 22 3e 3e | 22 2c 20 65 2e 67 2e 0a | and ">>|", e.g..|
|00004bb0| 22 31 3c 3c 32 38 22 2e | 0a 0a 41 64 64 69 74 69 |"1<<28".|..Additi|
|00004bc0| 6f 6e 20 6f 70 65 72 61 | 74 6f 72 73 20 61 72 65 |on opera|tors are|
|00004bd0| 20 6e 6f 72 6d 61 6c 20 | 61 64 64 69 74 69 6f 6e | normal |addition|
|00004be0| 20 61 6e 64 20 73 75 62 | 74 72 61 63 74 69 6f 6e | and sub|traction|
|00004bf0| 2e 0a 0a 4d 75 6c 74 69 | 70 6c 69 63 61 74 69 6f |...Multi|plicatio|
|00004c00| 6e 20 6f 70 65 72 61 74 | 6f 72 73 20 63 6f 6d 70 |n operat|ors comp|
|00004c10| 72 69 73 65 20 6d 75 6c | 74 69 70 6c 69 63 61 74 |rise mul|tiplicat|
|00004c20| 69 6f 6e 20 61 6e 64 20 | 64 69 76 69 73 69 6f 6e |ion and |division|
|00004c30| 2e 0a 0a 54 68 65 20 75 | 6e 61 72 79 20 6f 70 65 |...The u|nary ope|
|00004c40| 72 61 74 6f 72 73 20 61 | 72 65 20 22 4e 4f 54 22 |rators a|re "NOT"|
|00004c50| 2c 20 22 2b 22 20 61 6e | 64 20 22 2d 22 2e 20 22 |, "+" an|d "-". "|
|00004c60| 2b 22 20 61 6e 64 20 22 | 2d 22 20 61 72 65 20 6a |+" and "|-" are j|
|00004c70| 75 73 74 20 74 6f 20 61 | 6c 6c 6f 77 0a 73 69 67 |ust to a|llow.sig|
|00004c80| 6e 65 64 20 65 78 70 72 | 65 73 73 69 6f 6e 73 20 |ned expr|essions |
|00004c90| 74 6f 20 62 65 20 67 69 | 76 65 6e 20 28 65 2e 67 |to be gi|ven (e.g|
|00004ca0| 2e 20 22 31 2b 28 2b 32 | 29 22 29 2e 20 22 4e 4f |. "1+(+2|)"). "NO|
|00004cb0| 54 22 20 69 73 20 61 20 | 62 69 74 77 69 73 65 20 |T" is a |bitwise |
|00004cc0| 4e 4f 54 2c 20 6e 6f 74 | 20 61 0a 6c 6f 67 69 63 |NOT, not| a.logic|
|00004cd0| 61 6c 20 6f 6e 65 2e 0a | 0a 50 72 69 6d 61 72 79 |al one..|.Primary|
|00004ce0| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 20 61 72 65 | express|ions are|
|00004cf0| 20 6c 69 74 65 72 61 6c | 73 20 61 6e 64 20 62 72 | literal|s and br|
|00004d00| 61 63 6b 65 74 65 64 20 | 65 78 70 72 65 73 73 69 |acketed |expressi|
|00004d10| 6f 6e 73 2e 20 53 74 72 | 69 6e 67 20 6c 69 74 65 |ons. Str|ing lite|
|00004d20| 72 61 6c 73 0a 61 72 65 | 20 61 73 20 69 6e 20 43 |rals.are| as in C|
|00004d30| 20 28 65 73 63 61 70 65 | 73 2c 20 74 72 69 67 72 | (escape|s, trigr|
|00004d40| 61 70 68 73 20 61 6e 64 | 20 61 6c 6c 29 20 61 6e |aphs and| all) an|
|00004d50| 64 20 61 72 65 20 61 75 | 74 6f 6d 61 74 69 63 61 |d are au|tomatica|
|00004d60| 6c 6c 79 20 63 6f 6e 63 | 61 74 65 6e 61 74 65 64 |lly conc|atenated|
|00004d70| 2c 0a 69 2e 65 2e 20 22 | 41 42 43 22 20 22 44 45 |,.i.e. "|ABC" "DE|
|00004d80| 46 22 20 69 73 20 69 64 | 65 6e 74 69 63 61 6c 20 |F" is id|entical |
|00004d90| 74 6f 20 22 41 42 43 44 | 45 46 22 2e 20 54 68 69 |to "ABCD|EF". Thi|
|00004da0| 73 20 61 63 74 75 61 6c | 6c 79 20 6d 61 6b 65 73 |s actual|ly makes|
|00004db0| 20 61 64 64 69 74 69 6f | 6e 20 6f 66 0a 73 74 72 | additio|n of.str|
|00004dc0| 69 6e 67 20 72 65 64 75 | 6e 64 61 6e 74 20 28 22 |ing redu|ndant ("|
|00004dd0| 41 42 43 22 2b 22 44 45 | 46 22 20 67 69 76 65 73 |ABC"+"DE|F" gives|
|00004de0| 20 74 68 65 20 73 61 6d | 65 20 74 68 69 6e 67 29 | the sam|e thing)|
|00004df0| 20 62 75 74 20 69 74 27 | 73 20 61 6c 6c 6f 77 65 | but it'|s allowe|
|00004e00| 64 20 61 6e 79 77 61 79 | 2e 0a 0a 49 6e 74 65 67 |d anyway|...Integ|
|00004e10| 65 72 20 6c 69 74 65 72 | 61 6c 73 20 61 72 65 20 |er liter|als are |
|00004e20| 61 6e 20 75 6e 68 6f 6c | 79 20 63 6f 6d 62 69 6e |an unhol|y combin|
|00004e30| 61 74 69 6f 6e 20 6f 66 | 20 43 2c 20 42 41 53 49 |ation of| C, BASI|
|00004e40| 43 20 61 6e 64 20 54 4c | 41 2e 20 54 68 65 79 20 |C and TL|A. They |
|00004e50| 6d 61 79 20 62 65 0a 70 | 72 65 66 69 78 65 64 20 |may be.p|refixed |
|00004e60| 77 69 74 68 20 22 30 78 | 22 20 6f 72 20 22 26 22 |with "0x|" or "&"|
|00004e70| 20 66 6f 72 20 68 65 78 | 61 64 65 63 69 6d 61 6c | for hex|adecimal|
|00004e80| 2c 20 22 30 22 20 66 6f | 72 20 6f 63 74 61 6c 20 |, "0" fo|r octal |
|00004e90| 6f 72 20 22 25 22 20 66 | 6f 72 20 62 69 6e 61 72 |or "%" f|or binar|
|00004ea0| 79 2e 0a 54 68 65 79 20 | 6d 61 79 20 62 65 20 70 |y..They |may be p|
|00004eb0| 6f 73 74 66 69 78 65 64 | 20 77 69 74 68 20 22 48 |ostfixed| with "H|
|00004ec0| 22 20 66 6f 72 20 68 65 | 78 61 64 65 63 69 6d 61 |" for he|xadecima|
|00004ed0| 6c 2e 20 45 78 61 6d 70 | 6c 65 73 3a 0a 0a 20 20 |l. Examp|les:.. |
|00004ee0| 20 20 20 20 31 32 20 20 | 20 20 44 65 63 69 6d 61 | 12 | Decima|
|00004ef0| 6c 20 31 32 0a 20 20 20 | 20 20 20 30 31 34 20 20 |l 12. | 014 |
|00004f00| 20 53 61 6d 65 0a 20 20 | 20 20 20 20 30 78 61 31 | Same. | 0xa1|
|00004f10| 20 20 48 65 78 61 64 65 | 63 69 6d 61 6c 20 31 36 | Hexade|cimal 16|
|00004f20| 5f 41 31 0a 20 20 20 20 | 20 20 61 31 48 20 20 20 |_A1. | a1H |
|00004f30| 53 61 6d 65 0a 20 20 20 | 20 20 20 26 61 31 20 20 |Same. | &a1 |
|00004f40| 20 53 61 6d 65 0a 20 20 | 20 20 20 20 25 31 30 20 | Same. | %10 |
|00004f50| 20 20 44 65 63 69 6d 61 | 6c 20 32 2c 20 67 69 76 | Decima|l 2, giv|
|00004f60| 65 6e 20 69 6e 20 62 69 | 6e 61 72 79 0a 0a 43 6f |en in bi|nary..Co|
|00004f70| 6e 73 74 61 6e 74 73 20 | 61 72 65 20 65 76 61 75 |nstants |are evau|
|00004f80| 6c 61 74 65 64 20 77 68 | 65 72 65 20 70 6f 73 73 |lated wh|ere poss|
|00004f90| 69 62 6c 65 2c 20 61 6e | 64 20 6d 61 79 20 62 65 |ible, an|d may be|
|00004fa0| 20 75 73 65 64 20 69 6e | 20 69 6e 73 74 72 75 63 | used in| instruc|
|00004fb0| 74 69 6f 6e 73 2c 0a 65 | 2e 67 2e 3a 0a 20 20 20 |tions,.e|.g.:. |
|00004fc0| 20 20 20 20 20 20 4f 52 | 52 53 20 20 50 43 2c 20 | OR|RS PC, |
|00004fd0| 52 31 34 2c 20 23 28 31 | 3c 3c 32 38 29 0a 0a 69 |R14, #(1|<<28)..i|
|00004fe0| 73 20 61 20 76 61 6c 69 | 64 20 41 52 4d 6d 61 6b |s a vali|d ARMmak|
|00004ff0| 65 72 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 2e 0a |er instr|uction..|
|00005000| 0a 4d 61 63 72 6f 73 0a | 3d 3d 3d 3d 3d 3d 0a 0a |.Macros.|======..|
|00005010| 41 52 4d 6d 61 6b 65 72 | 20 61 6c 6c 6f 77 73 20 |ARMmaker| allows |
|00005020| 79 6f 75 20 74 6f 20 64 | 65 66 69 6e 65 20 6d 61 |you to d|efine ma|
|00005030| 63 72 6f 73 2c 20 73 65 | 74 73 20 6f 66 20 69 6e |cros, se|ts of in|
|00005040| 73 74 72 75 63 74 69 6f | 6e 73 2f 64 69 72 65 63 |structio|ns/direc|
|00005050| 74 69 76 65 73 20 77 68 | 69 63 68 0a 61 72 65 20 |tives wh|ich.are |
|00005060| 22 65 78 70 61 6e 64 65 | 64 22 20 69 6e 74 6f 20 |"expande|d" into |
|00005070| 74 68 65 20 66 69 6c 65 | 20 77 68 65 6e 65 76 65 |the file| wheneve|
|00005080| 72 20 79 6f 75 20 63 61 | 6c 6c 20 6f 6e 20 74 68 |r you ca|ll on th|
|00005090| 65 6d 2e 0a 0a 46 6f 72 | 20 65 78 61 6d 70 6c 65 |em...For| example|
|000050a0| 2c 20 74 68 65 20 74 65 | 78 74 20 65 64 69 74 6f |, the te|xt edito|
|000050b0| 72 20 5a 61 70 20 72 65 | 71 75 69 72 65 73 20 74 |r Zap re|quires t|
|000050c0| 68 61 74 20 65 78 74 65 | 6e 73 69 6f 6e 20 6d 6f |hat exte|nsion mo|
|000050d0| 64 65 73 20 63 61 6c 6c | 20 61 6e 20 6f 66 66 73 |des call| an offs|
|000050e0| 65 74 0a 69 6e 74 6f 20 | 61 20 74 61 62 6c 65 20 |et.into |a table |
|000050f0| 71 75 69 74 65 20 6f 66 | 74 65 6e 2e 20 54 6f 20 |quite of|ten. To |
|00005100| 6d 61 6b 65 20 69 74 20 | 65 61 73 69 65 72 20 74 |make it |easier t|
|00005110| 6f 20 63 61 6c 6c 20 74 | 68 69 73 2c 20 61 6e 64 |o call t|his, and|
|00005120| 20 74 6f 20 6d 61 6b 65 | 20 74 68 65 0a 63 6f 64 | to make| the.cod|
|00005130| 65 20 6d 6f 72 65 20 72 | 65 61 64 62 6c 65 2c 20 |e more r|eadble, |
|00005140| 69 74 20 69 73 20 6e 69 | 63 65 20 69 66 20 79 6f |it is ni|ce if yo|
|00005150| 75 20 63 61 6e 20 77 72 | 69 74 65 20 22 43 41 4c |u can wr|ite "CAL|
|00005160| 4c 5a 41 50 20 2e 2e 2e | 22 20 72 61 74 68 65 72 |LZAP ...|" rather|
|00005170| 20 74 68 61 6e 0a 73 65 | 76 65 72 61 6c 20 6c 69 | than.se|veral li|
|00005180| 6e 65 73 20 6f 66 20 63 | 6f 64 65 2e 0a 0a 54 6f |nes of c|ode...To|
|00005190| 20 64 65 66 69 6e 65 20 | 61 20 6d 61 63 72 6f 2c | define |a macro,|
|000051a0| 20 67 69 76 65 20 74 68 | 65 20 6d 61 63 72 6f 20 | give th|e macro |
|000051b0| 6e 61 6d 65 20 61 73 20 | 61 20 6c 61 62 65 6c 2c |name as |a label,|
|000051c0| 20 61 6e 64 20 75 73 65 | 20 74 68 65 20 64 69 72 | and use| the dir|
|000051d0| 65 63 74 69 76 65 0a 22 | 44 45 46 4d 22 2e 20 4d |ective."|DEFM". M|
|000051e0| 61 63 72 6f 73 20 63 61 | 6e 20 74 61 6b 65 20 70 |acros ca|n take p|
|000051f0| 61 72 61 6d 65 74 65 72 | 73 3a 20 6c 69 73 74 20 |arameter|s: list |
|00005200| 74 68 65 20 70 61 72 61 | 6d 74 65 72 73 27 20 6e |the para|mters' n|
|00005210| 61 6d 65 73 20 69 6e 20 | 74 68 65 0a 70 61 72 61 |ames in |the.para|
|00005220| 6d 65 74 65 72 73 20 66 | 69 65 6c 64 2c 20 73 65 |meters f|ield, se|
|00005230| 70 61 72 61 74 65 64 20 | 62 79 20 63 6f 6d 6d 61 |parated |by comma|
|00005240| 73 2e 20 54 68 69 73 20 | 70 61 72 74 69 63 75 6c |s. This |particul|
|00005250| 61 72 20 65 78 61 6d 70 | 6c 65 20 74 61 6b 65 73 |ar examp|le takes|
|00005260| 20 6f 6e 65 0a 70 61 72 | 61 6d 65 74 65 72 20 28 | one.par|ameter (|
|00005270| 74 68 65 20 6f 66 66 73 | 65 74 29 2e 20 53 6f 20 |the offs|et). So |
|00005280| 74 68 65 20 66 69 72 73 | 74 20 6c 69 6e 65 20 6f |the firs|t line o|
|00005290| 66 20 74 68 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |f the de|finition|
|000052a0| 20 69 73 0a 0a 43 41 4c | 4c 5a 41 50 20 20 20 20 | is..CAL|LZAP |
|000052b0| 20 20 20 20 44 45 46 4d | 20 20 20 20 20 6f 66 66 | DEFM| off|
|000052c0| 73 65 74 0a 0a 4e 6f 77 | 20 77 72 69 74 65 20 74 |set..Now| write t|
|000052d0| 68 65 20 63 6f 64 65 20 | 74 68 61 74 20 79 6f 75 |he code |that you|
|000052e0| 20 77 61 6e 74 20 69 6e | 63 6c 75 64 69 6e 67 20 | want in|cluding |
|000052f0| 77 68 65 6e 65 76 65 72 | 20 79 6f 75 20 61 73 6b |whenever| you ask|
|00005300| 20 66 6f 72 20 74 68 65 | 20 6d 61 63 72 6f 2e 20 | for the| macro. |
|00005310| 49 66 0a 79 6f 75 20 75 | 73 65 20 61 20 70 61 72 |If.you u|se a par|
|00005320| 61 6d 65 74 65 72 20 28 | 22 6f 66 66 73 65 74 22 |ameter (|"offset"|
|00005330| 20 69 6e 20 74 68 69 73 | 20 63 61 73 65 29 20 69 | in this| case) i|
|00005340| 74 20 77 69 6c 6c 20 62 | 65 20 72 65 70 6c 61 63 |t will b|e replac|
|00005350| 65 64 20 62 79 20 74 68 | 65 0a 70 61 72 61 6d 65 |ed by th|e.parame|
|00005360| 74 65 72 20 76 61 6c 75 | 65 20 79 6f 75 20 67 69 |ter valu|e you gi|
|00005370| 76 65 20 77 68 65 6e 20 | 79 6f 75 20 63 61 6c 6c |ve when |you call|
|00005380| 20 74 68 65 20 6d 61 63 | 72 6f 2e 20 28 44 6f 6e | the mac|ro. (Don|
|00005390| 27 74 20 50 61 6e 69 63 | 3b 20 61 6c 6c 20 77 69 |'t Panic|; all wi|
|000053a0| 6c 6c 0a 62 65 63 6f 6d | 65 20 63 6c 65 61 72 21 |ll.becom|e clear!|
|000053b0| 29 2e 0a 0a 53 6f 2c 20 | 6e 6f 77 20 77 72 69 74 |)...So, |now writ|
|000053c0| 65 3a 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |e:.. | |
|000053d0| 20 20 20 4c 44 52 20 20 | 20 20 20 20 52 31 34 2c | LDR | R14,|
|000053e0| 20 5b 52 31 32 5d 0a 20 | 20 20 20 20 20 20 20 20 | [R12]. | |
|000053f0| 20 20 20 20 20 20 41 44 | 44 20 20 20 20 20 20 52 | AD|D R|
|00005400| 31 34 2c 20 52 31 34 2c | 20 23 6f 66 66 73 65 74 |14, R14,| #offset|
|00005410| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005420| 53 54 4d 46 44 20 20 20 | 20 52 31 33 21 2c 20 7b |STMFD | R13!, {|
|00005430| 52 31 34 7d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |R14}. | |
|00005440| 20 20 20 20 4d 4f 56 20 | 20 20 20 20 20 52 31 34 | MOV | R14|
|00005450| 2c 20 50 43 0a 20 20 20 | 20 20 20 20 20 20 20 20 |, PC. | |
|00005460| 20 20 20 20 4c 44 4d 46 | 44 20 20 20 20 52 31 33 | LDMF|D R13|
|00005470| 21 2c 20 7b 50 43 7d 0a | 0a 54 68 69 73 20 69 73 |!, {PC}.|.This is|
|00005480| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00005490| 6d 61 63 72 6f 20 63 6f | 64 65 2c 20 73 6f 20 74 |macro co|de, so t|
|000054a0| 65 6c 6c 20 41 52 4d 6d | 61 6b 65 72 20 62 79 20 |ell ARMm|aker by |
|000054b0| 75 73 69 6e 67 20 74 68 | 65 20 22 45 4e 44 4d 22 |using th|e "ENDM"|
|000054c0| 0a 64 69 72 65 63 74 69 | 76 65 3a 0a 0a 20 20 20 |.directi|ve:.. |
|000054d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 4e 44 4d | | ENDM|
|000054e0| 0a 0a 4e 6f 77 2c 20 69 | 66 20 79 6f 75 20 77 61 |..Now, i|f you wa|
|000054f0| 6e 74 20 74 6f 20 63 61 | 6c 6c 20 74 68 65 20 6f |nt to ca|ll the o|
|00005500| 66 66 73 65 74 20 22 5a | 61 70 5f 41 64 64 4d 6f |ffset "Z|ap_AddMo|
|00005510| 64 65 22 20 28 77 68 65 | 72 65 20 5a 61 70 5f 41 |de" (whe|re Zap_A|
|00005520| 64 64 4d 6f 64 65 20 68 | 61 73 0a 62 65 65 6e 20 |ddMode h|as.been |
|00005530| 64 65 66 69 6e 65 64 20 | 61 73 20 61 20 63 6f 6e |defined |as a con|
|00005540| 73 74 61 6e 74 29 2c 20 | 79 6f 75 20 77 6f 75 6c |stant), |you woul|
|00005550| 64 20 77 72 69 74 65 3a | 0a 0a 20 20 20 20 20 20 |d write:|.. |
|00005560| 20 20 20 20 20 20 20 20 | 20 43 41 4c 4c 5a 41 50 | | CALLZAP|
|00005570| 20 20 5a 61 70 5f 41 64 | 64 4d 6f 64 65 0a 0a 57 | Zap_Ad|dMode..W|
|00005580| 68 65 6e 20 41 52 4d 6d | 61 6b 65 72 20 73 65 65 |hen ARMm|aker see|
|00005590| 73 20 74 68 69 73 2c 20 | 69 74 20 6c 6f 6f 6b 73 |s this, |it looks|
|000055a0| 20 75 70 20 74 68 65 20 | 6d 61 63 72 6f 20 61 6e | up the |macro an|
|000055b0| 64 20 61 63 74 75 61 6c | 6c 79 20 61 73 73 65 6d |d actual|ly assem|
|000055c0| 62 6c 65 73 20 74 68 69 | 73 0a 69 6e 73 74 65 61 |bles thi|s.instea|
|000055d0| 64 3a 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |d:.. | |
|000055e0| 20 20 20 4c 44 52 20 20 | 20 20 20 20 52 31 34 2c | LDR | R14,|
|000055f0| 20 5b 52 31 32 5d 0a 20 | 20 20 20 20 20 20 20 20 | [R12]. | |
|00005600| 20 20 20 20 20 20 41 44 | 44 20 20 20 20 20 20 52 | AD|D R|
|00005610| 31 34 2c 20 52 31 34 2c | 20 23 5a 61 70 5f 41 64 |14, R14,| #Zap_Ad|
|00005620| 64 4d 6f 64 65 0a 20 20 | 20 20 20 20 20 20 20 20 |dMode. | |
|00005630| 20 20 20 20 20 53 54 4d | 46 44 20 20 20 20 52 31 | STM|FD R1|
|00005640| 33 21 2c 20 7b 52 31 34 | 7d 0a 20 20 20 20 20 20 |3!, {R14|}. |
|00005650| 20 20 20 20 20 20 20 20 | 20 4d 4f 56 20 20 20 20 | | MOV |
|00005660| 20 20 52 31 34 2c 20 50 | 43 0a 20 20 20 20 20 20 | R14, P|C. |
|00005670| 20 20 20 20 20 20 20 20 | 20 4c 44 4d 46 44 20 20 | | LDMFD |
|00005680| 20 20 52 31 33 21 2c 20 | 7b 50 43 7d 0a 0a 41 6e | R13!, |{PC}..An|
|00005690| 6f 74 68 65 72 20 65 78 | 61 6d 70 6c 65 20 69 73 |other ex|ample is|
|000056a0| 20 77 68 65 6e 20 79 6f | 75 20 61 72 65 20 77 72 | when yo|u are wr|
|000056b0| 69 74 69 6e 67 20 61 20 | 6d 6f 64 75 6c 65 2c 20 |iting a |module, |
|000056c0| 61 6e 64 20 77 69 73 68 | 20 74 6f 20 67 65 74 20 |and wish| to get |
|000056d0| 74 68 65 20 77 6f 72 64 | 20 61 74 0a 6f 66 66 73 |the word| at.offs|
|000056e0| 65 74 20 3c 78 3e 20 69 | 6e 20 79 6f 75 72 20 77 |et <x> i|n your w|
|000056f0| 6f 72 6b 73 70 61 63 65 | 2e 20 59 6f 75 20 63 61 |orkspace|. You ca|
|00005700| 6e 20 64 65 66 69 6e 65 | 20 61 20 6d 61 63 72 6f |n define| a macro|
|00005710| 20 66 6f 72 20 74 68 69 | 73 2e 20 49 66 20 79 6f | for thi|s. If yo|
|00005720| 75 20 63 61 6c 6c 20 69 | 74 0a 4c 44 57 2c 20 69 |u call i|t.LDW, i|
|00005730| 74 20 77 69 6c 6c 20 6c | 6f 6f 6b 20 6c 69 6b 65 |t will l|ook like|
|00005740| 20 61 6e 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 3a | an inst|ruction:|
|00005750| 0a 0a 4c 44 57 20 20 20 | 20 20 20 20 20 20 20 20 |..LDW | |
|00005760| 20 44 45 46 4d 20 20 20 | 20 20 52 64 2c 20 6f 66 | DEFM | Rd, of|
|00005770| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|00005780| 20 4c 44 52 20 20 20 20 | 20 20 52 64 2c 20 5b 52 | LDR | Rd, [R|
|00005790| 31 32 2c 20 23 6f 66 73 | 5d 0a 20 20 20 20 20 20 |12, #ofs|]. |
|000057a0| 20 20 20 20 20 20 20 20 | 20 45 4e 44 4d 0a 0a 41 | | ENDM..A|
|000057b0| 6e 64 20 74 68 65 6e 20 | 79 6f 75 20 63 61 6e 20 |nd then |you can |
|000057c0| 75 73 65 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |use.. | |
|000057d0| 20 20 20 20 4c 44 57 20 | 20 20 20 20 20 52 30 2c | LDW | R0,|
|000057e0| 20 77 6b 46 6c 61 67 0a | 0a 49 6e 73 74 72 75 63 | wkFlag.|.Instruc|
|000057f0| 74 69 6f 6e 20 73 65 74 | 20 65 78 74 65 6e 73 69 |tion set| extensi|
|00005800| 6f 6e 73 0a 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ons.====|========|
|00005810| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 0a |========|======..|
|00005820| 54 68 65 72 65 20 61 72 | 65 20 73 65 76 65 72 61 |There ar|e severa|
|00005830| 6c 20 22 65 78 74 65 6e | 73 69 6f 6e 73 22 20 6d |l "exten|sions" m|
|00005840| 61 64 65 20 74 6f 20 74 | 68 65 20 69 6e 73 74 72 |ade to t|he instr|
|00005850| 75 63 74 69 6f 6e 20 73 | 65 74 20 62 79 20 41 52 |uction s|et by AR|
|00005860| 4d 6d 61 6b 65 72 2e 20 | 54 68 65 73 65 0a 61 72 |Mmaker. |These.ar|
|00005870| 65 20 6e 6f 74 20 61 63 | 74 75 61 6c 6c 79 20 6e |e not ac|tually n|
|00005880| 65 77 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 73 2c |ew instr|uctions,|
|00005890| 20 62 75 74 20 61 20 72 | 65 66 69 6e 65 64 20 66 | but a r|efined f|
|000058a0| 6f 72 6d 20 6f 66 20 6d | 61 63 72 6f 2e 0a 0a 4f |orm of m|acro...O|
|000058b0| 6e 65 20 69 73 20 61 20 | 63 6f 70 79 20 6f 66 20 |ne is a |copy of |
|000058c0| 42 41 53 49 43 27 53 20 | 41 44 52 20 69 6e 73 74 |BASIC'S |ADR inst|
|000058d0| 72 75 63 74 69 6f 6e 2e | 20 54 68 69 73 20 69 6e |ruction.| This in|
|000058e0| 73 74 72 75 63 74 69 6f | 6e 20 64 6f 65 73 6e 27 |structio|n doesn'|
|000058f0| 74 20 61 63 74 75 61 6c | 6c 79 0a 65 78 69 73 74 |t actual|ly.exist|
|00005900| 2c 20 61 73 20 79 6f 75 | 20 6d 61 79 20 6b 6e 6f |, as you| may kno|
|00005910| 77 2c 20 69 74 20 69 73 | 20 61 63 74 75 61 6c 6c |w, it is| actuall|
|00005920| 79 20 61 20 22 41 44 44 | 20 52 64 2c 20 50 43 2c |y a "ADD| Rd, PC,|
|00005930| 20 23 63 6f 6e 73 74 22 | 20 6f 72 20 22 53 55 42 | #const"| or "SUB|
|00005940| 20 52 64 2c 20 50 43 2c | 0a 23 63 6f 6e 73 74 22 | Rd, PC,|.#const"|
|00005950| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 2e 0a 0a 4f | instruc|tion...O|
|00005960| 6e 65 20 70 72 6f 62 6c | 65 6d 20 77 69 74 68 20 |ne probl|em with |
|00005970| 74 68 69 73 20 69 73 20 | 74 68 61 74 20 74 68 65 |this is |that the|
|00005980| 20 63 6f 6e 73 74 61 6e | 74 20 68 61 73 20 61 20 | constan|t has a |
|00005990| 6c 69 6d 69 74 65 64 20 | 72 61 6e 67 65 20 6f 66 |limited |range of|
|000059a0| 20 76 61 6c 75 65 73 2e | 20 49 0a 63 61 6c 6c 20 | values.| I.call |
|000059b0| 61 20 63 6f 6e 73 74 61 | 6e 74 20 74 68 61 74 20 |a consta|nt that |
|000059c0| 63 61 6e 27 74 20 62 65 | 20 70 75 74 20 73 74 72 |can't be| put str|
|000059d0| 61 69 67 68 74 20 69 6e | 74 6f 20 61 6e 20 41 44 |aight in|to an AD|
|000059e0| 44 20 6f 72 20 53 55 42 | 20 22 69 6c 6c 2d 66 6f |D or SUB| "ill-fo|
|000059f0| 72 6d 65 64 22 2e 0a 54 | 68 69 73 20 69 73 20 62 |rmed"..T|his is b|
|00005a00| 65 63 61 75 73 65 20 69 | 74 20 69 73 6e 27 74 20 |ecause i|t isn't |
|00005a10| 6a 75 73 74 20 62 65 63 | 61 75 73 65 20 74 68 65 |just bec|ause the|
|00005a20| 20 63 6f 6e 73 74 61 6e | 74 20 69 73 20 74 6f 6f | constan|t is too|
|00005a30| 20 6c 61 72 67 65 20 28 | 26 66 66 30 30 30 30 30 | large (|&ff00000|
|00005a40| 30 20 69 73 0a 6e 6f 74 | 20 69 6c 6c 2d 66 6f 72 |0 is.not| ill-for|
|00005a50| 6d 65 64 29 2c 20 62 75 | 74 20 62 65 63 61 75 73 |med), bu|t becaus|
|00005a60| 65 20 61 6c 6c 20 74 68 | 65 20 64 61 74 61 20 6d |e all th|e data m|
|00005a70| 75 73 74 20 62 65 20 69 | 6e 20 38 20 63 6f 6e 73 |ust be i|n 8 cons|
|00005a80| 65 63 75 74 69 76 65 20 | 62 69 74 73 2c 0a 77 68 |ecutive |bits,.wh|
|00005a90| 69 63 68 20 6d 75 73 74 | 20 73 74 61 72 74 20 61 |ich must| start a|
|00005aa0| 74 20 61 6e 20 65 76 65 | 6e 20 62 69 74 2e 2e 2e |t an eve|n bit...|
|00005ab0| 20 69 74 27 73 20 6e 61 | 73 74 79 20 28 62 75 74 | it's na|sty (but|
|00005ac0| 20 6e 65 63 65 73 73 61 | 72 79 29 2e 0a 0a 53 6f | necessa|ry)...So|
|00005ad0| 2c 20 41 52 4d 6d 61 6b | 65 72 20 69 6d 70 6c 65 |, ARMmak|er imple|
|00005ae0| 6d 65 6e 74 73 20 61 6e | 20 22 65 78 74 65 6e 64 |ments an| "extend|
|00005af0| 65 64 20 41 44 52 22 2c | 20 63 61 6c 6c 65 64 20 |ed ADR",| called |
|00005b00| 22 41 44 52 4c 22 2e 20 | 54 68 69 73 20 61 73 73 |"ADRL". |This ass|
|00005b10| 65 6d 62 6c 65 73 20 74 | 6f 0a 54 57 4f 20 69 6e |embles t|o.TWO in|
|00005b20| 73 74 72 75 63 74 69 6f | 6e 73 2c 20 74 68 65 20 |structio|ns, the |
|00005b30| 66 69 72 73 74 20 6c 6f | 61 64 69 6e 67 20 74 68 |first lo|ading th|
|00005b40| 65 20 66 69 72 73 74 20 | 38 20 62 69 74 73 20 61 |e first |8 bits a|
|00005b50| 6e 64 20 74 68 65 20 73 | 65 63 6f 6e 64 2c 20 74 |nd the s|econd, t|
|00005b60| 68 65 0a 73 65 63 6f 6e | 64 2e 20 49 6e 20 70 72 |he.secon|d. In pr|
|00005b70| 61 63 74 69 63 65 2c 20 | 74 68 69 73 20 65 78 74 |actice, |this ext|
|00005b80| 65 6e 64 73 20 74 68 65 | 20 61 64 64 72 65 73 73 |ends the| address|
|00005b90| 69 6e 67 20 72 61 6e 67 | 65 20 6f 66 20 41 44 52 |ing rang|e of ADR|
|00005ba0| 20 74 6f 20 36 34 6b 2c | 20 6f 72 20 32 35 36 6b | to 64k,| or 256k|
|00005bb0| 0a 66 6f 72 20 77 6f 72 | 64 2d 61 6c 69 67 6e 65 |.for wor|d-aligne|
|00005bc0| 64 20 61 64 64 72 65 73 | 73 65 73 2e 20 28 43 6f |d addres|ses. (Co|
|00005bd0| 6d 70 61 72 69 73 69 6f | 6e 3a 20 6e 6f 72 6d 61 |mparisio|n: norma|
|00005be0| 6c 20 41 44 52 27 73 20 | 72 61 6e 67 65 20 69 73 |l ADR's |range is|
|00005bf0| 20 32 35 36 20 62 79 74 | 65 73 20 6f 72 0a 31 6b | 256 byt|es or.1k|
|00005c00| 29 2e 0a 0a 41 6e 6f 74 | 68 65 72 20 75 73 65 66 |)...Anot|her usef|
|00005c10| 75 6c 20 61 64 64 69 74 | 69 6f 6e 20 69 73 20 22 |ul addit|ion is "|
|00005c20| 4d 4f 56 4c 22 2e 20 54 | 68 69 73 20 69 73 20 61 |MOVL". T|his is a|
|00005c30| 6e 20 65 78 74 65 6e 73 | 69 6f 6e 20 6f 66 20 61 |n extens|ion of a|
|00005c40| 6e 20 69 6d 6d 65 64 69 | 61 74 65 20 4d 4f 56 0a |n immedi|ate MOV.|
|00005c50| 22 4d 4f 56 20 52 64 2c | 20 23 63 6f 6e 73 74 22 |"MOV Rd,| #const"|
|00005c60| 20 77 68 69 63 68 20 77 | 69 6c 6c 20 6c 6f 61 64 | which w|ill load|
|00005c70| 20 61 6e 79 20 33 32 2d | 62 69 74 20 63 6f 6e 73 | any 32-|bit cons|
|00005c80| 74 61 6e 74 20 69 6e 20 | 61 73 20 66 65 77 20 69 |tant in |as few i|
|00005c90| 6e 73 74 72 75 63 74 69 | 6f 6e 73 0a 61 73 20 70 |nstructi|ons.as p|
|00005ca0| 6f 73 73 69 62 6c 65 2e | 20 49 20 6d 65 61 6e 20 |ossible.| I mean |
|00005cb0| 69 74 3a 20 69 74 20 77 | 69 6c 6c 20 67 65 74 20 |it: it w|ill get |
|00005cc0| 26 30 31 30 38 30 31 66 | 63 20 69 6e 20 69 6e 20 |&010801f|c in in |
|00005cd0| 74 77 6f 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 73 |two inst|ructions|
|00005ce0| 2c 20 75 6e 6c 69 6b 65 | 0a 6d 6f 73 74 20 69 6d |, unlike|.most im|
|00005cf0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 73 20 77 68 |plementa|tions wh|
|00005d00| 69 63 68 20 72 65 71 75 | 69 72 65 20 66 6f 75 72 |ich requ|ire four|
|00005d10| 2e 20 41 6c 74 68 6f 75 | 67 68 20 79 6f 75 27 6c |. Althou|gh you'l|
|00005d20| 6c 20 72 61 72 65 6c 79 | 20 6e 6f 74 69 63 65 20 |l rarely| notice |
|00005d30| 74 68 69 73 2e 0a 0a 4d | 4f 56 4c 20 69 73 20 69 |this...M|OVL is i|
|00005d40| 6e 76 61 6c 75 61 62 6c | 65 20 69 6e 20 6d 61 63 |nvaluabl|e in mac|
|00005d50| 72 6f 73 2e 20 54 61 6b | 65 20 61 6e 20 61 64 61 |ros. Tak|e an ada|
|00005d60| 70 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 4c 44 57 |ption of| the LDW|
|00005d70| 20 6d 61 63 72 6f 20 61 | 62 6f 76 65 2e 20 54 6f | macro a|bove. To|
|00005d80| 0a 6d 61 6b 65 20 61 6e | 20 41 44 57 20 28 6c 6f |.make an| ADW (lo|
|00005d90| 61 64 20 61 64 64 72 65 | 73 73 20 6f 66 20 6f 66 |ad addre|ss of of|
|00005da0| 66 73 65 74 20 77 69 74 | 68 69 6e 20 77 6f 72 6b |fset wit|hin work|
|00005db0| 73 70 61 63 65 29 20 79 | 6f 75 20 77 6f 75 6c 64 |space) y|ou would|
|00005dc0| 20 75 73 65 3a 0a 0a 41 | 44 57 20 20 20 20 20 20 | use:..A|DW |
|00005dd0| 20 20 20 44 45 46 4d 20 | 20 52 64 2c 20 6f 66 73 | DEFM | Rd, ofs|
|00005de0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 41 44 44 |. | ADD|
|00005df0| 20 20 20 52 64 2c 20 52 | 31 32 2c 20 23 6f 66 73 | Rd, R|12, #ofs|
|00005e00| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 45 4e 44 |. | END|
|00005e10| 4d 0a 0a 42 75 74 20 74 | 68 69 73 20 77 6f 75 6c |M..But t|his woul|
|00005e20| 64 20 62 65 20 6c 69 6d | 69 74 65 64 20 74 6f 20 |d be lim|ited to |
|00005e30| 74 68 65 20 66 69 72 73 | 74 20 32 35 36 20 62 79 |the firs|t 256 by|
|00005e40| 74 65 73 20 6f 66 20 77 | 6f 72 6b 73 70 61 63 65 |tes of w|orkspace|
|00005e50| 20 28 31 6b 20 66 6f 72 | 0a 77 6f 72 64 2d 61 6c | (1k for|.word-al|
|00005e60| 69 67 6e 65 64 20 64 61 | 74 61 29 2e 20 54 68 69 |igned da|ta). Thi|
|00005e70| 73 20 6d 69 67 68 74 20 | 6e 6f 74 20 62 65 20 61 |s might |not be a|
|00005e80| 20 70 72 6f 62 6c 65 6d | 2e 20 49 66 20 69 74 20 | problem|. If it |
|00005e90| 69 73 2c 20 79 6f 75 20 | 63 61 6e 20 75 73 65 20 |is, you |can use |
|00005ea0| 61 20 4d 4f 56 4c 0a 74 | 6f 20 68 65 6c 70 20 79 |a MOVL.t|o help y|
|00005eb0| 6f 75 20 6f 75 74 3a 0a | 0a 41 44 57 4c 20 20 20 |ou out:.|.ADWL |
|00005ec0| 20 20 20 20 20 44 45 46 | 4d 20 20 52 64 2c 20 6f | DEF|M Rd, o|
|00005ed0| 66 73 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 4d |fs. | M|
|00005ee0| 4f 56 4c 20 20 52 64 2c | 20 23 6f 66 73 0a 20 20 |OVL Rd,| #ofs. |
|00005ef0| 20 20 20 20 20 20 20 20 | 20 20 41 44 44 20 20 20 | | ADD |
|00005f00| 52 64 2c 20 52 64 2c 20 | 52 31 32 0a 20 20 20 20 |Rd, Rd, |R12. |
|00005f10| 20 20 20 20 20 20 20 20 | 45 4e 44 4d 0a 0a 57 68 | |ENDM..Wh|
|00005f20| 69 63 68 20 77 69 6c 6c | 20 77 6f 72 6b 20 66 6f |ich will| work fo|
|00005f30| 72 20 61 6e 79 20 63 6f | 6e 73 74 61 6e 74 2e 20 |r any co|nstant. |
|00005f40| 4f 62 76 69 6f 75 73 6c | 79 2c 20 69 66 20 74 68 |Obviousl|y, if th|
|00005f50| 65 20 6f 66 66 73 65 74 | 20 69 73 20 6e 6f 74 20 |e offset| is not |
|00005f60| 69 6c 6c 2d 66 6f 72 6d | 65 64 2c 0a 74 68 65 6e |ill-form|ed,.then|
|00005f70| 20 74 68 69 73 20 77 69 | 6c 6c 20 77 61 73 74 65 | this wi|ll waste|
|00005f80| 20 61 6e 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 2c | an inst|ruction,|
|00005f90| 20 73 69 6e 63 65 20 69 | 74 20 77 69 6c 6c 20 63 | since i|t will c|
|00005fa0| 6f 6d 70 69 6c 65 20 74 | 6f 20 61 20 6e 6f 72 6d |ompile t|o a norm|
|00005fb0| 61 6c 20 4d 4f 56 0a 61 | 6e 64 20 74 68 65 20 41 |al MOV.a|nd the A|
|00005fc0| 44 44 2e 0a 0a 52 65 67 | 69 73 74 65 72 20 62 69 |DD...Reg|ister bi|
|00005fd0| 6e 64 69 6e 67 73 0a 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ndings.=|========|
|00005fe0| 3d 3d 3d 3d 3d 3d 3d 3d | 0a 0a 42 79 20 64 65 66 |========|..By def|
|00005ff0| 61 75 6c 74 2c 20 74 68 | 65 20 72 65 67 69 73 74 |ault, th|e regist|
|00006000| 65 72 73 20 61 72 65 20 | 6e 61 6d 65 64 20 52 30 |ers are |named R0|
|00006010| 20 74 6f 20 52 31 35 20 | 28 61 6e 64 20 50 43 29 | to R15 |(and PC)|
|00006020| 20 61 6e 64 20 46 30 20 | 74 6f 20 46 37 2e 20 54 | and F0 |to F7. T|
|00006030| 68 65 73 65 0a 6e 61 6d | 65 73 20 63 61 6e 20 61 |hese.nam|es can a|
|00006040| 6c 77 61 79 73 20 62 65 | 20 75 73 65 64 2e 20 48 |lways be| used. H|
|00006050| 6f 77 65 76 65 72 2c 20 | 79 6f 75 20 63 61 6e 20 |owever, |you can |
|00006060| 67 69 76 65 20 61 6c 74 | 65 72 6e 61 74 69 76 65 |give alt|ernative|
|00006070| 20 6e 61 6d 65 73 20 75 | 73 69 6e 67 20 74 68 65 | names u|sing the|
|00006080| 0a 42 49 4e 44 52 45 47 | 20 64 69 72 65 63 74 69 |.BINDREG| directi|
|00006090| 76 65 2e 20 50 75 74 20 | 74 68 65 20 61 6c 74 65 |ve. Put |the alte|
|000060a0| 72 6e 61 74 69 76 65 20 | 6e 61 6d 65 20 69 6e 20 |rnative |name in |
|000060b0| 74 68 65 20 6c 61 62 65 | 6c 20 66 69 65 6c 64 20 |the labe|l field |
|000060c0| 61 6e 64 20 74 68 65 0a | 72 65 67 69 73 74 65 72 |and the.|register|
|000060d0| 20 6e 61 6d 65 20 69 6e | 20 74 68 65 20 70 61 72 | name in| the par|
|000060e0| 61 6d 65 74 65 72 73 20 | 66 69 65 6c 64 2c 20 65 |ameters |field, e|
|000060f0| 2e 67 2e 3a 0a 0a 61 31 | 20 20 20 20 42 49 4e 44 |.g.:..a1| BIND|
|00006100| 52 45 47 20 20 52 30 0a | 53 50 20 20 20 20 42 49 |REG R0.|SP BI|
|00006110| 4e 44 52 45 47 20 20 52 | 31 33 0a 4c 52 20 20 20 |NDREG R|13.LR |
|00006120| 20 42 49 4e 44 52 45 47 | 20 20 52 31 34 0a 66 30 | BINDREG| R14.f0|
|00006130| 20 20 20 20 42 49 4e 44 | 52 45 47 20 20 46 30 0a | BIND|REG F0.|
|00006140| 66 35 20 20 20 20 42 49 | 4e 44 52 45 47 20 20 46 |f5 BI|NDREG F|
|00006150| 35 0a 63 33 20 20 20 20 | 42 49 4e 44 52 45 47 20 |5.c3 |BINDREG |
|00006160| 20 43 33 0a 0a 54 68 65 | 20 66 69 6c 65 20 22 69 | C3..The| file "i|
|00006170| 6e 63 2e 41 50 43 53 2d | 52 22 20 62 69 6e 64 73 |nc.APCS-|R" binds|
|00006180| 20 74 68 65 20 72 65 67 | 69 73 74 65 72 73 20 74 | the reg|isters t|
|00006190| 6f 20 74 68 65 69 72 20 | 41 50 43 53 2d 52 20 6e |o their |APCS-R n|
|000061a0| 61 6d 65 73 2e 0a 0a 59 | 6f 75 20 6d 61 79 20 62 |ames...Y|ou may b|
|000061b0| 69 6e 64 20 61 6e 79 20 | 6f 66 20 74 68 65 20 73 |ind any |of the s|
|000061c0| 69 78 74 65 65 6e 20 43 | 50 55 20 72 65 67 69 73 |ixteen C|PU regis|
|000061d0| 74 65 72 73 2c 20 74 68 | 65 20 65 69 67 68 74 20 |ters, th|e eight |
|000061e0| 46 50 55 20 72 65 67 69 | 73 74 65 72 73 20 6f 72 |FPU regi|sters or|
|000061f0| 20 74 68 65 0a 73 69 78 | 74 65 65 6e 20 63 6f 70 | the.six|teen cop|
|00006200| 72 6f 63 65 73 73 6f 72 | 20 22 72 65 67 69 73 74 |rocessor| "regist|
|00006210| 65 72 73 22 20 28 68 6f | 77 20 74 68 65 79 20 72 |ers" (ho|w they r|
|00006220| 65 6c 61 74 65 20 74 6f | 20 61 63 74 75 61 6c 20 |elate to| actual |
|00006230| 70 72 6f 63 65 73 73 6f | 72 0a 72 65 67 69 73 74 |processo|r.regist|
|00006240| 65 72 73 20 6d 61 79 20 | 76 61 72 79 2c 20 65 2e |ers may |vary, e.|
|00006250| 67 2e 20 46 50 55 20 75 | 73 65 73 20 62 69 74 20 |g. FPU u|ses bit |
|00006260| 33 20 6f 66 20 73 6f 6d | 65 20 72 65 67 69 73 74 |3 of som|e regist|
|00006270| 65 72 20 66 69 65 6c 64 | 73 20 74 6f 20 73 74 6f |er field|s to sto|
|00006280| 72 65 0a 72 6f 75 6e 64 | 69 6e 67 2f 70 72 65 63 |re.round|ing/prec|
|00006290| 69 73 69 6f 6e 2c 20 61 | 6e 64 20 61 6c 73 6f 20 |ision, a|nd also |
|000062a0| 75 73 65 73 20 69 6d 6d | 65 64 69 61 74 65 73 2e |uses imm|ediates.|
|000062b0| 2e 2e 29 0a 0a 46 75 6e | 63 74 69 6f 6e 20 6e 61 |..)..Fun|ction na|
|000062c0| 6d 65 73 20 0a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |mes .===|========|
|000062d0| 3d 3d 3d 0a 0a 54 68 65 | 20 64 69 72 65 63 74 69 |===..The| directi|
|000062e0| 76 65 20 22 46 4e 41 4d | 45 22 20 73 74 6f 72 65 |ve "FNAM|E" store|
|000062f0| 73 20 74 68 65 20 73 74 | 72 69 6e 67 20 67 69 76 |s the st|ring giv|
|00006300| 65 6e 20 61 73 20 69 74 | 73 20 70 61 72 61 6d 65 |en as it|s parame|
|00006310| 74 65 72 2c 20 66 6f 6c | 6c 6f 77 65 64 20 62 79 |ter, fol|lowed by|
|00006320| 20 61 0a 7a 65 72 6f 20 | 61 6e 64 20 61 6c 69 67 | a.zero |and alig|
|00006330| 6e 65 64 20 74 6f 20 61 | 20 77 6f 72 64 20 62 6f |ned to a| word bo|
|00006340| 75 6e 64 61 72 79 2e 20 | 49 74 20 74 68 65 6e 20 |undary. |It then |
|00006350| 73 74 6f 72 65 73 20 26 | 66 66 30 30 30 30 30 30 |stores &|ff000000|
|00006360| 20 4f 52 27 65 64 20 77 | 69 74 68 20 74 68 65 0a | OR'ed w|ith the.|
|00006370| 6c 65 6e 67 74 68 20 6f | 66 20 74 68 65 20 70 72 |length o|f the pr|
|00006380| 65 63 65 64 69 6e 67 20 | 73 74 72 69 6e 67 20 66 |eceding |string f|
|00006390| 69 65 6c 64 2e 20 54 68 | 69 73 20 69 73 20 74 68 |ield. Th|is is th|
|000063a0| 65 20 73 61 6d 65 20 66 | 6f 72 6d 61 74 20 75 73 |e same f|ormat us|
|000063b0| 65 64 20 62 79 20 74 68 | 65 20 43 0a 63 6f 6d 70 |ed by th|e C.comp|
|000063c0| 69 6c 65 72 20 74 6f 20 | 73 74 6f 72 65 20 66 75 |iler to |store fu|
|000063d0| 6e 63 74 69 6f 6e 20 6e | 61 6d 65 73 2e 20 45 78 |nction n|ames. Ex|
|000063e0| 61 6d 70 6c 65 3a 0a 0a | 20 20 20 20 20 20 20 20 |ample:..| |
|000063f0| 20 20 20 20 20 20 20 46 | 4e 41 4d 45 20 22 6d 79 | F|NAME "my|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.