home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: ArcFS Archive
(archive/arcFS).
You can browse this item here: gravity
Confidence | Program | Detection | Match Type | Support
|
---|
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 | fc 00 00 00 5c 01 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 47 72 61 76 69 74 | 79 00 00 00 ff ff ff ff |.!Gravit|y.......|
|00000070| 45 fd ff ff 2d 47 a9 6e | 00 00 00 00 ff ff ff ff |E...-G.n|........|
|00000080| d8 00 00 80 82 21 48 65 | 6c 70 00 34 00 00 00 00 |.....!He|lp.4....|
|00000090| 6b 0a 00 00 45 ff ff ff | 01 f6 a6 6e 03 00 15 00 |k...E...|...n....|
|000000a0| 6b 0a 00 00 24 00 00 00 | 82 21 52 75 6e 00 2d 34 |k...$...|.!Run.-4|
|000000b0| 00 00 00 00 19 00 00 00 | 45 eb ff ff 27 e3 7d 6d |........|E...'.}m|
|000000c0| 03 00 fa 1a 19 00 00 00 | b3 0a 00 00 82 21 52 75 |........|.....!Ru|
|000000d0| 6e 49 6d 61 67 65 00 00 | b2 1b 00 00 45 fb ff ff |nImage..|....E...|
|000000e0| 61 9a aa 6e 03 00 62 31 | b2 1b 00 00 f0 0a 00 00 |a..n..b1|........|
|000000f0| 82 21 53 70 72 69 74 65 | 73 00 00 00 e4 03 00 00 |.!Sprite|s.......|
|00000100| 44 f9 ff ff f3 b3 82 6e | 03 00 12 07 e4 03 00 00 |D......n|........|
|00000110| c6 26 00 00 00 65 72 00 | 00 73 2d 34 00 00 00 00 |.&...er.|.s-4....|
|00000120| 1f 00 00 00 44 eb ff ff | ba 1c f6 47 03 00 d1 9f |....D...|...G....|
|00000130| 1f 00 00 00 fc 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | f8 01 00 00 46 69 6c 65 |........|....File|
|00000160| 44 61 74 61 82 21 48 65 | 6c 70 00 34 00 00 00 00 |Data.!He|lp.4....|
|00000170| 6b 0a 00 00 45 ff ff ff | 01 f6 a6 6e 03 00 15 00 |k...E...|...n....|
|00000180| 47 72 61 76 69 74 79 20 | 53 69 6d 75 6c 61 74 6f |Gravity |Simulato|
|00000190| 72 0a 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |r.======|========|
|000001a0| 3d 3d 3d 0a 0a 62 79 20 | 4a 4a 46 0a 0a 0a 54 68 |===..by |JJF...Th|
|000001b0| 69 73 20 70 72 6f 67 72 | 61 6d 20 73 65 65 6d 65 |is progr|am seeme|
|000001c0| 64 20 6c 69 6b 65 20 61 | 20 6e 69 63 65 20 69 64 |d like a| nice id|
|000001d0| 65 61 20 69 6e 20 74 68 | 65 20 62 65 67 69 6e 6e |ea in th|e beginn|
|000001e0| 69 6e 67 2e 20 57 72 69 | 74 65 20 61 6e 20 41 52 |ing. Wri|te an AR|
|000001f0| 4d 20 63 6f 64 65 0a 67 | 72 61 76 69 74 79 20 73 |M code.g|ravity s|
|00000200| 69 6d 75 6c 61 74 6f 72 | 20 61 6e 64 20 73 65 6c |imulator| and sel|
|00000210| 6c 20 69 74 20 74 6f 20 | 41 63 6f 72 6e 20 55 73 |l it to |Acorn Us|
|00000220| 65 72 20 66 6f 72 20 61 | 20 76 61 73 74 20 73 75 |er for a| vast su|
|00000230| 6d 20 6f 66 20 63 61 73 | 68 2e 20 48 6f 77 65 76 |m of cas|h. Howev|
|00000240| 65 72 2c 0a 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |er,.the |program |
|00000250| 64 69 64 6e 27 74 20 77 | 6f 72 6b 20 71 75 69 74 |didn't w|ork quit|
|00000260| 65 20 61 73 20 49 27 64 | 20 61 6e 74 69 63 69 70 |e as I'd| anticip|
|00000270| 61 74 65 64 2c 20 61 6e | 64 20 49 20 65 6e 64 65 |ated, an|d I ende|
|00000280| 64 20 75 70 20 77 69 74 | 68 0a 73 6f 6d 65 74 68 |d up wit|h.someth|
|00000290| 69 6e 67 20 49 20 61 6d | 20 6e 65 72 76 6f 75 73 |ing I am| nervous|
|000002a0| 20 61 62 6f 75 74 20 65 | 76 65 6e 20 73 65 6e 64 | about e|ven send|
|000002b0| 69 6e 67 20 74 6f 20 61 | 20 50 44 20 6c 69 62 72 |ing to a| PD libr|
|000002c0| 61 72 79 2c 20 6c 65 74 | 20 61 6c 6f 6e 65 20 61 |ary, let| alone a|
|000002d0| 0a 6d 61 67 61 7a 69 6e | 65 2e 0a 0a 54 68 65 20 |.magazin|e...The |
|000002e0| 70 72 6f 67 72 61 6d 20 | 75 73 65 73 20 4e 65 77 |program |uses New|
|000002f0| 74 6f 6e 27 73 20 4c 61 | 77 20 6f 66 20 47 72 61 |ton's La|w of Gra|
|00000300| 76 69 74 61 74 69 6f 6e | 20 74 6f 20 64 69 73 63 |vitation| to disc|
|00000310| 6f 76 65 72 20 74 68 65 | 20 66 6f 72 63 65 20 77 |over the| force w|
|00000320| 68 69 63 68 20 69 73 0a | 65 78 65 72 74 65 64 20 |hich is.|exerted |
|00000330| 6f 6e 20 65 61 63 68 20 | 6f 62 6a 65 63 74 2e 20 |on each |object. |
|00000340| 42 61 73 69 63 61 6c 6c | 79 2c 20 66 6f 72 20 74 |Basicall|y, for t|
|00000350| 68 6f 73 65 20 75 6e 66 | 61 6d 69 6c 69 61 72 20 |hose unf|amiliar |
|00000360| 77 69 74 68 20 74 68 69 | 73 2c 20 74 68 65 20 6c |with thi|s, the l|
|00000370| 61 77 0a 73 74 61 74 65 | 73 20 74 68 61 74 20 3a |aw.state|s that :|
|00000380| 0a 0a 20 20 46 20 3d 20 | 47 20 4d 20 6d 20 2f 20 |.. F = |G M m / |
|00000390| 28 72 5e 32 29 0a 0a 57 | 68 65 72 65 20 46 20 69 |(r^2)..W|here F i|
|000003a0| 73 20 74 68 65 20 66 6f | 72 63 65 20 62 65 74 77 |s the fo|rce betw|
|000003b0| 65 65 6e 20 74 77 6f 20 | 6f 62 6a 65 63 74 73 2c |een two |objects,|
|000003c0| 20 4d 20 61 6e 64 20 6d | 20 61 72 65 20 74 68 65 | M and m| are the|
|000003d0| 69 72 20 6d 61 73 73 65 | 73 2c 20 61 6e 64 20 72 |ir masse|s, and r|
|000003e0| 20 69 73 0a 74 68 65 20 | 64 69 73 74 61 6e 63 65 | is.the |distance|
|000003f0| 20 62 65 74 77 65 65 6e | 20 74 68 65 6d 2c 20 77 | between| them, w|
|00000400| 68 69 6c 73 74 20 47 20 | 69 73 20 73 6f 6d 65 20 |hilst G |is some |
|00000410| 63 6f 6e 73 74 61 6e 74 | 2e 20 54 68 65 6e 2c 20 |constant|. Then, |
|00000420| 4e 65 77 74 6f 6e 27 73 | 20 53 65 63 6f 6e 64 0a |Newton's| Second.|
|00000430| 4c 61 77 20 28 46 3d 6d | 61 29 20 69 73 20 61 70 |Law (F=m|a) is ap|
|00000440| 70 6c 69 65 64 20 74 6f | 20 74 68 69 73 20 65 71 |plied to| this eq|
|00000450| 75 61 74 69 6f 6e 2c 20 | 6c 65 61 76 69 6e 67 20 |uation, |leaving |
|00000460| 75 73 20 77 69 74 68 20 | 3a 0a 0a 20 20 61 20 3d |us with |:.. a =|
|00000470| 20 47 20 4d 20 2f 20 28 | 72 5e 32 29 0a 0a 57 68 | G M / (|r^2)..Wh|
|00000480| 65 72 65 20 61 20 69 73 | 20 74 68 65 20 61 63 63 |ere a is| the acc|
|00000490| 65 6c 65 72 61 74 69 6f | 6e 20 74 68 61 74 20 69 |eleratio|n that i|
|000004a0| 73 20 63 61 75 73 65 64 | 20 6f 6e 20 61 6e 20 6f |s caused| on an o|
|000004b0| 62 6a 65 63 74 20 62 79 | 20 61 20 73 65 63 6f 6e |bject by| a secon|
|000004c0| 64 20 6f 62 6a 65 63 74 | 0a 6f 66 20 6d 61 73 73 |d object|.of mass|
|000004d0| 20 4d 2e 20 54 68 69 73 | 20 61 63 63 65 6c 65 72 | M. This| acceler|
|000004e0| 61 74 69 6f 6e 20 69 73 | 20 72 65 73 6f 6c 76 65 |ation is| resolve|
|000004f0| 64 20 69 6e 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 |d in hor|izontal |
|00000500| 61 6e 64 20 76 65 72 74 | 69 63 61 6c 0a 64 69 72 |and vert|ical.dir|
|00000510| 65 63 74 69 6f 6e 73 2c | 20 61 6e 64 2c 20 61 66 |ections,| and, af|
|00000520| 74 65 72 20 61 6c 6c 20 | 74 68 65 20 66 6f 72 63 |ter all |the forc|
|00000530| 65 73 20 65 78 65 72 74 | 65 64 20 6f 6e 20 74 68 |es exert|ed on th|
|00000540| 65 20 6f 62 6a 65 63 74 | 20 61 72 65 20 63 6f 6e |e object| are con|
|00000550| 73 69 64 65 72 65 64 2c | 0a 74 68 65 20 63 6f 6d |sidered,|.the com|
|00000560| 70 6f 6e 65 6e 74 73 20 | 6f 66 20 74 68 65 20 61 |ponents |of the a|
|00000570| 63 63 61 6c 65 72 61 74 | 69 6f 6e 73 20 61 72 65 |ccalerat|ions are|
|00000580| 20 61 64 64 65 64 20 75 | 70 20 61 6e 64 20 61 64 | added u|p and ad|
|00000590| 64 65 64 20 6f 6e 74 6f | 20 74 68 65 20 76 65 6c |ded onto| the vel|
|000005a0| 6f 63 69 74 79 0a 6f 66 | 20 74 68 65 20 6f 62 6a |ocity.of| the obj|
|000005b0| 65 63 74 2e 20 54 68 65 | 6e 20 74 68 65 20 6e 65 |ect. The|n the ne|
|000005c0| 78 74 20 6f 62 6a 65 63 | 74 20 69 73 20 63 6f 6e |xt objec|t is con|
|000005d0| 73 69 64 65 72 65 64 20 | 69 6e 20 74 68 65 20 73 |sidered |in the s|
|000005e0| 61 6d 65 20 6d 61 6e 6e | 65 72 2e 0a 0a 54 68 65 |ame mann|er...The|
|000005f0| 20 66 69 72 73 74 20 70 | 72 6f 62 6c 65 6d 20 69 | first p|roblem i|
|00000600| 73 20 74 68 61 74 20 74 | 68 65 20 66 6f 72 63 65 |s that t|he force|
|00000610| 20 62 65 74 77 65 65 6e | 20 74 77 6f 20 6f 62 6a | between| two obj|
|00000620| 65 63 74 73 20 6f 6e 20 | 64 69 66 66 65 72 65 6e |ects on |differen|
|00000630| 74 20 73 69 64 65 73 0a | 6f 66 20 74 68 65 20 73 |t sides.|of the s|
|00000640| 63 72 65 65 6e 20 69 73 | 20 6d 69 6e 69 73 63 75 |creen is| miniscu|
|00000650| 6c 65 3b 20 69 6e 20 66 | 61 63 74 2c 20 73 69 6e |le; in f|act, sin|
|00000660| 63 65 20 69 74 20 69 73 | 20 68 65 6c 64 20 27 73 |ce it is| held 's|
|00000670| 63 61 6c 65 64 20 75 70 | 27 20 62 79 20 61 0a 6d |caled up|' by a.m|
|00000680| 61 73 73 69 76 65 20 66 | 61 63 74 6f 72 20 28 73 |assive f|actor (s|
|00000690| 69 6e 63 65 20 74 68 65 | 20 41 52 4d 20 63 68 69 |ince the| ARM chi|
|000006a0| 70 20 63 61 6e 6e 6f 74 | 20 68 61 6e 64 6c 65 20 |p cannot| handle |
|000006b0| 66 72 61 63 74 69 6f 6e | 73 29 2c 20 69 74 20 69 |fraction|s), it i|
|000006c0| 73 20 66 61 72 20 74 6f | 6f 0a 73 6d 61 6c 6c 20 |s far to|o.small |
|000006d0| 74 6f 20 72 65 67 69 73 | 74 65 72 20 75 6e 6c 65 |to regis|ter unle|
|000006e0| 73 73 20 47 20 69 73 20 | 76 65 72 79 20 6c 61 72 |ss G is |very lar|
|000006f0| 67 65 2e 20 48 6f 77 65 | 76 65 72 2c 20 77 68 65 |ge. Howe|ver, whe|
|00000700| 6e 20 47 20 69 73 20 76 | 65 72 79 20 6c 61 72 67 |n G is v|ery larg|
|00000710| 65 2c 0a 74 68 65 20 66 | 6f 72 63 65 73 20 65 78 |e,.the f|orces ex|
|00000720| 70 65 72 69 65 6e 63 65 | 64 20 77 68 65 6e 20 74 |perience|d when t|
|00000730| 77 6f 20 6f 62 6a 65 63 | 74 73 20 61 72 65 20 63 |wo objec|ts are c|
|00000740| 6c 6f 73 65 20 61 72 65 | 20 70 68 65 6e 6f 6d 65 |lose are| phenome|
|00000750| 6e 61 6c 20 2d 20 66 61 | 72 20 74 6f 6f 0a 6c 61 |nal - fa|r too.la|
|00000760| 72 67 65 2c 20 69 6e 20 | 66 61 63 74 2c 20 61 6e |rge, in |fact, an|
|00000770| 64 20 74 68 65 20 6f 62 | 6a 65 63 74 73 20 73 75 |d the ob|jects su|
|00000780| 64 64 65 6e 6c 79 20 67 | 6f 20 73 74 72 65 61 6b |ddenly g|o streak|
|00000790| 69 6e 67 20 6f 66 66 20 | 69 6e 74 6f 20 74 68 65 |ing off |into the|
|000007a0| 20 73 75 6e 73 65 74 2e | 0a 0a 54 68 65 20 73 65 | sunset.|..The se|
|000007b0| 63 6f 6e 64 20 70 72 6f | 62 6c 65 6d 20 69 73 20 |cond pro|blem is |
|000007c0| 74 68 61 74 20 74 68 65 | 20 67 72 61 76 69 74 79 |that the| gravity|
|000007d0| 20 73 69 6d 75 6c 61 74 | 69 6f 6e 20 69 73 20 0a | simulat|ion is .|
|000007e0| 54 68 65 20 6f 74 68 65 | 72 20 70 72 6f 62 6c 65 |The othe|r proble|
|000007f0| 6d 20 49 20 65 6e 63 6f | 75 6e 74 65 72 65 64 20 |m I enco|untered |
|00000800| 77 61 73 20 74 68 61 74 | 20 74 68 65 20 61 6e 69 |was that| the ani|
|00000810| 6d 61 74 69 6f 6e 20 69 | 73 20 6d 79 73 74 65 72 |mation i|s myster|
|00000820| 69 6f 75 73 6c 79 20 0a | 76 65 72 79 20 6a 65 72 |iously .|very jer|
|00000830| 6b 79 2e 20 49 20 68 61 | 76 65 20 73 69 6e 63 65 |ky. I ha|ve since|
|00000840| 20 73 75 63 63 65 65 64 | 65 64 20 69 6e 20 66 69 | succeed|ed in fi|
|00000850| 78 69 6e 67 20 74 68 69 | 73 2c 20 68 6f 77 65 76 |xing thi|s, howev|
|00000860| 65 72 2e 2e 2e 0a 0a 54 | 68 65 72 65 20 61 72 65 |er.....T|here are|
|00000870| 20 74 68 72 65 65 20 76 | 61 72 69 61 62 6c 65 73 | three v|ariables|
|00000880| 20 64 65 66 69 6e 65 64 | 20 65 61 72 6c 79 20 69 | defined| early i|
|00000890| 6e 20 74 68 65 20 21 52 | 75 6e 49 6d 61 67 65 20 |n the !R|unImage |
|000008a0| 66 69 6c 65 20 74 68 61 | 74 20 79 6f 75 20 6d 69 |file tha|t you mi|
|000008b0| 67 68 74 0a 6c 69 6b 65 | 20 74 6f 20 61 6c 74 65 |ght.like| to alte|
|000008c0| 72 2e 20 54 68 65 20 66 | 69 72 73 74 2c 20 62 6f |r. The f|irst, bo|
|000008d0| 75 6e 63 65 64 61 6d 70 | 2c 20 69 73 20 61 20 6e |uncedamp|, is a n|
|000008e0| 75 6d 62 65 72 20 62 79 | 20 77 68 69 63 68 20 74 |umber by| which t|
|000008f0| 68 65 20 76 65 6c 6f 63 | 69 74 79 20 6f 66 0a 61 |he veloc|ity of.a|
|00000900| 6e 20 6f 62 6a 65 63 74 | 20 63 6f 6c 6c 69 64 69 |n object| collidi|
|00000910| 6e 67 20 77 69 74 68 20 | 74 68 65 20 73 69 64 65 |ng with |the side|
|00000920| 20 6f 66 20 74 68 65 20 | 73 63 72 65 65 6e 20 69 | of the |screen i|
|00000930| 73 20 27 64 61 6d 70 65 | 64 27 20 2d 20 69 74 20 |s 'dampe|d' - it |
|00000940| 69 73 20 6d 61 69 6e 6c | 79 0a 6a 75 73 74 20 74 |is mainl|y.just t|
|00000950| 6f 20 70 72 65 76 65 6e | 74 20 76 65 6c 6f 63 69 |o preven|t veloci|
|00000960| 74 69 65 73 20 66 72 6f | 6d 20 62 65 63 6f 6d 69 |ties fro|m becomi|
|00000970| 6e 67 20 74 6f 6f 20 68 | 69 67 68 2e 20 54 68 65 |ng too h|igh. The|
|00000980| 20 73 65 63 6f 6e 64 2c | 20 73 71 72 64 61 6d 70 | second,| sqrdamp|
|00000990| 2c 20 69 73 0a 70 72 6f | 76 69 64 65 64 20 74 6f |, is.pro|vided to|
|000009a0| 20 27 64 61 6d 70 27 20 | 74 68 65 20 67 72 61 76 | 'damp' |the grav|
|000009b0| 69 74 61 74 69 6f 6e 61 | 6c 20 66 6f 72 63 65 20 |itationa|l force |
|000009c0| 62 65 74 77 65 65 6e 20 | 6f 62 6a 65 63 74 73 20 |between |objects |
|000009d0| 74 68 61 74 20 61 72 65 | 20 63 6c 6f 73 65 0a 74 |that are| close.t|
|000009e0| 6f 67 65 74 68 65 72 2e | 20 42 61 73 69 63 61 6c |ogether.| Basical|
|000009f0| 6c 79 2c 20 61 6e 20 6f | 62 6a 65 63 74 20 68 61 |ly, an o|bject ha|
|00000a00| 73 20 61 20 75 6e 69 66 | 6f 72 6d 20 67 72 61 76 |s a unif|orm grav|
|00000a10| 69 74 61 74 69 6f 6e 61 | 6c 20 66 69 65 6c 64 20 |itationa|l field |
|00000a20| 75 70 20 74 6f 20 61 0a | 64 69 73 74 61 6e 63 65 |up to a.|distance|
|00000a30| 20 6f 66 20 73 71 72 64 | 61 6d 70 20 66 72 6f 6d | of sqrd|amp from|
|00000a40| 20 69 74 2c 20 77 69 74 | 68 20 4e 65 77 74 6f 6e | it, wit|h Newton|
|00000a50| 27 73 20 4c 61 77 20 6f | 66 20 47 72 61 76 69 74 |'s Law o|f Gravit|
|00000a60| 61 74 69 6f 6e 20 61 70 | 70 6c 79 69 6e 67 20 61 |ation ap|plying a|
|00000a70| 74 0a 64 69 73 74 61 6e | 63 65 73 20 61 62 6f 76 |t.distan|ces abov|
|00000a80| 65 20 74 68 69 73 2e 20 | 54 68 65 20 66 69 6e 61 |e this. |The fina|
|00000a90| 6c 20 76 61 72 69 61 62 | 6c 65 2c 20 47 2c 20 63 |l variab|le, G, c|
|00000aa0| 6f 6e 74 72 6f 6c 73 20 | 74 68 65 20 73 74 72 65 |ontrols |the stre|
|00000ab0| 6e 67 74 68 20 6f 66 20 | 74 68 65 0a 67 72 61 76 |ngth of |the.grav|
|00000ac0| 69 74 61 74 69 6f 6e 61 | 6c 20 66 6f 72 63 65 73 |itationa|l forces|
|00000ad0| 2e 20 54 68 65 20 68 69 | 67 68 65 72 20 74 68 65 |. The hi|gher the|
|00000ae0| 20 76 61 6c 75 65 20 6f | 66 20 47 2c 20 74 68 65 | value o|f G, the|
|00000af0| 20 6d 6f 72 65 20 70 61 | 72 74 69 63 6c 65 73 20 | more pa|rticles |
|00000b00| 61 74 74 72 61 63 74 2e | 0a 0a 46 65 65 6c 20 66 |attract.|..Feel f|
|00000b10| 72 65 65 20 74 6f 20 6d | 75 63 6b 20 61 62 6f 75 |ree to m|uck abou|
|00000b20| 74 20 77 69 74 68 20 74 | 68 65 20 70 72 6f 67 72 |t with t|he progr|
|00000b30| 61 6d 20 74 6f 20 79 6f | 75 72 20 68 65 61 72 74 |am to yo|ur heart|
|00000b40| 27 73 20 63 6f 6e 74 65 | 6e 74 2e 20 49 74 20 69 |'s conte|nt. It i|
|00000b50| 73 0a 65 6e 74 69 72 65 | 6c 79 20 50 44 2c 20 73 |s.entire|ly PD, s|
|00000b60| 6f 2c 20 69 66 20 79 6f | 75 20 74 68 69 6e 6b 20 |o, if yo|u think |
|00000b70| 74 68 61 74 20 79 6f 75 | 20 63 61 6e 20 69 6d 70 |that you| can imp|
|00000b80| 72 6f 76 65 20 69 74 2c | 20 74 68 65 6e 20 66 65 |rove it,| then fe|
|00000b90| 65 6c 20 66 72 65 65 2e | 20 49 0a 6d 69 67 68 74 |el free.| I.might|
|00000ba0| 20 66 65 65 6c 20 61 20 | 62 69 74 20 68 75 72 74 | feel a |bit hurt|
|00000bb0| 20 69 66 20 79 6f 75 20 | 74 72 79 20 74 6f 20 70 | if you |try to p|
|00000bc0| 61 73 73 20 69 74 20 6f | 66 66 20 61 73 20 61 6c |ass it o|ff as al|
|00000bd0| 6c 20 79 6f 75 72 20 6f | 77 6e 20 77 6f 72 6b 2c |l your o|wn work,|
|00000be0| 0a 74 68 6f 75 67 68 2e | 2e 2e 0a 46 69 6c 65 44 |.though.|...FileD|
|00000bf0| 61 74 61 82 21 52 75 6e | 00 2d 34 00 00 00 00 19 |ata.!Run|.-4.....|
|00000c00| 00 00 00 45 eb ff ff 27 | e3 7d 6d 03 00 fa 1a 52 |...E...'|.}m....R|
|00000c10| 75 6e 20 3c 4f 62 65 79 | 24 44 69 72 3e 2e 21 52 |un <Obey|$Dir>.!R|
|00000c20| 75 6e 49 6d 61 67 65 0a | 46 69 6c 65 44 61 74 61 |unImage.|FileData|
|00000c30| 82 21 52 75 6e 49 6d 61 | 67 65 00 00 b2 1b 00 00 |.!RunIma|ge......|
|00000c40| 45 fb ff ff 61 9a aa 6e | 03 00 62 31 0d 00 0a 17 |E...a..n|..b1....|
|00000c50| f4 20 47 72 61 76 69 74 | 79 20 73 69 6d 75 6c 61 |. Gravit|y simula|
|00000c60| 74 6f 72 0d 00 14 0c f4 | 20 62 79 20 4a 4a 46 0d |tor.....| by JJF.|
|00000c70| 00 1e 0f f4 20 4a 75 6e | 65 20 31 39 39 34 0d 00 |.... Jun|e 1994..|
|00000c80| 28 19 f4 20 2a 2a 20 50 | 75 62 6c 69 63 20 44 6f |(.. ** P|ublic Do|
|00000c90| 6d 61 69 6e 20 2a 2a 0d | 00 32 45 f4 20 54 68 61 |main **.|.2E. Tha|
|00000ca0| 6e 6b 73 20 74 6f 20 41 | 72 72 6f 77 20 56 61 6c |nks to A|rrow Val|
|00000cb0| 65 20 48 69 67 68 20 53 | 63 68 6f 6f 6c 20 66 6f |e High S|chool fo|
|00000cc0| 72 20 74 65 61 63 68 69 | 6e 67 20 6d 65 20 61 62 |r teachi|ng me ab|
|00000cd0| 6f 75 74 20 67 72 61 76 | 69 74 79 21 0d 00 3c 04 |out grav|ity!..<.|
|00000ce0| 0d 00 46 2f ee 20 85 20 | eb 20 30 3a f1 20 22 49 |..F/. . |. 0:. "I|
|00000cf0| 20 6e 65 65 64 20 31 36 | 30 6b 20 6f 66 20 73 63 | need 16|0k of sc|
|00000d00| 72 65 65 6e 20 6d 65 6d | 6f 72 79 21 22 3a e0 0d |reen mem|ory!":..|
|00000d10| 00 50 0a eb 20 31 35 3a | 87 0d 00 5a 20 ee 20 85 |.P.. 15:|...Z . .|
|00000d20| 20 eb 20 30 3a f1 20 f6 | 24 3b 22 20 61 74 20 6c | . 0:. .|$;" at l|
|00000d30| 69 6e 65 20 22 3b 9e 3a | e0 0d 00 64 0a eb 20 31 |ine ";.:|...d.. 1|
|00000d40| 32 3a 87 0d 00 6e 04 0d | 00 78 10 62 6f 75 6e 63 |2:...n..|.x.bounc|
|00000d50| 65 64 61 6d 70 3d 31 0d | 00 82 0e 73 71 72 64 61 |edamp=1.|...sqrda|
|00000d60| 6d 70 3d 35 30 0d 00 8c | 09 47 3d 36 2a 32 0d 00 |mp=50...|.G=6*2..|
|00000d70| 96 04 0d 00 a0 11 e3 20 | 6c 6f 6f 70 3d 38 20 b8 |....... |loop=8 .|
|00000d80| 20 31 35 0d 00 aa 05 f5 | 0d 00 b4 1e 72 3d b3 28 | 15.....|....r=.(|
|00000d90| 32 35 35 29 3a 67 3d b3 | 28 32 35 35 29 3a 62 3d |255):g=.|(255):b=|
|00000da0| b3 28 32 35 35 29 0d 00 | be 1b fd 20 72 3e 32 32 |.(255)..|... r>22|
|00000db0| 30 20 84 20 67 3e 32 32 | 30 20 84 20 62 3e 32 32 |0 . g>22|0 . b>22|
|00000dc0| 30 0d 00 c8 10 fb 20 6c | 6f 6f 70 2c 72 2c 67 2c |0..... l|oop,r,g,|
|00000dd0| 62 0d 00 d2 05 ed 0d 00 | dc 04 0d 00 e6 04 0d 00 |b.......|........|
|00000de0| f0 14 de 20 64 69 76 69 | 64 65 25 20 33 32 38 30 |... divi|de% 3280|
|00000df0| 2a 34 0d 00 fa 0e 21 64 | 69 76 69 64 65 25 3d 31 |*4....!d|ivide%=1|
|00000e00| 0d 01 04 12 6d 65 6d 25 | 3d 64 69 76 69 64 65 25 |....mem%|=divide%|
|00000e10| 2b 34 0d 01 0e 13 e3 20 | 6c 6f 6f 70 3d 31 20 b8 |+4..... |loop=1 .|
|00000e20| 20 33 32 37 39 0d 01 18 | 19 21 6d 65 6d 25 3d 28 | 3279...|.!mem%=(|
|00000e30| 31 2f 6c 6f 6f 70 29 2a | 28 32 5e 31 36 29 0d 01 |1/loop)*|(2^16)..|
|00000e40| 22 0b 6d 65 6d 25 2b 3d | 34 0d 01 2c 10 f1 20 8a |".mem%+=|4..,.. .|
|00000e50| 30 2c 30 29 3b 6c 6f 6f | 70 0d 01 36 05 ed 0d 01 |0,0);loo|p..6....|
|00000e60| 40 04 0d 01 4a 15 de 20 | 64 69 76 69 64 65 32 25 |@...J.. |divide2%|
|00000e70| 20 33 32 38 30 2a 34 0d | 01 54 0f 21 64 69 76 69 | 3280*4.|.T.!divi|
|00000e80| 64 65 32 25 3d 31 0d 01 | 5e 13 6d 65 6d 25 3d 64 |de2%=1..|^.mem%=d|
|00000e90| 69 76 69 64 65 32 25 2b | 34 0d 01 68 13 e3 20 6c |ivide2%+|4..h.. l|
|00000ea0| 6f 6f 70 3d 31 20 b8 20 | 33 32 37 39 0d 01 72 14 |oop=1 . |3279..r.|
|00000eb0| e7 20 6c 6f 6f 70 3e 73 | 71 72 64 61 6d 70 20 8c |. loop>s|qrdamp .|
|00000ec0| 0d 01 7c 22 21 6d 65 6d | 25 3d 28 47 2f 6c 6f 6f |..|"!mem|%=(G/loo|
|00000ed0| 70 29 2a 28 31 2f 6c 6f | 6f 70 29 2a 28 32 5e 31 |p)*(1/lo|op)*(2^1|
|00000ee0| 36 29 0d 01 86 05 cc 0d | 01 90 28 21 6d 65 6d 25 |6)......|..(!mem%|
|00000ef0| 3d 28 47 2f 73 71 72 64 | 61 6d 70 29 2a 28 31 2f |=(G/sqrd|amp)*(1/|
|00000f00| 73 71 72 64 61 6d 70 29 | 2a 28 32 5e 31 36 29 0d |sqrdamp)|*(2^16).|
|00000f10| 01 9a 05 cd 0d 01 a4 0b | 6d 65 6d 25 2b 3d 34 0d |........|mem%+=4.|
|00000f20| 01 ae 10 f1 20 8a 30 2c | 31 29 3b 6c 6f 6f 70 0d |.... .0,|1);loop.|
|00000f30| 01 b8 05 ed 0d 01 c2 04 | 0d 01 cc 05 db 0d 01 d6 |........|........|
|00000f40| 07 fb 20 36 0d 01 e0 31 | e8 20 22 50 6c 65 61 73 |.. 6...1|. "Pleas|
|00000f50| 65 20 69 6e 70 75 74 20 | 6e 75 6d 62 65 72 20 6f |e input |number o|
|00000f60| 66 20 6d 61 73 73 65 73 | 20 3d 20 22 6e 6f 6d 61 |f masses| = "noma|
|00000f70| 73 73 65 73 25 0d 01 ea | 1a de 20 6d 61 73 73 65 |sses%...|.. masse|
|00000f80| 73 25 20 6e 6f 6d 61 73 | 73 65 73 25 2a 32 34 0d |s% nomas|ses%*24.|
|00000f90| 01 f4 15 f1 20 22 52 61 | 6e 64 6f 6d 3f 20 28 59 |.... "Ra|ndom? (Y|
|00000fa0| 2f 4e 29 22 0d 01 fe 2e | f5 3a 41 24 3d be 3a fd |/N)"....|.:A$=.:.|
|00000fb0| 20 41 24 3d 22 59 22 20 | 84 20 41 24 3d 22 79 22 | A$="Y" |. A$="y"|
|00000fc0| 20 84 20 41 24 3d 22 4e | 22 20 84 20 41 24 3d 22 | . A$="N|" . A$="|
|00000fd0| 6e 22 0d 02 08 28 e7 20 | 41 24 3d 22 4e 22 20 84 |n"...(. |A$="N" .|
|00000fe0| 20 41 24 3d 22 6e 22 20 | 8c 20 f2 69 6e 70 75 74 | A$="n" |. .input|
|00000ff0| 20 8b 20 f2 72 61 6e 64 | 6f 6d 0d 02 12 05 db 0d | . .rand|om......|
|00001000| 02 1c 29 f1 20 22 42 6f | 75 6e 63 65 20 6f 66 66 |..). "Bo|unce off|
|00001010| 20 73 69 64 65 73 20 6f | 66 20 73 63 72 65 65 6e | sides o|f screen|
|00001020| 3f 20 28 59 2f 4e 29 22 | 0d 02 26 2e f5 3a 41 24 |? (Y/N)"|..&..:A$|
|00001030| 3d be 3a fd 20 41 24 3d | 22 59 22 20 84 20 41 24 |=.:. A$=|"Y" . A$|
|00001040| 3d 22 79 22 20 84 20 41 | 24 3d 22 4e 22 20 84 20 |="y" . A|$="N" . |
|00001050| 41 24 3d 22 6e 22 0d 02 | 30 2b e7 20 41 24 3d 22 |A$="n"..|0+. A$="|
|00001060| 59 22 20 84 20 41 24 3d | 22 79 22 20 62 6f 75 6e |Y" . A$=|"y" boun|
|00001070| 63 65 25 3d 31 20 8b 20 | 62 6f 75 6e 63 65 25 3d |ce%=1 . |bounce%=|
|00001080| 30 0d 02 3a 04 0d 02 44 | 0d f2 61 73 73 65 6d 62 |0..:...D|..assemb|
|00001090| 6c 65 0d 02 4e 0a d6 20 | 69 6e 69 74 0d 02 58 09 |le..N.. |init..X.|
|000010a0| d6 20 72 75 6e 0d 02 62 | 04 0d 02 6c 07 eb 20 30 |. run..b|...l.. 0|
|000010b0| 0d 02 76 05 e0 0d 02 80 | 04 0d 02 8a 0f dd 20 f2 |..v.....|...... .|
|000010c0| 61 73 73 65 6d 62 6c 65 | 0d 02 94 17 73 70 61 63 |assemble|....spac|
|000010d0| 65 66 6f 72 63 6f 64 65 | 25 3d 26 46 46 46 46 0d |eforcode|%=&FFFF.|
|000010e0| 02 9e 19 de 20 63 6f 64 | 65 25 20 73 70 61 63 65 |.... cod|e% space|
|000010f0| 66 6f 72 63 6f 64 65 25 | 0d 02 a8 40 63 6f 75 6e |forcode%|...@coun|
|00001100| 74 3d 30 3a 63 6f 75 6e | 74 32 3d 31 3a 78 3d 32 |t=0:coun|t2=1:x=2|
|00001110| 3a 79 3d 33 3a 62 79 74 | 65 3d 34 3a 78 32 3d 35 |:y=3:byt|e=4:x2=5|
|00001120| 3a 79 32 3d 36 3a 63 6f | 75 6e 74 33 3d 37 3a 78 |:y2=6:co|unt3=7:x|
|00001130| 33 3d 38 3a 79 33 3d 39 | 0d 02 b2 20 61 64 64 72 |3=8:y3=9|... addr|
|00001140| 3d 31 30 3a 73 63 72 61 | 64 64 72 3d 31 31 3a 73 |=10:scra|ddr=11:s|
|00001150| 63 72 65 65 6e 3d 31 32 | 0d 02 bc 17 73 70 3d 31 |creen=12|....sp=1|
|00001160| 33 3a 6c 69 6e 6b 3d 31 | 34 3a 70 63 3d 31 35 0d |3:link=1|4:pc=15.|
|00001170| 02 c6 04 0d 02 d0 14 e3 | 20 70 61 73 73 3d 30 20 |........| pass=0 |
|00001180| b8 20 32 20 88 20 32 0d | 02 da 0c 50 25 3d 63 6f |. 2 . 2.|...P%=co|
|00001190| 64 65 25 0d 02 e4 0d 5b | 4f 50 54 20 70 61 73 73 |de%....[|OPT pass|
|000011a0| 0d 02 ee 04 0d 02 f8 30 | 2e 64 69 76 69 64 65 20 |.......0|.divide |
|000011b0| 3b 20 74 68 69 73 20 63 | 6f 6e 74 61 69 6e 73 20 |; this c|ontains |
|000011c0| 74 68 65 20 76 61 6c 75 | 65 73 20 6f 66 20 28 31 |the valu|es of (1|
|000011d0| 2f 72 29 21 0d 03 02 10 | 45 51 55 44 20 64 69 76 |/r)!....|EQUD div|
|000011e0| 69 64 65 25 0d 03 0c 04 | 0d 03 16 35 2e 64 69 76 |ide%....|...5.div|
|000011f0| 69 64 65 32 20 3b 20 74 | 68 69 73 20 63 6f 6e 74 |ide2 ; t|his cont|
|00001200| 61 69 6e 73 20 74 68 65 | 20 76 61 6c 75 65 73 20 |ains the| values |
|00001210| 6f 66 20 28 28 47 2f 72 | 29 5e 32 29 21 0d 03 20 |of ((G/r|)^2)!.. |
|00001220| 11 45 51 55 44 20 64 69 | 76 69 64 65 32 25 0d 03 |.EQUD di|vide2%..|
|00001230| 2a 04 0d 03 34 0d 2e 6e | 6f 6d 61 73 73 65 73 0d |*...4..n|omasses.|
|00001240| 03 3e 12 45 51 55 44 20 | 6e 6f 6d 61 73 73 65 73 |.>.EQUD |nomasses|
|00001250| 25 0d 03 48 09 2e 64 61 | 74 61 0d 03 52 10 45 51 |%..H..da|ta..R.EQ|
|00001260| 55 44 20 6d 61 73 73 65 | 73 25 0d 03 5c 04 0d 03 |UD masse|s%..\...|
|00001270| 66 0b 2e 62 6f 75 6e 63 | 65 0d 03 70 10 45 51 55 |f..bounc|e..p.EQU|
|00001280| 44 20 62 6f 75 6e 63 65 | 25 0d 03 7a 04 0d 03 84 |D bounce|%..z....|
|00001290| 0f 2e 73 63 72 65 65 6e | 64 61 74 61 0d 03 8e 0c |..screen|data....|
|000012a0| 45 51 55 44 20 31 34 39 | 0d 03 98 0b 45 51 55 44 |EQUD 149|....EQUD|
|000012b0| 20 2d 31 0d 03 a2 0c 2e | 73 63 72 65 65 6e 31 0d | -1.....|screen1.|
|000012c0| 03 ac 0a 45 51 55 44 20 | 30 0d 03 b6 0c 2e 73 63 |...EQUD |0.....sc|
|000012d0| 72 65 65 6e 32 0d 03 c0 | 0a 45 51 55 44 20 30 0d |reen2...|.EQUD 0.|
|000012e0| 03 ca 14 2e 73 63 72 65 | 65 6e 64 69 73 70 6c 61 |....scre|endispla|
|000012f0| 79 65 64 0d 03 d4 0a 45 | 51 55 44 20 31 0d 03 de |yed....E|QUD 1...|
|00001300| 04 0d 03 e8 09 2e 69 6e | 69 74 0d 03 f2 0f 4d 4f |......in|it....MO|
|00001310| 56 20 52 30 2c 23 31 31 | 33 0d 03 fc 0d 4d 4f 56 |V R0,#11|3....MOV|
|00001320| 20 52 31 2c 23 31 0d 04 | 06 09 53 57 49 20 36 0d | R1,#1..|..SWI 6.|
|00001330| 04 10 15 41 44 52 20 52 | 30 2c 73 63 72 65 65 6e |...ADR R|0,screen|
|00001340| 64 61 74 61 0d 04 1a 12 | 41 44 52 20 52 31 2c 73 |data....|ADR R1,s|
|00001350| 63 72 65 65 6e 31 0d 04 | 24 1d 53 57 49 20 22 4f |creen1..|$.SWI "O|
|00001360| 53 5f 52 65 61 64 56 64 | 75 56 61 72 69 61 62 6c |S_ReadVd|uVariabl|
|00001370| 65 73 22 0d 04 2e 0f 4d | 4f 56 20 52 30 2c 23 31 |es"....M|OV R0,#1|
|00001380| 31 33 0d 04 38 0d 4d 4f | 56 20 52 31 2c 23 32 0d |13..8.MO|V R1,#2.|
|00001390| 04 42 09 53 57 49 20 36 | 0d 04 4c 15 41 44 52 20 |.B.SWI 6|..L.ADR |
|000013a0| 52 30 2c 73 63 72 65 65 | 6e 64 61 74 61 0d 04 56 |R0,scree|ndata..V|
|000013b0| 12 41 44 52 20 52 31 2c | 73 63 72 65 65 6e 32 0d |.ADR R1,|screen2.|
|000013c0| 04 60 1d 53 57 49 20 22 | 4f 53 5f 52 65 61 64 56 |.`.SWI "|OS_ReadV|
|000013d0| 64 75 56 61 72 69 61 62 | 6c 65 73 22 0d 04 6a 0f |duVariab|les"..j.|
|000013e0| 4d 4f 56 20 70 63 2c 6c | 69 6e 6b 0d 04 74 04 0d |MOV pc,l|ink..t..|
|000013f0| 04 7e 04 0d 04 88 08 2e | 72 75 6e 0d 04 92 16 53 |.~......|run....S|
|00001400| 54 4d 46 44 20 28 73 70 | 29 21 2c 7b 6c 69 6e 6b |TMFD (sp|)!,{link|
|00001410| 7d 0d 04 9c 04 0d 04 a6 | 0a 2e 66 72 61 6d 65 0d |}.......|..frame.|
|00001420| 04 b0 0e 4d 4f 56 20 52 | 30 2c 23 31 39 0d 04 ba |...MOV R|0,#19...|
|00001430| 11 53 57 49 20 22 4f 53 | 5f 42 79 74 65 22 0d 04 |.SWI "OS|_Byte"..|
|00001440| c4 0f 4d 4f 56 20 52 30 | 2c 23 31 31 33 0d 04 ce |..MOV R0|,#113...|
|00001450| 1a 4c 44 52 20 52 31 2c | 73 63 72 65 65 6e 64 69 |.LDR R1,|screendi|
|00001460| 73 70 6c 61 79 65 64 0d | 04 d8 09 53 57 49 20 36 |splayed.|...SWI 6|
|00001470| 0d 04 e2 1a 4c 44 52 20 | 52 31 2c 73 63 72 65 65 |....LDR |R1,scree|
|00001480| 6e 64 69 73 70 6c 61 79 | 65 64 0d 04 ec 10 52 53 |ndisplay|ed....RS|
|00001490| 42 20 52 31 2c 52 31 2c | 23 33 0d 04 f6 1a 53 54 |B R1,R1,|#3....ST|
|000014a0| 52 20 52 31 2c 73 63 72 | 65 65 6e 64 69 73 70 6c |R R1,scr|eendispl|
|000014b0| 61 79 65 64 0d 05 00 0d | 43 4d 50 20 52 31 2c 23 |ayed....|CMP R1,#|
|000014c0| 31 0d 05 0a 18 4c 44 52 | 45 51 20 73 63 72 65 65 |1....LDR|EQ scree|
|000014d0| 6e 2c 73 63 72 65 65 6e | 31 0d 05 14 18 4c 44 52 |n,screen|1....LDR|
|000014e0| 4e 45 20 73 63 72 65 65 | 6e 2c 73 63 72 65 65 6e |NE scree|n,screen|
|000014f0| 32 0d 05 1e 04 0d 05 28 | 22 3b 20 63 61 6c 6c 73 |2......(|"; calls|
|00001500| 20 74 6f 20 73 75 62 72 | 6f 75 74 69 6e 65 73 20 | to subr|outines |
|00001510| 67 6f 20 68 65 72 65 0d | 05 32 0a 42 4c 20 63 6c |go here.|.2.BL cl|
|00001520| 73 0d 05 3c 10 42 4c 20 | 63 61 6c 63 75 6c 61 74 |s..<.BL |calculat|
|00001530| 65 0d 05 46 0e 42 4c 20 | 64 69 73 70 6c 61 79 0d |e..F.BL |display.|
|00001540| 05 50 04 0d 05 5a 04 0d | 05 64 14 3b 20 61 6e 64 |.P...Z..|.d.; and|
|00001550| 20 66 69 6e 61 6c 6c 79 | 2e 2e 2e 0d 05 6e 1c 53 | finally|.....n.S|
|00001560| 57 49 20 22 4f 53 5f 52 | 65 61 64 45 73 63 61 70 |WI "OS_R|eadEscap|
|00001570| 65 53 74 61 74 65 22 0d | 05 78 0d 42 43 43 20 66 |eState".|.x.BCC f|
|00001580| 72 61 6d 65 0d 05 82 14 | 4c 44 4d 46 44 20 28 73 |rame....|LDMFD (s|
|00001590| 70 29 21 2c 7b 70 63 7d | 0d 05 8c 04 0d 05 96 19 |p)!,{pc}|........|
|000015a0| 3b 20 73 75 62 72 6f 75 | 74 69 6e 65 73 20 67 6f |; subrou|tines go|
|000015b0| 20 68 65 72 65 0d 05 a0 | 04 0d 05 aa 24 2e 64 69 | here...|....$.di|
|000015c0| 73 70 6c 61 79 20 3b 20 | 64 69 73 70 6c 61 79 20 |splay ; |display |
|000015d0| 74 68 65 20 70 61 72 74 | 69 63 6c 65 73 0d 05 b4 |the part|icles...|
|000015e0| 11 4c 44 52 20 61 64 64 | 72 2c 64 61 74 61 0d 05 |.LDR add|r,data..|
|000015f0| be 16 4c 44 52 20 63 6f | 75 6e 74 2c 6e 6f 6d 61 |..LDR co|unt,noma|
|00001600| 73 73 65 73 0d 05 c8 14 | 41 44 44 20 61 64 64 72 |sses....|ADD addr|
|00001610| 2c 61 64 64 72 2c 23 34 | 0d 05 d2 13 4d 4f 56 20 |,addr,#4|....MOV |
|00001620| 63 6f 75 6e 74 32 2c 23 | 33 32 30 0d 05 dc 10 2e |count2,#|320.....|
|00001630| 64 69 73 70 6c 61 79 6c | 6f 6f 70 0d 05 e6 1b 4c |displayl|oop....L|
|00001640| 44 4d 49 41 20 28 61 64 | 64 72 29 2c 7b 78 2c 79 |DMIA (ad|dr),{x,y|
|00001650| 2c 62 79 74 65 7d 0d 05 | f0 15 41 44 44 20 61 64 |,byte}..|..ADD ad|
|00001660| 64 72 2c 61 64 64 72 2c | 23 32 34 0d 05 fa 12 4d |dr,addr,|#24....M|
|00001670| 4f 56 20 78 2c 78 2c 41 | 53 52 20 23 32 0d 06 04 |OV x,x,A|SR #2...|
|00001680| 12 4d 4f 56 20 79 2c 79 | 2c 41 53 52 20 23 33 0d |.MOV y,y|,ASR #3.|
|00001690| 06 0e 12 4d 4f 56 20 78 | 2c 78 2c 41 53 52 20 23 |...MOV x|,x,ASR #|
|000016a0| 31 0d 06 18 0c 43 4d 50 | 20 78 2c 23 30 0d 06 22 |1....CMP| x,#0.."|
|000016b0| 14 42 4c 54 20 64 69 73 | 70 6c 61 79 6c 6f 6f 70 |.BLT dis|playloop|
|000016c0| 32 0d 06 2c 0e 43 4d 50 | 20 78 2c 23 33 32 30 0d |2..,.CMP| x,#320.|
|000016d0| 06 36 14 42 47 45 20 64 | 69 73 70 6c 61 79 6c 6f |.6.BGE d|isplaylo|
|000016e0| 6f 70 32 0d 06 40 0c 43 | 4d 50 20 79 2c 23 30 0d |op2..@.C|MP y,#0.|
|000016f0| 06 4a 14 42 4c 54 20 64 | 69 73 70 6c 61 79 6c 6f |.J.BLT d|isplaylo|
|00001700| 6f 70 32 0d 06 54 0e 43 | 4d 50 20 79 2c 23 32 35 |op2..T.C|MP y,#25|
|00001710| 36 0d 06 5e 14 42 47 45 | 20 64 69 73 70 6c 61 79 |6..^.BGE| display|
|00001720| 6c 6f 6f 70 32 0d 06 68 | 1a 4d 4c 41 20 73 63 72 |loop2..h|.MLA scr|
|00001730| 61 64 64 72 2c 79 2c 63 | 6f 75 6e 74 32 2c 78 0d |addr,y,c|ount2,x.|
|00001740| 06 72 1a 4d 4f 56 43 43 | 20 62 79 74 65 2c 62 79 |.r.MOVCC| byte,by|
|00001750| 74 65 2c 4c 53 4c 20 23 | 34 0d 06 7c 1e 53 54 52 |te,LSL #|4..|.STR|
|00001760| 42 20 62 79 74 65 2c 5b | 73 63 72 65 65 6e 2c 73 |B byte,[|screen,s|
|00001770| 63 72 61 64 64 72 5d 0d | 06 86 11 2e 64 69 73 70 |craddr].|....disp|
|00001780| 6c 61 79 6c 6f 6f 70 32 | 0d 06 90 17 53 55 42 53 |layloop2|....SUBS|
|00001790| 20 63 6f 75 6e 74 2c 63 | 6f 75 6e 74 2c 23 31 0d | count,c|ount,#1.|
|000017a0| 06 9a 13 42 4e 45 20 64 | 69 73 70 6c 61 79 6c 6f |...BNE d|isplaylo|
|000017b0| 6f 70 0d 06 a4 0f 4d 4f | 56 20 70 63 2c 6c 69 6e |op....MO|V pc,lin|
|000017c0| 6b 0d 06 ae 04 0d 06 b8 | 3b 2e 63 61 6c 63 75 6c |k.......|;.calcul|
|000017d0| 61 74 65 20 3b 20 63 61 | 6c 63 75 6c 61 74 65 20 |ate ; ca|lculate |
|000017e0| 74 68 65 20 61 63 63 65 | 6c 65 72 61 74 69 6f 6e |the acce|leration|
|000017f0| 73 20 61 6e 64 20 76 65 | 6c 6f 63 69 74 69 65 73 |s and ve|locities|
|00001800| 0d 06 c2 1d 53 54 4d 46 | 44 20 28 73 70 29 21 2c |....STMF|D (sp)!,|
|00001810| 7b 73 63 72 65 65 6e 2c | 6c 69 6e 6b 7d 0d 06 cc |{screen,|link}...|
|00001820| 16 4c 44 52 20 63 6f 75 | 6e 74 2c 6e 6f 6d 61 73 |.LDR cou|nt,nomas|
|00001830| 73 65 73 0d 06 d6 11 4c | 44 52 20 61 64 64 72 2c |ses....L|DR addr,|
|00001840| 64 61 74 61 0d 06 e0 0d | 2e 63 61 6c 63 6c 6f 6f |data....|.calcloo|
|00001850| 70 0d 06 ea 31 4c 44 4d | 49 41 20 28 61 64 64 72 |p...1LDM|IA (addr|
|00001860| 29 2c 7b 63 6f 75 6e 74 | 32 2c 78 2c 79 2c 62 79 |),{count|2,x,y,by|
|00001870| 74 65 2c 73 63 72 61 64 | 64 72 2c 73 63 72 65 65 |te,scrad|dr,scree|
|00001880| 6e 7d 0d 06 f4 1c 53 54 | 4d 46 44 20 28 73 70 29 |n}....ST|MFD (sp)|
|00001890| 21 2c 7b 63 6f 75 6e 74 | 2c 61 64 64 72 7d 0d 06 |!,{count|,addr}..|
|000018a0| fe 15 4c 44 52 20 62 79 | 74 65 2c 6e 6f 6d 61 73 |..LDR by|te,nomas|
|000018b0| 73 65 73 0d 07 08 11 4c | 44 52 20 61 64 64 72 2c |ses....L|DR addr,|
|000018c0| 64 61 74 61 0d 07 12 0e | 2e 63 61 6c 63 6c 6f 6f |data....|.calcloo|
|000018d0| 70 32 0d 07 1c 20 4c 44 | 4d 49 41 20 28 61 64 64 |p2... LD|MIA (add|
|000018e0| 72 29 21 2c 7b 63 6f 75 | 6e 74 33 2c 78 33 2c 79 |r)!,{cou|nt3,x3,y|
|000018f0| 33 7d 0d 07 26 15 41 44 | 44 20 61 64 64 72 2c 61 |3}..&.AD|D addr,a|
|00001900| 64 64 72 2c 23 31 32 0d | 07 30 0f 53 55 42 20 78 |ddr,#12.|.0.SUB x|
|00001910| 33 2c 78 33 2c 78 0d 07 | 3a 0f 53 55 42 20 79 33 |3,x3,x..|:.SUB y3|
|00001920| 2c 79 33 2c 79 0d 07 44 | 12 4d 4f 56 20 63 6f 75 |,y3,y..D|.MOV cou|
|00001930| 6e 74 2c 23 33 32 30 0d | 07 4e 1a 4d 4f 56 20 63 |nt,#320.|.N.MOV c|
|00001940| 6f 75 6e 74 2c 63 6f 75 | 6e 74 2c 41 53 4c 20 23 |ount,cou|nt,ASL #|
|00001950| 33 0d 07 58 10 43 4d 50 | 20 78 33 2c 63 6f 75 6e |3..X.CMP| x3,coun|
|00001960| 74 0d 07 62 12 4d 4f 56 | 48 49 20 78 33 2c 23 32 |t..b.MOV|HI x3,#2|
|00001970| 35 36 30 0d 07 6c 10 43 | 4d 50 20 79 33 2c 23 32 |560..l.C|MP y3,#2|
|00001980| 30 34 38 0d 07 76 12 4d | 4f 56 48 49 20 79 33 2c |048..v.M|OVHI y3,|
|00001990| 23 32 30 34 38 0d 07 80 | 10 4d 55 4c 20 78 32 2c |#2048...|.MUL x2,|
|000019a0| 78 33 2c 78 33 0d 07 8a | 10 4d 55 4c 20 79 32 2c |x3,x3...|.MUL y2,|
|000019b0| 79 33 2c 79 33 0d 07 94 | 13 41 44 44 20 63 6f 75 |y3,y3...|.ADD cou|
|000019c0| 6e 74 2c 78 32 2c 79 32 | 0d 07 9e 19 a4 72 6f 6f |nt,x2,y2|.....roo|
|000019d0| 74 20 20 20 20 3b 20 73 | 6f 20 63 6f 75 6e 74 3d |t ; s|o count=|
|000019e0| 72 0d 07 a8 20 20 20 3b | 20 6e 6f 77 2c 20 63 6f |r... ;| now, co|
|000019f0| 75 6e 74 32 3d 61 63 63 | 65 6c 65 72 61 74 69 6f |unt2=acc|eleratio|
|00001a00| 6e 0d 07 b2 1a 4d 4f 56 | 20 63 6f 75 6e 74 2c 63 |n....MOV| count,c|
|00001a10| 6f 75 6e 74 2c 41 53 4c | 20 23 32 0d 07 bc 16 4c |ount,ASL| #2....L|
|00001a20| 44 52 20 63 6f 75 6e 74 | 32 2c 64 69 76 69 64 65 |DR count|2,divide|
|00001a30| 32 0d 07 c6 1d 4c 44 52 | 20 63 6f 75 6e 74 32 2c |2....LDR| count2,|
|00001a40| 5b 63 6f 75 6e 74 32 2c | 63 6f 75 6e 74 5d 0d 07 |[count2,|count]..|
|00001a50| d0 1c 4d 55 4c 20 63 6f | 75 6e 74 32 2c 63 6f 75 |..MUL co|unt2,cou|
|00001a60| 6e 74 33 2c 63 6f 75 6e | 74 32 0d 07 da 1c 4d 4f |nt3,coun|t2....MO|
|00001a70| 56 20 63 6f 75 6e 74 32 | 2c 63 6f 75 6e 74 32 2c |V count2|,count2,|
|00001a80| 41 53 52 20 23 36 0d 07 | e4 1d 20 20 3b 20 58 20 |ASR #6..|.. ; X |
|00001a90| 61 63 63 65 6c 65 72 61 | 74 69 6f 6e 20 3d 20 61 |accelera|tion = a|
|00001aa0| 78 2f 72 0d 07 ee 11 4c | 44 52 20 78 32 2c 64 69 |x/r....L|DR x2,di|
|00001ab0| 76 69 64 65 0d 07 f8 15 | 4c 44 52 20 79 32 2c 5b |vide....|LDR y2,[|
|00001ac0| 78 32 2c 63 6f 75 6e 74 | 5d 0d 08 02 14 4d 55 4c |x2,count|]....MUL|
|00001ad0| 20 79 32 2c 63 6f 75 6e | 74 32 2c 79 32 0d 08 0c | y2,coun|t2,y2...|
|00001ae0| 10 4d 55 4c 20 78 32 2c | 78 33 2c 79 32 0d 08 16 |.MUL x2,|x3,y2...|
|00001af0| 15 4d 4f 56 20 78 32 2c | 78 32 2c 41 53 52 20 23 |.MOV x2,|x2,ASR #|
|00001b00| 32 36 0d 08 20 1a 41 44 | 44 20 73 63 72 61 64 64 |26.. .AD|D scradd|
|00001b10| 72 2c 73 63 72 61 64 64 | 72 2c 78 32 0d 08 2a 1d |r,scradd|r,x2..*.|
|00001b20| 20 20 3b 20 59 20 61 63 | 63 65 6c 65 72 61 74 69 | ; Y ac|celerati|
|00001b30| 6f 6e 20 3d 20 61 79 2f | 72 0d 08 34 10 4d 55 4c |on = ay/|r..4.MUL|
|00001b40| 20 79 32 2c 79 33 2c 79 | 32 0d 08 3e 15 4d 4f 56 | y2,y3,y|2..>.MOV|
|00001b50| 20 79 32 2c 79 32 2c 41 | 53 52 20 23 32 36 0d 08 | y2,y2,A|SR #26..|
|00001b60| 48 18 41 44 44 20 73 63 | 72 65 65 6e 2c 73 63 72 |H.ADD sc|reen,scr|
|00001b70| 65 65 6e 2c 79 32 0d 08 | 52 18 20 20 3b 20 65 6e |een,y2..|R. ; en|
|00001b80| 64 20 6f 66 20 63 61 6c | 63 6c 6f 6f 70 32 0d 08 |d of cal|cloop2..|
|00001b90| 5c 15 53 55 42 53 20 62 | 79 74 65 2c 62 79 74 65 |\.SUBS b|yte,byte|
|00001ba0| 2c 23 31 0d 08 66 11 42 | 4e 45 20 63 61 6c 63 6c |,#1..f.B|NE calcl|
|00001bb0| 6f 6f 70 32 0d 08 70 17 | 20 20 3b 20 65 6e 64 20 |oop2..p.| ; end |
|00001bc0| 6f 66 20 63 61 6c 63 6c | 6f 6f 70 0d 08 7a 1c 4c |of calcl|oop..z.L|
|00001bd0| 44 4d 46 44 20 28 73 70 | 29 21 2c 7b 63 6f 75 6e |DMFD (sp|)!,{coun|
|00001be0| 74 2c 61 64 64 72 7d 0d | 08 84 28 4c 44 4d 49 41 |t,addr}.|..(LDMIA|
|00001bf0| 20 28 61 64 64 72 29 2c | 7b 63 6f 75 6e 74 32 2c | (addr),|{count2,|
|00001c00| 78 2c 79 2c 62 79 74 65 | 2c 78 32 2c 79 32 7d 0d |x,y,byte|,x2,y2}.|
|00001c10| 08 8e 13 41 44 44 20 78 | 2c 78 2c 73 63 72 61 64 |...ADD x|,x,scrad|
|00001c20| 64 72 0d 08 98 12 41 44 | 44 20 79 2c 79 2c 73 63 |dr....AD|D y,y,sc|
|00001c30| 72 65 65 6e 0d 08 a2 11 | 4c 44 52 20 78 32 2c 62 |reen....|LDR x2,b|
|00001c40| 6f 75 6e 63 65 0d 08 ac | 0d 43 4d 50 20 78 32 2c |ounce...|.CMP x2,|
|00001c50| 23 31 0d 08 b6 11 42 4e | 45 20 63 61 6c 63 73 74 |#1....BN|E calcst|
|00001c60| 6f 72 65 0d 08 c0 0c 43 | 4d 50 20 78 2c 23 30 0d |ore....C|MP x,#0.|
|00001c70| 08 ca 0e 4d 4f 56 4c 54 | 20 78 2c 23 30 0d 08 d4 |...MOVLT| x,#0...|
|00001c80| 23 41 44 44 20 73 63 72 | 61 64 64 72 2c 73 63 72 |#ADD scr|addr,scr|
|00001c90| 61 64 64 72 2c 23 62 6f | 75 6e 63 65 64 61 6d 70 |addr,#bo|uncedamp|
|00001ca0| 0d 08 de 1c 52 53 42 4c | 54 20 73 63 72 61 64 64 |....RSBL|T scradd|
|00001cb0| 72 2c 73 63 72 61 64 64 | 72 2c 23 30 0d 08 e8 0f |r,scradd|r,#0....|
|00001cc0| 4d 4f 56 20 78 32 2c 23 | 36 34 30 0d 08 f2 14 4d |MOV x2,#|640....M|
|00001cd0| 4f 56 20 78 32 2c 78 32 | 2c 41 53 4c 20 23 32 0d |OV x2,x2|,ASL #2.|
|00001ce0| 08 fc 0c 43 4d 50 20 78 | 2c 78 32 0d 09 06 0e 4d |...CMP x|,x2....M|
|00001cf0| 4f 56 47 45 20 78 2c 78 | 32 0d 09 10 23 53 55 42 |OVGE x,x|2...#SUB|
|00001d00| 20 73 63 72 61 64 64 72 | 2c 73 63 72 61 64 64 72 | scraddr|,scraddr|
|00001d10| 2c 23 62 6f 75 6e 63 65 | 64 61 6d 70 0d 09 1a 1c |,#bounce|damp....|
|00001d20| 52 53 42 47 45 20 73 63 | 72 61 64 64 72 2c 73 63 |RSBGE sc|raddr,sc|
|00001d30| 72 61 64 64 72 2c 23 30 | 0d 09 24 0c 43 4d 50 20 |raddr,#0|..$.CMP |
|00001d40| 79 2c 23 30 0d 09 2e 0e | 4d 4f 56 4c 54 20 79 2c |y,#0....|MOVLT y,|
|00001d50| 23 30 0d 09 38 21 41 44 | 44 20 73 63 72 65 65 6e |#0..8!AD|D screen|
|00001d60| 2c 73 63 72 65 65 6e 2c | 23 62 6f 75 6e 63 65 64 |,screen,|#bounced|
|00001d70| 61 6d 70 0d 09 42 1a 52 | 53 42 4c 54 20 73 63 72 |amp..B.R|SBLT scr|
|00001d80| 65 65 6e 2c 73 63 72 65 | 65 6e 2c 23 30 0d 09 4c |een,scre|en,#0..L|
|00001d90| 0f 43 4d 50 20 79 2c 23 | 32 30 34 38 0d 09 56 11 |.CMP y,#|2048..V.|
|00001da0| 4d 4f 56 47 45 20 79 2c | 23 32 30 34 38 0d 09 60 |MOVGE y,|#2048..`|
|00001db0| 21 53 55 42 20 73 63 72 | 65 65 6e 2c 73 63 72 65 |!SUB scr|een,scre|
|00001dc0| 65 6e 2c 23 62 6f 75 6e | 63 65 64 61 6d 70 0d 09 |en,#boun|cedamp..|
|00001dd0| 6a 1a 52 53 42 47 45 20 | 73 63 72 65 65 6e 2c 73 |j.RSBGE |screen,s|
|00001de0| 63 72 65 65 6e 2c 23 30 | 0d 09 74 0e 2e 63 61 6c |creen,#0|..t..cal|
|00001df0| 63 73 74 6f 72 65 0d 09 | 7e 32 53 54 4d 49 41 20 |cstore..|~2STMIA |
|00001e00| 28 61 64 64 72 29 21 2c | 7b 63 6f 75 6e 74 32 2c |(addr)!,|{count2,|
|00001e10| 78 2c 79 2c 62 79 74 65 | 2c 73 63 72 61 64 64 72 |x,y,byte|,scraddr|
|00001e20| 2c 73 63 72 65 65 6e 7d | 0d 09 88 17 53 55 42 53 |,screen}|....SUBS|
|00001e30| 20 63 6f 75 6e 74 2c 63 | 6f 75 6e 74 2c 23 31 0d | count,c|ount,#1.|
|00001e40| 09 92 10 42 4e 45 20 63 | 61 6c 63 6c 6f 6f 70 0d |...BNE c|alcloop.|
|00001e50| 09 9c 1b 4c 44 4d 46 44 | 20 28 73 70 29 21 2c 7b |...LDMFD| (sp)!,{|
|00001e60| 73 63 72 65 65 6e 2c 70 | 63 7d 0d 09 a6 04 0d 09 |screen,p|c}......|
|00001e70| b0 04 0d 09 ba 08 2e 63 | 6c 73 0d 09 c4 16 4d 4f |.......c|ls....MO|
|00001e80| 56 20 73 63 72 61 64 64 | 72 2c 73 63 72 65 65 6e |V scradd|r,screen|
|00001e90| 0d 09 ce 0d 4d 4f 56 20 | 52 30 2c 23 30 0d 09 d8 |....MOV |R0,#0...|
|00001ea0| 0d 4d 4f 56 20 52 31 2c | 23 30 0d 09 e2 0d 4d 4f |.MOV R1,|#0....MO|
|00001eb0| 56 20 52 32 2c 23 30 0d | 09 ec 0d 4d 4f 56 20 52 |V R2,#0.|...MOV R|
|00001ec0| 33 2c 23 30 0d 09 f6 0d | 4d 4f 56 20 52 34 2c 23 |3,#0....|MOV R4,#|
|00001ed0| 30 0d 0a 00 0d 4d 4f 56 | 20 52 35 2c 23 30 0d 0a |0....MOV| R5,#0..|
|00001ee0| 0a 0d 4d 4f 56 20 52 36 | 2c 23 30 0d 0a 14 0d 4d |..MOV R6|,#0....M|
|00001ef0| 4f 56 20 52 37 2c 23 30 | 0d 0a 1e 0d 4d 4f 56 20 |OV R7,#0|....MOV |
|00001f00| 52 38 2c 23 30 0d 0a 28 | 0d 4d 4f 56 20 52 39 2c |R8,#0..(|.MOV R9,|
|00001f10| 23 30 0d 0a 32 10 4d 4f | 56 20 52 31 30 2c 23 32 |#0..2.MO|V R10,#2|
|00001f20| 35 36 0d 0a 3c 0c 2e 63 | 6c 73 6c 6f 6f 70 0d 0a |56..<..c|lsloop..|
|00001f30| 46 23 5d 3a e3 20 6c 6f | 6f 70 3d 30 20 b8 20 33 |F#]:. lo|op=0 . 3|
|00001f40| 31 39 20 88 20 34 30 3a | 5b 4f 50 54 20 70 61 73 |19 . 40:|[OPT pas|
|00001f50| 73 0d 0a 50 1c 53 54 4d | 49 41 20 28 73 63 72 61 |s..P.STM|IA (scra|
|00001f60| 64 64 72 29 21 2c 7b 52 | 30 2d 52 39 7d 0d 0a 5a |ddr)!,{R|0-R9}..Z|
|00001f70| 11 5d 3a ed 3a 5b 4f 50 | 54 20 70 61 73 73 0d 0a |.]:.:[OP|T pass..|
|00001f80| 64 13 53 55 42 53 20 52 | 31 30 2c 52 31 30 2c 23 |d.SUBS R|10,R10,#|
|00001f90| 31 0d 0a 6e 0f 42 4e 45 | 20 63 6c 73 6c 6f 6f 70 |1..n.BNE| clsloop|
|00001fa0| 0d 0a 78 0f 4d 4f 56 20 | 70 63 2c 6c 69 6e 6b 0d |..x.MOV |pc,link.|
|00001fb0| 0a 82 04 0d 0a 8c 33 a4 | 73 71 75 61 72 65 72 6f |......3.|squarero|
|00001fc0| 6f 74 20 3b 20 69 6e 69 | 74 69 61 6c 69 73 65 20 |ot ; ini|tialise |
|00001fd0| 74 68 65 20 73 71 75 61 | 72 65 20 72 6f 6f 74 20 |the squa|re root |
|00001fe0| 62 69 74 2e 2e 2e 0d 0a | 96 04 0d 0a a0 26 5d 3a |bit.....|.....&]:|
|00001ff0| f1 20 22 50 61 73 73 20 | 22 3b 70 61 73 73 3b 22 |. "Pass |";pass;"|
|00002000| 20 2d 20 70 61 73 73 65 | 64 20 4f 4b 21 22 3a ed | - passe|d OK!":.|
|00002010| 0d 0a aa 44 e7 20 50 25 | 2d 63 6f 64 65 25 3e 73 |...D. P%|-code%>s|
|00002020| 70 61 63 65 66 6f 72 63 | 6f 64 65 25 20 ef 20 37 |paceforc|ode% . 7|
|00002030| 3a f1 20 22 57 41 52 4e | 49 4e 47 21 20 49 6e 73 |:. "WARN|ING! Ins|
|00002040| 75 66 66 69 63 69 65 6e | 74 20 4d 65 6d 6f 72 79 |ufficien|t Memory|
|00002050| 21 22 3a e0 0d 0a b4 05 | e1 0d 0a be 04 0d 0a c8 |!":.....|........|
|00002060| 11 dd 20 a4 73 71 75 61 | 72 65 72 6f 6f 74 0d 0a |.. .squa|reroot..|
|00002070| d2 3b f4 20 54 68 69 73 | 20 66 75 6e 63 74 69 6f |.;. This| functio|
|00002080| 6e 20 73 68 6f 75 6c 64 | 20 62 65 20 63 61 6c 6c |n should| be call|
|00002090| 65 64 20 4f 4e 43 45 20 | 74 6f 20 49 4e 49 54 49 |ed ONCE |to INITI|
|000020a0| 41 4c 49 53 45 20 74 68 | 65 0d 0a dc 3b f4 20 73 |ALISE th|e...;. s|
|000020b0| 71 75 61 72 65 20 72 6f | 6f 74 20 72 6f 75 74 69 |quare ro|ot routi|
|000020c0| 6e 65 20 66 6f 72 20 66 | 75 74 75 72 65 20 75 73 |ne for f|uture us|
|000020d0| 65 2e 20 49 74 20 63 61 | 6c 63 75 6c 61 74 65 73 |e. It ca|lculates|
|000020e0| 20 74 68 65 0d 0a e6 39 | f4 20 69 6e 74 65 67 65 | the...9|. intege|
|000020f0| 72 20 73 71 75 61 72 65 | 20 72 6f 6f 74 20 6f 66 |r square| root of|
|00002100| 20 52 30 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 | R0 and |returns |
|00002110| 74 68 65 20 72 65 73 75 | 6c 74 20 69 6e 0d 0a f0 |the resu|lt in...|
|00002120| 3b f4 20 52 30 2e 20 54 | 68 65 20 63 6f 6e 74 65 |;. R0. T|he conte|
|00002130| 6e 74 73 20 6f 66 20 52 | 37 2c 20 52 38 20 26 20 |nts of R|7, R8 & |
|00002140| 52 39 20 61 72 65 20 43 | 4f 52 52 55 50 54 45 44 |R9 are C|ORRUPTED|
|00002150| 20 62 79 20 74 68 69 73 | 0d 0a fa 3c f4 20 72 6f | by this|...<. ro|
|00002160| 75 74 69 6e 65 2e 20 53 | 74 61 63 6b 20 61 6e 79 |utine. S|tack any|
|00002170| 20 72 65 71 75 69 72 65 | 64 20 62 65 66 6f 72 65 | require|d before|
|00002180| 20 62 72 61 6e 63 68 69 | 6e 67 20 74 6f 20 22 73 | branchi|ng to "s|
|00002190| 71 72 22 2e 0d 0b 04 16 | 78 30 3d 30 3a 61 3d 37 |qr".....|x0=0:a=7|
|000021a0| 3a 63 3d 38 3a 73 75 6d | 3d 39 0d 0b 0e 0d 5b 4f |:c=8:sum|=9....[O|
|000021b0| 50 54 20 70 61 73 73 0d | 0b 18 08 2e 73 71 72 0d |PT pass.|....sqr.|
|000021c0| 0b 22 0c 4d 4f 56 20 61 | 2c 23 31 0d 0b 2c 0c 4d |.".MOV a|,#1..,.M|
|000021d0| 4f 56 20 63 2c 23 30 0d | 0b 36 09 42 20 63 6d 70 |OV c,#0.|.6.B cmp|
|000021e0| 0d 0b 40 0c 2e 73 71 72 | 6c 6f 6f 70 0d 0b 4a 12 |..@..sqr|loop..J.|
|000021f0| 4d 4f 56 20 61 2c 61 2c | 41 53 4c 20 23 32 0d 0b |MOV a,a,|ASL #2..|
|00002200| 54 08 2e 63 6d 70 0d 0b | 5e 0c 43 4d 50 20 61 2c |T..cmp..|^.CMP a,|
|00002210| 78 30 0d 0b 68 0f 42 4c | 54 20 73 71 72 6c 6f 6f |x0..h.BL|T sqrloo|
|00002220| 70 0d 0b 72 0d 2e 73 71 | 72 6c 6f 6f 70 32 0d 0b |p..r..sq|rloop2..|
|00002230| 7c 0f 41 44 44 20 73 75 | 6d 2c 61 2c 63 0d 0b 86 ||.ADD su|m,a,c...|
|00002240| 12 4d 4f 56 20 63 2c 63 | 2c 4c 53 52 20 23 31 0d |.MOV c,c|,LSR #1.|
|00002250| 0b 90 0e 43 4d 50 20 78 | 30 2c 73 75 6d 0d 0b 9a |...CMP x|0,sum...|
|00002260| 13 53 55 42 47 45 20 78 | 30 2c 78 30 2c 73 75 6d |.SUBGE x|0,x0,sum|
|00002270| 0d 0b a4 0f 41 44 44 47 | 45 20 63 2c 63 2c 61 0d |....ADDG|E c,c,a.|
|00002280| 0b ae 13 4d 4f 56 53 20 | 61 2c 61 2c 4c 53 52 20 |...MOVS |a,a,LSR |
|00002290| 23 32 0d 0b b8 10 42 4e | 45 20 73 71 72 6c 6f 6f |#2....BN|E sqrloo|
|000022a0| 70 32 0d 0b c2 0c 43 4d | 50 20 63 2c 78 30 0d 0b |p2....CM|P c,x0..|
|000022b0| cc 11 41 44 44 4c 54 20 | 52 30 2c 63 2c 23 31 0d |..ADDLT |R0,c,#1.|
|000022c0| 0b d6 0e 4d 4f 56 47 45 | 20 52 30 2c 63 0d 0b e0 |...MOVGE| R0,c...|
|000022d0| 0f 4d 4f 56 20 70 63 2c | 6c 69 6e 6b 0d 0b ea 0b |.MOV pc,|link....|
|000022e0| 5d 3a 3d 70 61 73 73 0d | 0b f4 04 0d 0b fe 0b dd |]:=pass.|........|
|000022f0| 20 a4 72 6f 6f 74 0d 0c | 08 44 f4 20 54 68 69 73 | .root..|.D. This|
|00002300| 20 62 69 74 20 6d 65 72 | 65 6c 79 20 63 61 6c 6c | bit mer|ely call|
|00002310| 73 20 74 68 65 20 73 71 | 75 61 72 65 20 72 6f 6f |s the sq|uare roo|
|00002320| 74 20 62 69 74 20 41 46 | 54 45 52 20 73 74 61 63 |t bit AF|TER stac|
|00002330| 6b 69 6e 67 20 52 37 2d | 52 39 0d 0c 12 0d 5b 4f |king R7-|R9....[O|
|00002340| 50 54 20 70 61 73 73 0d | 0c 1c 17 53 54 4d 46 44 |PT pass.|...STMFD|
|00002350| 20 28 73 70 29 21 2c 7b | 52 37 2d 52 39 7d 0d 0c | (sp)!,{|R7-R9}..|
|00002360| 26 0a 42 4c 20 73 71 72 | 0d 0c 30 17 4c 44 4d 46 |&.BL sqr|..0.LDMF|
|00002370| 44 20 28 73 70 29 21 2c | 7b 52 37 2d 52 39 7d 0d |D (sp)!,|{R7-R9}.|
|00002380| 0c 3a 0b 5d 3a 3d 70 61 | 73 73 0d 0c 44 04 0d 0c |.:.]:=pa|ss..D...|
|00002390| 4e 0c dd 20 f2 69 6e 70 | 75 74 0d 0c 58 0e 2a 50 |N.. .inp|ut..X.*P|
|000023a0| 4f 49 4e 54 45 52 20 31 | 0d 0c 62 10 6d 65 6d 25 |OINTER 1|..b.mem%|
|000023b0| 3d 6d 61 73 73 65 73 25 | 0d 0c 6c 18 e3 20 6c 6f |=masses%|..l.. lo|
|000023c0| 6f 70 3d 31 20 b8 20 6e | 6f 6d 61 73 73 65 73 25 |op=1 . n|omasses%|
|000023d0| 0d 0c 76 05 db 0d 0c 80 | 0e e7 20 6c 6f 6f 70 3e |..v.....|.. loop>|
|000023e0| 31 20 8c 0d 0c 8a 11 6d | 65 6d 32 25 3d 6d 61 73 |1 .....m|em2%=mas|
|000023f0| 73 65 73 25 0d 0c 94 16 | e3 20 6c 6f 6f 70 32 3d |ses%....|. loop2=|
|00002400| 31 20 b8 20 6c 6f 6f 70 | 2d 31 0d 0c 9e 07 e6 20 |1 . loop|-1..... |
|00002410| 34 0d 0c a8 15 ec 20 6d | 65 6d 32 25 21 34 2c 6d |4..... m|em2%!4,m|
|00002420| 65 6d 32 25 21 38 0d 0c | b2 1a df 20 42 59 20 6d |em2%!8..|... BY m|
|00002430| 65 6d 32 25 21 31 36 2c | 6d 65 6d 32 25 21 32 30 |em2%!16,|mem2%!20|
|00002440| 0d 0c bc 0e e6 20 6d 65 | 6d 32 25 21 31 32 0d 0c |..... me|m2%!12..|
|00002450| c6 16 c8 92 20 6d 65 6d | 32 25 21 34 2c 6d 65 6d |.... mem|2%!4,mem|
|00002460| 32 25 21 38 0d 0c d0 0d | 6d 65 6d 32 25 2b 3d 32 |2%!8....|mem2%+=2|
|00002470| 34 0d 0c da 05 ed 0d 0c | e4 05 cd 0d 0c ee 07 fb |4.......|........|
|00002480| 20 36 0d 0c f8 39 f2 68 | 65 61 64 28 22 50 6c 65 | 6...9.h|ead("Ple|
|00002490| 61 73 65 20 63 6c 69 63 | 6b 20 6f 6e 20 70 6f 73 |ase clic|k on pos|
|000024a0| 69 74 69 6f 6e 20 66 6f | 72 20 6f 62 6a 65 63 74 |ition fo|r object|
|000024b0| 20 22 2b c3 28 6c 6f 6f | 70 29 29 0d 0d 02 05 f5 | "+.(loo|p)).....|
|000024c0| 0d 0d 0c 0c c8 97 20 58 | 2c 59 2c 5a 0d 0d 16 0a |...... X|,Y,Z....|
|000024d0| fd 20 5a 3c 3e 30 0d 0d | 20 15 6d 65 6d 25 21 34 |. Z<>0..| .mem%!4|
|000024e0| 3d 58 3a 6d 65 6d 25 21 | 38 3d 59 0d 0d 2a 11 6d |=X:mem%!|8=Y..*.m|
|000024f0| 65 6d 25 21 31 32 3d b3 | 28 31 35 29 0d 0d 34 0d |em%!12=.|(15)..4.|
|00002500| e6 20 6d 65 6d 25 21 31 | 32 0d 0d 3e 0a c8 92 20 |. mem%!1|2..>... |
|00002510| 58 2c 59 0d 0d 48 0d f2 | 68 65 61 64 28 22 22 29 |X,Y..H..|head("")|
|00002520| 0d 0d 52 38 e8 20 8a 30 | 2c 30 29 22 50 6c 65 61 |..R8. .0|,0)"Plea|
|00002530| 73 65 20 69 6e 70 75 74 | 20 74 68 65 20 6d 61 73 |se input| the mas|
|00002540| 73 20 6f 66 20 74 68 69 | 73 20 6f 62 6a 65 63 74 |s of thi|s object|
|00002550| 20 3a 20 22 6d 61 73 73 | 0d 0d 5c 0f 6d 65 6d 25 | : "mass|..\.mem%|
|00002560| 21 30 3d 6d 61 73 73 0d | 0d 66 39 f2 68 65 61 64 |!0=mass.|.f9.head|
|00002570| 28 22 57 65 20 6d 75 73 | 74 20 6e 6f 77 20 73 65 |("We mus|t now se|
|00002580| 74 20 74 68 65 20 76 65 | 6c 6f 63 69 74 79 20 66 |t the ve|locity f|
|00002590| 6f 72 20 74 68 69 73 20 | 6f 62 6a 65 63 74 22 29 |or this |object")|
|000025a0| 0d 0d 70 09 e6 20 33 2c | 34 0d 0d 7a 05 f5 0d 0d |..p.. 3,|4..z....|
|000025b0| 84 0c c8 97 20 58 2c 59 | 2c 5a 0d 0d 8e 13 ec 20 |.... X,Y|,Z..... |
|000025c0| 6d 65 6d 25 21 34 2c 6d | 65 6d 25 21 38 0d 0d 98 |mem%!4,m|em%!8...|
|000025d0| 09 df 20 58 2c 59 0d 0d | a2 06 c8 96 0d 0d ac 13 |.. X,Y..|........|
|000025e0| df 20 6d 65 6d 25 21 34 | 2c 6d 65 6d 25 21 38 0d |. mem%!4|,mem%!8.|
|000025f0| 0d b6 0a fd 20 5a 3c 3e | 30 0d 0d c0 16 6d 65 6d |.... Z<>|0....mem|
|00002600| 25 21 31 36 3d 58 2d 28 | 6d 65 6d 25 21 34 29 0d |%!16=X-(|mem%!4).|
|00002610| 0d ca 16 6d 65 6d 25 21 | 32 30 3d 59 2d 28 6d 65 |...mem%!|20=Y-(me|
|00002620| 6d 25 21 38 29 0d 0d d4 | 0c 6d 65 6d 25 2b 3d 32 |m%!8)...|.mem%+=2|
|00002630| 34 0d 0d de 05 f5 0d 0d | e8 0c c8 97 20 58 2c 59 |4.......|.... X,Y|
|00002640| 2c 5a 0d 0d f2 09 fd 20 | 5a 3d 30 0d 0d fc 05 ed |,Z..... |Z=0.....|
|00002650| 0d 0e 06 10 6d 65 6d 25 | 3d 6d 61 73 73 65 73 25 |....mem%|=masses%|
|00002660| 0d 0e 10 18 e3 20 6c 6f | 6f 70 3d 31 20 b8 20 6e |..... lo|op=1 . n|
|00002670| 6f 6d 61 73 73 65 73 25 | 0d 0e 1a 15 6d 65 6d 25 |omasses%|....mem%|
|00002680| 21 34 3d 28 6d 65 6d 25 | 21 34 29 2a 32 0d 0e 24 |!4=(mem%|!4)*2..$|
|00002690| 1c 6d 65 6d 25 21 38 3d | 32 30 34 38 2d 28 28 6d |.mem%!8=|2048-((m|
|000026a0| 65 6d 25 21 38 29 2a 32 | 29 0d 0e 2e 1d 6d 65 6d |em%!8)*2|)....mem|
|000026b0| 25 21 31 36 3d 28 28 6d | 65 6d 25 21 31 36 29 2a |%!16=((m|em%!16)*|
|000026c0| 32 29 20 81 20 36 0d 0e | 38 1e 6d 65 6d 25 21 32 |2) . 6..|8.mem%!2|
|000026d0| 30 3d 28 2d 28 6d 65 6d | 25 21 32 30 29 2a 32 29 |0=(-(mem|%!20)*2)|
|000026e0| 20 81 20 36 0d 0e 42 0c | 6d 65 6d 25 2b 3d 32 34 | . 6..B.|mem%+=24|
|000026f0| 0d 0e 4c 05 ed 0d 0e 56 | 05 e1 0d 0e 60 04 0d 0e |..L....V|....`...|
|00002700| 6a 0d dd 20 f2 72 61 6e | 64 6f 6d 0d 0e 74 05 db |j.. .ran|dom..t..|
|00002710| 0d 0e 7e 10 6d 65 6d 25 | 3d 6d 61 73 73 65 73 25 |..~.mem%|=masses%|
|00002720| 0d 0e 88 18 e3 20 6c 6f | 6f 70 3d 31 20 b8 20 6e |..... lo|op=1 . n|
|00002730| 6f 6d 61 73 73 65 73 25 | 0d 0e 92 10 f1 20 8a 30 |omasses%|..... .0|
|00002740| 2c 30 29 3b 6c 6f 6f 70 | 0d 0e 9c 0f 21 6d 65 6d |,0);loop|....!mem|
|00002750| 25 3d b3 28 31 30 29 0d | 0e a6 25 6d 65 6d 25 21 |%=.(10).|..%mem%!|
|00002760| 34 3d b3 28 32 35 36 30 | 29 2d 31 3a 6d 65 6d 25 |4=.(2560|)-1:mem%|
|00002770| 21 38 3d b3 28 32 30 34 | 38 29 2d 31 0d 0e b0 2d |!8=.(204|8)-1...-|
|00002780| 6d 65 6d 25 21 31 32 3d | b3 28 31 35 29 3a 6d 65 |mem%!12=|.(15):me|
|00002790| 6d 25 21 31 36 3d b3 28 | 31 30 29 3a 6d 65 6d 25 |m%!16=.(|10):mem%|
|000027a0| 21 32 30 3d b3 28 31 30 | 29 0d 0e ba 0c 6d 65 6d |!20=.(10|)....mem|
|000027b0| 25 2b 3d 32 34 0d 0e c4 | 05 ed 0d 0e ce 05 e1 0d |%+=24...|........|
|000027c0| 0e d8 04 0d 0e e2 12 dd | 20 f2 68 65 61 64 28 68 |........| .head(h|
|000027d0| 65 61 64 24 29 0d 0e ec | 11 f1 20 8a 30 2c 30 29 |ead$)...|.. .0,0)|
|000027e0| 3b 89 28 38 30 29 0d 0e | f6 11 f1 20 8a 30 2c 30 |;.(80)..|... .0,0|
|000027f0| 29 3b 68 65 61 64 24 0d | 0f 00 05 e1 0d ff 46 69 |);head$.|......Fi|
|00002800| 6c 65 44 61 74 61 82 21 | 53 70 72 69 74 65 73 00 |leData.!|Sprites.|
|00002810| 00 00 e4 03 00 00 44 f9 | ff ff f3 b3 82 6e 03 00 |......D.|.....n..|
|00002820| 12 07 02 00 00 00 10 00 | 00 00 e8 03 00 00 d4 02 |........|........|
|00002830| 00 00 21 67 72 61 76 69 | 74 79 00 00 00 00 04 00 |..!gravi|ty......|
|00002840| 00 00 10 00 00 00 00 00 | 00 00 07 00 00 00 2c 00 |........|......,.|
|00002850| 00 00 80 01 00 00 0c 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 00 ee 0e 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 00 00 00 00 00 e0 | ee ee 55 55 55 05 00 00 |........|..UUU...|
|00002880| 00 00 00 00 00 00 00 88 | 88 88 88 ee ee 55 55 45 |........|.....UUE|
|00002890| 45 54 05 00 00 00 00 00 | 00 80 88 e8 ee ee ee ee |ET......|........|
|000028a0| ee 55 45 55 55 44 05 00 | 00 00 00 00 00 80 e8 ee |.UEUUD..|........|
|000028b0| ee ee ee ee ee 55 55 54 | 55 55 05 00 00 00 00 00 |.....UUT|UU......|
|000028c0| 00 88 88 88 88 88 e8 ee | ee ee 55 55 44 05 00 00 |........|..UUD...|
|000028d0| 00 00 00 00 a8 aa 88 88 | 88 aa 88 e8 0e ee 0e 00 |........|........|
|000028e0| 00 00 00 00 00 00 00 88 | a8 aa 8a 88 88 a8 8a 88 |........|........|
|000028f0| 08 00 00 00 00 00 00 00 | 00 00 80 a8 aa aa aa 88 |........|........|
|00002900| 88 88 a8 88 88 00 00 00 | 00 00 00 00 00 00 a8 aa |........|........|
|00002910| aa aa 88 88 88 aa 8a aa | aa 08 00 00 00 00 00 00 |........|........|
|00002920| 00 00 88 aa aa 8a 88 88 | 88 a8 aa aa aa 08 00 00 |........|........|
|00002930| 00 00 00 00 00 00 88 88 | aa 88 8a 88 88 88 aa 8a |........|........|
|00002940| aa 08 00 00 00 00 00 00 | 00 00 80 88 a8 aa 88 88 |........|........|
|00002950| 88 88 88 8a 8a 00 00 00 | 00 00 00 00 00 00 00 88 |........|........|
|00002960| a8 aa 8a 88 88 a8 88 88 | 08 00 00 00 00 00 00 00 |........|........|
|00002970| 00 00 00 00 88 a8 8a 88 | 88 88 aa 0a 00 00 00 00 |........|........|
|00002980| 00 00 00 00 00 00 00 00 | 00 88 a8 88 88 88 08 00 |........|........|
|00002990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 ff |........|........|
|000029c0| ff ff 00 00 00 00 00 00 | 00 00 00 00 00 00 ff ff |........|........|
|000029d0| ff 0f 00 ff ff ff 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029e0| 00 ff ff ff ff ff 0f ff | ff ff 00 00 00 00 00 00 |........|........|
|000029f0| 00 00 00 00 00 ff ff ff | ff ff 0f ff ff ff 00 00 |........|........|
|00002a00| 00 00 00 00 00 00 00 00 | 00 ff ff ff ff ff 0f ff |........|........|
|00002a10| ff ff 00 00 00 ff ff ff | ff ff 0f 00 00 00 ff ff |........|........|
|00002a20| ff 0f 00 ff ff ff 00 00 | ff ff ff ff ff ff ff 0f |........|........|
|00002a30| 00 00 00 00 00 00 00 ff | ff ff 00 ff ff ff ff ff |........|........|
|00002a40| ff ff ff ff 0f 00 00 00 | 00 00 00 ff ff ff f0 ff |........|........|
|00002a50| ff ff ff ff ff ff ff ff | ff 00 00 00 00 00 00 ff |........|........|
|00002a60| ff ff ff ff ff ff ff ff | ff ff ff ff ff 0f 00 00 |........|........|
|00002a70| 00 00 00 ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a80| ff 0f 00 00 00 00 00 ff | ff ff ff ff ff ff ff ff |........|........|
|00002a90| ff ff ff ff ff 0f 00 00 | 00 00 00 ff ff ff f0 ff |........|........|
|00002aa0| ff ff ff ff ff ff ff ff | ff 00 00 00 00 00 00 ff |........|........|
|00002ab0| ff ff 00 ff ff ff ff ff | ff ff ff ff 0f 00 00 00 |........|........|
|00002ac0| 00 00 00 ff ff ff 00 00 | ff ff ff ff ff ff ff 0f |........|........|
|00002ad0| 00 00 00 00 00 00 00 ff | ff ff 00 00 00 ff ff ff |........|........|
|00002ae0| ff ff 0f 00 00 00 00 00 | 00 00 00 ff ff ff 00 00 |........|........|
|00002af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 ff |........|........|
|00002b00| ff ff 04 01 00 00 73 6d | 21 67 72 61 76 69 74 79 |......sm|!gravity|
|00002b10| 00 00 02 00 00 00 08 00 | 00 00 00 00 00 00 0b 00 |........|........|
|00002b20| 00 00 2c 00 00 00 98 00 | 00 00 0c 00 00 00 00 00 |..,.....|........|
|00002b30| 00 80 88 88 00 00 0e 00 | 00 00 00 80 a8 aa 8a a8 |........|........|
|00002b40| 88 88 0e 00 00 00 00 88 | aa aa 88 88 a8 8a 08 00 |........|........|
|00002b50| 00 00 80 a8 aa aa 8a 88 | 8a aa a8 00 00 00 80 88 |........|........|
|00002b60| aa aa 88 88 aa aa aa 00 | 00 00 80 88 a8 8a 88 88 |........|........|
|00002b70| 88 aa 88 00 00 00 00 88 | 88 8a 88 88 88 aa 08 00 |........|........|
|00002b80| 00 00 00 80 88 a8 88 88 | aa 88 00 00 00 00 00 00 |........|........|
|00002b90| 00 80 88 88 00 00 00 00 | 00 00 00 00 00 f0 ff ff |........|........|
|00002ba0| 00 00 00 f0 ff ff 00 f0 | ff ff ff ff ff ff 00 f0 |........|........|
|00002bb0| ff ff 00 ff ff ff ff ff | ff ff 0f f0 ff ff f0 ff |........|........|
|00002bc0| ff ff ff ff ff ff ff f0 | ff ff f0 ff ff ff ff ff |........|........|
|00002bd0| ff ff ff f0 ff ff f0 ff | ff ff ff ff ff ff ff f0 |........|........|
|00002be0| ff ff 00 ff ff ff ff ff | ff ff 0f f0 ff ff 00 f0 |........|........|
|00002bf0| ff ff ff ff ff ff 00 f0 | ff ff 00 00 00 f0 ff ff |........|........|
|00002c00| 00 00 00 f0 ff ff | |...... | |
+--------+-------------------------+-------------------------+--------+--------+