home *** CD-ROM | disk | FTP | other *** search
Unknown | 1991-03-14 | 22.2 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| GW-BASIC (document/gwBasic)
| ext
| Supported |
66%
| dexvert
| GFA-BASIC Atari (other/gfaBASICAtari)
| ext
| Supported |
1%
| dexvert
| Memotech MTX BASIC source (document/memotechMTXBASICSource)
| ext
| Unsupported |
1%
| dexvert
| Amiga BASIC Protected File (other/amigaBASICProtectedFile)
| ext
| Unsupported |
1%
| dexvert
| BAS VBDOS Pro 1.0 Source (other/basVBDOSPro10Source)
| ext
| Unsupported |
1%
| dexvert
| Visual Basic Tokenized Source (other/visualBasicTokenizedSource)
| ext
| Unsupported |
1%
| dexvert
| ZBASIC (other/zbasic)
| ext
| Unsupported |
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| fc 00 04 00 0c 00 81 01 | 91 01 06 00 01 02 03 04 |........|........|
|00000010| 05 08 14 10 ff ff 24 00 | ff ff 6a 05 5f 01 56 00 |......$.|..j._.V.|
|00000020| 2f 01 9a 00 2c 02 a8 00 | 00 00 60 00 cf 00 13 01 |/...,...|..`.....|
|00000030| 89 01 c7 03 dd 00 b3 02 | 72 02 bc 01 7a 01 6b 00 |........|r...z.k.|
|00000040| ac 01 b7 00 9d 01 00 00 | 00 00 74 00 e3 02 8f 00 |........|..t.....|
|00000050| 5b 00 4e 01 79 03 70 03 | c4 00 7d 00 00 00 00 00 |[.N.y.p.|..}.....|
|00000060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 67 04 |........|......g.|
|00000070| 52 00 05 01 00 01 41 97 | 02 00 01 5a 4a 02 00 07 |R.....A.|...ZJ...|
|00000080| 52 61 6e 64 49 6e 74 2b | 03 00 05 6c 6f 77 65 72 |RandInt+|...lower|
|00000090| d5 01 00 05 55 70 70 65 | 72 f1 01 40 0e 49 6e 74 |....Uppe|r..@.Int|
|000000a0| 72 6f 64 75 63 74 69 6f | 6e 32 38 23 01 40 07 42 |roductio|n28#.@.B|
|000000b0| 6f 78 49 6e 69 74 42 02 | 40 0a 42 75 62 62 6c 65 |oxInitB.|@.Bubble|
|000000c0| 53 6f 72 74 6b 01 40 0b | 43 68 65 63 6b 53 63 72 |Sortk.@.|CheckScr|
|000000d0| 65 65 6e 3d 01 40 09 44 | 72 61 77 46 72 61 6d 65 |een=.@.D|rawFrame|
|000000e0| e9 00 00 07 54 6f 70 53 | 69 64 65 58 02 00 0a 42 |....TopS|ideX...B|
|000000f0| 6f 74 74 6f 6d 53 69 64 | 65 f6 00 00 08 4c 65 66 |ottomSid|e....Lef|
|00000100| 74 53 69 64 65 00 00 00 | 09 52 69 67 68 74 53 69 |tSide...|.RightSi|
|00000110| 64 65 e1 01 40 0b 45 6c | 61 70 73 65 64 54 69 6d |de..@.El|apsedTim|
|00000120| 65 16 02 00 0a 43 75 72 | 72 65 6e 74 52 6f 77 a4 |e....Cur|rentRow.|
|00000130| 01 40 0c 45 78 63 68 61 | 6e 67 65 53 6f 72 74 0a |.@.Excha|ngeSort.|
|00000140| 02 40 08 48 65 61 70 53 | 6f 72 74 00 02 40 0a 49 |.@.HeapS|ort..@.I|
|00000150| 6e 69 74 69 61 6c 69 7a | 65 47 03 40 0d 49 6e 73 |nitializ|eG.@.Ins|
|00000160| 65 72 74 69 6f 6e 53 6f | 72 74 f0 02 40 0d 50 65 |ertionSo|rt..@.Pe|
|00000170| 72 63 6f 6c 61 74 65 44 | 6f 77 6e 20 02 00 08 4d |rcolateD|own ...M|
|00000180| 61 78 4c 65 76 65 6c 7c | 02 40 0b 50 65 72 63 6f |axLevel||.@.Perco|
|00000190| 6c 61 74 65 55 70 90 01 | 40 0b 50 72 69 6e 74 4f |lateUp..|@.PrintO|
|000001a0| 6e 65 42 61 72 5a 03 00 | 03 72 6f 77 fa 02 40 09 |neBarZ..|.row..@.|
|000001b0| 51 75 69 63 6b 53 6f 72 | 74 da 02 00 03 4c 6f 77 |QuickSor|t....Low|
|000001c0| c9 01 00 04 48 69 67 68 | 1a 03 40 0c 52 65 69 6e |....High|..@.Rein|
|000001d0| 69 74 69 61 6c 69 7a 65 | e9 01 40 09 53 68 65 6c |itialize|..@.Shel|
|000001e0| 6c 53 6f 72 74 26 03 40 | 08 53 6f 72 74 4d 65 6e |lSort&.@|.SortMen|
|000001f0| 75 00 00 40 08 53 77 61 | 70 42 61 72 73 89 02 00 |u..@.Swa|pBars...|
|00000200| 04 52 6f 77 31 12 04 00 | 04 52 6f 77 32 05 03 40 |.Row1...|.Row2..@|
|00000210| 0b 54 6f 67 67 6c 65 53 | 6f 75 6e 64 39 02 00 06 |.ToggleS|ound9...|
|00000220| 63 6f 6c 75 6d 6e e8 03 | 00 08 53 6f 72 74 54 79 |column..|..SortTy|
|00000230| 70 65 00 00 00 06 4c 65 | 6e 67 74 68 00 00 00 08 |pe....Le|ngth....|
|00000240| 43 6f 6c 6f 72 56 61 6c | 00 00 00 09 42 61 72 53 |ColorVal|....BarS|
|00000250| 74 72 69 6e 67 a6 02 00 | 05 46 41 4c 53 45 00 00 |tring...|.FALSE..|
|00000260| 00 04 54 52 55 45 c1 02 | 00 0a 4c 45 46 54 43 4f |..TRUE..|..LEFTCO|
|00000270| 4c 55 4d 4e 66 02 00 0a | 4e 55 4d 4f 50 54 49 4f |LUMNf...|NUMOPTIO|
|00000280| 4e 53 a5 03 00 08 4e 55 | 4d 53 4f 52 54 53 5d 04 |NS....NU|MSORTS].|
|00000290| 00 06 42 61 72 4e 75 6d | cf 02 08 09 53 6f 72 74 |..BarNum|....Sort|
|000002a0| 41 72 72 61 79 34 03 08 | 0a 53 6f 72 74 42 61 63 |Array4..|.SortBac|
|000002b0| 6b 75 70 00 00 00 0b 4f | 70 74 69 6f 6e 74 69 74 |kup....O|ptiontit|
|000002c0| 6c 65 00 00 00 09 53 74 | 61 72 74 54 69 6d 65 3e |le....St|artTime>|
|000002d0| 03 00 0a 46 6f 72 65 67 | 72 6f 75 6e 64 12 03 00 |...Foreg|round...|
|000002e0| 0a 42 61 63 6b 67 72 6f | 75 6e 64 d4 03 00 07 4e |.Backgro|und....N|
|000002f0| 6f 53 6f 75 6e 64 51 03 | 00 05 50 61 75 73 65 fb |oSoundQ.|..Pause.|
|00000300| 03 00 09 53 65 6c 65 63 | 74 69 6f 6e 00 00 00 06 |...Selec|tion....|
|00000310| 4d 61 78 52 6f 77 00 00 | 00 07 49 6e 69 74 52 6f |MaxRow..|..InitRo|
|00000320| 77 64 03 00 09 4d 61 78 | 43 6f 6c 6f 72 73 04 04 |wd...Max|Colors..|
|00000330| 00 04 4d 6f 64 65 00 00 | 04 08 4d 6f 6e 6f 54 72 |..Mode..|..MonoTr|
|00000340| 61 70 91 03 00 01 49 53 | 04 00 05 4c 69 6d 69 74 |ap....IS|...Limit|
|00000350| 00 00 00 06 53 77 69 74 | 63 68 00 00 00 05 55 4c |....Swit|ch....UL|
|00000360| 45 46 54 49 04 00 06 55 | 52 49 47 48 54 b2 03 00 |EFTI...U|RIGHT...|
|00000370| 05 4c 4c 45 46 54 a0 03 | 00 06 4c 52 49 47 48 54 |.LLEFT..|..LRIGHT|
|00000380| be 03 00 08 56 45 52 54 | 49 43 41 4c 87 03 00 05 |....VERT|ICAL....|
|00000390| 48 4f 52 49 5a 00 00 00 | 0a 46 72 61 6d 65 57 69 |HORIZ...|.FrameWi|
|000003a0| 64 74 68 dd 03 00 06 46 | 4f 52 4d 41 54 00 00 00 |dth....F|ORMAT...|
|000003b0| 0b 53 6d 61 6c 6c 65 73 | 74 52 6f 77 00 00 00 01 |.Smalles|tRow....|
|000003c0| 4a 00 00 00 09 54 65 6d | 70 41 72 72 61 79 f6 03 |J....Tem|pArray..|
|000003d0| 00 08 4d 61 78 49 6e 64 | 65 78 32 04 00 05 49 6e |..MaxInd|ex2...In|
|000003e0| 64 65 78 25 04 00 09 42 | 61 72 4c 65 6e 67 74 68 |dex%...B|arLength|
|000003f0| 1b 04 00 05 42 6c 6f 63 | 6b 3f 04 08 07 54 65 6d |....Bloc|k?...Tem|
|00000400| 70 56 61 6c 00 00 00 0a | 54 65 6d 70 4c 65 6e 67 |pVal....|TempLeng|
|00000410| 74 68 00 00 00 01 54 00 | 00 00 05 54 69 74 6c 65 |th....T.|...Title|
|00000420| 00 00 00 0a 4c 65 66 74 | 4d 61 72 67 69 6e 00 00 |....Left|Margin..|
|00000430| 00 05 43 68 69 6c 64 00 | 00 00 06 50 61 72 65 6e |..Child.|...Paren|
|00000440| 74 00 00 00 09 52 61 6e | 64 49 6e 64 65 78 00 00 |t....Ran|dIndex..|
|00000450| 00 09 50 61 72 74 69 74 | 69 6f 6e 00 00 00 06 4f |..Partit|ion....O|
|00000460| 66 66 73 65 74 00 00 00 | 06 45 73 63 61 70 65 00 |ffset...|.Escape.|
|00000470| 00 00 06 4f 70 74 69 6f | 6e 00 00 00 06 43 68 6f |...Optio|n....Cho|
|00000480| 69 63 65 00 00 00 00 00 | 00 00 00 00 00 00 97 00 |ice.....|........|
|00000490| 06 00 00 00 20 0d 4c 3d | 00 00 97 00 0d 00 00 00 |.... .L=|........|
|000004a0| 0d 21 20 53 4f 52 54 44 | 45 4d 4f 20 00 00 97 00 |.! SORTD|EMO ....|
|000004b0| 4b 00 00 00 20 54 68 69 | 73 20 70 72 6f 67 72 61 |K... Thi|s progra|
|000004c0| 6d 20 67 72 61 70 68 69 | 63 61 6c 6c 79 20 64 65 |m graphi|cally de|
|000004d0| 6d 6f 6e 73 74 72 61 74 | 65 73 20 73 69 78 20 63 |monstrat|es six c|
|000004e0| 6f 6d 6d 6f 6e 20 73 6f | 72 74 69 6e 67 20 61 6c |ommon so|rting al|
|000004f0| 67 6f 72 69 74 68 6d 73 | 2e 20 20 49 74 3d 00 00 |gorithms|. It=..|
|00000500| 97 00 48 00 00 00 20 70 | 72 69 6e 74 73 20 32 31 |..H... p|rints 21|
|00000510| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 62 61 72 73 | horizon|tal bars|
|00000520| 2c 20 61 6c 6c 20 6f 66 | 20 64 69 66 66 65 72 65 |, all of| differe|
|00000530| 6e 74 20 6c 65 6e 67 74 | 68 73 20 61 6e 64 20 61 |nt lengt|hs and a|
|00000540| 6c 6c 20 69 6e 20 72 61 | 6e 64 6f 6d 00 00 97 00 |ll in ra|ndom....|
|00000550| 37 00 00 00 20 6f 72 64 | 65 72 2c 20 74 68 65 6e |7... ord|er, then|
|00000560| 20 73 6f 72 74 73 20 74 | 68 65 20 62 61 72 73 20 | sorts t|he bars |
|00000570| 66 72 6f 6d 20 73 6d 61 | 6c 6c 65 73 74 20 74 6f |from sma|llest to|
|00000580| 20 6c 6f 6e 67 65 64 0b | 00 00 97 00 06 00 00 00 | longed.|........|
|00000590| 20 0d 4c 3d 00 00 97 00 | 0d 00 00 00 0d 21 20 53 | .L=....|.....! S|
|000005a0| 4f 52 54 44 45 4d 4f 20 | 00 00 97 00 4b 00 00 00 |ORTDEMO |....K...|
|000005b0| 20 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 67 72 | This pr|ogram gr|
|000005c0| 61 70 68 69 63 61 6c 6c | 79 20 64 65 6d 6f 6e 73 |aphicall|y demons|
|000005d0| 74 72 61 74 65 73 20 73 | 69 78 20 63 6f 6d 6d 6f |trates s|ix commo|
|000005e0| 6e 20 73 6f 72 74 69 6e | 67 20 61 6c 67 6f 72 69 |n sortin|g algori|
|000005f0| 74 68 6d 73 2e 20 20 49 | 74 3d 00 00 97 00 48 00 |thms. I|t=....H.|
|00000600| 00 00 20 70 72 69 6e 74 | 73 20 32 31 20 68 6f 72 |.. print|s 21 hor|
|00000610| 69 7a 6f 6e 74 61 6c 20 | 62 61 72 73 2c 20 61 6c |izontal |bars, al|
|00000620| 6c 20 6f 66 20 64 69 66 | 66 65 72 65 6e 74 20 6c |l of dif|ferent l|
|00000630| 65 6e 67 74 68 73 20 61 | 6e 64 20 61 6c 6c 20 69 |engths a|nd all i|
|00000640| 6e 20 72 61 6e 64 6f 6d | 00 00 97 00 37 00 00 00 |n random|....7...|
|00000650| 20 6f 72 64 65 72 2c 20 | 74 68 65 6e 20 73 6f 72 | order, |then sor|
|00000660| 74 73 20 74 68 65 20 62 | 61 72 73 20 66 72 6f 6d |ts the b|ars from|
|00000670| 20 73 6d 61 6c 6c 65 73 | 74 20 74 6f 20 6c 6f 6e | smalles|t to lon|
|00000680| 67 65 73 74 2e 61 00 00 | 97 00 02 00 00 00 00 00 |gest.a..|........|
|00000690| 97 00 48 00 00 00 20 54 | 68 65 20 70 72 6f 67 72 |..H... T|he progr|
|000006a0| 61 6d 20 61 6c 73 6f 20 | 75 73 65 73 20 53 4f 55 |am also |uses SOU|
|000006b0| 4e 44 20 73 74 61 74 65 | 6d 65 6e 74 73 20 74 6f |ND state|ments to|
|000006c0| 20 67 65 6e 65 72 61 74 | 65 20 64 69 66 66 65 72 | generat|e differ|
|000006d0| 65 6e 74 20 70 69 74 63 | 68 65 73 2c 00 00 97 00 |ent pitc|hes,....|
|000006e0| 4a 00 00 00 20 64 65 70 | 65 6e 64 69 6e 67 20 6f |J... dep|ending o|
|000006f0| 6e 20 74 68 65 20 6c 6f | 63 61 74 69 6f 6e 20 6f |n the lo|cation o|
|00000700| 66 20 74 68 65 20 62 61 | 72 20 62 65 69 6e 67 20 |f the ba|r being |
|00000710| 70 72 69 6e 74 65 64 2e | 20 4e 6f 74 65 20 74 68 |printed.| Note th|
|00000720| 61 74 20 74 68 65 20 53 | 4f 55 4e 44 00 00 97 00 |at the S|OUND....|
|00000730| 49 00 00 00 20 73 74 61 | 74 65 6d 65 6e 74 73 20 |I... sta|tements |
|00000740| 64 65 6c 61 79 20 74 68 | 65 20 73 70 65 65 64 20 |delay th|e speed |
|00000750| 6f 66 20 65 61 63 68 20 | 73 6f 72 74 69 6e 67 20 |of each |sorting |
|00000760| 61 6c 67 6f 72 69 74 68 | 6d 20 73 6f 20 79 6f 75 |algorith|m so you|
|00000770| 20 63 61 6e 20 66 6f 6c | 6c 6f 77 44 00 00 97 00 | can fol|lowD....|
|00000780| 4b 00 00 00 20 74 68 65 | 20 70 72 6f 67 72 65 73 |K... the| progres|
|00000790| 73 20 6f 66 20 74 68 65 | 20 73 6f 72 74 2e 20 20 |s of the| sort. |
|000007a0| 54 68 65 72 65 66 6f 72 | 65 2c 20 74 68 65 20 74 |Therefor|e, the t|
|000007b0| 69 6d 65 73 20 73 68 6f | 77 6e 20 61 72 65 20 66 |imes sho|wn are f|
|000007c0| 6f 72 20 63 6f 6d 70 61 | 72 69 73 6f 6e 00 00 00 |or compa|rison...|
|000007d0| 97 00 38 00 00 00 20 6f | 6e 6c 79 2e 20 54 68 65 |..8... o|nly. The|
|000007e0| 79 20 61 72 65 20 6e 6f | 74 20 61 6e 20 61 63 63 |y are no|t an acc|
|000007f0| 75 72 61 74 65 20 6d 65 | 61 73 75 72 65 20 6f 66 |urate me|asure of|
|00000800| 20 73 6f 72 74 20 73 70 | 65 65 64 2e 00 00 97 00 | sort sp|eed.....|
|00000810| 02 00 00 00 00 00 97 00 | 49 00 00 00 20 49 66 20 |........|I... If |
|00000820| 79 6f 75 20 75 73 65 20 | 74 68 65 73 65 20 73 6f |you use |these so|
|00000830| 72 74 69 6e 67 20 72 6f | 75 74 69 6e 65 73 20 69 |rting ro|utines i|
|00000840| 6e 20 79 6f 75 72 20 6f | 77 6e 20 70 72 6f 67 72 |n your o|wn progr|
|00000850| 61 6d 73 2c 20 79 6f 75 | 20 6d 61 79 20 6e 6f 74 |ams, you| may not|
|00000860| 69 63 65 6f 00 00 97 00 | 43 00 00 00 20 61 20 64 |iceo....|C... a d|
|00000870| 69 66 66 65 72 65 6e 63 | 65 20 69 6e 20 74 68 65 |ifferenc|e in the|
|00000880| 69 72 20 72 65 6c 61 74 | 69 76 65 20 73 70 65 65 |ir relat|ive spee|
|00000890| 64 73 20 28 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |ds (for |example,|
|000008a0| 20 74 68 65 20 65 78 63 | 68 61 6e 67 65 6e 00 00 | the exc|hangen..|
|000008b0| 97 00 45 00 00 00 20 73 | 6f 72 74 20 6d 61 79 20 |..E... s|ort may |
|000008c0| 62 65 20 66 61 73 74 65 | 72 20 74 68 61 6e 20 74 |be faste|r than t|
|000008d0| 68 65 20 73 68 65 6c 6c | 20 73 6f 72 74 29 20 64 |he shell| sort) d|
|000008e0| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 20 74 68 65 20 |epending| on the |
|000008f0| 6e 75 6d 62 65 72 20 6f | 66 00 00 00 97 00 44 00 |number o|f.....D.|
|00000900| 00 00 20 65 6c 65 6d 65 | 6e 74 73 20 74 6f 20 62 |.. eleme|nts to b|
|00000910| 65 20 73 6f 72 74 65 64 | 20 61 6e 64 20 68 6f 77 |e sorted| and how|
|00000920| 20 22 73 63 72 61 6d 62 | 6c 65 64 22 20 74 68 65 | "scramb|led" the|
|00000930| 79 20 61 72 65 20 74 6f | 20 62 65 67 69 6e 20 77 |y are to| begin w|
|00000940| 69 74 68 2e 00 00 97 00 | 06 00 00 00 20 0d 4c 3d |ith.....|.... .L=|
|00000950| 00 00 00 00 1b 00 ff ff | c1 ff ff ff 97 00 18 00 |........|........|
|00000960| 10 00 20 44 65 66 61 75 | 6c 74 20 74 79 70 65 20 |.. Defau|lt type |
|00000970| 69 6e 74 65 67 65 72 2e | 00 00 00 00 97 00 4d 00 |integer.|......M.|
|00000980| 00 00 20 44 65 63 6c 61 | 72 65 20 46 55 4e 43 54 |.. Decla|re FUNCT|
|00000990| 49 4f 4e 20 61 6e 64 20 | 53 55 42 20 70 72 6f 63 |ION and |SUB proc|
|000009a0| 65 64 75 72 65 73 2c 20 | 61 6e 64 20 74 68 65 20 |edures, |and the |
|000009b0| 6e 75 6d 62 65 72 20 61 | 6e 64 20 74 79 70 65 20 |number a|nd type |
|000009c0| 6f 66 20 61 72 67 75 6d | 65 6e 74 73 3a 3d 00 08 |of argum|ents:=..|
|000009d0| 44 00 12 00 60 00 81 02 | 02 00 6b 00 00 00 01 00 |D...`...|..k.....|
|000009e0| 74 00 00 00 01 00 00 08 | 44 00 06 00 7d 00 00 01 |t.......|D...}...|
|000009f0| 00 00 00 08 44 00 06 00 | 8f 00 00 01 00 00 00 08 |....D...|........|
|00000a00| 44 00 06 00 9a 00 00 01 | 00 00 00 08 44 00 06 00 |D.......|....D...|
|00000a10| a8 00 00 01 00 00 00 08 | 44 00 1e 00 b7 00 00 01 |........|D.......|
|00000a20| 04 00 c4 00 00 00 01 00 | cf 00 00 00 01 00 dd 00 |........|........|
|00000a30| 00 00 01 00 e9 00 00 00 | 01 00 00 08 44 00 0c 00 |........|....D...|
|00000a40| f6 00 00 01 01 00 05 01 | 00 00 01 00 00 08 44 00 |........|......D.|
|00000a50| 06 00 13 01 00 01 00 00 | 00 08 44 00 06 00 23 01 |........|..D...#.|
|00000a60| 00 01 00 00 00 08 44 00 | 06 00 2f 01 00 01 00 00 |......D.|../.....|
|00000a70| 00 08 44 00 06 00 3d 01 | 00 01 00 00 00 08 44 00 |..D...=.|......D.|
|00000a80| 0c 00 4e 01 00 01 01 00 | 5f 01 00 00 01 00 00 08 |..N.....|_.......|
|00000a90| 44 00 0c 00 6b 01 00 01 | 01 00 5f 01 00 00 01 00 |D...k...|.._.....|
|00000aa0| 00 08 44 00 0c 00 7a 01 | 00 01 01 00 89 01 00 00 |..D...z.|........|
|00000ab0| 01 00 00 08 44 00 12 00 | 90 01 00 01 02 00 9d 01 |....D...|........|
|00000ac0| 00 00 01 00 a4 01 00 00 | 01 00 00 08 44 00 06 00 |........|....D...|
|00000ad0| ac 01 00 01 00 00 00 08 | 44 00 06 00 bc 01 00 01 |........|D.......|
|00000ae0| 00 00 00 08 44 00 06 00 | c9 01 00 01 00 00 00 08 |....D...|........|
|00000af0| 44 00 12 00 d5 01 00 01 | 02 00 e1 01 00 00 01 00 |D.......|........|
|00000b00| e9 01 00 00 01 00 00 08 | 44 00 12 00 f1 01 00 01 |........|D.......|
|00000b10| 02 00 89 01 00 00 01 00 | 00 02 00 00 01 00 00 00 |........|........|
|00000b20| 00 00 97 00 4a 00 00 00 | 20 44 65 66 69 6e 65 20 |....J...| Define |
|00000b30| 74 68 65 20 64 61 74 61 | 20 74 79 70 65 20 75 73 |the data| type us|
|00000b40| 65 64 20 74 6f 20 68 6f | 6c 64 20 74 68 65 20 69 |ed to ho|ld the i|
|00000b50| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 66 6f 72 20 65 |nformati|on for e|
|00000b60| 61 63 68 20 63 6f 6c 6f | 72 65 64 20 62 61 72 3a |ach colo|red bar:|
|00000b70| 00 08 20 00 a8 06 0a 02 | 00 14 19 00 16 02 16 00 |.. .....|........|
|00000b80| 01 00 0c 00 97 00 23 00 | 1f 00 20 42 61 72 20 6c |......#.|.. Bar l|
|00000b90| 65 6e 67 74 68 20 28 74 | 68 65 20 65 6c 65 6d 65 |ength (t|he eleme|
|00000ba0| 6e 74 20 63 6f 6d 70 61 | 72 65 64 72 01 00 1f 00 |nt compa|redr....|
|00000bb0| 97 00 1a 00 1f 00 20 69 | 6e 20 74 68 65 20 64 69 |...... i|n the di|
|00000bc0| 66 66 65 72 65 6e 74 20 | 73 6f 72 74 73 29 00 14 |fferent |sorts)..|
|00000bd0| 19 00 20 02 16 00 01 00 | 0e 00 97 00 0c 00 1f 00 |.. .....|........|
|00000be0| 20 42 61 72 20 63 6f 6c | 6f 72 00 14 19 00 2c 02 | Bar col|or....,.|
|00000bf0| 7c 01 06 00 2a 00 0f 00 | 97 00 2f 00 1f 00 20 54 ||...*...|../... T|
|00000c00| 68 65 20 62 61 72 20 28 | 61 20 73 74 72 69 6e 67 |he bar (|a string|
|00000c10| 20 6f 66 20 32 31 20 54 | 77 6f 2d 42 79 74 65 20 | of 21 T|wo-Byte |
|00000c20| 63 68 61 72 61 63 74 65 | 72 73 29 63 00 08 1d 00 |characte|rs)c....|
|00000c30| ff ff 00 00 00 00 97 00 | 1c 00 00 00 20 44 65 63 |........|.... Dec|
|00000c40| 6c 61 72 65 20 67 6c 6f | 62 61 6c 20 63 6f 6e 73 |lare glo|bal cons|
|00000c50| 74 61 6e 74 73 3a 00 08 | 23 00 64 01 0c 00 39 02 |tants:..|#.d...9.|
|00000c60| 0b 00 39 02 74 01 0c 00 | 42 02 65 01 2f 00 0c 00 |..9.t...|B.e./...|
|00000c70| 4a 02 00 08 23 00 65 01 | 0b 00 0c 00 58 02 64 19 |J...#.e.|....X.d.|
|00000c80| 0c 00 66 02 65 01 15 00 | 0c 00 72 02 00 00 00 00 |..f.e...|..r.....|
|00000c90| 97 00 4c 00 00 00 20 44 | 65 63 6c 61 72 65 20 67 |..L... D|eclare g|
|00000ca0| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 73 2c |lobal va|riables,|
|00000cb0| 20 61 6e 64 20 61 6c 6c | 6f 63 61 74 65 20 73 74 | and all|ocate st|
|00000cc0| 6f 72 61 67 65 20 73 70 | 61 63 65 20 66 6f 72 20 |orage sp|ace for |
|00000cd0| 74 68 65 6d 2e 20 20 53 | 6f 72 74 41 72 72 61 79 |them. S|ortArray|
|00000ce0| 00 00 97 00 4a 00 00 00 | 20 61 6e 64 20 53 6f 72 |....J...| and Sor|
|00000cf0| 74 42 61 63 6b 75 70 20 | 61 72 65 20 62 6f 74 68 |tBackup |are both|
|00000d00| 20 61 72 72 61 79 73 20 | 6f 66 20 74 68 65 20 64 | arrays |of the d|
|00000d10| 61 74 61 20 74 79 70 65 | 20 53 6f 72 74 54 79 70 |ata type| SortTyp|
|00000d20| 65 20 64 65 66 69 6e 65 | 64 20 61 62 6f 76 65 3a |e define|d above:|
|00000d30| 00 08 1a 00 7d 01 ff ff | 64 05 0b 00 72 02 15 00 |....}...|d...r...|
|00000d40| 0a 02 24 00 10 00 02 00 | 7c 02 64 05 0b 00 72 02 |..$.....||.d...r.|
|00000d50| 15 00 0a 02 49 00 10 00 | 02 00 89 02 00 08 1a 00 |....I...|........|
|00000d60| 7d 01 ff ff 64 05 0b 00 | 58 02 7c 01 06 00 10 00 |}...d...|X.|.....|
|00000d70| 2a 00 10 00 02 00 97 02 | 00 08 1a 00 7d 01 ff ff |*.......|....}...|
|00000d80| 16 00 03 00 17 00 0d 00 | a6 02 00 08 1a 00 7d 01 |........|......}.|
|00000d90| ff ff 0d 00 b3 02 0d 00 | c1 02 0d 00 cf 02 0d 00 |........|........|
|00000da0| da 02 00 08 1a 00 7d 01 | ff ff 0d 00 e3 02 0d 00 |......}.|........|
|00000db0| f0 02 0d 00 fa 02 0d 00 | 05 03 00 08 65 01 52 00 |........|....e.R.|
|00000dc0| 0c 00 12 03 00 00 00 00 | 97 00 46 00 00 00 20 44 |........|..F... D|
|00000dd0| 61 74 61 20 73 74 61 74 | 65 6d 65 6e 74 73 20 66 |ata stat|ements f|
|00000de0| 6f 72 20 74 68 65 20 64 | 69 66 66 65 72 65 6e 74 |or the d|ifferent|
|00000df0| 20 6f 70 74 69 6f 6e 73 | 20 70 72 69 6e 74 65 64 | options| printed|
|00000e00| 20 69 6e 20 74 68 65 20 | 73 6f 72 74 20 6d 65 6e | in the |sort men|
|00000e10| 75 3a 00 08 a6 00 6f 00 | 02 00 20 49 6e 73 65 72 |u:....o.|.. Inser|
|00000e20| 74 69 6f 6e 20 b4 a1 a4 | 4a aa 6b 2c 20 42 75 62 |tion ...|J.k, Bub|
|00000e30| 62 6c 65 20 20 20 20 a8 | 54 aa 77 aa 6b 2c 20 48 |ble .|T.w.k, H|
|00000e40| 65 61 70 20 20 20 20 20 | 20 a4 c0 b0 ef aa 6b 2c |eap | .....k,|
|00000e50| 20 45 78 63 68 61 6e 67 | 65 20 20 a5 e6 b4 ab aa | Exchang|e .....|
|00000e60| 6b 2c 20 53 68 65 6c 6c | 20 20 20 20 20 b4 df bc |k, Shell| ...|
|00000e70| 68 aa 6b 2c 20 51 75 69 | 63 6b 20 20 20 20 20 a7 |h.k, Qui|ck .|
|00000e80| d6 b3 74 aa 6b 2c 00 00 | 00 08 a6 00 2d 00 02 00 |..t.k,..|....-...|
|00000e90| 20 54 6f 67 67 6c 65 20 | b6 7d c3 f6 ad b5 ae c4 | Toggle |.}......|
|00000ea0| 2c 20 2c 20 3c 20 b1 c6 | ba 43 a4 40 c2 49 2c 20 |, , < ..|.C.@.I, |
|00000eb0| 3e 20 b1 c6 a7 d6 a4 40 | c2 49 00 20 00 00 00 00 |> .....@|.I. ....|
|00000ec0| 97 00 24 00 00 00 20 42 | 65 67 69 6e 20 6c 6f 67 |..$... B|egin log|
|00000ed0| 69 63 20 6f 66 20 6d 6f | 64 75 6c 65 2d 6c 65 76 |ic of mo|dule-lev|
|00000ee0| 65 6c 20 63 6f 64 65 3a | 00 00 00 08 38 00 00 00 |el code:|....8...|
|00000ef0| 7d 00 00 08 38 00 00 00 | 2f 01 97 00 1a 00 19 00 |}...8...|/.......|
|00000f00| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 64 61 74 61 | Initial|ize data|
|00000f10| 20 76 61 6c 75 65 73 2e | 00 08 38 00 00 00 c9 01 | values.|..8.....|
|00000f20| 97 00 13 00 19 00 20 50 | 72 69 6e 74 20 73 6f 72 |...... P|rint sor|
|00000f30| 74 20 6d 65 6e 75 2e 76 | 00 08 65 01 50 00 0b 00 |t menu.v|..e.P...|
|00000f40| fa 02 f8 00 97 00 23 00 | 19 00 20 52 65 73 74 6f |......#.|.. Resto|
|00000f50| 72 65 20 6f 72 69 67 69 | 6e 61 6c 20 6e 75 6d 62 |re origi|nal numb|
|00000f60| 65 72 20 6f 66 20 72 6f | 77 73 2e 20 00 08 73 01 |er of ro|ws. ..s.|
|00000f70| 64 1d 73 01 64 01 a4 00 | 04 00 97 00 18 00 19 00 |d.s.d...|........|
|00000f80| 20 52 65 73 74 6f 72 65 | 20 64 65 66 61 75 6c 74 | Restore| default|
|00000f90| 20 63 6f 6c 6f 72 00 08 | 73 01 a3 00 00 08 4e 00 | color..|s.....N.|
|00000fa0| 00 00 00 00 97 00 45 00 | 00 00 20 4d 6f 6e 6f 54 |......E.|.. MonoT|
|00000fb0| 72 61 70 20 69 73 20 65 | 72 72 6f 72 2d 68 61 6e |rap is e|rror-han|
|00000fc0| 64 6c 69 6e 67 20 72 6f | 75 74 69 6e 65 73 20 69 |dling ro|utines i|
|00000fd0| 6e 76 6f 6b 65 64 20 62 | 79 20 74 68 65 20 43 68 |nvoked b|y the Ch|
|00000fe0| 65 63 6b 53 63 72 65 65 | 6e 20 53 55 42 b4 00 00 |eckScree|n SUB...|
|00000ff0| 97 00 4e 00 00 00 20 70 | 72 6f 63 65 64 75 72 65 |..N... p|rocedure|
|00001000| 2e 20 20 4d 6f 6e 6f 54 | 72 61 70 20 64 65 74 65 |. MonoT|rap dete|
|00001010| 72 6d 69 6e 65 73 20 69 | 66 20 74 68 65 20 63 75 |rmines i|f the cu|
|00001020| 72 72 65 6e 74 20 76 69 | 64 65 6f 20 61 64 61 70 |rrent vi|deo adap|
|00001030| 74 65 72 20 69 73 20 6d | 6f 6e 6f 63 68 72 6f 6d |ter is m|onochrom|
|00001040| 65 2e 00 00 04 00 ff ff | 1a 03 00 0c 0b 00 12 03 |e.......|........|
|00001050| 74 00 ff ff 00 14 65 01 | 52 00 3b 00 00 1c 65 01 |t.....e.|R.;...e.|
|00001060| 50 00 0c 00 12 03 00 1c | 6c 00 00 14 65 01 50 00 |P.......|l...e.P.|
|00001070| 3b 00 00 1c 65 01 47 00 | 0c 00 12 03 06 00 64 09 |;...e.G.|......d.|
|00001080| 0c 00 05 03 00 1c 6c 00 | 00 14 3a 00 00 1c 73 01 |......l.|..:...s.|
|00001090| a3 00 00 1c 73 01 65 01 | 0c 00 73 01 65 01 0f 00 |....s.e.|..s.e...|
|000010a0| c1 00 04 00 00 1c 6d 01 | 32 00 b0 f5 a6 e6 b3 6f |......m.|2......o|
|000010b0| ad d3 ae 69 a5 dc b5 7b | a6 a1 a5 b2 b6 b7 a6 b3 |...i...{|........|
|000010c0| 20 4d 47 41 2c 20 45 47 | 41 2c 20 a9 ce 20 56 47 | MGA, EG|A, .. VG|
|000010d0| 41 20 c3 b8 b9 cf a5 64 | 20 21 21 21 96 00 00 1c |A .....d| !!!....|
|000010e0| 4e 00 00 0c 52 00 00 00 | 09 00 08 00 be 0a ce 03 |N...R...|........|
|000010f0| ec 05 ff ff 5f 00 00 00 | 00 00 02 01 00 07 00 52 |...._...|.......R|
|00001100| 61 6e 64 49 6e 74 02 01 | b8 04 01 00 00 1b 00 ff |andInt..|........|
|00001110| ff c1 ff ff ff 00 00 97 | 00 13 00 00 00 20 0d 1f |........|..... ..|
|00001120| 3d 20 52 61 6e 64 49 6e | 74 25 20 0d 23 3d 00 00 |= RandIn|t% .#=..|
|00001130| 00 97 00 4a 00 00 00 20 | 20 20 52 65 74 75 72 6e |...J... | Return|
|00001140| 73 20 61 20 72 61 6e 64 | 6f 6d 20 69 6e 74 65 67 |s a rand|om integ|
|00001150| 65 72 20 67 72 65 61 74 | 65 72 20 74 68 61 6e 20 |er great|er than |
|00001160| 6f 72 20 65 71 75 61 6c | 20 74 6f 20 74 68 65 20 |or equal| to the |
|00001170| 4c 6f 77 65 72 20 70 61 | 72 61 6d 65 74 65 72 00 |Lower pa|rameter.|
|00001180| 00 97 00 33 00 00 00 20 | 20 20 61 6e 64 20 6c 65 |...3... | and le|
|00001190| 73 73 20 74 68 61 6e 20 | 6f 72 20 65 71 75 61 6c |ss than |or equal|
|000011a0| 20 74 6f 20 74 68 65 20 | 55 70 70 65 72 20 70 61 | to the |Upper pa|
|000011b0| 72 61 6d 65 74 65 72 2e | 20 00 00 97 00 06 00 00 |rameter.| .......|
|000011c0| 00 20 0d 4c 3d 00 00 97 | 00 02 00 00 00 00 00 58 |. .L=...|.......X|
|000011d0| 00 12 00 60 00 81 02 02 | 00 6b 00 00 00 01 00 74 |...`....|.k.....t|
|000011e0| 00 00 00 01 00 00 0c 43 | 01 0b 00 74 00 0b 00 6b |.......C|...t...k|
|000011f0| 00 77 01 64 05 00 01 6e | 01 70 01 26 01 0b 00 6b |.w.d...n|.p.&...k|
|00001200| 00 00 01 0c 04 60 00 00 | 00 51 00 09 00 08 00 ff |.....`..|.Q......|
|00001210| ff 04 00 ff ff ff ff 09 | 00 00 00 ff ff 02 0c 00 |........|........|
|00001220| 0e 00 49 6e 74 72 6f 64 | 75 63 74 69 6f 6e 32 38 |..Introd|uction28|
|00001230| 01 00 38 0c 05 00 00 1b | 00 ff ff c1 ff ff ff 00 |..8.....|........|
|00001240| 00 76 00 06 00 7d 00 00 | 01 00 00 00 08 64 29 0c |.v...}..|.....d).|
|00001250| 00 f6 03 00 08 6d 01 15 | 00 20 20 b1 c6 20 20 20 |.....m..|. .. |
|00001260| a7 c7 20 20 20 ae 69 20 | 20 20 a5 dc 20 20 22 0c |.. .i | .. ".|
|00001270| 14 fb 03 00 08 65 01 50 | 00 0b 14 fb 03 2d 01 ff |.....e.P|.....-..|
|00001280| ff 77 01 6e 01 64 09 60 | 01 0c 00 04 04 00 08 73 |.w.n.d.`|.......s|
|00001290| 01 a3 00 00 08 73 01 64 | 01 73 01 64 1d a4 00 04 |.....s.d|.s.d....|
|000012a0| 00 00 08 73 01 64 05 73 | 01 0b 00 04 04 73 01 64 |...s.d.s|.....s.d|
|000012b0| 05 73 01 64 01 73 01 65 | 01 0c 00 c1 00 0a 00 06 |.s.d.s.e|........|
|000012c0| 00 0b 14 fb 03 96 00 00 | 08 73 01 64 1d 73 01 64 |........|.s.d.s.d|
|000012d0| 01 a4 00 04 00 00 08 73 | 01 64 0d c1 00 02 00 00 |.......s|.d......|
|000012e0| 08 0b 00 f6 03 90 00 92 | 00 6d 01 38 00 a4 ba ae |........|.m.8....|
|000012f0| 65 bb a1 a9 fa 20 20 20 | 3a 20 b3 6f ad d3 b5 7b |e.... |: .o...{|
|00001300| a6 a1 ae 69 a5 dc a6 55 | ba d8 b1 c6 a7 c7 a4 e8 |...i...U|........|
|00001310| aa 6b 2c 20 a8 c3 a4 f1 | b8 fb b0 f5 a6 e6 aa ba |.k, ....|........|
|00001320| ae c9 b6 a1 2e 96 00 00 | 08 93 00 00 08 0b 00 f6 |........|........|
|00001330| 03 90 00 92 00 6d 01 0d | 00 42 41 53 49 43 20 b1 |.....m..|.BASIC .|
|00001340| d0 ab c7 20 3a 20 22 96 | 00 00 08 0b 00 f6 03 90 |... : ".|........|
|00001350| 00 92 00 6d 01 2c 00 20 | 20 20 20 20 20 20 20 20 |...m.,. | |
|00001360| 20 31 29 20 bf f9 bb 7e | b3 42 b2 7a 28 45 52 52 | 1) ...~|.B.z(ERR|
|00001370| 4f 52 20 48 41 4e 44 4c | 49 4e 47 29 aa ba a7 de |OR HANDL|ING)....|
|00001380| a5 a9 2e 96 00 00 08 0b | 00 f6 03 90 00 92 00 6d |........|.......m|
|00001390| 01 30 00 20 20 20 20 20 | 20 20 20 20 20 32 29 20 |.0. | 2) |
|000013a0| bb 73 a7 40 a5 e6 bd cd | a6 a1 a5 5c af e0 bf ef |.s.@....|...\....|
|000013b0| be dc b5 65 ad b1 28 4d | 45 4e 55 29 aa ba a7 de |...e..(M|ENU)....|
|000013c0| a5 a9 2e 96 00 00 08 0b | 00 f6 03 90 00 92 00 6d |........|.......m|
|000013d0| 01 39 00 20 20 20 20 20 | 20 20 20 20 20 33 29 20 |.9. | 3) |
|000013e0| a5 ce c3 b8 b9 cf aa ba | a4 e8 a6 a1 2c 20 ae 69 |........|...., .i|
|000013f0| a5 dc a4 bb ba d8 b3 cc | b1 60 a8 a3 aa ba b1 c6 |........|.`......|
|00001400| a7 c7 aa 6b 2c 20 a5 5d | ac 41 20 3a 22 96 00 00 |...k, .]|.A :"...|
|00001410| 08 0b 00 f6 03 90 00 92 | 00 6d 01 38 00 20 20 20 |........|.m.8. |
|00001420| 20 20 20 20 20 20 20 20 | 20 20 49 6e 73 65 72 74 | | Insert|
|00001430| 69 6f 6e 2c 20 42 75 62 | 62 6c 65 2c 20 48 65 61 |ion, Bub|ble, Hea|
|00001440| 70 2c 20 45 78 63 68 61 | 6e 67 65 2c 20 53 68 65 |p, Excha|nge, She|
|00001450| 6c 6c 20 a4 ce 96 00 00 | 08 0b 00 f6 03 90 00 92 |ll .....|........|
|00001460| 00 6d 01 18 00 20 20 20 | 20 20 20 20 20 20 20 20 |.m... | |
|00001470| 20 20 51 75 69 63 6b 20 | 53 6f 72 74 2e 96 00 00 | Quick |Sort....|
|00001480| 08 0b 00 f6 03 90 00 92 | 00 6d 01 29 00 20 20 20 |........|.m.). |
|00001490| 20 20 20 20 20 20 20 34 | 29 20 a5 ce 27 53 65 6d | 4|) ..'Sem|
|000014a0| 69 2d 67 72 61 70 68 69 | 63 73 27 a6 72 a4 b8 b5 |i-graphi|cs'.r...|
|000014b0| 65 aa ed ae e6 2e 22 96 | 00 00 08 0b 00 f6 03 90 |e.....".|........|
|000014c0| 00 92 00 6d 01 2b 00 20 | 20 20 20 20 20 20 20 20 |...m.+. | |
|000014d0| 20 35 29 20 a5 ce 27 53 | 4f 55 4e 44 27 ab fc a5 | 5) ..'S|OUND'...|
|000014e0| 4f a6 62 b1 c6 a7 c7 ae | c9 b2 a3 a5 cd ad b5 bc |O.b.....|........|
|000014f0| d6 2e 22 96 00 00 08 0b | 00 f6 03 90 00 92 00 6d |..".....|.......m|
|00001500| 01 38 00 20 20 20 20 20 | 20 20 20 20 20 36 29 20 |.8. | 6) |
|00001510| a5 ce a9 b5 bf f0 28 44 | 65 6c 61 79 29 aa ba a7 |......(D|elay)...|
|00001520| de a5 a9 2c 20 bd d5 be | e3 c5 e3 a5 dc aa ba b3 |..., ...|........|
|00001530| 74 ab d7 2c 20 a4 e8 ab | 4b a8 cf 96 00 00 08 0b |t.., ...|K.......|
|00001540| 00 f6 03 90 00 92 00 6d | 01 1c 00 20 20 20 20 20 |.......m|... |
|00001550| 20 20 20 20 20 20 20 20 | a5 ce aa cc a4 46 b8 d1 | |.....F..|
|00001560| ba 74 ba e2 aa 6b 2e 96 | 00 00 08 0b 00 f6 03 90 |.t...k..|........|
|00001570| 00 92 00 6d 01 2d 00 20 | 20 20 20 20 20 20 20 20 |...m.-. | |
|00001580| 20 37 29 20 c5 aa a8 fa | 27 54 49 4d 45 52 27 a8 | 7) ....|'TIMER'.|
|00001590| d3 ad 70 ba e2 b5 7b a6 | a1 b0 f5 a6 e6 aa ba ae |..p...{.|........|
|000015a0| c9 b6 a1 2e 22 96 00 00 | 08 0b 00 f6 03 90 00 92 |...."...|........|
|000015b0| 00 6d 01 1c 00 20 20 20 | 20 20 20 20 20 20 20 38 |.m... | 8|
|000015c0| 29 20 b6 c3 bc c6 a8 e7 | bc c6 aa ba b9 42 a5 ce |) ......|.....B..|
|000015d0| 2e 96 00 00 08 0b 00 f6 | 03 90 00 92 00 6d 01 38 |........|.....m.8|
|000015e0| 00 20 20 20 20 20 20 20 | 20 20 20 39 29 20 b9 42 |. | 9) .B|
|000015f0| a5 ce 20 43 4f 4c 4f 52 | 20 ab fc a5 4f c5 dc b4 |.. COLOR| ...O...|
|00001600| ab ab 65 b4 ba a4 ce ad | 49 b4 ba aa ba c3 43 a6 |..e.....|I.....C.|
|00001610| e2 2c 20 a8 d3 a7 b9 a6 | a8 96 00 00 08 0b 00 f6 |., .....|........|
|00001620| 03 90 00 92 00 6d 01 1c | 00 20 20 20 20 20 20 20 |.....m..|. |
|00001630| 20 20 20 20 20 20 af 53 | a9 77 aa ba b5 65 ad b1 | .S|.w...e..|
|00001640| ae c4 aa 47 2e 96 00 00 | 08 93 00 00 08 0b 00 f6 |...G....|........|
|00001650| 03 90 00 92 00 6d 01 0d | 00 b3 d0 b7 4e ae c9 b6 |.....m..|....N...|
|00001660| a1 20 20 20 3a 20 22 96 | 00 00 08 0b 00 f6 03 90 |. : ".|........|
|00001670| 00 92 00 6d 01 39 00 20 | 20 20 20 20 20 20 20 20 |...m.9. | |
|00001680| 20 31 29 20 a7 41 a5 69 | a5 48 b1 4e be c7 a8 ec | 1) .A.i|.H.N....|
|00001690| aa ba b1 c6 a7 c7 aa 6b | b9 42 a5 ce a6 62 a8 e4 |.......k|.B...b..|
|000016a0| a5 4c b5 7b a6 a1 2c 20 | a8 d2 a6 70 3a 20 a6 a8 |.L.{.., |...p: ..|
|000016b0| 22 96 00 00 08 0b 00 f6 | 03 90 00 92 00 6d 01 20 |".......|.....m. |
|000016c0| 00 20 20 20 20 20 20 20 | 20 20 20 20 20 20 c1 5a |. | .Z|
|000016d0| b2 ce ad 70 2c 20 ac 64 | b8 df b8 ea ae c6 b5 a5 |...p, .d|........|
|000016e0| 2e 96 00 00 08 73 01 65 | 01 18 00 c1 00 02 00 00 |.....s.e|........|
|000016f0| 08 0b 00 f6 03 90 00 92 | 00 6d 01 26 00 20 20 20 |........|.m.&. |
|00001700| 20 20 20 20 20 20 20 20 | 20 20 bd d0 ab f6 a5 f4 | | ......|
|00001710| b7 4e c1 e4 2c 20 b1 d2 | b0 ca b5 7b a6 a1 20 2e |.N.., ..|...{.. .|
|00001720| 2e 2e 20 95 00 93 00 00 | 08 46 00 06 00 20 01 6d |.. .....|.F... .m|
|00001730| 01 00 00 03 01 64 00 ff | ff 00 00 51 00 09 00 08 |.....d..|...Q....|
|00001740| 00 ff ff 04 00 ff ff ff | ff 22 00 00 00 ff ff 02 |........|."......|
|00001750| 0c 00 07 00 42 6f 78 49 | 6e 69 74 01 00 b8 16 03 |....BoxI|nit.....|
|00001760| 00 00 1b 00 ff ff c1 ff | ff ff 00 00 97 00 12 00 |........|........|
|00001770| 00 00 20 0d 1f 3d 20 42 | 6f 78 49 6e 69 74 20 0d |.. ..= B|oxInit .|
|00001780| 24 3d 00 00 97 00 4a 00 | 00 00 0d 04 20 43 61 6c |$=....J.|.... Cal|
|00001790| 6c 73 20 74 68 65 20 44 | 72 61 77 46 72 61 6d 65 |ls the D|rawFrame|
|000017a0| 20 70 72 6f 63 65 64 75 | 72 65 20 74 6f 20 64 72 | procedu|re to dr|
|000017b0| 61 77 20 74 68 65 20 66 | 72 61 6d 65 20 61 72 6f |aw the f|rame aro|
|000017c0| 75 6e 64 20 74 68 65 20 | 73 6f 72 74 20 6d 65 6e |und the |sort men|
|000017d0| 75 2c 00 00 97 00 47 00 | 00 00 0d 04 20 74 68 65 |u,....G.|.... the|
|000017e0| 6e 20 70 72 69 6e 74 73 | 20 74 68 65 20 64 69 66 |n prints| the dif|
|000017f0| 66 65 72 65 6e 74 20 6f | 70 74 69 6f 6e 73 20 73 |ferent o|ptions s|
|00001800| 74 6f 72 65 64 20 69 6e | 20 74 68 65 20 4f 70 74 |tored in| the Opt|
|00001810| 69 6f 6e 54 69 74 6c 65 | 20 61 72 72 61 79 2e 6e |ionTitle| array.n|
|00001820| 00 00 97 00 06 00 00 00 | 20 0d 4c 3d 00 00 97 00 |........| .L=....|
|00001830| 02 00 00 00 00 00 76 00 | 06 00 8f 00 00 01 00 00 |......v.|........|
|00001840| 00 0c 64 05 65 01 16 00 | 0b 00 4a 02 64 0d 77 01 |..d.e...|..J.d.w.|
|00001850| 65 01 4e 00 38 00 04 00 | b7 00 00 00 00 0c 73 01 |e.N.8...|......s.|
|00001860| 64 0d 73 01 0b 00 4a 02 | 64 09 00 01 c1 00 04 00 |d.s...J.|d.......|
|00001870| 06 00 6d 01 1a 00 a4 a4 | 20 a4 e5 20 51 55 49 43 |..m.....| .. QUIC|
|00001880| 4b 42 41 53 49 43 20 b1 | c6 a7 c7 20 ae 69 a5 dc |KBASIC .|... .i..|
|00001890| 95 00 93 00 00 0c 73 01 | 64 15 c1 00 02 00 00 0c |......s.|d.......|
|000018a0| 0b 00 26 03 64 05 0b 00 | 58 02 64 05 77 01 56 00 |..&.d...|X.d.w.V.|
|000018b0| ff ff ff ff 00 18 72 01 | 73 01 0b 00 4a 02 c1 00 |......r.|s...J...|
|000018c0| 03 00 06 00 0b 00 26 03 | 0e 00 01 00 97 02 96 00 |......&.|........|
|000018d0| 00 0c 0b 00 26 03 66 00 | ff ff ff ff 00 00 00 0c |....&.f.|........|
|000018e0| 97 00 44 00 03 00 20 44 | 6f 6e 27 74 20 70 72 69 |..D... D|on't pri|
|000018f0| 6e 74 20 74 68 65 20 6c | 61 73 74 20 6f 70 74 69 |nt the l|ast opti|
|00001900| 6f 6e 20 28 3e 20 46 61 | 73 74 65 72 29 20 69 66 |on (> Fa|ster) if|
|00001910| 20 74 68 65 20 6c 65 6e | 67 74 68 20 6f 66 20 74 | the len|gth of t|
|00001920| 68 65 20 50 61 75 73 65 | 00 0c 97 00 1b 00 03 00 |he Pause|........|
|00001930| 20 69 73 20 64 6f 77 6e | 20 74 6f 20 31 20 63 6c | is down| to 1 cl|
|00001940| 6f 63 6b 20 74 69 63 6b | 3a 69 00 0c 0b 00 da 02 |ock tick|:i......|
|00001950| 64 05 5f 01 5d 00 00 00 | 72 01 73 01 0b 00 4a 02 |d._.]...|r.s...J.|
|00001960| c1 00 03 00 06 00 0b 00 | 58 02 0e 00 01 00 97 02 |........|X.......|
|00001970| 95 00 93 00 00 00 00 0c | 97 00 44 00 03 00 20 54 |........|..D... T|
|00001980| 6f 67 67 6c 65 20 73 6f | 75 6e 64 20 6f 6e 20 6f |oggle so|und on o|
|00001990| 72 20 6f 66 66 2c 20 74 | 68 65 6e 20 70 72 69 6e |r off, t|hen prin|
|000019a0| 74 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 76 61 |t the cu|rrent va|
|000019b0| 6c 75 65 20 66 6f 72 20 | 4e 6f 53 6f 75 6e 64 3a |lue for |NoSound:|
|000019c0| 00 0c 0b 00 cf 02 74 01 | 0c 00 cf 02 00 0c 65 01 |......t.|......e.|
|000019d0| 0c 00 0b 00 4a 02 65 01 | 0c 00 00 01 38 00 02 00 |....J.e.|....8...|
|000019e0| f1 01 00 00 00 0c 73 01 | 0b 00 58 02 64 19 00 01 |......s.|..X.d...|
|000019f0| 73 01 0b 00 4a 02 c1 00 | 04 00 00 0c 6d 01 10 00 |s...J...|....m...|
|00001a00| bd d0 bf e9 a4 4a a7 41 | aa ba bf ef be dc 20 3a |.....J.A|...... :|
|00001a10| 96 00 00 0c 72 01 73 01 | 0b 00 4a 02 c1 00 03 00 |....r.s.|..J.....|
|00001a20| 00 0c 6d 01 15 00 28 20 | 49 20 42 20 48 20 45 20 |..m...( |I B H E |
|00001a30| 53 20 51 20 54 20 3c 20 | 3e 20 29 22 96 00 00 0c |S Q T < |> )"....|
|00001a40| 72 01 73 01 0b 00 4a 02 | c1 00 03 00 00 0c 6d 01 |r.s...J.|......m.|
|00001a50| 17 00 a9 ce ab f6 20 5b | 45 53 43 5d 20 c1 e4 b5 |...... [|ESC] ...|
|00001a60| b2 a7 f4 b5 7b a6 a1 3a | 20 22 95 00 93 00 00 00 |....{..:| "......|
|00001a70| 51 00 09 00 08 00 ff ff | 04 00 ff ff ff ff 1e 00 |Q.......|........|
|00001a80| 00 00 ff ff 02 0c 00 0a | 00 42 75 62 62 6c 65 53 |........|.BubbleS|
|00001a90| 6f 72 74 01 00 b8 84 02 | 00 00 1b 00 ff ff c1 ff |ort.....|........|
|00001aa0| ff ff 00 00 97 00 15 00 | 00 00 20 0d 1e 3d 20 42 |........|.. ..= B|
|00001ab0| 75 62 62 6c 65 53 6f 72 | 74 20 0d 22 3d 00 00 00 |ubbleSor|t ."=...|
|00001ac0| 97 00 4a 00 00 00 0d 04 | 20 54 68 65 20 42 75 62 |..J.....| The Bub|
|00001ad0| 62 6c 65 53 6f 72 74 20 | 61 6c 67 6f 72 69 74 68 |bleSort |algorith|
|00001ae0| 6d 20 63 79 63 6c 65 73 | 20 74 68 72 6f 75 67 68 |m cycles| through|
|00001af0| 20 53 6f 72 74 41 72 72 | 61 79 2c 20 63 6f 6d 70 | SortArr|ay, comp|
|00001b00| 61 72 69 6e 67 20 61 64 | 6a 61 63 65 6e 74 00 00 |aring ad|jacent..|
|00001b10| 97 00 48 00 00 00 0d 04 | 20 65 6c 65 6d 65 6e 74 |..H.....| element|
|00001b20| 73 20 61 6e 64 20 73 77 | 61 70 70 69 6e 67 20 70 |s and sw|apping p|
|00001b30| 61 69 72 73 20 74 68 61 | 74 20 61 72 65 20 6f 75 |airs tha|t are ou|
|00001b40| 74 20 6f 66 20 6f 72 64 | 65 72 2e 20 20 49 74 20 |t of ord|er. It |
|00001b50| 63 6f 6e 74 69 6e 75 65 | 73 20 74 6f 00 00 97 00 |continue|s to....|
|00001b60| 28 00 00 00 0d 04 20 64 | 6f 20 74 68 69 73 20 75 |(..... d|o this u|
|00001b70| 6e 74 69 6c 20 6e 6f 20 | 70 61 69 72 73 20 61 72 |ntil no |pairs ar|
|00001b80| 65 20 73 77 61 70 70 65 | 64 2e 00 00 97 00 06 00 |e swappe|d.......|
|00001b90| 00 00 20 0d 4c 3d 00 00 | 97 00 02 00 00 00 00 00 |.. .L=..|........|
|00001ba0| 76 00 06 00 9a 00 00 01 | 00 00 00 0c 0b 00 72 02 |v.......|......r.|
|00001bb0| 0c 00 2b 03 00 0c 46 00 | 00 18 0b 00 39 02 0c 00 |..+...F.|....9...|
|00001bc0| 34 03 00 18 0b 00 89 01 | 64 05 0b 00 2b 03 64 05 |4.......|d...+.d.|
|00001bd0| 77 01 6e 01 56 00 ff ff | ff ff 00 00 00 24 97 00 |w.n.V...|.....$..|
|00001be0| 3f 00 09 00 20 54 77 6f | 20 61 64 6a 61 63 65 6e |?... Two| adjacen|
|00001bf0| 74 20 65 6c 65 6d 65 6e | 74 73 20 61 72 65 20 6f |t elemen|ts are o|
|00001c00| 75 74 20 6f 66 20 6f 72 | 64 65 72 2c 20 73 6f 20 |ut of or|der, so |
|00001c10| 73 77 61 70 20 74 68 65 | 69 72 20 76 61 6c 75 65 |swap the|ir value|
|00001c20| 73 3d 00 24 97 00 1d 00 | 09 00 20 61 6e 64 20 72 |s=.$....|.. and r|
|00001c30| 65 64 72 61 77 20 74 68 | 6f 73 65 20 74 77 6f 20 |edraw th|ose two |
|00001c40| 62 61 72 73 3a 6f 00 24 | 0b 00 89 01 0e 00 01 00 |bars:o.$|........|
|00001c50| 7c 02 11 00 16 02 0b 00 | 89 01 64 05 00 01 0e 00 ||.......|..d.....|
|00001c60| 01 00 7c 02 11 00 16 02 | 5f 01 61 00 00 00 00 30 |..|.....|_.a....0|
|00001c70| 0b 00 89 01 0e 00 01 00 | 7c 02 0b 00 89 01 64 05 |........||.....d.|
|00001c80| 00 01 0e 00 01 00 7c 02 | ed 00 ff ff 00 30 0b 00 |......|.|.....0..|
|00001c90| 89 01 0b 00 89 01 64 05 | 00 01 38 00 02 00 d5 01 |......d.|..8.....|
|00001ca0| 00 30 0b 00 89 01 0c 00 | 34 03 00 24 50 00 00 18 |.0......|4..$P...|
|00001cb0| 0b 00 89 01 66 00 ff ff | ff ff 00 00 00 18 97 00 |....f...|........|
|00001cc0| 3c 00 06 00 20 53 6f 72 | 74 20 6f 6e 20 6e 65 78 |<... Sor|t on nex|
|00001cd0| 74 20 70 61 73 73 20 6f | 6e 6c 79 20 74 6f 20 77 |t pass o|nly to w|
|00001ce0| 68 65 72 65 20 74 68 65 | 20 6c 61 73 74 20 73 77 |here the| last sw|
|00001cf0| 69 74 63 68 20 77 61 73 | 20 6d 61 64 65 3a 00 18 |itch was| made:..|
|00001d00| 0b 00 34 03 0c 00 2b 03 | 00 0c 0b 00 34 03 64 00 |..4...+.|....4.d.|
|00001d10| ff ff 00 00 00 00 51 00 | 09 00 08 00 ff ff 04 00 |......Q.|........|
|00001d20| ff ff ff ff 1b 00 00 00 | ff ff 02 0c 00 0b 00 43 |........|.......C|
|00001d30| 68 65 63 6b 53 63 72 65 | 65 6e 01 00 b8 b2 01 00 |heckScre|en......|
|00001d40| 00 1b 00 ff ff c1 ff ff | ff 00 00 97 00 16 00 00 |........|........|
|00001d50| 00 20 0d 1e 3d 20 43 68 | 65 63 6b 53 63 72 65 65 |. ..= Ch|eckScree|
|00001d60| 6e 20 0d 21 3d 00 00 97 | 00 3a 00 00 00 0d 05 20 |n .!=...|.:..... |
|00001d70| 43 68 65 63 6b 73 20 66 | 6f 72 20 74 79 70 65 20 |Checks f|or type |
|00001d80| 6f 66 20 6d 6f 6e 69 74 | 6f 72 20 28 56 47 41 2c |of monit|or (VGA,|
|00001d90| 20 45 47 41 2c 20 6f 72 | 20 6d 6f 6e 6f 63 68 72 | EGA, or| monochr|
|00001da0| 6f 6d 65 29 2e 00 00 97 | 00 06 00 00 00 20 0d 4c |ome)....|..... .L|
|00001db0| 3d 00 00 97 00 02 00 00 | 00 00 00 76 00 06 00 a8 |=.......|...v....|
|00001dc0| 00 00 01 00 00 00 00 1e | 00 ff ff 0d 00 12 03 00 |........|........|
|00001dd0| 00 00 0c 65 01 19 00 0c | 00 fa 02 00 0c 73 01 0b |...e....|.....s..|
|00001de0| 00 fa 02 73 01 64 05 c1 | 00 04 00 00 00 00 0c 97 |...s.d..|........|
|00001df0| 00 4b 00 03 00 20 54 72 | 79 20 61 20 53 43 52 45 |.K... Tr|y a SCRE|
|00001e00| 45 4e 20 38 32 20 6f 72 | 20 53 43 52 45 45 4e 20 |EN 82 or| SCREEN |
|00001e10| 38 30 20 73 74 61 74 65 | 6d 65 6e 74 20 74 6f 20 |80 state|ment to |
|00001e20| 73 65 65 20 69 66 20 74 | 68 65 20 63 75 72 72 65 |see if t|he curre|
|00001e30| 6e 74 20 61 64 61 70 74 | 65 72 20 68 61 73 3d 00 |nt adapt|er has=.|
|00001e40| 0c 97 00 40 00 03 00 63 | 6f 6c 6f 72 20 67 72 61 |...@...c|olor gra|
|00001e50| 70 68 69 63 73 3b 20 69 | 66 20 74 68 61 74 20 63 |phics; i|f that c|
|00001e60| 61 75 73 65 73 20 61 6e | 20 65 72 72 6f 72 2c 20 |auses an| error, |
|00001e70| 72 65 73 65 74 20 4d 61 | 78 43 6f 6c 6f 72 73 20 |reset Ma|xColors |
|00001e80| 74 6f 20 32 3a 00 0c 65 | 01 0f 00 0c 00 05 03 00 |to 2:..e|........|
|00001e90| 0c 67 00 1a 03 00 0c 73 | 01 0b 00 12 03 e7 00 02 |.g.....s|........|
|00001ea0| 00 00 0c 73 01 64 01 e7 | 00 02 00 00 00 00 0c 65 |...s.d..|.......e|
|00001eb0| 01 19 00 0c 00 f0 02 00 | 0c 65 01 50 00 0b 00 f0 |........|.e.P....|
|00001ec0| 02 f8 00 00 0c 67 00 ff | ff 97 00 1b 00 20 00 20 |.....g..|..... . |
|00001ed0| 54 75 72 6e 20 6f 66 66 | 20 65 72 72 6f 72 20 74 |Turn off| error t|
|00001ee0| 72 61 70 70 69 6e 67 2e | 73 00 00 51 00 09 00 08 |rapping.|s..Q....|
|00001ef0| 00 ff ff 04 00 ff ff ff | ff 16 00 00 00 ff ff 02 |........|........|
|00001f00| 0c 00 09 00 44 72 61 77 | 46 72 61 6d 65 01 00 b8 |....Draw|Frame...|
|00001f10| 82 02 00 00 1b 00 ff ff | c1 ff ff ff 00 00 97 00 |........|........|
|00001f20| 14 00 00 00 20 0d 1e 3d | 20 44 72 61 77 46 72 61 |.... ..=| DrawFra|
|00001f30| 6d 65 20 0d 23 3d 00 00 | 97 00 4b 00 00 00 20 44 |me .#=..|..K... D|
|00001f40| 72 61 77 73 20 61 20 72 | 65 63 74 61 6e 67 75 6c |raws a r|ectangul|
|00001f50| 61 72 20 66 72 61 6d 65 | 20 75 73 69 6e 67 20 74 |ar frame| using t|
|00001f60| 68 65 20 73 70 65 63 69 | 61 6c 20 73 79 6d 62 6f |he speci|al symbo|
|00001f70| 6c 73 2e 20 a2 7a 20 2c | 20 a2 7b 2c a2 7c 20 2c |ls. .z ,| .{,.| ,|
|00001f80| 20 a2 7d 2c a2 78 2c 3d | 00 00 97 00 4e 00 00 00 | .},.x,=|....N...|
|00001f90| 20 61 6e 64 20 a2 77 2e | 20 54 68 65 20 70 61 72 | and .w.| The par|
|00001fa0| 61 6d 65 74 65 72 73 20 | 54 6f 70 53 69 64 65 2c |ameters |TopSide,|
|00001fb0| 20 42 6f 74 74 6f 6d 53 | 69 64 65 2c 20 4c 65 66 | BottomS|ide, Lef|
|00001fc0| 74 53 69 64 65 2c 20 61 | 6e 64 20 52 69 67 68 74 |tSide, a|nd Right|
|00001fd0| 53 69 64 65 20 61 72 65 | 20 74 68 65 00 00 97 00 |Side are| the....|
|00001fe0| 4d 00 00 00 20 72 6f 77 | 20 61 6e 64 20 63 6f 6c |M... row| and col|
|00001ff0| 75 6d 6e 20 61 72 67 75 | 6d 65 6e 74 73 20 66 6f |umn argu|ments fo|
|00002000| 72 20 74 68 65 20 75 70 | 70 65 72 2d 6c 65 66 74 |r the up|per-left|
|00002010| 20 61 6e 64 20 6c 6f 77 | 65 72 2d 72 69 67 68 74 | and low|er-right|
|00002020| 20 63 6f 72 6e 65 72 73 | 20 6f 66 20 74 68 65 65 | corners| of thee|
|00002030| 00 00 97 00 09 00 00 00 | 20 66 72 61 6d 65 2e 64 |........| frame.d|
|00002040| 00 00 97 00 06 00 00 00 | 20 0d 4c 3d 00 00 97 00 |........| .L=....|
|00002050| 02 00 00 00 00 00 76 00 | 1e 00 b7 00 00 01 04 00 |......v.|........|
|00002060| c4 00 00 00 01 00 cf 00 | 00 00 01 00 dd 00 00 00 |........|........|
|00002070| 01 00 e9 00 00 00 01 00 | 00 0c 23 00 6d 01 02 00 |........|..#.m...|
|00002080| a2 7a 0c 14 3e 03 6d 01 | 02 00 a2 7b 0c 14 47 03 |.z..>.m.|...{..G.|
|00002090| 6d 01 02 00 a2 7c 0c 14 | 51 03 00 0c 23 00 6d 01 |m....|..|Q...#.m.|
|000020a0| 02 00 a2 7d 0c 14 5a 03 | 6d 01 02 00 a2 78 0c 14 |...}..Z.|m....x..|
|000020b0| 64 03 6d 01 02 00 a2 77 | 0c 14 70 03 00 00 00 0c |d.m....w|..p.....|
|000020c0| 0b 00 e9 00 0b 00 dd 00 | 77 01 64 09 77 01 0c 00 |........|w.d.w...|
|000020d0| 79 03 00 0c 73 01 0b 00 | c4 00 73 01 0b 00 dd 00 |y...s...|..s.....|
|000020e0| c1 00 04 00 00 0c 0b 14 | 3e 03 0b 00 79 03 64 09 |........|>...y.d.|
|000020f0| 02 01 6e 01 0b 14 70 03 | 53 01 00 01 0b 14 47 03 |..n...p.|S.....G.|
|00002100| 00 01 95 00 93 00 00 0c | 0b 00 89 01 0b 00 c4 00 |........|........|
|00002110| 64 05 00 01 0b 00 cf 00 | 64 05 77 01 56 00 ff ff |d.......|d.w.V...|
|00002120| ff ff 00 18 73 01 0b 00 | 89 01 73 01 0b 00 dd 00 |....s...|..s.....|
|00002130| c1 00 04 00 00 18 0b 14 | 64 03 95 00 0b 00 79 03 |........|d.....y.|
|00002140| 8f 00 92 00 0b 14 64 03 | 95 00 93 00 00 0c 0b 00 |......d.|........|
|00002150| 89 01 66 00 ff ff ff ff | 00 0c 73 01 0b 00 cf 00 |..f.....|..s.....|
|00002160| 73 01 0b 00 dd 00 c1 00 | 04 00 00 0c 0b 14 51 03 |s.......|......Q.|
|00002170| 0b 00 79 03 64 09 02 01 | 6e 01 0b 14 70 03 53 01 |..y.d...|n...p.S.|
|00002180| 00 01 0b 14 5a 03 00 01 | 95 00 93 00 00 00 51 00 |....Z...|......Q.|
|00002190| 09 00 08 00 ff ff 04 00 | ff ff ff ff 16 00 00 00 |........|........|
|000021a0| ff ff 02 0c 00 0b 00 45 | 6c 61 70 73 65 64 54 69 |.......E|lapsedTi|
|000021b0| 6d 65 01 00 b8 34 03 00 | 00 1b 00 ff ff c1 ff ff |me...4..|........|
|000021c0| ff 00 00 97 00 16 00 00 | 00 20 0d 1d 3d 20 45 6c |........|. ..= El|
|000021d0| 61 70 73 65 64 54 69 6d | 65 20 0d 22 3d 00 00 97 |apsedTim|e ."=...|
|000021e0| 00 44 00 00 00 0d 04 20 | 50 72 69 6e 74 73 20 73 |.D..... |Prints s|
|000021f0| 65 63 6f 6e 64 73 20 65 | 6c 61 70 73 65 64 20 73 |econds e|lapsed s|
|00002200| 69 6e 63 65 20 74 68 65 | 20 67 69 76 65 6e 20 73 |ince the| given s|
|00002210| 6f 72 74 69 6e 67 20 72 | 6f 75 74 69 6e 65 20 73 |orting r|outine s|
|00002220| 74 61 72 74 65 64 2e 00 | 00 97 00 46 00 00 00 0d |tarted..|...F....|
|00002230| 04 20 4e 6f 74 65 20 74 | 68 61 74 20 74 68 69 73 |. Note t|hat this|
|00002240| 20 74 69 6d 65 20 69 6e | 63 6c 75 64 65 73 20 62 | time in|cludes b|
|00002250| 6f 74 68 20 74 68 65 20 | 74 69 6d 65 20 69 74 20 |oth the |time it |
|00002260| 74 61 6b 65 73 20 74 6f | 20 72 65 64 72 61 77 20 |takes to| redraw |
|00002270| 74 68 65 00 00 97 00 44 | 00 00 00 0d 04 20 62 61 |the....D|..... ba|
|00002280| 72 73 20 70 6c 75 73 20 | 74 68 65 20 70 61 75 73 |rs plus |the paus|
|00002290| 65 20 77 68 69 6c 65 20 | 74 68 65 20 53 4f 55 4e |e while |the SOUN|
|000022a0| 44 20 73 74 61 74 65 6d | 65 6e 74 20 70 6c 61 79 |D statem|ent play|
|000022b0| 73 20 61 20 6e 6f 74 65 | 2c 20 61 6e 64 00 00 97 |s a note|, and...|
|000022c0| 00 39 00 00 00 0d 04 20 | 74 68 75 73 20 69 73 20 |.9..... |thus is |
|000022d0| 6e 6f 74 20 61 6e 20 61 | 63 63 75 72 61 74 65 20 |not an a|ccurate |
|000022e0| 69 6e 64 69 63 61 74 69 | 6f 6e 20 6f 66 20 73 6f |indicati|on of so|
|000022f0| 72 74 69 6e 67 20 73 70 | 65 65 64 2e 61 00 00 97 |rting sp|eed.a...|
|00002300| 00 06 00 00 00 20 0d 4c | 3d 00 00 97 00 02 00 00 |..... .L|=.......|
|00002310| 00 00 00 76 00 0c 00 f6 | 00 00 01 01 00 05 01 00 |...v....|........|
|00002320| 00 01 00 00 0c 23 00 6d | 01 0e 00 20 20 20 23 23 |.....#.m|... ##|
|00002330| 23 2e 23 23 23 20 ac ed | 20 0c 00 87 03 00 00 00 |#.### ..| .......|
|00002340| 0c 97 00 3b 00 03 00 20 | 50 72 69 6e 74 20 63 75 |...;... |Print cu|
|00002350| 72 72 65 6e 74 20 73 65 | 6c 65 63 74 69 6f 6e 20 |rrent se|lection |
|00002360| 61 6e 64 20 6e 75 6d 62 | 65 72 20 6f 66 20 73 65 |and numb|er of se|
|00002370| 63 6f 6e 64 73 20 65 6c | 61 70 73 65 64 20 69 6e |conds el|apsed in|
|00002380| 3d 00 0c 97 00 11 00 03 | 00 20 72 65 76 65 72 73 |=.......|. revers|
|00002390| 65 20 76 69 64 65 6f 3a | 73 00 0c 73 01 0b 00 b3 |e video:|s..s....|
|000023a0| 02 73 01 0b 00 c1 02 a4 | 00 04 00 00 0c 73 01 0b |.s......|.....s..|
|000023b0| 00 e3 02 64 11 00 01 73 | 01 0b 00 4a 02 c1 00 04 |...d...s|...J....|
|000023c0| 00 06 00 0b 00 e3 02 0e | 00 01 00 97 02 95 00 93 |........|........|
|000023d0| 00 00 0c 73 01 0b 00 e3 | 02 64 11 00 01 73 01 0b |...s....|.d...s..|
|000023e0| 00 4a 02 65 01 10 00 00 | 01 c1 00 04 00 00 0c 0b |.J.e....|........|
|000023f0| 00 87 03 ff 00 56 01 0b | 00 a6 02 77 01 6e 01 95 |.....V..|...w.n..|
|00002400| 00 93 00 00 00 00 0c 0b | 00 cf 02 61 00 00 00 00 |........|...a....|
|00002410| 18 65 01 30 75 0b 00 da | 02 ec 00 97 00 1c 00 24 |.e.0u...|.......$|
|00002420| 00 20 53 6f 75 6e 64 20 | 6f 66 66 2c 20 73 6f 20 |. Sound |off, so |
|00002430| 6a 75 73 74 20 70 61 75 | 73 65 2e 00 0c 49 00 ff |just pau|se...I..|
|00002440| ff 00 18 65 01 3c 00 0b | 00 05 01 70 01 0b 00 da |...e.<..|...p....|
|00002450| 02 ec 00 97 00 21 00 24 | 00 20 53 6f 75 6e 64 20 |.....!.$|. Sound |
|00002460| 6f 6e 2c 20 73 6f 20 70 | 6c 61 79 20 61 20 6e 6f |on, so p|lay a no|
|00002470| 74 65 20 77 68 69 6c 65 | 65 00 0c 50 00 97 00 0b |te while|e..P....|
|00002480| 00 24 00 20 70 61 75 73 | 69 6e 67 2e 00 00 00 00 |.$. paus|ing.....|
|00002490| 0c 73 01 0b 00 05 03 73 | 01 64 01 a4 00 04 00 97 |.s.....s|.d......|
|000024a0| 00 21 00 24 00 20 52 65 | 73 74 6f 72 65 20 72 65 |.!.$. Re|store re|
|000024b0| 67 75 6c 61 72 20 66 6f | 72 65 67 72 6f 75 6e 64 |gular fo|reground|
|000024c0| 20 61 6e 64 6c 01 00 24 | 00 97 00 15 00 24 00 20 | andl..$|.....$. |
|000024d0| 62 61 63 6b 67 72 6f 75 | 6e 64 20 63 6f 6c 6f 72 |backgrou|nd color|
|000024e0| 73 2e 65 00 00 51 00 09 | 00 08 00 ff ff 04 00 ff |s.e..Q..|........|
|000024f0| ff ff ff 1b 00 00 00 ff | ff 02 0c 00 0c 00 45 78 |........|......Ex|
|00002500| 63 68 61 6e 67 65 53 6f | 72 74 01 00 b8 ce 02 00 |changeSo|rt......|
|00002510| 00 1b 00 ff ff c1 ff ff | ff 00 00 97 00 17 00 00 |........|........|
|00002520| 00 20 0d 1d 3d 20 45 78 | 63 68 61 6e 67 65 53 6f |. ..= Ex|changeSo|
|00002530| 72 74 20 0d 21 3d 00 00 | 00 97 00 48 00 00 00 20 |rt .!=..|...H... |
|00002540| 20 20 54 68 65 20 45 78 | 63 68 61 6e 67 65 53 6f | The Ex|changeSo|
|00002550| 72 74 20 63 6f 6d 70 61 | 72 65 73 20 65 61 63 68 |rt compa|res each|
|00002560| 20 65 6c 65 6d 65 6e 74 | 20 69 6e 20 53 6f 72 74 | element| in Sort|
|00002570| 41 72 72 61 79 20 2d 20 | 73 74 61 72 74 69 6e 67 |Array - |starting|
|00002580| 20 77 69 74 68 00 00 97 | 00 45 00 00 00 20 20 20 | with...|.E... |
|00002590| 74 68 65 20 66 69 72 73 | 74 20 65 6c 65 6d 65 6e |the firs|t elemen|
|000025a0| 74 20 2d 20 77 69 74 68 | 20 65 76 65 72 79 20 66 |t - with| every f|
|000025b0| 6f 6c 6c 6f 77 69 6e 67 | 20 65 6c 65 6d 65 6e 74 |ollowing| element|
|000025c0| 2e 20 20 49 66 20 61 6e | 79 20 6f 66 20 74 68 65 |. If an|y of the|
|000025d0| 69 00 00 97 00 4c 00 00 | 00 20 20 20 66 6f 6c 6c |i....L..|. foll|
|000025e0| 6f 77 69 6e 67 20 65 6c | 65 6d 65 6e 74 73 20 69 |owing el|ements i|
|000025f0| 73 20 73 6d 61 6c 6c 65 | 72 20 74 68 61 6e 20 74 |s smalle|r than t|
|00002600| 68 65 20 63 75 72 72 65 | 6e 74 20 65 6c 65 6d 65 |he curre|nt eleme|
|00002610| 6e 74 2c 20 69 74 20 69 | 73 20 65 78 63 68 61 6e |nt, it i|s exchan|
|00002620| 67 65 64 00 00 97 00 46 | 00 00 00 20 20 20 77 69 |ged....F|... wi|
|00002630| 74 68 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 65 |th the c|urrent e|
|00002640| 6c 65 6d 65 6e 74 20 61 | 6e 64 20 74 68 65 20 70 |lement a|nd the p|
|00002650| 72 6f 63 65 73 73 20 69 | 73 20 72 65 70 65 61 74 |rocess i|s repeat|
|00002660| 65 64 20 66 6f 72 20 74 | 68 65 20 6e 65 78 74 00 |ed for t|he next.|
|00002670| 00 97 00 1a 00 00 00 20 | 20 20 65 6c 65 6d 65 6e |....... | elemen|
|00002680| 74 20 69 6e 20 53 6f 72 | 74 41 72 72 61 79 2e 00 |t in Sor|tArray..|
|00002690| 00 97 00 06 00 00 00 20 | 0d 4c 3d 00 00 97 00 02 |....... |.L=.....|
|000026a0| 00 00 00 00 00 76 00 06 | 00 13 01 00 01 00 00 00 |.....v..|........|
|000026b0| 0c 0b 00 89 01 64 05 0b | 00 72 02 56 00 ff ff ff |.....d..|.r.V....|
|000026c0| ff 00 18 0b 00 89 01 0c | 00 91 03 00 18 0b 00 a0 |........|........|
|000026d0| 03 0b 00 89 01 64 05 00 | 01 0b 00 72 02 56 00 ff |.....d..|...r.V..|
|000026e0| ff ff ff 00 24 0b 00 a0 | 03 0e 00 01 00 7c 02 11 |....$...|.....|..|
|000026f0| 00 16 02 0b 00 91 03 0e | 00 01 00 7c 02 11 00 16 |........|...|....|
|00002700| 02 63 01 61 00 00 00 00 | 30 0b 00 a0 03 0c 00 91 |.c.a....|0.......|
|00002710| 03 00 30 0b 00 a0 03 38 | 00 01 00 f6 00 00 24 50 |..0....8|......$P|
|00002720| 00 00 18 0b 00 a0 03 66 | 00 ff ff ff ff 00 00 00 |.......f|........|
|00002730| 18 97 00 3a 00 06 00 20 | 46 6f 75 6e 64 20 61 20 |...:... |Found a |
|00002740| 72 6f 77 20 73 68 6f 72 | 74 65 72 20 74 68 61 6e |row shor|ter than|
|00002750| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 72 6f 77 | the cur|rent row|
|00002760| 2c 20 73 6f 20 73 77 61 | 70 20 74 68 6f 73 65 00 |, so swa|p those.|
|00002770| 18 97 00 16 00 06 00 20 | 74 77 6f 20 61 72 72 61 |....... |two arra|
|00002780| 79 20 65 6c 65 6d 65 6e | 74 73 3a 00 18 0b 00 91 |y elemen|ts:.....|
|00002790| 03 0b 00 89 01 5f 01 61 | 00 00 00 00 24 0b 00 89 |....._.a|....$...|
|000027a0| 01 0e 00 01 00 7c 02 0b | 00 91 03 0e 00 01 00 7c |.....|..|.......||
|000027b0| 02 ed 00 ff ff 00 24 0b | 00 89 01 0b 00 91 03 38 |......$.|.......8|
|000027c0| 00 02 00 d5 01 00 18 50 | 00 00 0c 0b 00 89 01 66 |.......P|.......f|
|000027d0| 00 ff ff ff ff 00 00 51 | 00 09 00 08 00 ff ff 04 |.......Q|........|
|000027e0| 00 ff ff ff ff 1b 00 00 | 00 ff ff 02 0c 00 08 00 |........|........|
|000027f0| 48 65 61 70 53 6f 72 74 | 01 00 b8 b8 05 00 00 1b |HeapSort|........|
|00002800| 00 ff ff c1 ff ff ff 00 | 00 97 00 13 00 00 00 20 |........|....... |
|00002810| 0d 1f 3d 20 48 65 61 70 | 53 6f 72 74 20 0d 23 3d |..= Heap|Sort .#=|
|00002820| 00 00 00 97 00 4e 00 00 | 00 20 20 54 68 65 20 48 |.....N..|. The H|
|00002830| 65 61 70 53 6f 72 74 20 | 70 72 6f 63 65 64 75 72 |eapSort |procedur|
|00002840| 65 20 77 6f 72 6b 73 20 | 62 79 20 63 61 6c 6c 69 |e works |by calli|
|00002850| 6e 67 20 74 77 6f 20 6f | 74 68 65 72 20 70 72 6f |ng two o|ther pro|
|00002860| 63 65 64 75 72 65 73 20 | 2d 20 50 65 72 63 6f 6c |cedures |- Percol|
|00002870| 61 74 65 55 70 00 00 97 | 00 4c 00 00 00 20 20 61 |ateUp...|.L... a|
|00002880| 6e 64 20 50 65 72 63 6f | 6c 61 74 65 44 6f 77 6e |nd Perco|lateDown|
|00002890| 2e 20 20 50 65 72 63 6f | 6c 61 74 65 55 70 20 74 |. Perco|lateUp t|
|000028a0| 75 72 6e 73 20 53 6f 72 | 74 41 72 72 61 79 20 69 |urns Sor|tArray i|
|000028b0| 6e 74 6f 20 61 20 22 68 | 65 61 70 2c 22 20 77 68 |nto a "h|eap," wh|
|000028c0| 69 63 68 20 68 61 73 00 | 00 97 00 31 00 00 00 20 |ich has.|...1... |
|000028d0| 20 74 68 65 20 70 72 6f | 70 65 72 74 69 65 73 20 | the pro|perties |
|000028e0| 6f 75 74 6c 69 6e 65 64 | 20 69 6e 20 74 68 65 20 |outlined| in the |
|000028f0| 64 69 61 67 72 61 6d 20 | 62 65 6c 6f 77 3a 61 00 |diagram |below:a.|
|00002900| 00 97 00 02 00 00 00 00 | 00 97 00 11 00 00 00 0d |........|........|
|00002910| 1f 20 53 6f 72 74 41 72 | 72 61 79 28 31 29 20 00 |. SortAr|ray(1) .|
|00002920| 00 97 00 0a 00 00 00 0d | 1f 20 2f 0d 0a 20 5c 00 |........|. /.. \.|
|00002930| 00 97 00 20 00 00 00 0d | 14 20 53 6f 72 74 41 72 |... ....|. SortAr|
|00002940| 72 61 79 28 32 29 0d 0b | 20 53 6f 72 74 41 72 72 |ray(2)..| SortArr|
|00002950| 61 79 28 33 29 00 00 97 | 00 12 00 00 00 0d 13 20 |ay(3)...|....... |
|00002960| 2f 0d 0a 20 5c 0d 0c 20 | 2f 0d 0a 20 5c 00 00 97 |/.. \.. |/.. \...|
|00002970| 00 3d 00 00 00 0d 09 20 | 53 6f 72 74 41 72 72 61 |.=..... |SortArra|
|00002980| 79 28 34 29 20 20 20 53 | 6f 72 74 41 72 72 61 79 |y(4) S|ortArray|
|00002990| 28 35 29 20 20 20 53 6f | 72 74 41 72 72 61 79 28 |(5) So|rtArray(|
|000029a0| 36 29 20 20 53 6f 72 74 | 41 72 72 61 79 28 37 29 |6) Sort|Array(7)|
|000029b0| 65 00 00 97 00 22 00 00 | 00 0d 0a 20 2f 0d 06 20 |e...."..|... /.. |
|000029c0| 5c 0d 07 20 2f 0d 07 20 | 5c 0d 07 20 2f 0d 06 20 |\.. /.. |\.. /.. |
|000029d0| 5c 0d 06 20 2f 0d 06 20 | 5c 00 00 97 00 31 00 00 |\.. /.. |\....1..|
|000029e0| 00 0d 08 20 2e 2e 2e 0d | 06 20 2e 2e 2e 20 20 20 |... ....|. ... |
|000029f0| 2e 2e 2e 0d 07 20 2e 2e | 2e 20 20 20 2e 2e 2e 0d |..... ..|. ....|
|00002a00| 06 20 2e 2e 2e 20 20 2e | 2e 2e 0d 06 20 2e 2e 2e |. ... .|.... ...|
|00002a10| 53 00 00 97 00 02 00 00 | 00 00 00 97 00 02 00 00 |S.......|........|
|00002a20| 00 00 00 97 00 4b 00 00 | 00 20 20 77 68 65 72 65 |.....K..|. where|
|00002a30| 20 65 61 63 68 20 22 70 | 61 72 65 6e 74 20 6e 6f | each "p|arent no|
|00002a40| 64 65 22 20 69 73 20 67 | 72 65 61 74 65 72 20 74 |de" is g|reater t|
|00002a50| 68 61 6e 20 65 61 63 68 | 20 6f 66 20 69 74 73 20 |han each| of its |
|00002a60| 22 63 68 69 6c 64 20 6e | 6f 64 65 73 22 3b 20 66 |"child n|odes"; f|
|00002a70| 6f 72 73 00 00 97 00 47 | 00 00 00 20 20 65 78 61 |ors....G|... exa|
|00002a80| 6d 70 6c 65 2c 20 53 6f | 72 74 41 72 72 61 79 28 |mple, So|rtArray(|
|00002a90| 31 29 20 69 73 20 67 72 | 65 61 74 65 72 20 74 68 |1) is gr|eater th|
|00002aa0| 61 6e 20 53 6f 72 74 41 | 72 72 61 79 28 32 29 20 |an SortA|rray(2) |
|00002ab0| 6f 72 20 53 6f 72 74 41 | 72 72 61 79 28 33 29 2c |or SortA|rray(3),|
|00002ac0| 20 00 00 97 00 4c 00 00 | 00 20 20 53 6f 72 74 41 | ....L..|. SortA|
|00002ad0| 72 72 61 79 28 33 29 20 | 69 73 20 67 72 65 61 74 |rray(3) |is great|
|00002ae0| 65 72 20 74 68 61 6e 20 | 53 6f 72 74 41 72 72 61 |er than |SortArra|
|00002af0| 79 28 36 29 20 6f 72 20 | 53 6f 72 74 41 72 72 61 |y(6) or |SortArra|
|00002b00| 79 28 37 29 2c 20 61 6e | 64 20 73 6f 20 66 6f 72 |y(7), an|d so for|
|00002b10| 74 68 2e 00 00 97 00 02 | 00 00 00 00 00 97 00 4a |th......|.......J|
|00002b20| 00 00 00 20 20 54 68 65 | 72 65 66 6f 72 65 2c 20 |... The|refore, |
|00002b30| 6f 6e 63 65 20 74 68 65 | 20 66 69 72 73 74 20 46 |once the| first F|
|00002b40| 4f 52 2e 2e 2e 4e 45 58 | 54 20 6c 6f 6f 70 20 69 |OR...NEX|T loop i|
|00002b50| 6e 20 48 65 61 70 53 6f | 72 74 20 69 73 20 66 69 |n HeapSo|rt is fi|
|00002b60| 6e 69 73 68 65 64 2c 20 | 74 68 65 00 00 97 00 27 |nished, |the....'|
|00002b70| 00 00 00 20 20 6c 61 72 | 67 65 73 74 20 65 6c 65 |... lar|gest ele|
|00002b80| 6d 65 6e 74 20 69 73 20 | 69 6e 20 53 6f 72 74 41 |ment is |in SortA|
|00002b90| 72 72 61 79 28 31 29 2e | 54 00 00 97 00 02 00 00 |rray(1).|T.......|
|00002ba0| 00 00 00 97 00 4c 00 00 | 00 20 20 54 68 65 20 73 |.....L..|. The s|
|00002bb0| 65 63 6f 6e 64 20 46 4f | 52 2e 2e 2e 4e 45 58 54 |econd FO|R...NEXT|
|00002bc0| 20 6c 6f 6f 70 20 69 6e | 20 48 65 61 70 53 6f 72 | loop in| HeapSor|
|00002bd0| 74 20 73 77 61 70 73 20 | 74 68 65 20 65 6c 65 6d |t swaps |the elem|
|00002be0| 65 6e 74 20 69 6e 20 53 | 6f 72 74 41 72 72 61 79 |ent in S|ortArray|
|00002bf0| 28 31 29 00 00 97 00 4a | 00 00 00 20 20 77 69 74 |(1)....J|... wit|
|00002c00| 68 20 74 68 65 20 65 6c | 65 6d 65 6e 74 20 69 6e |h the el|ement in|
|00002c10| 20 4d 61 78 52 6f 77 2c | 20 72 65 62 75 69 6c 64 | MaxRow,| rebuild|
|00002c20| 73 20 74 68 65 20 68 65 | 61 70 20 28 77 69 74 68 |s the he|ap (with|
|00002c30| 20 50 65 72 63 6f 6c 61 | 74 65 44 6f 77 6e 29 20 | Percola|teDown) |
|00002c40| 66 6f 72 00 00 97 00 4a | 00 00 00 20 20 4d 61 78 |for....J|... Max|
|00002c50| 52 6f 77 20 2d 20 31 2c | 20 74 68 65 6e 20 73 77 |Row - 1,| then sw|
|00002c60| 61 70 73 20 74 68 65 20 | 65 6c 65 6d 65 6e 74 20 |aps the |element |
|00002c70| 69 6e 20 53 6f 72 74 41 | 72 72 61 79 28 31 29 20 |in SortA|rray(1) |
|00002c80| 77 69 74 68 20 74 68 65 | 20 65 6c 65 6d 65 6e 74 |with the| element|
|00002c90| 20 69 6e 00 00 97 00 4b | 00 00 00 20 20 4d 61 78 | in....K|... Max|
|00002ca0| 52 6f 77 20 2d 20 31 2c | 20 72 65 62 75 69 6c 64 |Row - 1,| rebuild|
|00002cb0| 73 20 74 68 65 20 68 65 | 61 70 20 66 6f 72 20 4d |s the he|ap for M|
|00002cc0| 61 78 52 6f 77 20 2d 20 | 32 2c 20 61 6e 64 20 63 |axRow - |2, and c|
|00002cd0| 6f 6e 74 69 6e 75 65 73 | 20 69 6e 20 74 68 69 73 |ontinues| in this|
|00002ce0| 20 77 61 79 00 00 00 97 | 00 1e 00 00 00 20 20 75 | way....|..... u|
|00002cf0| 6e 74 69 6c 20 74 68 65 | 20 61 72 72 61 79 20 69 |ntil the| array i|
|00002d00| 73 20 73 6f 72 74 65 64 | 2e 00 00 97 00 06 00 00 |s sorted|........|
|00002d10| 00 20 0d 4c 3d 00 00 97 | 00 02 00 00 00 00 00 76 |. .L=...|.......v|
|00002d20| 00 06 00 23 01 00 01 00 | 00 00 0c 0b 00 26 03 64 |...#....|.....&.d|
|00002d30| 09 0b 00 72 02 56 00 ff | ff ff ff 00 18 0b 00 26 |...r.V..|.......&|
|00002d40| 03 38 00 01 00 6b 01 00 | 0c 0b 00 26 03 66 00 ff |.8...k..|...&.f..|
|00002d50| ff ff ff 00 00 00 0c 0b | 00 26 03 0b 00 72 02 64 |........|.&...r.d|
|00002d60| 09 64 05 78 01 57 00 ff | ff ff ff 00 18 64 05 0e |.d.x.W..|.....d..|
|00002d70| 00 01 00 7c 02 0b 00 26 | 03 0e 00 01 00 7c 02 ed |...|...&|.....|..|
|00002d80| 00 ff ff 00 18 64 05 0b | 00 26 03 38 00 02 00 d5 |.....d..|.&.8....|
|00002d90| 01 00 18 0b 00 26 03 64 | 05 77 01 38 00 01 00 4e |.....&.d|.w.8...N|
|00002da0| 01 00 0c 0b 00 26 03 66 | 00 ff ff ff ff 00 00 51 |.....&.f|.......Q|
|00002db0| 00 09 00 08 00 ff ff 04 | 00 ff ff ff ff 28 00 00 |........|.....(..|
|00002dc0| 00 ff ff 02 0c 00 0a 00 | 49 6e 69 74 69 61 6c 69 |........|Initiali|
|00002dd0| 7a 65 01 00 b8 a6 06 00 | 00 1b 00 ff ff c1 ff ff |ze......|........|
|00002de0| ff 00 00 97 00 15 00 00 | 00 20 0d 1e 3d 20 49 6e |........|. ..= In|
|00002df0| 69 74 69 61 6c 69 7a 65 | 20 0d 22 3d 00 00 00 97 |itialize| ."=....|
|00002e00| 00 4a 00 00 00 0d 04 20 | 49 6e 69 74 69 61 6c 69 |.J..... |Initiali|
|00002e10| 7a 65 73 20 74 68 65 20 | 53 6f 72 74 42 61 63 6b |zes the |SortBack|
|00002e20| 75 70 20 61 6e 64 20 4f | 70 74 69 6f 6e 54 69 74 |up and O|ptionTit|
|00002e30| 6c 65 20 61 72 72 61 79 | 73 2e 20 20 49 74 20 61 |le array|s. It a|
|00002e40| 6c 73 6f 20 63 61 6c 6c | 73 20 74 68 65 00 00 97 |lso call|s the...|
|00002e50| 00 33 00 00 00 0d 04 20 | 43 68 65 63 6b 53 63 72 |.3..... |CheckScr|
|00002e60| 65 65 6e 2c 20 42 6f 78 | 49 6e 69 74 2c 20 61 6e |een, Box|Init, an|
|00002e70| 64 20 52 61 6e 64 49 6e | 74 25 20 70 72 6f 63 65 |d RandIn|t% proce|
|00002e80| 64 75 72 65 73 2e 61 00 | 00 97 00 06 00 00 00 20 |dures.a.|....... |
|00002e90| 0d 4c 3d 00 00 97 00 02 | 00 00 00 00 00 76 00 06 |.L=.....|.....v..|
|00002ea0| 00 2f 01 00 01 00 00 00 | 0c 7d 01 ff ff 64 05 0b |./......|.}...d..|
|00002eb0| 00 72 02 10 00 02 00 a5 | 03 00 00 00 0c 38 00 00 |.r......|.....8..|
|00002ec0| 00 a8 00 97 00 24 00 20 | 00 20 43 68 65 63 6b 20 |.....$. |. Check |
|00002ed0| 66 6f 72 20 4d 47 41 2c | 20 45 47 41 20 6f 72 20 |for MGA,| EGA or |
|00002ee0| 56 47 41 20 61 6e 64 20 | 73 65 74 01 00 20 00 97 |VGA and |set.. ..|
|00002ef0| 00 20 00 20 00 20 6d 61 | 78 69 6d 75 6d 20 6e 75 |. . . ma|ximum nu|
|00002f00| 6d 62 65 72 20 6f 66 20 | 74 65 78 74 20 6c 69 6e |mber of |text lin|
|00002f10| 65 73 2e 00 0c 0b 00 26 | 03 64 05 0b 00 72 02 56 |es.....&|.d...r.V|
|00002f20| 00 ff ff ff ff 00 18 0b | 00 26 03 0b 00 26 03 0f |........|.&...&..|
|00002f30| 00 01 00 a5 03 00 0c 0b | 00 26 03 66 00 ff ff ff |........|.&.f....|
|00002f40| ff 00 00 00 0c 0b 00 72 | 02 0c 00 b2 03 00 00 00 |.......r|........|
|00002f50| 0c 56 01 e1 00 97 00 24 | 00 20 00 20 53 65 65 64 |.V.....$|. . Seed|
|00002f60| 20 74 68 65 20 72 61 6e | 64 6f 6d 2d 6e 75 6d 62 | the ran|dom-numb|
|00002f70| 65 72 20 67 65 6e 65 72 | 61 74 6f 72 2e 00 0c 0b |er gener|ator....|
|00002f80| 00 26 03 64 05 0b 00 72 | 02 56 00 ff ff ff ff 00 |.&.d...r|.V......|
|00002f90| 00 00 18 97 00 40 00 06 | 00 20 43 61 6c 6c 20 52 |.....@..|. Call R|
|00002fa0| 61 6e 64 49 6e 74 25 20 | 74 6f 20 66 69 6e 64 20 |andInt% |to find |
|00002fb0| 61 20 72 61 6e 64 6f 6d | 20 65 6c 65 6d 65 6e 74 |a random| element|
|00002fc0| 20 69 6e 20 54 65 6d 70 | 41 72 72 61 79 20 62 65 | in Temp|Array be|
|00002fd0| 74 77 65 65 6e 20 31 00 | 18 97 00 44 00 06 00 20 |tween 1.|...D... |
|00002fe0| 61 6e 64 20 4d 61 78 49 | 6e 64 65 78 2c 20 74 68 |and MaxI|ndex, th|
|00002ff0| 65 6e 20 61 73 73 69 67 | 6e 20 74 68 65 20 76 61 |en assig|n the va|
|00003000| 6c 75 65 20 69 6e 20 74 | 68 61 74 20 65 6c 65 6d |lue in t|hat elem|
|00003010| 65 6e 74 20 74 6f 20 42 | 61 72 4c 65 6e 67 74 68 |ent to B|arLength|
|00003020| 3a 00 18 64 05 0b 00 b2 | 03 0e 04 02 00 60 00 0c |:..d....|.....`..|
|00003030| 00 be 03 00 18 0b 00 be | 03 0e 00 01 00 a5 03 0c |........|........|
|00003040| 00 c7 03 00 00 00 18 97 | 00 3c 00 06 00 20 4f 76 |........|.<... Ov|
|00003050| 65 72 77 72 69 74 65 20 | 74 68 65 20 76 61 6c 75 |erwrite |the valu|
|00003060| 65 20 69 6e 20 54 65 6d | 70 41 72 72 61 79 28 49 |e in Tem|pArray(I|
|00003070| 6e 64 65 78 29 20 77 69 | 74 68 20 74 68 65 20 76 |ndex) wi|th the v|
|00003080| 61 6c 75 65 20 69 6e 00 | 18 97 00 3a 00 06 00 20 |alue in.|...:... |
|00003090| 54 65 6d 70 41 72 72 61 | 79 28 4d 61 78 49 6e 64 |TempArra|y(MaxInd|
|000030a0| 65 78 29 20 73 6f 20 74 | 68 65 20 76 61 6c 75 65 |ex) so t|he value|
|000030b0| 20 69 6e 20 54 65 6d 70 | 41 72 72 61 79 28 49 6e | in Temp|Array(In|
|000030c0| 64 65 78 29 20 69 73 00 | 18 97 00 14 00 06 00 20 |dex) is.|....... |
|000030d0| 63 68 6f 73 65 6e 20 6f | 6e 6c 79 20 6f 6e 63 65 |chosen o|nly once|
|000030e0| 3a 00 18 0b 00 b2 03 0e | 00 01 00 a5 03 0b 00 be |:.......|........|
|000030f0| 03 0f 00 01 00 a5 03 00 | 00 00 18 97 00 43 00 06 |........|.....C..|
|00003100| 00 20 44 65 63 72 65 61 | 73 65 20 74 68 65 20 76 |. Decrea|se the v|
|00003110| 61 6c 75 65 20 6f 66 20 | 4d 61 78 49 6e 64 65 78 |alue of |MaxIndex|
|00003120| 20 73 6f 20 74 68 61 74 | 20 54 65 6d 70 41 72 72 | so that| TempArr|
|00003130| 61 79 28 4d 61 78 49 6e | 64 65 78 29 20 63 61 6e |ay(MaxIn|dex) can|
|00003140| 27 74 3a 00 18 97 00 2f | 00 06 00 20 62 65 20 63 |'t:..../|... be c|
|00003150| 68 6f 73 65 6e 20 6f 6e | 20 74 68 65 20 6e 65 78 |hosen on| the nex|
|00003160| 74 20 70 61 73 73 20 74 | 68 72 6f 75 67 68 20 74 |t pass t|hrough t|
|00003170| 68 65 20 6c 6f 6f 70 3a | 72 00 18 0b 00 b2 03 64 |he loop:|r......d|
|00003180| 05 77 01 0c 00 b2 03 00 | 00 00 18 97 00 40 00 06 |.w......|.....@..|
|00003190| 00 20 41 73 73 69 67 6e | 20 74 68 65 20 42 61 72 |. Assign| the Bar|
|000031a0| 4c 65 6e 67 74 68 20 76 | 61 6c 75 65 20 74 6f 20 |Length v|alue to |
|000031b0| 74 68 65 20 2e 4c 65 6e | 67 74 68 20 65 6c 65 6d |the .Len|gth elem|
|000031c0| 65 6e 74 2c 20 74 68 65 | 6e 20 73 74 6f 72 65 00 |ent, the|n store.|
|000031d0| 18 97 00 3e 00 06 00 20 | 61 20 73 74 72 69 6e 67 |...>... |a string|
|000031e0| 20 6f 66 20 42 61 72 4c | 65 6e 67 74 68 20 62 6c | of BarL|ength bl|
|000031f0| 6f 63 6b 20 63 68 61 72 | 61 63 74 65 72 73 20 a2 |ock char|acters .|
|00003200| 67 20 69 6e 20 74 68 65 | 20 2e 42 61 72 53 74 72 |g in the| .BarStr|
|00003210| 69 6e 67 00 18 97 00 0b | 00 06 00 20 65 6c 65 6d |ing.....|... elem|
|00003220| 65 6e 74 3a 20 00 18 6d | 01 02 00 a2 67 0c 14 d4 |ent: ..m|....g...|
|00003230| 03 00 18 0b 00 c7 03 0b | 00 26 03 0e 00 01 00 89 |........|.&......|
|00003240| 02 12 00 16 02 00 18 0b | 00 c7 03 0b 14 d4 03 53 |........|.......S|
|00003250| 01 0b 00 26 03 0e 00 01 | 00 89 02 12 00 2c 02 00 |...&....|.....,..|
|00003260| 00 00 18 97 00 3e 00 06 | 00 20 53 74 6f 72 65 20 |.....>..|. Store |
|00003270| 74 68 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |the appr|opriate |
|00003280| 63 6f 6c 6f 72 20 76 61 | 6c 75 65 20 69 6e 20 74 |color va|lue in t|
|00003290| 68 65 20 2e 43 6f 6c 6f | 72 56 61 6c 20 65 6c 65 |he .Colo|rVal ele|
|000032a0| 6d 65 6e 74 3a 00 18 0b | 00 05 03 64 09 5f 01 61 |ment:...|...d._.a|
|000032b0| 00 00 00 00 24 0b 00 c7 | 03 0b 00 05 03 6f 01 6e |....$...|.....o.n|
|000032c0| 01 64 05 00 01 0b 00 26 | 03 0e 00 01 00 89 02 12 |.d.....&|........|
|000032d0| 00 20 02 00 18 49 00 ff | ff 00 24 0b 00 05 03 0b |. ...I..|..$.....|
|000032e0| 00 26 03 0e 00 01 00 89 | 02 12 00 20 02 00 18 50 |.&......|... ...P|
|000032f0| 00 00 0c 0b 00 26 03 66 | 00 ff ff ff ff 00 00 00 |.....&.f|........|
|00003300| 0c 0b 00 26 03 64 05 0b | 00 58 02 56 00 ff ff ff |...&.d..|.X.V....|
|00003310| ff 97 00 28 00 20 00 20 | 52 65 61 64 20 53 4f 52 |...(. . |Read SOR|
|00003320| 54 20 44 45 4d 4f 20 6d | 65 6e 75 20 6f 70 74 69 |T DEMO m|enu opti|
|00003330| 6f 6e 73 20 61 6e 64 20 | 73 74 6f 72 65 00 18 0b |ons and |store...|
|00003340| 00 26 03 0e 00 01 00 97 | 02 e2 00 97 00 21 00 20 |.&......|.....!. |
|00003350| 00 20 74 68 65 6d 20 69 | 6e 20 74 68 65 20 4f 70 |. them i|n the Op|
|00003360| 74 69 6f 6e 54 69 74 6c | 65 20 61 72 72 61 79 2e |tionTitl|e array.|
|00003370| 73 00 0c 0b 00 26 03 66 | 00 ff ff ff ff 00 00 00 |s....&.f|........|
|00003380| 0c 73 01 a3 00 00 0c 38 | 00 00 00 ac 01 97 00 34 |.s.....8|.......4|
|00003390| 00 18 00 20 41 73 73 69 | 67 6e 20 76 61 6c 75 65 |... Assi|gn value|
|000033a0| 73 20 69 6e 20 53 6f 72 | 74 42 61 63 6b 75 70 20 |s in Sor|tBackup |
|000033b0| 74 6f 20 53 6f 72 74 41 | 72 72 61 79 20 61 6e 64 |to SortA|rray and|
|000033c0| 20 64 72 61 77 00 60 97 | 00 1f 00 18 00 20 75 6e | draw.`.|..... un|
|000033d0| 73 6f 72 74 65 64 20 62 | 61 72 73 20 6f 6e 20 74 |sorted b|ars on t|
|000033e0| 68 65 20 73 63 72 65 65 | 6e 2e 61 00 0c 0b 00 39 |he scree|n.a....9|
|000033f0| 02 0c 00 cf 02 00 0c 64 | 09 0c 00 da 02 97 00 34 |.......d|.......4|
|00003400| 00 18 00 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 50 |... Init|ialize P|
|00003410| 61 75 73 65 20 74 6f 20 | 32 20 63 6c 6f 63 6b 20 |ause to |2 clock |
|00003420| 74 69 63 6b 73 20 28 40 | 20 31 2f 39 20 73 65 63 |ticks (@| 1/9 sec|
|00003430| 6f 6e 64 29 2e 00 0c 38 | 00 00 00 8f 00 97 00 32 |ond)...8|.......2|
|00003440| 00 18 00 20 44 72 61 77 | 20 66 72 61 6d 65 20 66 |... Draw| frame f|
|00003450| 6f 72 20 74 68 65 20 73 | 6f 72 74 20 6d 65 6e 75 |or the s|ort menu|
|00003460| 20 61 6e 64 20 70 72 69 | 6e 74 20 6f 70 74 69 6f | and pri|nt optio|
|00003470| 6e 73 2e 00 00 00 00 51 | 00 09 00 08 00 ff ff 04 |ns.....Q|........|
|00003480| 00 ff ff ff ff 3d 00 00 | 00 ff ff 02 0c 00 0d 00 |.....=..|........|
|00003490| 49 6e 73 65 72 74 69 6f | 6e 53 6f 72 74 01 00 b8 |Insertio|nSort...|
|000034a0| 06 04 00 00 1b 00 ff ff | c1 ff ff ff 00 00 97 00 |........|........|
|000034b0| 18 00 00 00 20 0d 1d 3d | 20 49 6e 73 65 72 74 69 |.... ..=| Inserti|
|000034c0| 6f 6e 53 6f 72 74 20 0d | 20 3d 00 00 97 00 47 00 |onSort .| =....G.|
|000034d0| 00 00 20 20 20 54 68 65 | 20 49 6e 73 65 72 74 69 |.. The| Inserti|
|000034e0| 6f 6e 53 6f 72 74 20 70 | 72 6f 63 65 64 75 72 65 |onSort p|rocedure|
|000034f0| 20 63 6f 6d 70 61 72 65 | 73 20 74 68 65 20 6c 65 | compare|s the le|
|00003500| 6e 67 74 68 20 6f 66 20 | 65 61 63 68 20 73 75 63 |ngth of |each suc|
|00003510| 63 65 73 73 69 76 65 3d | 00 00 97 00 49 00 00 00 |cessive=|....I...|
|00003520| 20 20 20 65 6c 65 6d 65 | 6e 74 20 69 6e 20 53 6f | eleme|nt in So|
|00003530| 72 74 41 72 72 61 79 20 | 77 69 74 68 20 74 68 65 |rtArray |with the|
|00003540| 20 6c 65 6e 67 74 68 73 | 20 6f 66 20 61 6c 6c 20 | lengths| of all |
|00003550| 74 68 65 20 70 72 65 63 | 65 64 69 6e 67 20 65 6c |the prec|eding el|
|00003560| 65 6d 65 6e 74 73 2e 00 | 00 00 97 00 4b 00 00 00 |ements..|....K...|
|00003570| 20 20 20 57 68 65 6e 20 | 74 68 65 20 70 72 6f 63 | When |the proc|
|00003580| 65 64 75 72 65 20 66 69 | 6e 64 73 20 74 68 65 20 |edure fi|nds the |
|00003590| 61 70 70 72 6f 70 72 69 | 61 74 65 20 70 6c 61 63 |appropri|ate plac|
|000035a0| 65 20 66 6f 72 20 74 68 | 65 20 6e 65 77 20 65 6c |e for th|e new el|
|000035b0| 65 6d 65 6e 74 2c 20 69 | 74 00 00 00 97 00 4b 00 |ement, i|t.....K.|
|000035c0| 00 00 20 20 20 69 6e 73 | 65 72 74 73 20 74 68 65 |.. ins|erts the|
|000035d0| 20 65 6c 65 6d 65 6e 74 | 20 69 6e 20 69 74 73 20 | element| in its |
|000035e0| 6e 65 77 20 70 6c 61 63 | 65 2c 20 61 6e 64 20 6d |new plac|e, and m|
|000035f0| 6f 76 65 73 20 61 6c 6c | 20 74 68 65 20 6f 74 68 |oves all| the oth|
|00003600| 65 72 20 65 6c 65 6d 65 | 6e 74 73 00 00 00 97 00 |er eleme|nts.....|
|00003610| 14 00 00 00 20 20 20 64 | 6f 77 6e 20 6f 6e 65 20 |.... d|own one |
|00003620| 70 6c 61 63 65 2e 00 00 | 97 00 06 00 00 00 20 0d |place...|...... .|
|00003630| 4c 3d 00 00 97 00 02 00 | 00 00 00 00 76 00 06 00 |L=......|....v...|
|00003640| 3d 01 00 01 00 00 00 0c | 7d 01 ff ff 15 00 0a 02 |=.......|}.......|
|00003650| 0f 00 0d 00 dd 03 00 0c | 0b 00 89 01 64 09 0b 00 |........|....d...|
|00003660| 72 02 56 00 ff ff ff ff | 00 18 0b 00 89 01 0e 00 |r.V.....|........|
|00003670| 01 00 7c 02 0c 00 dd 03 | 00 18 0b 00 dd 03 11 00 |..|.....|........|
|00003680| 16 02 0c 00 e8 03 00 18 | 0b 00 a0 03 0b 00 89 01 |........|........|
|00003690| 64 09 64 05 78 01 57 00 | ff ff ff ff 00 00 00 24 |d.d.x.W.|.......$|
|000036a0| 97 00 41 00 09 00 20 41 | 73 20 6c 6f 6e 67 20 61 |..A... A|s long a|
|000036b0| 73 20 74 68 65 20 6c 65 | 6e 67 74 68 20 6f 66 20 |s the le|ngth of |
|000036c0| 74 68 65 20 4a 2d 31 73 | 74 20 65 6c 65 6d 65 6e |the J-1s|t elemen|
|000036d0| 74 20 69 73 20 67 72 65 | 61 74 65 72 20 74 68 61 |t is gre|ater tha|
|000036e0| 6e 20 74 68 65 3d 00 24 | 97 00 42 00 09 00 20 6c |n the=.$|..B... l|
|000036f0| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 20 6f 72 69 |ength of| the ori|
|00003700| 67 69 6e 61 6c 20 65 6c | 65 6d 65 6e 74 20 69 6e |ginal el|ement in|
|00003710| 20 53 6f 72 74 41 72 72 | 61 79 28 52 6f 77 29 2c | SortArr|ay(Row),|
|00003720| 20 6b 65 65 70 20 73 68 | 69 66 74 69 6e 67 00 24 | keep sh|ifting.$|
|00003730| 97 00 1b 00 09 00 20 74 | 68 65 20 61 72 72 61 79 |...... t|he array|
|00003740| 20 65 6c 65 6d 65 6e 74 | 73 20 64 6f 77 6e 3a 6c | element|s down:l|
|00003750| 00 24 0b 00 a0 03 64 05 | 77 01 0e 00 01 00 7c 02 |.$....d.|w.....|.|
|00003760| 11 00 16 02 0b 00 e8 03 | 5f 01 61 00 00 00 00 30 |........|_.a....0|
|00003770| 0b 00 a0 03 64 05 77 01 | 0e 00 01 00 7c 02 0b 00 |....d.w.|....|...|
|00003780| a0 03 0f 00 01 00 7c 02 | 00 30 0b 00 a0 03 38 00 |......|.|.0....8.|
|00003790| 01 00 7a 01 97 00 15 00 | 28 00 20 50 72 69 6e 74 |..z.....|(. Print|
|000037a0| 20 74 68 65 20 6e 65 77 | 20 62 61 72 2e 00 00 30 | the new| bar...0|
|000037b0| 0b 00 a0 03 38 00 01 00 | f6 00 97 00 1a 00 28 00 |....8...|......(.|
|000037c0| 20 50 72 69 6e 74 20 74 | 68 65 20 65 6c 61 70 73 | Print t|he elaps|
|000037d0| 65 64 20 74 69 6d 65 2e | 00 00 00 24 97 00 27 00 |ed time.|...$..'.|
|000037e0| 09 00 20 4f 74 68 65 72 | 77 69 73 65 2c 20 65 78 |.. Other|wise, ex|
|000037f0| 69 74 20 74 68 65 20 46 | 4f 52 2e 2e 2e 4e 45 58 |it the F|OR...NEX|
|00003800| 54 20 6c 6f 6f 70 3a 72 | 00 24 49 00 ff ff 00 30 |T loop:r|.$I....0|
|00003810| 54 00 ff ff 00 24 50 00 | 00 18 0b 00 a0 03 66 00 |T....$P.|......f.|
|00003820| ff ff ff ff 00 00 00 18 | 97 00 3f 00 06 00 20 49 |........|..?... I|
|00003830| 6e 73 65 72 74 20 74 68 | 65 20 6f 72 69 67 69 6e |nsert th|e origin|
|00003840| 61 6c 20 76 61 6c 75 65 | 20 6f 66 20 53 6f 72 74 |al value| of Sort|
|00003850| 41 72 72 61 79 28 52 6f | 77 29 20 69 6e 20 53 6f |Array(Ro|w) in So|
|00003860| 72 74 41 72 72 61 79 28 | 4a 29 3a 69 00 18 0b 00 |rtArray(|J):i....|
|00003870| dd 03 0b 00 a0 03 0f 00 | 01 00 7c 02 00 18 0b 00 |........|..|.....|
|00003880| a0 03 38 00 01 00 7a 01 | 00 18 0b 00 a0 03 38 00 |..8...z.|......8.|
|00003890| 01 00 f6 00 00 0c 0b 00 | 89 01 66 00 ff ff ff ff |........|..f.....|
|000038a0| 00 00 51 00 09 00 08 00 | ff ff 04 00 ff ff ff ff |..Q.....|........|
|000038b0| 24 00 00 00 ff ff 02 0c | 00 0d 00 50 65 72 63 6f |$.......|...Perco|
|000038c0| 6c 61 74 65 44 6f 77 6e | 01 00 b8 3e 04 00 00 1b |lateDown|...>....|
|000038d0| 00 ff ff c1 ff ff ff 00 | 00 97 00 18 00 00 00 20 |........|....... |
|000038e0| 0d 1c 3d 20 50 65 72 63 | 6f 6c 61 74 65 44 6f 77 |..= Perc|olateDow|
|000038f0| 6e 20 0d 21 3d 00 00 97 | 00 4d 00 00 00 20 20 20 |n .!=...|.M... |
|00003900| 54 68 65 20 50 65 72 63 | 6f 6c 61 74 65 44 6f 77 |The Perc|olateDow|
|00003910| 6e 20 70 72 6f 63 65 64 | 75 72 65 20 72 65 73 74 |n proced|ure rest|
|00003920| 6f 72 65 73 20 74 68 65 | 20 65 6c 65 6d 65 6e 74 |ores the| element|
|00003930| 73 20 6f 66 20 53 6f 72 | 74 41 72 72 61 79 20 66 |s of Sor|tArray f|
|00003940| 72 6f 6d 20 31 20 74 6f | 3d 00 00 97 00 48 00 00 |rom 1 to|=....H..|
|00003950| 00 20 20 20 4d 61 78 4c | 65 76 65 6c 20 74 6f 20 |. MaxL|evel to |
|00003960| 61 20 22 68 65 61 70 22 | 20 28 73 65 65 20 74 68 |a "heap"| (see th|
|00003970| 65 20 64 69 61 67 72 61 | 6d 20 77 69 74 68 20 74 |e diagra|m with t|
|00003980| 68 65 20 48 65 61 70 53 | 6f 72 74 20 70 72 6f 63 |he HeapS|ort proc|
|00003990| 65 64 75 72 65 29 2e 00 | 00 97 00 06 00 00 00 20 |edure)..|....... |
|000039a0| 0d 4c 3d 00 00 97 00 02 | 00 00 00 00 00 76 00 0c |.L=.....|.....v..|
|000039b0| 00 4e 01 00 01 01 00 5f | 01 00 00 01 00 00 0c 64 |.N....._|.......d|
|000039c0| 05 0c 00 26 03 00 00 00 | 0c 97 00 3c 00 03 00 20 |...&....|...<... |
|000039d0| 4d 6f 76 65 20 74 68 65 | 20 76 61 6c 75 65 20 69 |Move the| value i|
|000039e0| 6e 20 53 6f 72 74 41 72 | 72 61 79 28 31 29 20 64 |n SortAr|ray(1) d|
|000039f0| 6f 77 6e 20 74 68 65 20 | 68 65 61 70 20 75 6e 74 |own the |heap unt|
|00003a00| 69 6c 20 69 74 20 68 61 | 73 00 0c 97 00 45 00 03 |il it ha|s....E..|
|00003a10| 00 20 72 65 61 63 68 65 | 64 20 69 74 73 20 70 72 |. reache|d its pr|
|00003a20| 6f 70 65 72 20 6e 6f 64 | 65 20 28 74 68 61 74 20 |oper nod|e (that |
|00003a30| 69 73 2c 20 75 6e 74 69 | 6c 20 69 74 20 69 73 20 |is, unti|l it is |
|00003a40| 6c 65 73 73 20 74 68 61 | 6e 20 69 74 73 20 70 61 |less tha|n its pa|
|00003a50| 72 65 6e 74 3d 00 0c 97 | 00 4a 00 03 00 20 6e 6f |rent=...|.J... no|
|00003a60| 64 65 20 6f 72 20 75 6e | 74 69 6c 20 69 74 20 68 |de or un|til it h|
|00003a70| 61 73 20 72 65 61 63 68 | 65 64 20 4d 61 78 4c 65 |as reach|ed MaxLe|
|00003a80| 76 65 6c 2c 20 74 68 65 | 20 62 6f 74 74 6f 6d 20 |vel, the| bottom |
|00003a90| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 68 |of the c|urrent h|
|00003aa0| 65 61 70 29 3a 00 0c 46 | 00 00 18 64 09 0b 00 26 |eap):..F|...d...&|
|00003ab0| 03 70 01 0c 00 12 04 97 | 00 28 00 20 00 20 47 65 |.p......|.(. . Ge|
|00003ac0| 74 20 74 68 65 20 73 75 | 62 73 63 72 69 70 74 20 |t the su|bscript |
|00003ad0| 66 6f 72 20 74 68 65 20 | 63 68 69 6c 64 20 6e 6f |for the |child no|
|00003ae0| 64 65 2e 00 00 00 18 97 | 00 3a 00 06 00 20 52 65 |de......|.:... Re|
|00003af0| 61 63 68 65 64 20 74 68 | 65 20 62 6f 74 74 6f 6d |ached th|e bottom|
|00003b00| 20 6f 66 20 74 68 65 20 | 68 65 61 70 2c 20 73 6f | of the |heap, so|
|00003b10| 20 65 78 69 74 20 74 68 | 69 73 20 70 72 6f 63 65 | exit th|is proce|
|00003b20| 64 75 72 65 3a 00 18 0b | 00 12 04 0b 00 5f 01 5f |dure:...|....._._|
|00003b30| 01 5d 00 00 00 53 00 ff | ff 00 00 00 18 97 00 3e |.]...S..|.......>|
|00003b40| 00 06 00 20 49 66 20 74 | 68 65 72 65 20 61 72 65 |... If t|here are|
|00003b50| 20 74 77 6f 20 63 68 69 | 6c 64 20 6e 6f 64 65 73 | two chi|ld nodes|
|00003b60| 2c 20 66 69 6e 64 20 6f | 75 74 20 77 68 69 63 68 |, find o|ut which|
|00003b70| 20 6f 6e 65 20 69 73 20 | 62 69 67 67 65 72 3a 00 | one is |bigger:.|
|00003b80| 18 0b 00 12 04 64 05 00 | 01 0b 00 5f 01 62 01 61 |.....d..|..._.b.a|
|00003b90| 00 00 00 00 24 0b 00 12 | 04 64 05 00 01 0e 00 01 |....$...|.d......|
|00003ba0| 00 7c 02 11 00 16 02 0b | 00 12 04 0e 00 01 00 7c |.|......|.......||
|00003bb0| 02 11 00 16 02 5f 01 61 | 00 00 00 00 30 0b 00 12 |....._.a|....0...|
|00003bc0| 04 64 05 00 01 0c 00 12 | 04 00 24 50 00 00 18 50 |.d......|..$P...P|
|00003bd0| 00 00 00 00 18 97 00 43 | 00 06 00 20 4d 6f 76 65 |.......C|... Move|
|00003be0| 20 74 68 65 20 76 61 6c | 75 65 20 64 6f 77 6e 20 | the val|ue down |
|00003bf0| 69 66 20 69 74 20 69 73 | 20 73 74 69 6c 6c 20 6e |if it is| still n|
|00003c00| 6f 74 20 62 69 67 67 65 | 72 20 74 68 61 6e 20 65 |ot bigge|r than e|
|00003c10| 69 74 68 65 72 20 6f 6e | 65 20 6f 66 20 00 18 97 |ither on|e of ...|
|00003c20| 00 10 00 06 00 20 69 74 | 73 20 63 68 69 6c 64 72 |..... it|s childr|
|00003c30| 65 6e 3a 00 18 0b 00 26 | 03 0e 00 01 00 7c 02 11 |en:....&|.....|..|
|00003c40| 00 16 02 0b 00 12 04 0e | 00 01 00 7c 02 11 00 16 |........|...|....|
|00003c50| 02 63 01 61 00 00 00 00 | 24 0b 00 26 03 0e 00 01 |.c.a....|$..&....|
|00003c60| 00 7c 02 0b 00 12 04 0e | 00 01 00 7c 02 ed 00 ff |.|......|...|....|
|00003c70| ff 00 24 0b 00 26 03 0b | 00 12 04 38 00 02 00 d5 |..$..&..|...8....|
|00003c80| 01 00 24 0b 00 12 04 0c | 00 26 03 00 00 00 18 97 |..$.....|.&......|
|00003c90| 00 47 00 06 00 20 4f 74 | 68 65 72 77 69 73 65 2c |.G... Ot|herwise,|
|00003ca0| 20 53 6f 72 74 41 72 72 | 61 79 20 68 61 73 20 62 | SortArr|ay has b|
|00003cb0| 65 65 6e 20 72 65 73 74 | 6f 72 65 64 20 74 6f 20 |een rest|ored to |
|00003cc0| 61 20 68 65 61 70 20 66 | 72 6f 6d 20 31 20 74 6f |a heap f|rom 1 to|
|00003cd0| 20 4d 61 78 4c 65 76 65 | 6c 2c 70 00 18 97 00 0b | MaxLeve|l,p.....|
|00003ce0| 00 06 00 20 73 6f 20 65 | 78 69 74 3a 65 00 18 49 |... so e|xit:e..I|
|00003cf0| 00 ff ff 00 24 53 00 ff | ff 00 18 50 00 00 0c 62 |....$S..|...P...b|
|00003d00| 00 ff ff 00 00 51 00 09 | 00 08 00 ff ff 04 00 ff |.....Q..|........|
|00003d10| ff ff ff 27 00 00 00 ff | ff 02 0c 00 0b 00 50 65 |...'....|......Pe|
|00003d20| 72 63 6f 6c 61 74 65 55 | 70 01 00 b8 8c 03 00 00 |rcolateU|p.......|
|00003d30| 1b 00 ff ff c1 ff ff ff | 00 00 97 00 16 00 00 00 |........|........|
|00003d40| 20 0d 1e 3d 20 50 65 72 | 63 6f 6c 61 74 65 55 70 | ..= Per|colateUp|
|00003d50| 20 0d 21 3d 00 00 97 00 | 4a 00 00 00 20 20 20 54 | .!=....|J... T|
|00003d60| 68 65 20 50 65 72 63 6f | 6c 61 74 65 55 70 20 70 |he Perco|lateUp p|
|00003d70| 72 6f 63 65 64 75 72 65 | 20 63 6f 6e 76 65 72 74 |rocedure| convert|
|00003d80| 73 20 74 68 65 20 65 6c | 65 6d 65 6e 74 73 20 66 |s the el|ements f|
|00003d90| 72 6f 6d 20 31 20 74 6f | 20 4d 61 78 4c 65 76 65 |rom 1 to| MaxLeve|
|00003da0| 6c 20 69 6e 00 00 97 00 | 4b 00 00 00 20 20 20 53 |l in....|K... S|
|00003db0| 6f 72 74 41 72 72 61 79 | 20 69 6e 74 6f 20 61 20 |ortArray| into a |
|00003dc0| 22 68 65 61 70 22 20 28 | 73 65 65 20 74 68 65 20 |"heap" (|see the |
|00003dd0| 64 69 61 67 72 61 6d 20 | 77 69 74 68 20 74 68 65 |diagram |with the|
|00003de0| 20 48 65 61 70 53 6f 72 | 74 20 70 72 6f 63 65 64 | HeapSor|t proced|
|00003df0| 75 72 65 29 2e 00 00 00 | 97 00 06 00 00 00 20 0d |ure)....|...... .|
|00003e00| 4c 3d 00 00 97 00 02 00 | 00 00 00 00 76 00 0c 00 |L=......|....v...|
|00003e10| 6b 01 00 01 01 00 5f 01 | 00 00 01 00 00 0c 0b 00 |k....._.|........|
|00003e20| 5f 01 0c 00 26 03 00 00 | 00 0c 97 00 41 00 03 00 |_...&...|....A...|
|00003e30| 20 4d 6f 76 65 20 74 68 | 65 20 76 61 6c 75 65 20 | Move th|e value |
|00003e40| 69 6e 20 53 6f 72 74 41 | 72 72 61 79 28 4d 61 78 |in SortA|rray(Max|
|00003e50| 4c 65 76 65 6c 29 20 75 | 70 20 74 68 65 20 68 65 |Level) u|p the he|
|00003e60| 61 70 20 75 6e 74 69 6c | 20 69 74 20 68 61 73 3d |ap until| it has=|
|00003e70| 00 0c 97 00 44 00 03 00 | 20 72 65 61 63 68 65 64 |....D...| reached|
|00003e80| 20 69 74 73 20 70 72 6f | 70 65 72 20 6e 6f 64 65 | its pro|per node|
|00003e90| 20 28 74 68 61 74 20 69 | 73 2c 20 75 6e 74 69 6c | (that i|s, until|
|00003ea0| 20 69 74 20 69 73 20 67 | 72 65 61 74 65 72 20 74 | it is g|reater t|
|00003eb0| 68 61 6e 20 65 69 74 68 | 65 72 00 0c 97 00 47 00 |han eith|er....G.|
|00003ec0| 03 00 20 6f 66 20 69 74 | 73 20 63 68 69 6c 64 20 |.. of it|s child |
|00003ed0| 6e 6f 64 65 73 2c 20 6f | 72 20 75 6e 74 69 6c 20 |nodes, o|r until |
|00003ee0| 69 74 20 68 61 73 20 72 | 65 61 63 68 65 64 20 31 |it has r|eached 1|
|00003ef0| 2c 20 74 68 65 20 74 6f | 70 20 6f 66 20 74 68 65 |, the to|p of the|
|00003f00| 20 68 65 61 70 29 3a 3d | 00 0c 0b 00 26 03 64 05 | heap):=|....&.d.|
|00003f10| 03 01 47 00 ff ff 00 18 | 0b 00 26 03 64 09 60 01 |..G.....|..&.d.`.|
|00003f20| 0c 00 1b 04 97 00 29 00 | 20 00 20 47 65 74 20 74 |......).| . Get t|
|00003f30| 68 65 20 73 75 62 73 63 | 72 69 70 74 20 66 6f 72 |he subsc|ript for|
|00003f40| 20 74 68 65 20 70 61 72 | 65 6e 74 20 6e 6f 64 65 | the par|ent node|
|00003f50| 2e 20 00 00 00 18 97 00 | 42 00 06 00 20 54 68 65 |. ......|B... The|
|00003f60| 20 76 61 6c 75 65 20 61 | 74 20 74 68 65 20 63 75 | value a|t the cu|
|00003f70| 72 72 65 6e 74 20 6e 6f | 64 65 20 69 73 20 73 74 |rrent no|de is st|
|00003f80| 69 6c 6c 20 62 69 67 67 | 65 72 20 74 68 61 6e 20 |ill bigg|er than |
|00003f90| 74 68 65 20 76 61 6c 75 | 65 20 61 74 00 18 97 00 |the valu|e at....|
|00003fa0| 35 00 06 00 20 69 74 73 | 20 70 61 72 65 6e 74 20 |5... its| parent |
|00003fb0| 6e 6f 64 65 2c 20 73 6f | 20 73 77 61 70 20 74 68 |node, so| swap th|
|00003fc0| 65 73 65 20 74 77 6f 20 | 61 72 72 61 79 20 65 6c |ese two |array el|
|00003fd0| 65 6d 65 6e 74 73 3a 20 | 00 18 0b 00 26 03 0e 00 |ements: |....&...|
|00003fe0| 01 00 7c 02 11 00 16 02 | 0b 00 1b 04 0e 00 01 00 |..|.....|........|
|00003ff0| 7c 02 11 00 16 02 5f 01 | 61 00 00 00 00 24 0b 00 ||....._.|a....$..|
|00004000| 1b 04 0e 00 01 00 7c 02 | 0b 00 26 03 0e 00 01 00 |......|.|..&.....|
|00004010| 7c 02 ed 00 ff ff 00 24 | 0b 00 1b 04 0b 00 26 03 ||......$|......&.|
|00004020| 38 00 02 00 d5 01 00 24 | 0b 00 1b 04 0c 00 26 03 |8......$|......&.|
|00004030| 00 00 00 18 97 00 43 00 | 06 00 20 4f 74 68 65 72 |......C.|.. Other|
|00004040| 77 69 73 65 2c 20 74 68 | 65 20 65 6c 65 6d 65 6e |wise, th|e elemen|
|00004050| 74 20 68 61 73 20 72 65 | 61 63 68 65 64 20 69 74 |t has re|ached it|
|00004060| 73 20 70 72 6f 70 65 72 | 20 70 6c 61 63 65 20 69 |s proper| place i|
|00004070| 6e 20 74 68 65 20 68 65 | 61 70 2c 00 00 18 97 00 |n the he|ap,.....|
|00004080| 1a 00 06 00 20 73 6f 20 | 65 78 69 74 20 74 68 69 |.... so |exit thi|
|00004090| 73 20 70 72 6f 63 65 64 | 75 72 65 3a 00 18 49 00 |s proced|ure:..I.|
|000040a0| ff ff 00 24 53 00 ff ff | 00 18 50 00 00 0c 62 00 |...$S...|..P...b.|
|000040b0| ff ff 00 00 51 00 09 00 | 08 00 ff ff 04 00 ff ff |....Q...|........|
|000040c0| ff ff 1d 00 00 00 ff ff | 02 0c 00 0b 00 50 72 69 |........|.....Pri|
|000040d0| 6e 74 4f 6e 65 42 61 72 | 01 00 b8 18 01 00 00 1b |ntOneBar|........|
|000040e0| 00 ff ff c1 ff ff ff 00 | 00 97 00 16 00 00 00 20 |........|....... |
|000040f0| 0d 1e 3d 20 50 72 69 6e | 74 4f 6e 65 42 61 72 20 |..= Prin|tOneBar |
|00004100| 0d 21 3d 00 00 97 00 43 | 00 00 00 20 20 50 72 69 |.!=....C|... Pri|
|00004110| 6e 74 73 20 53 6f 72 74 | 41 72 72 61 79 28 52 6f |nts Sort|Array(Ro|
|00004120| 77 29 2e 42 61 72 53 74 | 72 69 6e 67 20 61 74 20 |w).BarSt|ring at |
|00004130| 74 68 65 20 72 6f 77 20 | 69 6e 64 69 63 61 74 65 |the row |indicate|
|00004140| 64 20 62 79 20 74 68 65 | 20 52 6f 77 00 00 00 97 |d by the| Row....|
|00004150| 00 3a 00 00 00 20 20 70 | 61 72 61 6d 65 74 65 72 |.:... p|arameter|
|00004160| 2c 20 75 73 69 6e 67 20 | 74 68 65 20 63 6f 6c 6f |, using |the colo|
|00004170| 72 20 69 6e 20 53 6f 72 | 74 41 72 72 61 79 28 52 |r in Sor|tArray(R|
|00004180| 6f 77 29 2e 43 6f 6c 6f | 72 56 61 6c 2e 00 00 97 |ow).Colo|rVal....|
|00004190| 00 06 00 00 00 20 0d 4c | 3d 00 00 97 00 02 00 00 |..... .L|=.......|
|000041a0| 00 00 00 76 00 0c 00 7a | 01 00 01 01 00 89 01 00 |...v...z|........|
|000041b0| 00 01 00 00 0c 73 01 0b | 00 89 01 73 01 64 05 c1 |.....s..|...s.d..|
|000041c0| 00 04 00 00 0c 73 01 0b | 00 89 01 0e 00 01 00 7c |.....s..|.......||
|000041d0| 02 11 00 20 02 a4 00 02 | 00 00 0c 0b 00 89 01 0e |... ....|........|
|000041e0| 00 01 00 7c 02 11 00 2c | 02 95 00 93 00 00 00 51 |...|...,|.......Q|
|000041f0| 00 09 00 08 00 ff ff 04 | 00 ff ff ff ff 0b 00 00 |........|........|
|00004200| 00 ff ff 02 0c 00 09 00 | 51 75 69 63 6b 53 6f 72 |........|QuickSor|
|00004210| 74 01 00 38 b2 06 00 00 | 1b 00 ff ff c1 ff ff ff |t..8....|........|
|00004220| 00 00 97 00 14 00 00 00 | 20 0d 1e 3d 20 51 75 69 |........| ..= Qui|
|00004230| 63 6b 53 6f 72 74 20 0d | 23 3d 00 00 97 00 4b 00 |ckSort .|#=....K.|
|00004240| 00 00 20 20 20 51 75 69 | 63 6b 53 6f 72 74 20 77 |.. Qui|ckSort w|
|00004250| 6f 72 6b 73 20 62 79 20 | 70 69 63 6b 69 6e 67 20 |orks by |picking |
|00004260| 61 20 72 61 6e 64 6f 6d | 20 22 70 69 76 6f 74 22 |a random| "pivot"|
|00004270| 20 65 6c 65 6d 65 6e 74 | 20 69 6e 20 53 6f 72 74 | element| in Sort|
|00004280| 41 72 72 61 79 2c 20 74 | 68 65 6e 3d 00 00 97 00 |Array, t|hen=....|
|00004290| 4c 00 00 00 20 20 20 6d | 6f 76 69 6e 67 20 65 76 |L... m|oving ev|
|000042a0| 65 72 79 20 65 6c 65 6d | 65 6e 74 20 74 68 61 74 |ery elem|ent that|
|000042b0| 20 69 73 20 62 69 67 67 | 65 72 20 74 6f 20 6f 6e | is bigg|er to on|
|000042c0| 65 20 73 69 64 65 20 6f | 66 20 74 68 65 20 70 69 |e side o|f the pi|
|000042d0| 76 6f 74 2c 20 61 6e 64 | 20 65 76 65 72 79 00 00 |vot, and| every..|
|000042e0| 97 00 49 00 00 00 20 20 | 20 65 6c 65 6d 65 6e 74 |..I... | element|
|000042f0| 20 74 68 61 74 20 69 73 | 20 73 6d 61 6c 6c 65 72 | that is| smaller|
|00004300| 20 74 6f 20 74 68 65 20 | 6f 74 68 65 72 20 73 69 | to the |other si|
|00004310| 64 65 2e 20 20 51 75 69 | 63 6b 53 6f 72 74 20 69 |de. Qui|ckSort i|
|00004320| 73 20 74 68 65 6e 20 63 | 61 6c 6c 65 64 65 00 00 |s then c|allede..|
|00004330| 97 00 4a 00 00 00 20 20 | 20 72 65 63 75 72 73 69 |..J... | recursi|
|00004340| 76 65 6c 79 20 77 69 74 | 68 20 74 68 65 20 74 77 |vely wit|h the tw|
|00004350| 6f 20 73 75 62 64 69 76 | 69 73 69 6f 6e 73 20 63 |o subdiv|isions c|
|00004360| 72 65 61 74 65 64 20 62 | 79 20 74 68 65 20 70 69 |reated b|y the pi|
|00004370| 76 6f 74 2e 20 20 4f 6e | 63 65 20 74 68 65 00 00 |vot. On|ce the..|
|00004380| 97 00 4d 00 00 00 20 20 | 20 6e 75 6d 62 65 72 20 |..M... | number |
|00004390| 6f 66 20 65 6c 65 6d 65 | 6e 74 73 20 69 6e 20 61 |of eleme|nts in a|
|000043a0| 20 73 75 62 64 69 76 69 | 73 69 6f 6e 20 72 65 61 | subdivi|sion rea|
|000043b0| 63 68 65 73 20 74 77 6f | 2c 20 74 68 65 20 72 65 |ches two|, the re|
|000043c0| 63 75 72 73 69 76 65 20 | 63 61 6c 6c 73 20 65 6e |cursive |calls en|
|000043d0| 64 00 00 00 97 00 1d 00 | 00 00 20 20 20 61 6e 64 |d.......|.. and|
|000043e0| 20 74 68 65 20 61 72 72 | 61 79 20 69 73 20 73 6f | the arr|ay is so|
|000043f0| 72 74 65 64 2e 73 00 00 | 97 00 06 00 00 00 20 0d |rted.s..|...... .|
|00004400| 4c 3d 00 00 97 00 02 00 | 00 00 00 00 76 00 12 00 |L=......|....v...|
|00004410| 90 01 00 01 02 00 9d 01 | 00 00 01 00 a4 01 00 00 |........|........|
|00004420| 01 00 00 0c 0b 00 9d 01 | 0b 00 a4 01 63 01 61 00 |........|....c.a.|
|00004430| 00 00 00 00 00 18 97 00 | 46 00 06 00 20 4f 6e 6c |........|F... Onl|
|00004440| 79 20 74 77 6f 20 65 6c | 65 6d 65 6e 74 73 20 69 |y two el|ements i|
|00004450| 6e 20 74 68 69 73 20 73 | 75 62 64 69 76 69 73 69 |n this s|ubdivisi|
|00004460| 6f 6e 3b 20 73 77 61 70 | 20 74 68 65 6d 20 69 66 |on; swap| them if|
|00004470| 20 74 68 65 79 20 61 72 | 65 20 6f 75 74 20 6f 66 | they ar|e out of|
|00004480| 00 18 97 00 23 00 06 00 | 20 6f 72 64 65 72 2c 20 |....#...| order, |
|00004490| 74 68 65 6e 20 65 6e 64 | 20 72 65 63 75 72 73 69 |then end| recursi|
|000044a0| 76 65 20 63 61 6c 6c 73 | 3a 69 00 18 0b 00 a4 01 |ve calls|:i......|
|000044b0| 0b 00 9d 01 77 01 64 05 | 03 01 61 00 00 00 00 24 |....w.d.|..a....$|
|000044c0| 0b 00 9d 01 0e 00 01 00 | 7c 02 11 00 16 02 0b 00 |........||.......|
|000044d0| a4 01 0e 00 01 00 7c 02 | 11 00 16 02 5f 01 61 00 |......|.|...._.a.|
|000044e0| 00 00 00 30 0b 00 9d 01 | 0e 00 01 00 7c 02 0b 00 |...0....|....|...|
|000044f0| a4 01 0e 00 01 00 7c 02 | ed 00 ff ff 00 30 0b 00 |......|.|.....0..|
|00004500| 9d 01 0b 00 a4 01 38 00 | 02 00 d5 01 00 24 50 00 |......8.|.....$P.|
|00004510| 00 18 49 00 ff ff 00 00 | 00 24 97 00 3b 00 09 00 |..I.....|.$..;...|
|00004520| 20 50 69 63 6b 20 61 20 | 70 69 76 6f 74 20 65 6c | Pick a |pivot el|
|00004530| 65 6d 65 6e 74 20 61 74 | 20 72 61 6e 64 6f 6d 2c |ement at| random,|
|00004540| 20 74 68 65 6e 20 6d 6f | 76 65 20 69 74 20 74 6f | then mo|ve it to|
|00004550| 20 74 68 65 20 65 6e 64 | 3a 20 00 24 0b 00 9d 01 | the end|: .$....|
|00004560| 0b 00 a4 01 0e 04 02 00 | 60 00 0c 00 25 04 00 24 |........|`...%..$|
|00004570| 0b 00 a4 01 0e 00 01 00 | 7c 02 0b 00 25 04 0e 00 |........||...%...|
|00004580| 01 00 7c 02 ed 00 ff ff | 00 24 0b 00 a4 01 0b 00 |..|.....|.$......|
|00004590| 25 04 38 00 02 00 d5 01 | 00 24 0b 00 a4 01 0e 00 |%.8.....|.$......|
|000045a0| 01 00 7c 02 11 00 16 02 | 0c 00 32 04 00 24 46 00 |..|.....|..2..$F.|
|000045b0| 00 00 00 30 97 00 35 00 | 0c 00 20 4d 6f 76 65 20 |...0..5.|.. Move |
|000045c0| 69 6e 20 66 72 6f 6d 20 | 62 6f 74 68 20 73 69 64 |in from |both sid|
|000045d0| 65 73 20 74 6f 77 61 72 | 64 73 20 74 68 65 20 70 |es towar|ds the p|
|000045e0| 69 76 6f 74 20 65 6c 65 | 6d 65 6e 74 3a 65 00 30 |ivot ele|ment:e.0|
|000045f0| 0b 00 9d 01 0c 00 26 03 | 06 00 0b 00 a4 01 0c 00 |......&.|........|
|00004600| a0 03 00 30 0b 00 26 03 | 0b 00 a0 03 63 01 6e 01 |...0..&.|....c.n.|
|00004610| 0b 00 26 03 0e 00 01 00 | 7c 02 11 00 16 02 0b 00 |..&.....||.......|
|00004620| 32 04 62 01 6e 01 01 01 | 48 00 ff ff 00 3c 0b 00 |2.b.n...|H....<..|
|00004630| 26 03 64 05 00 01 0c 00 | 26 03 00 30 62 00 ff ff |&.d.....|&..0b...|
|00004640| 00 30 0b 00 a0 03 0b 00 | 26 03 5f 01 6e 01 0b 00 |.0......|&._.n...|
|00004650| a0 03 0e 00 01 00 7c 02 | 11 00 16 02 0b 00 32 04 |......|.|......2.|
|00004660| 5e 01 6e 01 01 01 48 00 | ff ff 00 3c 0b 00 a0 03 |^.n...H.|...<....|
|00004670| 64 05 77 01 0c 00 a0 03 | 00 30 62 00 ff ff 00 00 |d.w.....|.0b.....|
|00004680| 00 30 97 00 3d 00 0c 00 | 20 49 66 20 77 65 20 68 |.0..=...| If we h|
|00004690| 61 76 65 6e 27 74 20 72 | 65 61 63 68 65 64 20 74 |aven't r|eached t|
|000046a0| 68 65 20 70 69 76 6f 74 | 20 65 6c 65 6d 65 6e 74 |he pivot| element|
|000046b0| 2c 20 69 74 20 6d 65 61 | 6e 73 20 74 68 61 74 20 |, it mea|ns that |
|000046c0| 74 77 6f 00 00 30 97 00 | 3a 00 0c 00 20 65 6c 65 |two..0..|:... ele|
|000046d0| 6d 65 6e 74 73 20 6f 6e | 20 65 69 74 68 65 72 20 |ments on| either |
|000046e0| 73 69 64 65 20 61 72 65 | 20 6f 75 74 20 6f 66 20 |side are| out of |
|000046f0| 6f 72 64 65 72 2c 20 73 | 6f 20 73 77 61 70 20 74 |order, s|o swap t|
|00004700| 68 65 6d 3a 00 30 0b 00 | 26 03 0b 00 a0 03 63 01 |hem:.0..|&.....c.|
|00004710| 61 00 00 00 00 3c 0b 00 | 26 03 0e 00 01 00 7c 02 |a....<..|&.....|.|
|00004720| 0b 00 a0 03 0e 00 01 00 | 7c 02 ed 00 ff ff 00 3c |........||......<|
|00004730| 0b 00 26 03 0b 00 a0 03 | 38 00 02 00 d5 01 00 30 |..&.....|8......0|
|00004740| 50 00 00 24 0b 00 26 03 | 0b 00 a0 03 63 01 64 00 |P..$..&.|....c.d.|
|00004750| ff ff 00 00 00 24 97 00 | 40 00 09 00 20 4d 6f 76 |.....$..|@... Mov|
|00004760| 65 20 74 68 65 20 70 69 | 76 6f 74 20 65 6c 65 6d |e the pi|vot elem|
|00004770| 65 6e 74 20 62 61 63 6b | 20 74 6f 20 69 74 73 20 |ent back| to its |
|00004780| 70 72 6f 70 65 72 20 70 | 6c 61 63 65 20 69 6e 20 |proper p|lace in |
|00004790| 74 68 65 20 61 72 72 61 | 79 3a 00 24 0b 00 26 03 |the arra|y:.$..&.|
|000047a0| 0e 00 01 00 7c 02 0b 00 | a4 01 0e 00 01 00 7c 02 |....|...|......|.|
|000047b0| ed 00 ff ff 00 24 0b 00 | 26 03 0b 00 a4 01 38 00 |.....$..|&.....8.|
|000047c0| 02 00 d5 01 00 00 00 24 | 97 00 3d 00 09 00 20 52 |.......$|..=... R|
|000047d0| 65 63 75 72 73 69 76 65 | 6c 79 20 63 61 6c 6c 20 |ecursive|ly call |
|000047e0| 74 68 65 20 51 75 69 63 | 6b 53 6f 72 74 20 70 72 |the Quic|kSort pr|
|000047f0| 6f 63 65 64 75 72 65 20 | 28 70 61 73 73 20 74 68 |ocedure |(pass th|
|00004800| 65 20 73 6d 61 6c 6c 65 | 72 61 00 24 97 00 2e 00 |e smalle|ra.$....|
|00004810| 09 00 20 73 75 62 64 69 | 76 69 73 69 6f 6e 20 66 |.. subdi|vision f|
|00004820| 69 72 73 74 20 74 6f 20 | 75 73 65 20 6c 65 73 73 |irst to |use less|
|00004830| 20 73 74 61 63 6b 20 73 | 70 61 63 65 29 3a 00 24 | stack s|pace):.$|
|00004840| 0b 00 26 03 0b 00 9d 01 | 77 01 6e 01 0b 00 a4 01 |..&.....|w.n.....|
|00004850| 0b 00 26 03 77 01 6e 01 | 63 01 61 00 00 00 00 30 |..&.w.n.|c.a....0|
|00004860| 0b 00 9d 01 0b 00 26 03 | 64 05 77 01 38 00 02 00 |......&.|d.w.8...|
|00004870| 90 01 00 30 0b 00 26 03 | 64 05 00 01 0b 00 a4 01 |...0..&.|d.......|
|00004880| 38 00 02 00 90 01 00 24 | 49 00 ff ff 00 30 0b 00 |8......$|I....0..|
|00004890| 26 03 64 05 00 01 0b 00 | a4 01 38 00 02 00 90 01 |&.d.....|..8.....|
|000048a0| 00 30 0b 00 9d 01 0b 00 | 26 03 64 05 77 01 38 00 |.0......|&.d.w.8.|
|000048b0| 02 00 90 01 00 24 50 00 | 00 18 50 00 00 0c 50 00 |.....$P.|..P...P.|
|000048c0| 00 00 51 00 09 00 08 00 | ff ff 04 00 ff ff ff ff |..Q.....|........|
|000048d0| 3e 00 00 00 ff ff 02 0c | 00 0c 00 52 65 69 6e 69 |>.......|...Reini|
|000048e0| 74 69 61 6c 69 7a 65 01 | 00 b8 66 01 00 00 1b 00 |tialize.|..f.....|
|000048f0| ff ff c1 ff ff ff 00 00 | 97 00 17 00 00 00 20 0d |........|...... .|
|00004900| 1e 3d 20 52 65 69 6e 69 | 74 69 61 6c 69 7a 65 20 |.= Reini|tialize |
|00004910| 0d 20 3d 00 00 00 97 00 | 46 00 00 00 20 20 20 52 |. =.....|F... R|
|00004920| 65 73 74 6f 72 65 73 20 | 74 68 65 20 61 72 72 61 |estores |the arra|
|00004930| 79 20 53 6f 72 74 41 72 | 72 61 79 20 74 6f 20 69 |y SortAr|ray to i|
|00004940| 74 73 20 6f 72 69 67 69 | 6e 61 6c 20 75 6e 73 6f |ts origi|nal unso|
|00004950| 72 74 65 64 20 73 74 61 | 74 65 2c 20 74 68 65 6e |rted sta|te, then|
|00004960| 00 00 97 00 24 00 00 00 | 20 20 20 70 72 69 6e 74 |....$...| print|
|00004970| 73 20 74 68 65 20 75 6e | 73 6f 72 74 65 64 20 63 |s the un|sorted c|
|00004980| 6f 6c 6f 72 20 62 61 72 | 73 2e 00 00 97 00 06 00 |olor bar|s.......|
|00004990| 00 00 20 0d 4c 3d 00 00 | 97 00 02 00 00 00 00 00 |.. .L=..|........|
|000049a0| 76 00 06 00 ac 01 00 01 | 00 00 00 0c 0b 00 26 03 |v.......|......&.|
|000049b0| 64 05 0b 00 72 02 56 00 | ff ff ff ff 00 18 0b 00 |d...r.V.|........|
|000049c0| 26 03 0e 00 01 00 89 02 | 0b 00 26 03 0f 00 01 00 |&.......|..&.....|
|000049d0| 7c 02 00 0c 0b 00 26 03 | 66 00 ff ff ff ff 00 00 ||.....&.|f.......|
|000049e0| 00 0c 0b 00 26 03 64 05 | 0b 00 72 02 56 00 ff ff |....&.d.|..r.V...|
|000049f0| ff ff 00 18 73 01 0b 00 | 26 03 73 01 64 05 c1 00 |....s...|&.s.d...|
|00004a00| 04 00 00 18 73 01 0b 00 | 26 03 0e 00 01 00 7c 02 |....s...|&.....|.|
|00004a10| 11 00 20 02 a4 00 02 00 | 00 18 0b 00 26 03 0e 00 |.. .....|....&...|
|00004a20| 01 00 7c 02 11 00 2c 02 | 95 00 93 00 00 0c 0b 00 |..|...,.|........|
|00004a30| 26 03 66 00 ff ff ff ff | 00 00 00 0c 73 01 0b 00 |&.f.....|....s...|
|00004a40| 05 03 73 01 64 01 a4 00 | 04 00 00 00 51 00 09 00 |..s.d...|....Q...|
|00004a50| 08 00 ff ff 04 00 ff ff | ff ff 13 00 00 00 ff ff |........|........|
|00004a60| 02 0c 00 09 00 53 68 65 | 6c 6c 53 6f 72 74 01 00 |.....She|llSort..|
|00004a70| b8 52 04 00 00 1b 00 ff | ff c1 ff ff ff 00 00 97 |.R......|........|
|00004a80| 00 14 00 00 00 20 0d 1f | 3d 20 53 68 65 6c 6c 53 |..... ..|= ShellS|
|00004a90| 6f 72 74 20 0d 22 3d 00 | 00 97 00 4d 00 00 00 20 |ort ."=.|...M... |
|00004aa0| 20 54 68 65 20 53 68 65 | 6c 6c 53 6f 72 74 20 70 | The She|llSort p|
|00004ab0| 72 6f 63 65 64 75 72 65 | 20 69 73 20 73 69 6d 69 |rocedure| is simi|
|00004ac0| 6c 61 72 20 74 6f 20 74 | 68 65 20 42 75 62 62 6c |lar to t|he Bubbl|
|00004ad0| 65 53 6f 72 74 20 70 72 | 6f 63 65 64 75 72 65 2e |eSort pr|ocedure.|
|00004ae0| 20 20 48 6f 77 65 76 65 | 72 2c 3d 00 00 97 00 4b | Howeve|r,=....K|
|00004af0| 00 00 00 20 20 53 68 65 | 6c 6c 53 6f 72 74 20 62 |... She|llSort b|
|00004b00| 65 67 69 6e 73 20 62 79 | 20 63 6f 6d 70 61 72 69 |egins by| compari|
|00004b10| 6e 67 20 65 6c 65 6d 65 | 6e 74 73 20 74 68 61 74 |ng eleme|nts that|
|00004b20| 20 61 72 65 20 66 61 72 | 20 61 70 61 72 74 20 28 | are far| apart (|
|00004b30| 73 65 70 61 72 61 74 65 | 64 20 62 79 72 00 00 97 |separate|d byr...|
|00004b40| 00 4a 00 00 00 20 20 74 | 68 65 20 76 61 6c 75 65 |.J... t|he value|
|00004b50| 20 6f 66 20 74 68 65 20 | 4f 66 66 73 65 74 20 76 | of the |Offset v|
|00004b60| 61 72 69 61 62 6c 65 2c | 20 77 68 69 63 68 20 69 |ariable,| which i|
|00004b70| 73 20 69 6e 69 74 69 61 | 6c 6c 79 20 68 61 6c 66 |s initia|lly half|
|00004b80| 20 74 68 65 20 64 69 73 | 74 61 6e 63 65 00 00 97 | the dis|tance...|
|00004b90| 00 49 00 00 00 20 20 62 | 65 74 77 65 65 6e 20 74 |.I... b|etween t|
|00004ba0| 68 65 20 66 69 72 73 74 | 20 61 6e 64 20 6c 61 73 |he first| and las|
|00004bb0| 74 20 65 6c 65 6d 65 6e | 74 29 2c 20 74 68 65 6e |t elemen|t), then|
|00004bc0| 20 63 6f 6d 70 61 72 69 | 6e 67 20 65 6c 65 6d 65 | compari|ng eleme|
|00004bd0| 6e 74 73 20 74 68 61 74 | 20 61 72 65 65 00 00 97 |nts that| aree...|
|00004be0| 00 4d 00 00 00 20 20 63 | 6c 6f 73 65 72 20 74 6f |.M... c|loser to|
|00004bf0| 67 65 74 68 65 72 20 28 | 77 68 65 6e 20 4f 66 66 |gether (|when Off|
|00004c00| 73 65 74 20 69 73 20 6f | 6e 65 2c 20 74 68 65 20 |set is o|ne, the |
|00004c10| 6c 61 73 74 20 69 74 65 | 72 61 74 69 6f 6e 20 6f |last ite|ration o|
|00004c20| 66 20 74 68 69 73 20 70 | 72 6f 63 65 64 75 72 65 |f this p|rocedure|
|00004c30| 00 00 00 97 00 1d 00 00 | 00 20 20 69 73 20 6d 65 |........|. is me|
|00004c40| 72 65 6c 79 20 61 20 62 | 75 62 62 6c 65 20 73 6f |rely a b|ubble so|
|00004c50| 72 74 29 2e 73 00 00 97 | 00 06 00 00 00 20 0d 4c |rt).s...|..... .L|
|00004c60| 3d 00 00 97 00 02 00 00 | 00 00 00 76 00 06 00 bc |=.......|...v....|
|00004c70| 01 00 01 00 00 00 00 00 | 0c 97 00 44 00 03 00 20 |........|...D... |
|00004c80| 53 65 74 20 63 6f 6d 70 | 61 72 69 73 6f 6e 20 6f |Set comp|arison o|
|00004c90| 66 66 73 65 74 20 74 6f | 20 68 61 6c 66 20 74 68 |ffset to| half th|
|00004ca0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 72 65 63 6f |e number| of reco|
|00004cb0| 72 64 73 20 69 6e 20 53 | 6f 72 74 41 72 72 61 79 |rds in S|ortArray|
|00004cc0| 3a 00 0c 0b 00 72 02 64 | 09 60 01 0c 00 3f 04 00 |:....r.d|.`...?..|
|00004cd0| 00 00 0c 0b 00 3f 04 64 | 01 5f 01 48 00 ff ff 97 |.....?.d|._.H....|
|00004ce0| 00 22 00 20 00 20 4c 6f | 6f 70 20 75 6e 74 69 6c |.". . Lo|op until|
|00004cf0| 20 6f 66 66 73 65 74 20 | 67 65 74 73 20 74 6f 20 | offset |gets to |
|00004d00| 7a 65 72 6f 2e 00 18 0b | 00 72 02 0b 00 3f 04 77 |zero....|.r...?.w|
|00004d10| 01 0c 00 2b 03 00 18 46 | 00 00 24 0b 00 39 02 0c |...+...F|..$..9..|
|00004d20| 00 34 03 97 00 25 00 20 | 00 20 41 73 73 75 6d 65 |.4...%. |. Assume|
|00004d30| 20 6e 6f 20 73 77 69 74 | 63 68 65 73 20 61 74 20 | no swit|ches at |
|00004d40| 74 68 69 73 20 6f 66 66 | 73 65 74 2e 2e 00 00 00 |this off|set.....|
|00004d50| 24 97 00 31 00 09 00 20 | 43 6f 6d 70 61 72 65 20 |$..1... |Compare |
|00004d60| 65 6c 65 6d 65 6e 74 73 | 20 61 6e 64 20 73 77 69 |elements| and swi|
|00004d70| 74 63 68 20 6f 6e 65 73 | 20 6f 75 74 20 6f 66 20 |tch ones| out of |
|00004d80| 6f 72 64 65 72 3a 63 00 | 24 0b 00 89 01 64 05 0b |order:c.|$....d..|
|00004d90| 00 2b 03 56 00 ff ff ff | ff 00 30 0b 00 89 01 0e |.+.V....|..0.....|
|00004da0| 00 01 00 7c 02 11 00 16 | 02 0b 00 89 01 0b 00 3f |...|....|.......?|
|00004db0| 04 00 01 0e 00 01 00 7c | 02 11 00 16 02 5f 01 61 |.......||....._.a|
|00004dc0| 00 00 00 00 3c 0b 00 89 | 01 0e 00 01 00 7c 02 0b |....<...|.....|..|
|00004dd0| 00 89 01 0b 00 3f 04 00 | 01 0e 00 01 00 7c 02 ed |.....?..|.....|..|
|00004de0| 00 ff ff 00 3c 0b 00 89 | 01 0b 00 89 01 0b 00 3f |....<...|.......?|
|00004df0| 04 00 01 38 00 02 00 d5 | 01 00 3c 0b 00 89 01 0c |...8....|..<.....|
|00004e00| 00 34 03 00 30 50 00 00 | 24 0b 00 89 01 66 00 ff |.4..0P..|$....f..|
|00004e10| ff ff ff 00 00 00 24 97 | 00 38 00 09 00 20 53 6f |......$.|.8... So|
|00004e20| 72 74 20 6f 6e 20 6e 65 | 78 74 20 70 61 73 73 20 |rt on ne|xt pass |
|00004e30| 6f 6e 6c 79 20 74 6f 20 | 77 68 65 72 65 20 6c 61 |only to |where la|
|00004e40| 73 74 20 73 77 69 74 63 | 68 20 77 61 73 20 6d 61 |st switc|h was ma|
|00004e50| 64 65 3a 00 24 0b 00 34 | 03 0b 00 3f 04 77 01 0c |de:.$..4|...?.w..|
|00004e60| 00 2b 03 00 18 0b 00 34 | 03 64 00 ff ff 00 00 00 |.+.....4|.d......|
|00004e70| 18 97 00 33 00 06 00 20 | 4e 6f 20 73 77 69 74 63 |...3... |No switc|
|00004e80| 68 65 73 20 61 74 20 6c | 61 73 74 20 6f 66 66 73 |hes at l|ast offs|
|00004e90| 65 74 2c 20 74 72 79 20 | 6f 6e 65 20 68 61 6c 66 |et, try |one half|
|00004ea0| 20 61 73 20 62 69 67 3a | 6d 00 18 0b 00 3f 04 64 | as big:|m....?.d|
|00004eb0| 09 60 01 0c 00 3f 04 00 | 0c 62 00 ff ff 00 00 51 |.`...?..|.b.....Q|
|00004ec0| 00 09 00 08 00 ff ff 04 | 00 ff ff ff ff 25 00 00 |........|.....%..|
|00004ed0| 00 ff ff 02 0c 00 08 00 | 53 6f 72 74 4d 65 6e 75 |........|SortMenu|
|00004ee0| 01 00 b8 66 07 00 00 1b | 00 ff ff c1 ff ff ff 00 |...f....|........|
|00004ef0| 00 97 00 13 00 00 00 20 | 0d 1f 3d 20 53 6f 72 74 |....... |..= Sort|
|00004f00| 4d 65 6e 75 20 0d 23 3d | 00 00 00 97 00 4a 00 00 |Menu .#=|.....J..|
|00004f10| 00 20 20 20 54 68 65 20 | 53 6f 72 74 4d 65 6e 75 |. The |SortMenu|
|00004f20| 20 70 72 6f 63 65 64 75 | 72 65 20 66 69 72 73 74 | procedu|re first|
|00004f30| 20 63 61 6c 6c 73 20 74 | 68 65 20 52 65 69 6e 69 | calls t|he Reini|
|00004f40| 74 69 61 6c 69 7a 65 20 | 70 72 6f 63 65 64 75 72 |tialize |procedur|
|00004f50| 65 20 74 6f 20 6d 61 6b | 65 00 00 97 00 49 00 00 |e to mak|e....I..|
|00004f60| 00 20 20 20 73 75 72 65 | 20 74 68 65 20 53 6f 72 |. sure| the Sor|
|00004f70| 74 41 72 72 61 79 20 69 | 73 20 69 6e 20 69 74 73 |tArray i|s in its|
|00004f80| 20 75 6e 73 6f 72 74 65 | 64 20 66 6f 72 6d 2c 20 | unsorte|d form, |
|00004f90| 74 68 65 6e 20 70 72 6f | 6d 70 74 73 20 74 68 65 |then pro|mpts the|
|00004fa0| 20 75 73 65 72 20 74 6f | 65 00 00 97 00 27 00 00 | user to|e....'..|
|00004fb0| 00 20 20 20 6d 61 6b 65 | 20 6f 6e 65 20 6f 66 20 |. make| one of |
|00004fc0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 68 |the foll|owing ch|
|00004fd0| 6f 69 63 65 73 3a 74 00 | 00 97 00 02 00 00 00 00 |oices:t.|........|
|00004fe0| 00 97 00 24 00 00 00 0d | 0f 20 2a 20 4f 6e 65 20 |...$....|. * One |
|00004ff0| 6f 66 20 74 68 65 20 73 | 6f 72 74 69 6e 67 20 61 |of the s|orting a|
|00005000| 6c 67 6f 72 69 74 68 6d | 73 00 00 97 00 1d 00 00 |lgorithm|s.......|
|00005010| 00 0d 0f 20 2a 20 54 6f | 67 67 6c 65 20 73 6f 75 |... * To|ggle sou|
|00005020| 6e 64 20 6f 6e 20 6f 72 | 20 6f 66 66 6f 00 00 97 |nd on or| offo...|
|00005030| 00 21 00 00 00 0d 0f 20 | 2a 20 49 6e 63 72 65 61 |.!..... |* Increa|
|00005040| 73 65 20 6f 72 20 64 65 | 63 72 65 61 73 65 20 73 |se or de|crease s|
|00005050| 70 65 65 64 68 00 00 97 | 00 16 00 00 00 0d 0f 20 |peedh...|....... |
|00005060| 2a 20 45 6e 64 20 74 68 | 65 20 70 72 6f 67 72 61 |* End th|e progra|
|00005070| 6d 00 00 97 00 06 00 00 | 00 20 0d 4c 3d 00 00 97 |m.......|. .L=...|
|00005080| 00 02 00 00 00 00 00 76 | 00 06 00 c9 01 00 01 00 |.......v|........|
|00005090| 00 00 0c 65 01 1b 00 82 | 01 01 00 0c 14 49 04 00 |...e....|.....I..|
|000050a0| 00 00 0c 97 00 33 00 03 | 00 20 43 72 65 61 74 65 |.....3..|. Create|
|000050b0| 20 61 20 73 74 72 69 6e | 67 20 63 6f 6e 73 69 73 | a strin|g consis|
|000050c0| 74 69 6e 67 20 6f 66 20 | 61 6c 6c 20 6c 65 67 61 |ting of |all lega|
|000050d0| 6c 20 63 68 6f 69 63 65 | 73 3a 3d 00 0c 6d 01 09 |l choice|s:=..m..|
|000050e0| 00 49 42 48 45 53 51 3e | 3c 54 22 0b 14 49 04 00 |.IBHESQ>|<T"..I..|
|000050f0| 01 0c 14 53 04 00 00 00 | 0c 46 00 00 00 00 18 97 |...S....|.F......|
|00005100| 00 1b 00 06 00 20 4d 61 | 6b 65 20 74 68 65 20 63 |..... Ma|ke the c|
|00005110| 75 72 73 6f 72 20 76 69 | 73 69 62 6c 65 3a 45 00 |ursor vi|sible:E.|
|00005120| 18 73 01 0b 00 58 02 64 | 21 00 01 73 01 0b 00 4a |.s...X.d|!..s...J|
|00005130| 02 65 01 17 00 00 01 73 | 01 64 05 c1 00 06 00 00 |.e.....s|.d......|
|00005140| 00 00 18 64 05 22 01 59 | 01 0c 14 5d 04 97 00 20 |...d.".Y|...]... |
|00005150| 00 2b 00 20 47 65 74 20 | 74 68 65 20 75 73 65 72 |.+. Get |the user|
|00005160| 27 73 20 63 68 6f 69 63 | 65 20 61 6e 64 20 73 65 |'s choic|e and se|
|00005170| 65 00 18 0b 14 53 04 0b | 14 5d 04 24 01 0c 00 e3 |e....S..|.].$....|
|00005180| 02 97 00 23 00 2b 00 20 | 69 66 20 69 74 27 73 20 |...#.+. |if it's |
|00005190| 6f 6e 65 20 6f 66 20 74 | 68 65 20 6d 65 6e 75 20 |one of t|he menu |
|000051a0| 6f 70 74 69 6f 6e 73 2e | 73 00 00 00 18 97 00 2c |options.|s......,|
|000051b0| 00 06 00 20 55 73 65 72 | 20 63 68 6f 73 65 20 6f |... User| chose o|
|000051c0| 6e 65 20 6f 66 20 74 68 | 65 20 73 6f 72 74 69 6e |ne of th|e sortin|
|000051d0| 67 20 70 72 6f 63 65 64 | 75 72 65 73 3a 00 18 0b |g proced|ures:...|
|000051e0| 00 e3 02 64 05 5e 01 6e | 01 0b 00 e3 02 0b 00 66 |...d.^.n|.......f|
|000051f0| 02 62 01 6e 01 01 01 61 | 00 00 00 00 24 38 00 00 |.b.n...a|....$8..|
|00005200| 00 ac 01 97 00 17 00 2b | 00 20 52 65 73 63 72 61 |.......+|. Rescra|
|00005210| 6d 62 6c 65 20 74 68 65 | 20 62 61 72 73 2e 69 00 |mble the| bars.i.|
|00005220| 24 72 01 72 01 73 01 64 | 01 c1 00 04 00 97 00 1d |$r.r.s.d|........|
|00005230| 00 2b 00 20 4d 61 6b 65 | 20 74 68 65 20 63 75 72 |.+. Make| the cur|
|00005240| 73 6f 72 20 69 6e 76 69 | 73 69 62 6c 65 2e 65 00 |sor invi|sible.e.|
|00005250| 24 64 01 0c 00 b3 02 97 | 00 1c 00 2b 00 20 53 65 |$d......|...+. Se|
|00005260| 74 20 72 65 76 65 72 73 | 65 2d 76 69 64 65 6f 20 |t revers|e-video |
|00005270| 76 61 6c 75 65 73 2e 00 | 24 64 1d 0c 00 c1 02 00 |values..|$d......|
|00005280| 24 56 01 0c 00 a6 02 97 | 00 1c 00 2b 00 20 52 65 |$V......|...+. Re|
|00005290| 63 6f 72 64 20 74 68 65 | 20 73 74 61 72 74 69 6e |cord the| startin|
|000052a0| 67 20 74 69 6d 65 2e 00 | 18 50 00 00 00 00 18 97 |g time..|.P......|
|000052b0| 00 42 00 06 00 20 42 72 | 61 6e 63 68 20 74 6f 20 |.B... Br|anch to |
|000052c0| 74 68 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |the appr|opriate |
|000052d0| 70 72 6f 63 65 64 75 72 | 65 20 64 65 70 65 6e 64 |procedur|e depend|
|000052e0| 69 6e 67 20 6f 6e 20 74 | 68 65 20 6b 65 79 20 74 |ing on t|he key t|
|000052f0| 79 70 65 64 3a 00 18 0b | 14 5d 04 74 00 ff ff 00 |yped:...|.].t....|
|00005300| 24 6d 01 01 00 49 22 3b | 00 00 30 38 00 00 00 3d |$m...I";|..08...=|
|00005310| 01 00 24 6d 01 01 00 42 | 22 3b 00 00 30 38 00 00 |..$m...B|";..08..|
|00005320| 00 9a 00 00 24 6d 01 01 | 00 48 22 3b 00 00 30 38 |....$m..|.H";..08|
|00005330| 00 00 00 23 01 00 24 6d | 01 01 00 45 22 3b 00 00 |...#..$m|...E";..|
|00005340| 30 38 00 00 00 13 01 00 | 24 6d 01 01 00 53 22 3b |08......|$m...S";|
|00005350| 00 00 30 38 00 00 00 bc | 01 00 24 6d 01 01 00 51 |..08....|..$m...Q|
|00005360| 22 3b 00 00 30 64 05 0b | 00 72 02 38 00 02 00 90 |";..0d..|.r.8....|
|00005370| 01 00 24 6d 01 01 00 3e | 22 3b 00 00 00 00 30 97 |..$m...>|";....0.|
|00005380| 00 3e 00 0c 00 20 44 65 | 63 72 65 61 73 65 20 70 |.>... De|crease p|
|00005390| 61 75 73 65 20 6c 65 6e | 67 74 68 20 74 6f 20 73 |ause len|gth to s|
|000053a0| 70 65 65 64 20 75 70 20 | 73 6f 72 74 69 6e 67 20 |peed up |sorting |
|000053b0| 74 69 6d 65 2c 20 74 68 | 65 6e 20 72 65 64 72 61 |time, th|en redra|
|000053c0| 77 00 30 97 00 41 00 0c | 00 20 74 68 65 20 6d 65 |w.0..A..|. the me|
|000053d0| 6e 75 20 74 6f 20 63 6c | 65 61 72 20 61 6e 79 20 |nu to cl|ear any |
|000053e0| 74 69 6d 69 6e 67 20 72 | 65 73 75 6c 74 73 20 28 |timing r|esults (|
|000053f0| 73 69 6e 63 65 20 74 68 | 65 79 20 77 6f 6e 27 74 |since th|ey won't|
|00005400| 20 63 6f 6d 70 61 72 65 | 3a 00 30 97 00 18 00 0c | compare|:.0.....|
|00005410| 00 20 77 69 74 68 20 66 | 75 74 75 72 65 20 72 65 |. with f|uture re|
|00005420| 73 75 6c 74 73 29 3a 00 | 30 64 09 0b 00 da 02 70 |sults):.|0d.....p|
|00005430| 01 6e 01 64 0d 02 01 0c | 00 da 02 00 30 38 00 00 |.n.d....|....08..|
|00005440| 00 8f 00 00 00 00 24 6d | 01 01 00 3c 22 3b 00 00 |......$m|...<";..|
|00005450| 00 00 30 97 00 3f 00 0c | 00 20 49 6e 63 72 65 61 |..0..?..|. Increa|
|00005460| 73 65 20 70 61 75 73 65 | 20 6c 65 6e 67 74 68 20 |se pause| length |
|00005470| 74 6f 20 73 6c 6f 77 20 | 64 6f 77 6e 20 73 6f 72 |to slow |down sor|
|00005480| 74 69 6e 67 20 74 69 6d | 65 2c 20 74 68 65 6e 20 |ting tim|e, then |
|00005490| 72 65 64 72 61 77 72 00 | 30 97 00 41 00 0c 00 20 |redrawr.|0..A... |
|000054a0| 74 68 65 20 6d 65 6e 75 | 20 74 6f 20 63 6c 65 61 |the menu| to clea|
|000054b0| 72 20 61 6e 79 20 74 69 | 6d 69 6e 67 20 72 65 73 |r any ti|ming res|
|000054c0| 75 6c 74 73 20 28 73 69 | 6e 63 65 20 74 68 65 79 |ults (si|nce they|
|000054d0| 20 77 6f 6e 27 74 20 63 | 6f 6d 70 61 72 65 00 00 | won't c|ompare..|
|000054e0| 30 97 00 18 00 0c 00 20 | 77 69 74 68 20 66 75 74 |0...... |with fut|
|000054f0| 75 72 65 20 72 65 73 75 | 6c 74 73 29 3a 00 30 64 |ure resu|lts):.0d|
|00005500| 0d 0b 00 da 02 70 01 6e | 01 64 09 02 01 0c 00 da |.....p.n|.d......|
|00005510| 02 00 30 38 00 00 00 8f | 00 00 00 00 24 6d 01 01 |..08....|....$m..|
|00005520| 00 54 22 3b 00 00 30 65 | 01 0c 00 0b 00 4a 02 65 |.T";..0e|.....J.e|
|00005530| 01 0c 00 00 01 38 00 02 | 00 f1 01 00 00 00 24 0b |.....8..|......$.|
|00005540| 14 49 04 3b 00 00 00 00 | 30 97 00 39 00 0c 00 20 |.I.;....|0..9... |
|00005550| 55 73 65 72 20 70 72 65 | 73 73 65 64 20 45 53 43 |User pre|ssed ESC|
|00005560| 2c 20 73 6f 20 65 78 69 | 74 20 74 68 69 73 20 70 |, so exi|t this p|
|00005570| 72 6f 63 65 64 75 72 65 | 20 61 6e 64 20 72 65 74 |rocedure| and ret|
|00005580| 75 72 6e 20 74 6f 20 00 | 30 97 00 10 00 0c 00 20 |urn to .|0...... |
|00005590| 6d 6f 64 75 6c 65 20 6c | 65 76 65 6c 3a 00 30 53 |module l|evel:.0S|
|000055a0| 00 ff ff 00 00 00 24 3a | 00 00 00 00 30 97 00 0e |......$:|....0...|
|000055b0| 00 0c 00 20 49 6e 76 61 | 6c 69 64 20 6b 65 79 00 |... Inva|lid key.|
|000055c0| 18 52 00 00 00 00 18 0b | 00 e3 02 64 05 5e 01 6e |.R......|...d.^.n|
|000055d0| 01 0b 00 e3 02 0b 00 66 | 02 62 01 6e 01 01 01 61 |.......f|.b.n...a|
|000055e0| 00 00 00 00 24 0b 00 05 | 03 0c 00 b3 02 97 00 1a |....$...|........|
|000055f0| 00 2b 00 20 54 75 72 6e | 20 6f 66 66 20 72 65 76 |.+. Turn| off rev|
|00005600| 65 72 73 65 20 76 69 64 | 65 6f 2e 00 24 64 01 0c |erse vid|eo..$d..|
|00005610| 00 c1 02 00 24 64 01 38 | 00 01 00 f6 00 97 00 14 |....$d.8|........|
|00005620| 00 2b 00 20 50 72 69 6e | 74 20 66 69 6e 61 6c 20 |.+. Prin|t final |
|00005630| 74 69 6d 65 2e 00 18 50 | 00 00 00 00 0c 62 00 ff |time...P|.....b..|
|00005640| ff 00 00 00 00 51 00 09 | 00 08 00 ff ff 04 00 ff |.....Q..|........|
|00005650| ff ff ff 58 00 00 00 ff | ff 02 0c 00 08 00 53 77 |...X....|......Sw|
|00005660| 61 70 42 61 72 73 01 00 | b8 f8 00 00 00 1b 00 ff |apBars..|........|
|00005670| ff c1 ff ff ff 00 00 97 | 00 13 00 00 00 20 0d 1f |........|..... ..|
|00005680| 3d 20 53 77 61 70 42 61 | 72 73 20 0d 23 3d 00 00 |= SwapBa|rs .#=..|
|00005690| 00 97 00 45 00 00 00 20 | 20 20 43 61 6c 6c 73 20 |...E... | Calls |
|000056a0| 50 72 69 6e 74 4f 6e 65 | 42 61 72 20 74 77 69 63 |PrintOne|Bar twic|
|000056b0| 65 20 74 6f 20 73 77 69 | 74 63 68 20 74 68 65 20 |e to swi|tch the |
|000056c0| 74 77 6f 20 62 61 72 73 | 20 69 6e 20 52 6f 77 31 |two bars| in Row1|
|000056d0| 20 61 6e 64 20 52 6f 77 | 32 2c 3d 00 00 97 00 2a | and Row|2,=....*|
|000056e0| 00 00 00 20 20 20 74 68 | 65 6e 20 63 61 6c 6c 73 |... th|en calls|
|000056f0| 20 74 68 65 20 45 6c 61 | 70 73 65 64 54 69 6d 65 | the Ela|psedTime|
|00005700| 20 70 72 6f 63 65 64 75 | 72 65 2e 00 00 97 00 06 | procedu|re......|
|00005710| 00 00 00 20 0d 4c 3d 00 | 00 97 00 02 00 00 00 00 |... .L=.|........|
|00005720| 00 76 00 12 00 d5 01 00 | 01 02 00 e1 01 00 00 01 |.v......|........|
|00005730| 00 e9 01 00 00 01 00 00 | 0c 0b 00 e1 01 38 00 01 |........|.....8..|
|00005740| 00 7a 01 00 0c 0b 00 e9 | 01 38 00 01 00 7a 01 00 |.z......|.8...z..|
|00005750| 0c 0b 00 e1 01 38 00 01 | 00 f6 00 00 00 51 00 09 |.....8..|.....Q..|
|00005760| 00 08 00 ff ff 04 00 ff | ff ff ff 0b 00 00 00 ff |........|........|
|00005770| ff 02 0c 00 0b 00 54 6f | 67 67 6c 65 53 6f 75 6e |......To|ggleSoun|
|00005780| 64 01 00 b8 34 01 00 00 | 1b 00 ff ff c1 ff ff ff |d...4...|........|
|00005790| 00 00 97 00 16 00 00 00 | 20 0d 1e 3d 20 54 6f 67 |........| ..= Tog|
|000057a0| 67 6c 65 53 6f 75 6e 64 | 20 0d 21 3d 00 00 97 00 |gleSound| .!=....|
|000057b0| 48 00 00 00 20 20 20 52 | 65 76 65 72 73 65 73 20 |H... R|everses |
|000057c0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 76 61 6c 75 |the curr|ent valu|
|000057d0| 65 20 66 6f 72 20 4e 6f | 53 6f 75 6e 64 2c 20 74 |e for No|Sound, t|
|000057e0| 68 65 6e 20 70 72 69 6e | 74 73 20 74 68 61 74 20 |hen prin|ts that |
|000057f0| 76 61 6c 75 65 20 6e 65 | 78 74 00 00 97 00 33 00 |value ne|xt....3.|
|00005800| 00 00 20 20 20 74 6f 20 | 74 68 65 20 22 54 6f 67 |.. to |the "Tog|
|00005810| 67 6c 65 20 53 6f 75 6e | 64 22 20 6f 70 74 69 6f |gle Soun|d" optio|
|00005820| 6e 20 6f 6e 20 74 68 65 | 20 73 6f 72 74 20 6d 65 |n on the| sort me|
|00005830| 6e 75 2e 72 00 00 97 00 | 06 00 00 00 20 0d 4c 3d |nu.r....|.... .L=|
|00005840| 00 00 97 00 02 00 00 00 | 00 00 76 00 12 00 f1 01 |........|..v.....|
|00005850| 00 01 02 00 89 01 00 00 | 01 00 00 02 00 00 01 00 |........|........|
|00005860| 00 0c 0b 00 cf 02 74 01 | 0c 00 cf 02 00 0c 73 01 |......t.|......s.|
|00005870| 0b 00 89 01 73 01 0b 00 | 00 02 64 11 00 01 c1 00 |....s...|..d.....|
|00005880| 04 00 00 0c 0b 00 cf 02 | 61 00 00 00 00 18 6d 01 |........|a.....m.|
|00005890| 04 00 3a 20 c3 f6 95 00 | 93 00 00 0c 49 00 ff ff |..: ....|....I...|
|000058a0| 00 18 6d 01 04 00 3a 20 | b6 7d 95 00 93 00 00 0c |..m...: |.}......|
|000058b0| 50 00 00 00 51 00 09 00 | 08 00 ff ff 04 00 ff ff |P...Q...|........|
|000058c0| ff ff 0f 00 00 00 ff ff | 02 0c |........|.. |
+--------+-------------------------+-------------------------+--------+--------+