home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l190 / 1.ddi / SORTDEMO.BAS < prev    next >
Unknown  |  1988-09-08  |  21.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.

ConfidenceProgramDetectionMatch TypeSupport
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 01 00 0c 00 81 01 | 82 01 06 00 01 02 03 04 |........|........|
|00000010| 05 08 14 10 ff ff 24 00 | ff ff 3b 05 4d 01 56 00 |......$.|..;.M.V.|
|00000020| 1d 01 88 00 1a 02 96 00 | 00 00 60 00 bd 00 01 01 |........|..`.....|
|00000030| 77 01 61 03 cb 00 97 02 | 2e 04 aa 01 68 01 6b 00 |w.a.....|....h.k.|
|00000040| 9a 01 a5 00 8b 01 f6 02 | 00 00 74 00 c7 02 7d 00 |........|..t...}.|
|00000050| 5b 00 3c 01 6f 03 7d 03 | b2 00 df 01 00 00 00 00 |[.<.o.}.|........|
|00000060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 38 04 |........|......8.|
|00000070| 52 00 f3 00 00 01 41 7b | 02 00 01 5a 38 02 00 07 |R.....A{|...Z8...|
|00000080| 52 61 6e 64 49 6e 74 1c | 03 00 05 6c 6f 77 65 72 |RandInt.|...lower|
|00000090| c3 01 00 05 55 70 70 65 | 72 11 01 40 07 42 6f 78 |....Uppe|r..@.Box|
|000000a0| 49 6e 69 74 30 02 40 0a | 42 75 62 62 6c 65 53 6f |Init0.@.|BubbleSo|
|000000b0| 72 74 59 01 40 0b 43 68 | 65 63 6b 53 63 72 65 65 |rtY.@.Ch|eckScree|
|000000c0| 6e 2b 01 40 09 44 72 61 | 77 46 72 61 6d 65 d7 00 |n+.@.Dra|wFrame..|
|000000d0| 00 07 54 6f 70 53 69 64 | 65 46 02 00 0a 42 6f 74 |..TopSid|eF...Bot|
|000000e0| 74 6f 6d 53 69 64 65 e4 | 00 00 08 4c 65 66 74 53 |tomSide.|...LeftS|
|000000f0| 69 64 65 00 00 00 09 52 | 69 67 68 74 53 69 64 65 |ide....R|ightSide|
|00000100| cf 01 40 0b 45 6c 61 70 | 73 65 64 54 69 6d 65 04 |..@.Elap|sedTime.|
|00000110| 02 00 0a 43 75 72 72 65 | 6e 74 52 6f 77 92 01 40 |...Curre|ntRow..@|
|00000120| 0c 45 78 63 68 61 6e 67 | 65 53 6f 72 74 f8 01 40 |.Exchang|eSort..@|
|00000130| 08 48 65 61 70 53 6f 72 | 74 ee 01 40 0a 49 6e 69 |.HeapSor|t..@.Ini|
|00000140| 74 69 61 6c 69 7a 65 38 | 03 40 0d 49 6e 73 65 72 |tialize8|.@.Inser|
|00000150| 74 69 6f 6e 53 6f 72 74 | d4 02 40 0d 50 65 72 63 |tionSort|..@.Perc|
|00000160| 6f 6c 61 74 65 44 6f 77 | 6e 0e 02 00 08 4d 61 78 |olateDow|n....Max|
|00000170| 4c 65 76 65 6c 60 02 40 | 0b 50 65 72 63 6f 6c 61 |Level`.@|.Percola|
|00000180| 74 65 55 70 7e 01 40 0b | 50 72 69 6e 74 4f 6e 65 |teUp~.@.|PrintOne|
|00000190| 42 61 72 4b 03 00 03 52 | 6f 77 de 02 40 09 51 75 |BarK...R|ow..@.Qu|
|000001a0| 69 63 6b 53 6f 72 74 be | 02 00 03 4c 6f 77 b7 01 |ickSort.|...Low..|
|000001b0| 00 04 48 69 67 68 00 03 | 40 0c 52 65 69 6e 69 74 |..High..|@.Reinit|
|000001c0| 69 61 6c 69 7a 65 d7 01 | 40 09 53 68 65 6c 6c 53 |ialize..|@.ShellS|
|000001d0| 6f 72 74 17 03 40 08 53 | 6f 72 74 4d 65 6e 75 00 |ort..@.S|ortMenu.|
|000001e0| 00 40 08 53 77 61 70 42 | 61 72 73 6d 02 00 04 52 |.@.SwapB|arsm...R|
|000001f0| 6f 77 31 e3 03 00 04 52 | 6f 77 32 e9 02 40 0b 54 |ow1....R|ow2..@.T|
|00000200| 6f 67 67 6c 65 53 6f 75 | 6e 64 27 02 00 06 43 6f |oggleSou|nd'...Co|
|00000210| 6c 75 6d 6e d5 03 00 08 | 53 6f 72 74 54 79 70 65 |lumn....|SortType|
|00000220| 00 00 00 06 4c 65 6e 67 | 74 68 00 00 00 08 43 6f |....Leng|th....Co|
|00000230| 6c 6f 72 56 61 6c 00 00 | 00 09 42 61 72 53 74 72 |lorVal..|..BarStr|
|00000240| 69 6e 67 8a 02 00 05 46 | 41 4c 53 45 00 00 00 04 |ing....F|ALSE....|
|00000250| 54 52 55 45 a5 02 00 0a | 4c 45 46 54 43 4f 4c 55 |TRUE....|LEFTCOLU|
|00000260| 4d 4e 54 02 00 0a 4e 55 | 4d 4f 50 54 49 4f 4e 53 |MNT...NU|MOPTIONS|
|00000270| 9b 03 00 08 4e 55 4d 53 | 4f 52 54 53 b3 02 08 09 |....NUMS|ORTS....|
|00000280| 53 6f 72 74 41 72 72 61 | 79 25 03 08 0a 53 6f 72 |SortArra|y%...Sor|
|00000290| 74 42 61 63 6b 75 70 00 | 00 00 0b 4f 70 74 69 6f |tBackup.|...Optio|
|000002a0| 6e 54 69 74 6c 65 00 00 | 00 09 53 74 61 72 74 54 |nTitle..|..StartT|
|000002b0| 69 6d 65 0c 03 00 0a 46 | 6f 72 65 67 72 6f 75 6e |ime....F|oregroun|
|000002c0| 64 00 00 00 0a 42 61 63 | 6b 67 72 6f 75 6e 64 ec |d....Bac|kground.|
|000002d0| 03 00 07 4e 6f 53 6f 75 | 6e 64 42 03 00 05 50 61 |...NoSou|ndB...Pa|
|000002e0| 75 73 65 00 00 00 09 53 | 65 6c 65 63 74 69 6f 6e |use....S|election|
|000002f0| 00 00 00 06 4d 61 78 52 | 6f 77 00 00 00 07 49 6e |....MaxR|ow....In|
|00000300| 69 74 52 6f 77 55 03 00 | 09 4d 61 78 43 6f 6c 6f |itRowU..|.MaxColo|
|00000310| 72 73 00 00 04 06 47 65 | 74 52 6f 77 00 00 04 08 |rs....Ge|tRow....|
|00000320| 4d 6f 6e 6f 54 72 61 70 | 2f 03 04 07 52 6f 77 54 |MonoTrap|/...RowT|
|00000330| 72 61 70 87 03 00 01 49 | 24 04 00 05 4c 69 6d 69 |rap....I|$...Limi|
|00000340| 74 00 00 00 06 53 77 69 | 74 63 68 00 00 00 05 55 |t....Swi|tch....U|
|00000350| 4c 45 46 54 1a 04 00 06 | 55 52 49 47 48 54 a8 03 |LEFT....|URIGHT..|
|00000360| 00 05 4c 4c 45 46 54 96 | 03 00 06 4c 52 49 47 48 |..LLEFT.|...LRIGH|
|00000370| 54 b4 03 00 08 56 45 52 | 54 49 43 41 4c bd 03 00 |T....VER|TICAL...|
|00000380| 0a 48 4f 52 49 5a 4f 4e | 54 41 4c 00 00 00 0a 46 |.HORIZON|TAL....F|
|00000390| 72 61 6d 65 57 69 64 74 | 68 ca 03 00 06 46 4f 52 |rameWidt|h....FOR|
|000003a0| 4d 41 54 00 00 00 0b 53 | 6d 61 6c 6c 65 73 74 52 |MAT....S|mallestR|
|000003b0| 6f 77 00 00 00 01 4a 00 | 00 00 09 54 65 6d 70 41 |ow....J.|...TempA|
|000003c0| 72 72 61 79 00 00 00 08 | 4d 61 78 49 6e 64 65 78 |rray....|MaxIndex|
|000003d0| 03 04 00 05 49 6e 64 65 | 78 f6 03 00 09 42 61 72 |....Inde|x....Bar|
|000003e0| 4c 65 6e 67 74 68 10 04 | 08 07 54 65 6d 70 56 61 |Length..|..TempVa|
|000003f0| 6c 00 00 00 0a 54 65 6d | 70 4c 65 6e 67 74 68 00 |l....Tem|pLength.|
|00000400| 00 00 05 43 68 69 6c 64 | 00 00 00 06 50 61 72 65 |...Child|....Pare|
|00000410| 6e 74 00 00 00 09 52 61 | 6e 64 49 6e 64 65 78 00 |nt....Ra|ndIndex.|
|00000420| 00 00 09 50 61 72 74 69 | 74 69 6f 6e 00 00 00 06 |...Parti|tion....|
|00000430| 4f 66 66 73 65 74 00 00 | 00 06 45 73 63 61 70 65 |Offset..|..Escape|
|00000440| 00 00 00 06 4f 70 74 69 | 6f 6e 00 00 00 06 43 68 |....Opti|on....Ch|
|00000450| 6f 69 63 65 00 00 00 00 | 00 00 00 00 00 00 00 00 |oice....|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 97 00 |........|........|
|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 4e 00 00 00 20 70 | 72 69 6e 74 73 20 32 35 |..N... p|rints 25|
|00000510| 20 6f 72 20 34 33 20 68 | 6f 72 69 7a 6f 6e 74 61 | or 43 h|orizonta|
|00000520| 6c 20 62 61 72 73 2c 20 | 61 6c 6c 20 6f 66 20 64 |l bars, |all of d|
|00000530| 69 66 66 65 72 65 6e 74 | 20 6c 65 6e 67 74 68 73 |ifferent| lengths|
|00000540| 20 61 6e 64 20 61 6c 6c | 20 69 6e 20 72 61 6e 64 | and all| in rand|
|00000550| 6f 6d 00 00 97 00 37 7c | 0b 00 00 97 00 06 00 00 |om....7||........|
|00000560| 00 20 0d 4c 3d 00 00 97 | 00 0d 00 00 00 0d 21 20 |. .L=...|......! |
|00000570| 53 4f 52 54 44 45 4d 4f | 20 00 00 97 00 4b 00 00 |SORTDEMO| ....K..|
|00000580| 00 20 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 67 |. This p|rogram g|
|00000590| 72 61 70 68 69 63 61 6c | 6c 79 20 64 65 6d 6f 6e |raphical|ly demon|
|000005a0| 73 74 72 61 74 65 73 20 | 73 69 78 20 63 6f 6d 6d |strates |six comm|
|000005b0| 6f 6e 20 73 6f 72 74 69 | 6e 67 20 61 6c 67 6f 72 |on sorti|ng algor|
|000005c0| 69 74 68 6d 73 2e 20 20 | 49 74 3d 00 00 97 00 4e |ithms. |It=....N|
|000005d0| 00 00 00 20 70 72 69 6e | 74 73 20 32 35 20 6f 72 |... prin|ts 25 or|
|000005e0| 20 34 33 20 68 6f 72 69 | 7a 6f 6e 74 61 6c 20 62 | 43 hori|zontal b|
|000005f0| 61 72 73 2c 20 61 6c 6c | 20 6f 66 20 64 69 66 66 |ars, all| of diff|
|00000600| 65 72 65 6e 74 20 6c 65 | 6e 67 74 68 73 20 61 6e |erent le|ngths an|
|00000610| 64 20 61 6c 6c 20 69 6e | 20 72 61 6e 64 6f 6d 00 |d all in| random.|
|00000620| 00 97 00 37 00 00 00 20 | 6f 72 64 65 72 2c 20 74 |...7... |order, t|
|00000630| 68 65 6e 20 73 6f 72 74 | 73 20 74 68 65 20 62 61 |hen sort|s the ba|
|00000640| 72 73 20 66 72 6f 6d 20 | 73 6d 61 6c 6c 65 73 74 |rs from |smallest|
|00000650| 20 74 6f 20 6c 6f 6e 67 | 65 73 74 2e 6e 00 00 97 | to long|est.n...|
|00000660| 00 02 00 00 00 00 00 97 | 00 48 00 00 00 20 54 68 |........|.H... Th|
|00000670| 65 20 70 72 6f 67 72 61 | 6d 20 61 6c 73 6f 20 75 |e progra|m also u|
|00000680| 73 65 73 20 53 4f 55 4e | 44 20 73 74 61 74 65 6d |ses SOUN|D statem|
|00000690| 65 6e 74 73 20 74 6f 20 | 67 65 6e 65 72 61 74 65 |ents to |generate|
|000006a0| 20 64 69 66 66 65 72 65 | 6e 74 20 70 69 74 63 68 | differe|nt pitch|
|000006b0| 65 73 2c 00 00 97 00 4a | 00 00 00 20 64 65 70 65 |es,....J|... depe|
|000006c0| 6e 64 69 6e 67 20 6f 6e | 20 74 68 65 20 6c 6f 63 |nding on| the loc|
|000006d0| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 62 61 72 |ation of| the bar|
|000006e0| 20 62 65 69 6e 67 20 70 | 72 69 6e 74 65 64 2e 20 | being p|rinted. |
|000006f0| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 53 4f |Note tha|t the SO|
|00000700| 55 4e 44 00 00 97 00 49 | 00 00 00 20 73 74 61 74 |UND....I|... stat|
|00000710| 65 6d 65 6e 74 73 20 64 | 65 6c 61 79 20 74 68 65 |ements d|elay the|
|00000720| 20 73 70 65 65 64 20 6f | 66 20 65 61 63 68 20 73 | speed o|f each s|
|00000730| 6f 72 74 69 6e 67 20 61 | 6c 67 6f 72 69 74 68 6d |orting a|lgorithm|
|00000740| 20 73 6f 20 79 6f 75 20 | 63 61 6e 20 66 6f 6c 6c | so you |can foll|
|00000750| 6f 77 44 00 00 97 00 4b | 00 00 00 20 74 68 65 20 |owD....K|... the |
|00000760| 70 72 6f 67 72 65 73 73 | 20 6f 66 20 74 68 65 20 |progress| of the |
|00000770| 73 6f 72 74 2e 20 20 54 | 68 65 72 65 66 6f 72 65 |sort. T|herefore|
|00000780| 2c 20 74 68 65 20 74 69 | 6d 65 73 20 73 68 6f 77 |, the ti|mes show|
|00000790| 6e 20 61 72 65 20 66 6f | 72 20 63 6f 6d 70 61 72 |n are fo|r compar|
|000007a0| 69 73 6f 6e 00 00 00 97 | 00 38 00 00 00 20 6f 6e |ison....|.8... on|
|000007b0| 6c 79 2e 20 54 68 65 79 | 20 61 72 65 20 6e 6f 74 |ly. They| are not|
|000007c0| 20 61 6e 20 61 63 63 75 | 72 61 74 65 20 6d 65 61 | an accu|rate mea|
|000007d0| 73 75 72 65 20 6f 66 20 | 73 6f 72 74 20 73 70 65 |sure of |sort spe|
|000007e0| 65 64 2e 00 00 97 00 02 | 00 00 00 00 00 97 00 49 |ed......|.......I|
|000007f0| 00 00 00 20 49 66 20 79 | 6f 75 20 75 73 65 20 74 |... If y|ou use t|
|00000800| 68 65 73 65 20 73 6f 72 | 74 69 6e 67 20 72 6f 75 |hese sor|ting rou|
|00000810| 74 69 6e 65 73 20 69 6e | 20 79 6f 75 72 20 6f 77 |tines in| your ow|
|00000820| 6e 20 70 72 6f 67 72 61 | 6d 73 2c 20 79 6f 75 20 |n progra|ms, you |
|00000830| 6d 61 79 20 6e 6f 74 69 | 63 65 6f 00 00 97 00 43 |may noti|ceo....C|
|00000840| 00 00 00 20 61 20 64 69 | 66 66 65 72 65 6e 63 65 |... a di|fference|
|00000850| 20 69 6e 20 74 68 65 69 | 72 20 72 65 6c 61 74 69 | in thei|r relati|
|00000860| 76 65 20 73 70 65 65 64 | 73 20 28 66 6f 72 20 65 |ve speed|s (for e|
|00000870| 78 61 6d 70 6c 65 2c 20 | 74 68 65 20 65 78 63 68 |xample, |the exch|
|00000880| 61 6e 67 65 6e 00 00 97 | 00 45 00 00 00 20 73 6f |angen...|.E... so|
|00000890| 72 74 20 6d 61 79 20 62 | 65 20 66 61 73 74 65 72 |rt may b|e faster|
|000008a0| 20 74 68 61 6e 20 74 68 | 65 20 73 68 65 6c 6c 20 | than th|e shell |
|000008b0| 73 6f 72 74 29 20 64 65 | 70 65 6e 64 69 6e 67 20 |sort) de|pending |
|000008c0| 6f 6e 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |on the n|umber of|
|000008d0| 00 00 00 97 00 44 00 00 | 00 20 65 6c 65 6d 65 6e |.....D..|. elemen|
|000008e0| 74 73 20 74 6f 20 62 65 | 20 73 6f 72 74 65 64 20 |ts to be| sorted |
|000008f0| 61 6e 64 20 68 6f 77 20 | 22 73 63 72 61 6d 62 6c |and how |"scrambl|
|00000900| 65 64 22 20 74 68 65 79 | 20 61 72 65 20 74 6f 20 |ed" they| are to |
|00000910| 62 65 67 69 6e 20 77 69 | 74 68 2e 00 00 97 00 06 |begin wi|th......|
|00000920| 00 00 00 20 0d 4c 3d 00 | 00 00 00 1b 00 ff ff c1 |... .L=.|........|
|00000930| ff ff ff 97 00 18 00 10 | 00 20 44 65 66 61 75 6c |........|. Defaul|
|00000940| 74 20 74 79 70 65 20 69 | 6e 74 65 67 65 72 2e 00 |t type i|nteger..|
|00000950| 00 00 00 97 00 4d 00 00 | 00 20 44 65 63 6c 61 72 |.....M..|. Declar|
|00000960| 65 20 46 55 4e 43 54 49 | 4f 4e 20 61 6e 64 20 53 |e FUNCTI|ON and S|
|00000970| 55 42 20 70 72 6f 63 65 | 64 75 72 65 73 2c 20 61 |UB proce|dures, a|
|00000980| 6e 64 20 74 68 65 20 6e | 75 6d 62 65 72 20 61 6e |nd the n|umber an|
|00000990| 64 20 74 79 70 65 20 6f | 66 20 61 72 67 75 6d 65 |d type o|f argume|
|000009a0| 6e 74 73 3a 3d 00 08 44 | 00 12 00 60 00 81 02 02 |nts:=..D|...`....|
|000009b0| 00 6b 00 00 00 01 00 74 | 00 00 00 01 00 00 00 00 |.k.....t|........|
|000009c0| 08 44 00 06 00 7d 00 00 | 01 00 00 00 08 44 00 06 |.D...}..|.....D..|
|000009d0| 00 88 00 00 01 00 00 00 | 08 44 00 06 00 96 00 00 |........|.D......|
|000009e0| 01 00 00 00 08 44 00 1e | 00 a5 00 00 01 04 00 b2 |.....D..|........|
|000009f0| 00 00 00 01 00 bd 00 00 | 00 01 00 cb 00 00 00 01 |........|........|
|00000a00| 00 d7 00 00 00 01 00 00 | 08 44 00 0c 00 e4 00 00 |........|.D......|
|00000a10| 01 01 00 f3 00 00 00 01 | 00 00 08 44 00 06 00 01 |........|...D....|
|00000a20| 01 00 01 00 00 00 08 44 | 00 06 00 11 01 00 01 00 |.......D|........|
|00000a30| 00 00 08 44 00 06 00 1d | 01 00 01 00 00 00 08 44 |...D....|.......D|
|00000a40| 00 06 00 2b 01 00 01 00 | 00 00 08 44 00 0c 00 3c |...+....|...D...<|
|00000a50| 01 00 01 01 00 4d 01 00 | 00 01 00 00 08 44 00 0c |.....M..|.....D..|
|00000a60| 00 59 01 00 01 01 00 4d | 01 00 00 01 00 00 08 44 |.Y.....M|.......D|
|00000a70| 00 0c 00 68 01 00 01 01 | 00 77 01 00 00 01 00 00 |...h....|.w......|
|00000a80| 08 44 00 12 00 7e 01 00 | 01 02 00 8b 01 00 00 01 |.D...~..|........|
|00000a90| 00 92 01 00 00 01 00 00 | 08 44 00 06 00 9a 01 00 |........|.D......|
|00000aa0| 01 00 00 00 08 44 00 06 | 00 aa 01 00 01 00 00 00 |.....D..|........|
|00000ab0| 08 44 00 06 00 b7 01 00 | 01 00 00 00 08 44 00 12 |.D......|.....D..|
|00000ac0| 00 c3 01 00 01 02 00 cf | 01 00 00 01 00 d7 01 00 |........|........|
|00000ad0| 00 01 00 00 08 44 00 12 | 00 df 01 00 01 02 00 77 |.....D..|.......w|
|00000ae0| 01 00 00 01 00 ee 01 00 | 00 01 00 00 00 00 00 97 |........|........|
|00000af0| 00 4a 00 00 00 20 44 65 | 66 69 6e 65 20 74 68 65 |.J... De|fine the|
|00000b00| 20 64 61 74 61 20 74 79 | 70 65 20 75 73 65 64 20 | data ty|pe used |
|00000b10| 74 6f 20 68 6f 6c 64 20 | 74 68 65 20 69 6e 66 6f |to hold |the info|
|00000b20| 72 6d 61 74 69 6f 6e 20 | 66 6f 72 20 65 61 63 68 |rmation |for each|
|00000b30| 20 63 6f 6c 6f 72 65 64 | 20 62 61 72 3a 00 08 20 | colored| bar:.. |
|00000b40| 00 9a 06 f8 01 00 14 19 | 00 04 02 16 00 01 00 0c |........|........|
|00000b50| 00 97 00 23 00 1f 00 20 | 42 61 72 20 6c 65 6e 67 |...#... |Bar leng|
|00000b60| 74 68 20 28 74 68 65 20 | 65 6c 65 6d 65 6e 74 20 |th (the |element |
|00000b70| 63 6f 6d 70 61 72 65 64 | 72 01 00 1f 00 97 00 1a |compared|r.......|
|00000b80| 00 1f 00 20 69 6e 20 74 | 68 65 20 64 69 66 66 65 |... in t|he diffe|
|00000b90| 72 65 6e 74 20 73 6f 72 | 74 73 29 00 14 19 00 0e |rent sor|ts).....|
|00000ba0| 02 16 00 01 00 0e 00 97 | 00 0c 00 1f 00 20 42 61 |........|..... Ba|
|00000bb0| 72 20 63 6f 6c 6f 72 00 | 14 19 00 1a 02 7c 01 06 |r color.|.....|..|
|00000bc0| 00 2b 00 0f 00 97 00 26 | 00 1f 00 20 54 68 65 20 |.+.....&|... The |
|00000bd0| 62 61 72 20 28 61 20 73 | 74 72 69 6e 67 20 6f 66 |bar (a s|tring of|
|00000be0| 20 34 33 20 63 68 61 72 | 61 63 74 65 72 73 29 00 | 43 char|acters).|
|00000bf0| 08 1d 00 ff ff 00 00 00 | 00 97 00 1c 00 00 00 20 |........|....... |
|00000c00| 44 65 63 6c 61 72 65 20 | 67 6c 6f 62 61 6c 20 63 |Declare |global c|
|00000c10| 6f 6e 73 74 61 6e 74 73 | 3a 00 08 23 00 64 01 0c |onstants|:..#.d..|
|00000c20| 00 27 02 0b 00 27 02 74 | 01 0c 00 30 02 65 01 31 |.'...'.t|...0.e.1|
|00000c30| 00 0c 00 38 02 00 08 23 | 00 65 01 0b 00 0c 00 46 |...8...#|.e.....F|
|00000c40| 02 64 19 0c 00 54 02 00 | 00 00 00 97 00 4c 00 00 |.d...T..|.....L..|
|00000c50| 00 20 44 65 63 6c 61 72 | 65 20 67 6c 6f 62 61 6c |. Declar|e global|
|00000c60| 20 76 61 72 69 61 62 6c | 65 73 2c 20 61 6e 64 20 | variabl|es, and |
|00000c70| 61 6c 6c 6f 63 61 74 65 | 20 73 74 6f 72 61 67 65 |allocate| storage|
|00000c80| 20 73 70 61 63 65 20 66 | 6f 72 20 74 68 65 6d 2e | space f|or them.|
|00000c90| 20 20 53 6f 72 74 41 72 | 72 61 79 00 00 97 00 4a | SortAr|ray....J|
|00000ca0| 00 00 00 20 61 6e 64 20 | 53 6f 72 74 42 61 63 6b |... and |SortBack|
|00000cb0| 75 70 20 61 72 65 20 62 | 6f 74 68 20 61 72 72 61 |up are b|oth arra|
|00000cc0| 79 73 20 6f 66 20 74 68 | 65 20 64 61 74 61 20 74 |ys of th|e data t|
|00000cd0| 79 70 65 20 53 6f 72 74 | 54 79 70 65 20 64 65 66 |ype Sort|Type def|
|00000ce0| 69 6e 65 64 20 61 62 6f | 76 65 3a 00 08 1a 00 7d |ined abo|ve:....}|
|00000cf0| 01 ff ff 64 05 65 01 2b | 00 15 00 f8 01 20 00 10 |...d.e.+|..... ..|
|00000d00| 00 02 00 60 02 64 05 65 | 01 2b 00 15 00 f8 01 41 |...`.d.e|.+.....A|
|00000d10| 00 10 00 02 00 6d 02 00 | 08 1a 00 7d 01 ff ff 64 |.....m..|...}...d|
|00000d20| 05 0b 00 46 02 7c 01 06 | 00 0c 00 2a 00 10 00 02 |...F.|..|...*....|
|00000d30| 00 7b 02 00 08 1a 00 7d | 01 ff ff 16 00 03 00 17 |.{.....}|........|
|00000d40| 00 0d 00 8a 02 00 08 1a | 00 7d 01 ff ff 0d 00 97 |........|.}......|
|00000d50| 02 0d 00 a5 02 0d 00 b3 | 02 0d 00 be 02 00 08 1a |........|........|
|00000d60| 00 7d 01 ff ff 0d 00 c7 | 02 0d 00 d4 02 0d 00 de |.}......|........|
|00000d70| 02 0d 00 e9 02 00 00 00 | 00 97 00 46 00 00 00 20 |........|...F... |
|00000d80| 44 61 74 61 20 73 74 61 | 74 65 6d 65 6e 74 73 20 |Data sta|tements |
|00000d90| 66 6f 72 20 74 68 65 20 | 64 69 66 66 65 72 65 6e |for the |differen|
|00000da0| 74 20 6f 70 74 69 6f 6e | 73 20 70 72 69 6e 74 65 |t option|s printe|
|00000db0| 64 20 69 6e 20 74 68 65 | 20 73 6f 72 74 20 6d 65 |d in the| sort me|
|00000dc0| 6e 75 3a 00 08 a6 00 34 | 00 02 00 20 49 6e 73 65 |nu:....4|... Inse|
|00000dd0| 72 74 69 6f 6e 2c 20 42 | 75 62 62 6c 65 2c 20 48 |rtion, B|ubble, H|
|00000de0| 65 61 70 2c 20 45 78 63 | 68 61 6e 67 65 2c 20 53 |eap, Exc|hange, S|
|00000df0| 68 65 6c 6c 2c 20 51 75 | 69 63 6b 2c 00 00 08 a6 |hell, Qu|ick,....|
|00000e00| 00 2e 00 02 00 20 54 6f | 67 67 6c 65 20 53 6f 75 |..... To|ggle Sou|
|00000e10| 6e 64 2c 20 2c 20 3c 20 | 20 20 28 53 6c 6f 77 65 |nd, , < | (Slowe|
|00000e20| 72 29 2c 20 3e 20 20 20 | 28 46 61 73 74 65 72 29 |r), > |(Faster)|
|00000e30| 00 00 00 00 00 97 00 24 | 00 00 00 20 42 65 67 69 |.......$|... Begi|
|00000e40| 6e 20 6c 6f 67 69 63 20 | 6f 66 20 6d 6f 64 75 6c |n logic |of modul|
|00000e50| 65 2d 6c 65 76 65 6c 20 | 63 6f 64 65 3a 00 00 00 |e-level |code:...|
|00000e60| 08 38 00 00 00 1d 01 97 | 00 1a 00 19 00 20 49 6e |.8......|..... In|
|00000e70| 69 74 69 61 6c 69 7a 65 | 20 64 61 74 61 20 76 61 |itialize| data va|
|00000e80| 6c 75 65 73 2e 00 08 38 | 00 00 00 b7 01 97 00 13 |lues...8|........|
|00000e90| 00 19 00 20 50 72 69 6e | 74 20 73 6f 72 74 20 6d |... Prin|t sort m|
|00000ea0| 65 6e 75 2e 76 00 08 65 | 01 50 00 0b 00 de 02 f8 |enu.v..e|.P......|
|00000eb0| 00 97 00 23 00 19 00 20 | 52 65 73 74 6f 72 65 20 |...#... |Restore |
|00000ec0| 6f 72 69 67 69 6e 61 6c | 20 6e 75 6d 62 65 72 20 |original| number |
|00000ed0| 6f 66 20 72 6f 77 73 2e | 00 00 08 73 01 64 1d 73 |of rows.|...s.d.s|
|00000ee0| 01 64 01 a4 00 04 00 97 | 00 1b 00 19 00 20 52 65 |.d......|..... Re|
|00000ef0| 73 74 6f 72 65 20 64 65 | 66 61 75 6c 74 20 63 6f |store de|fault co|
|00000f00| 6c 6f 72 0d 05 20 00 00 | 08 73 01 a3 00 00 08 4e |lor.. ..|.s.....N|
|00000f10| 00 00 00 00 00 97 00 47 | 00 00 00 20 47 65 74 52 |.......G|... GetR|
|00000f20| 6f 77 2c 20 4d 6f 6e 6f | 54 72 61 70 2c 20 61 6e |ow, Mono|Trap, an|
|00000f30| 64 20 52 6f 77 54 72 61 | 70 20 61 72 65 20 65 72 |d RowTra|p are er|
|00000f40| 72 6f 72 2d 68 61 6e 64 | 6c 69 6e 67 20 72 6f 75 |ror-hand|ling rou|
|00000f50| 74 69 6e 65 73 20 69 6e | 76 6f 6b 65 64 20 62 79 |tines in|voked by|
|00000f60| 00 00 00 97 00 48 00 00 | 00 20 74 68 65 20 43 68 |.....H..|. the Ch|
|00000f70| 65 63 6b 53 63 72 65 65 | 6e 20 53 55 42 20 70 72 |eckScree|n SUB pr|
|00000f80| 6f 63 65 64 75 72 65 2e | 20 20 47 65 74 52 6f 77 |ocedure.| GetRow|
|00000f90| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 77 68 65 74 | determi|nes whet|
|00000fa0| 68 65 72 20 74 68 65 20 | 70 72 6f 67 72 61 6d 00 |her the |program.|
|00000fb0| 00 97 00 45 00 00 00 20 | 73 74 61 72 74 65 64 20 |...E... |started |
|00000fc0| 77 69 74 68 20 32 35 2c | 20 34 33 2c 20 6f 72 20 |with 25,| 43, or |
|00000fd0| 35 30 20 6c 69 6e 65 73 | 2e 20 20 4d 6f 6e 6f 54 |50 lines|. MonoT|
|00000fe0| 72 61 70 20 64 65 74 65 | 72 6d 69 6e 65 73 20 74 |rap dete|rmines t|
|00000ff0| 68 65 20 63 75 72 72 65 | 6e 74 72 00 00 97 00 42 |he curre|ntr....B|
|00001000| 00 00 00 20 76 69 64 65 | 6f 20 61 64 61 70 74 65 |... vide|o adapte|
|00001010| 72 20 69 73 20 6d 6f 6e | 6f 63 68 72 6f 6d 65 2e |r is mon|ochrome.|
|00001020| 20 20 52 6f 77 54 72 61 | 70 20 73 65 74 73 20 74 | RowTra|p sets t|
|00001030| 68 65 20 6d 61 78 69 6d | 75 6d 20 70 6f 73 73 69 |he maxim|um possi|
|00001040| 62 6c 65 00 00 97 00 1d | 00 00 00 20 6e 75 6d 62 |ble.....|... numb|
|00001050| 65 72 20 6f 66 20 72 6f | 77 73 20 28 34 33 20 6f |er of ro|ws (43 o|
|00001060| 72 20 32 35 29 2e 65 00 | 00 04 00 50 0b f6 02 00 |r 25).e.|...P....|
|00001070| 0c 0b 00 de 02 65 01 32 | 00 03 01 61 00 00 00 00 |.....e.2|...a....|
|00001080| 18 65 01 2b 00 0c 00 de | 02 00 18 6c 00 00 0c 49 |.e.+....|...l...I|
|00001090| 00 ff ff 00 18 65 01 19 | 00 0c 00 de 02 00 18 6e |.....e..|.......n|
|000010a0| 00 00 0c 50 00 00 00 04 | 00 64 0b 00 03 00 0c 64 |...P....|.d.....d|
|000010b0| 09 0c 00 e9 02 00 0c 6e | 00 00 00 04 00 ff ff 0c |.......n|........|
|000010c0| 03 00 0c 65 01 19 00 0c | 00 d4 02 00 0c 6c 00 00 |...e....|.....l..|
|000010d0| 00 09 00 08 00 12 0b d4 | 03 e8 05 ff ff 62 00 00 |........|.....b..|
|000010e0| 00 00 00 02 01 00 07 00 | 52 61 6e 64 49 6e 74 02 |........|RandInt.|
|000010f0| 01 b8 04 01 00 00 1b 00 | ff ff c1 ff ff ff 00 00 |........|........|
|00001100| 97 00 13 00 00 00 20 0d | 1f 3d 20 52 61 6e 64 49 |...... .|.= RandI|
|00001110| 6e 74 25 20 0d 23 3d 00 | 00 00 97 00 4a 00 00 00 |nt% .#=.|....J...|
|00001120| 20 20 20 52 65 74 75 72 | 6e 73 20 61 20 72 61 6e | Retur|ns a ran|
|00001130| 64 6f 6d 20 69 6e 74 65 | 67 65 72 20 67 72 65 61 |dom inte|ger grea|
|00001140| 74 65 72 20 74 68 61 6e | 20 6f 72 20 65 71 75 61 |ter than| or equa|
|00001150| 6c 20 74 6f 20 74 68 65 | 20 4c 6f 77 65 72 20 70 |l to the| Lower p|
|00001160| 61 72 61 6d 65 74 65 72 | 00 00 97 00 33 00 00 00 |arameter|....3...|
|00001170| 20 20 20 61 6e 64 20 6c | 65 73 73 20 74 68 61 6e | and l|ess than|
|00001180| 20 6f 72 20 65 71 75 61 | 6c 20 74 6f 20 74 68 65 | or equa|l to the|
|00001190| 20 55 70 70 65 72 20 70 | 61 72 61 6d 65 74 65 72 | Upper p|arameter|
|000011a0| 2e 20 00 00 97 00 06 00 | 00 00 20 0d 4c 3d 00 00 |. ......|.. .L=..|
|000011b0| 97 00 02 00 00 00 00 00 | 58 00 12 00 60 00 81 02 |........|X...`...|
|000011c0| 02 00 6b 00 00 00 01 00 | 74 00 00 00 01 00 00 0c |..k.....|t.......|
|000011d0| 43 01 0b 00 74 00 0b 00 | 6b 00 77 01 64 05 00 01 |C...t...|k.w.d...|
|000011e0| 6e 01 70 01 26 01 0b 00 | 6b 00 00 01 0c 04 60 00 |n.p.&...|k.....`.|
|000011f0| 00 00 51 00 09 00 08 00 | ff ff 04 00 ff ff ff ff |..Q.....|........|
|00001200| 09 00 00 00 ff ff 02 0c | 00 07 00 42 6f 78 49 6e |........|...BoxIn|
|00001210| 69 74 01 00 b8 26 03 00 | 00 1b 00 ff ff c1 ff ff |it...&..|........|
|00001220| ff 00 00 97 00 12 00 00 | 00 20 0d 1f 3d 20 42 6f |........|. ..= Bo|
|00001230| 78 49 6e 69 74 20 0d 24 | 3d 00 00 97 00 4a 00 00 |xInit .$|=....J..|
|00001240| 00 0d 04 20 43 61 6c 6c | 73 20 74 68 65 20 44 72 |... Call|s the Dr|
|00001250| 61 77 46 72 61 6d 65 20 | 70 72 6f 63 65 64 75 72 |awFrame |procedur|
|00001260| 65 20 74 6f 20 64 72 61 | 77 20 74 68 65 20 66 72 |e to dra|w the fr|
|00001270| 61 6d 65 20 61 72 6f 75 | 6e 64 20 74 68 65 20 73 |ame arou|nd the s|
|00001280| 6f 72 74 20 6d 65 6e 75 | 2c 00 00 97 00 47 00 00 |ort menu|,....G..|
|00001290| 00 0d 04 20 74 68 65 6e | 20 70 72 69 6e 74 73 20 |... then| prints |
|000012a0| 74 68 65 20 64 69 66 66 | 65 72 65 6e 74 20 6f 70 |the diff|erent op|
|000012b0| 74 69 6f 6e 73 20 73 74 | 6f 72 65 64 20 69 6e 20 |tions st|ored in |
|000012c0| 74 68 65 20 4f 70 74 69 | 6f 6e 54 69 74 6c 65 20 |the Opti|onTitle |
|000012d0| 61 72 72 61 79 2e 6e 00 | 00 97 00 06 00 00 00 20 |array.n.|....... |
|000012e0| 0d 4c 3d 00 00 97 00 02 | 00 00 00 00 00 76 00 06 |.L=.....|.....v..|
|000012f0| 00 7d 00 00 01 00 00 00 | 0c 64 05 65 01 16 00 0b |.}......|.d.e....|
|00001300| 00 38 02 64 0d 77 01 65 | 01 4e 00 38 00 04 00 a5 |.8.d.w.e|.N.8....|
|00001310| 00 00 00 00 0c 73 01 64 | 0d 73 01 0b 00 38 02 64 |.....s.d|.s...8.d|
|00001320| 09 00 01 c1 00 04 00 06 | 00 6d 01 17 00 51 55 49 |........|.m...QUI|
|00001330| 43 4b 42 41 53 49 43 20 | 53 4f 52 54 49 4e 47 20 |CKBASIC |SORTING |
|00001340| 44 45 4d 4f 22 95 00 93 | 00 00 0c 73 01 64 15 c1 |DEMO"...|...s.d..|
|00001350| 00 02 00 00 0c 0b 00 17 | 03 64 05 0b 00 46 02 64 |........|.d...F.d|
|00001360| 05 77 01 56 00 ff ff ff | ff 00 18 72 01 73 01 0b |.w.V....|...r.s..|
|00001370| 00 38 02 c1 00 03 00 06 | 00 0b 00 17 03 0e 00 01 |.8......|........|
|00001380| 00 7b 02 96 00 00 0c 0b | 00 17 03 66 00 ff ff ff |.{......|...f....|
|00001390| ff 00 00 00 0c 97 00 44 | 00 03 00 20 44 6f 6e 27 |.......D|... Don'|
|000013a0| 74 20 70 72 69 6e 74 20 | 74 68 65 20 6c 61 73 74 |t print |the last|
|000013b0| 20 6f 70 74 69 6f 6e 20 | 28 3e 20 46 61 73 74 65 | option |(> Faste|
|000013c0| 72 29 20 69 66 20 74 68 | 65 20 6c 65 6e 67 74 68 |r) if th|e length|
|000013d0| 20 6f 66 20 74 68 65 20 | 50 61 75 73 65 00 0c 97 | of the |Pause...|
|000013e0| 00 1b 00 03 00 20 69 73 | 20 64 6f 77 6e 20 74 6f |..... is| down to|
|000013f0| 20 31 20 63 6c 6f 63 6b | 20 74 69 63 6b 3a 69 00 | 1 clock| tick:i.|
|00001400| 0c 0b 00 be 02 64 05 5f | 01 5d 00 00 00 72 01 73 |.....d._|.]...r.s|
|00001410| 01 0b 00 38 02 c1 00 03 | 00 06 00 0b 00 46 02 0e |...8....|.....F..|
|00001420| 00 01 00 7b 02 95 00 93 | 00 00 00 00 0c 97 00 44 |...{....|.......D|
|00001430| 00 03 00 20 54 6f 67 67 | 6c 65 20 73 6f 75 6e 64 |... Togg|le sound|
|00001440| 20 6f 6e 20 6f 72 20 6f | 66 66 2c 20 74 68 65 6e | on or o|ff, then|
|00001450| 20 70 72 69 6e 74 20 74 | 68 65 20 63 75 72 72 65 | print t|he curre|
|00001460| 6e 74 20 76 61 6c 75 65 | 20 66 6f 72 20 4e 6f 53 |nt value| for NoS|
|00001470| 6f 75 6e 64 3a 00 0c 0b | 00 b3 02 74 01 0c 00 b3 |ound:...|...t....|
|00001480| 02 00 0c 65 01 0c 00 0b | 00 38 02 65 01 0c 00 00 |...e....|.8.e....|
|00001490| 01 38 00 02 00 df 01 00 | 00 00 0c 73 01 0b 00 46 |.8......|...s...F|
|000014a0| 02 64 19 00 01 73 01 0b | 00 38 02 c1 00 04 00 00 |.d...s..|.8......|
|000014b0| 0c 6d 01 17 00 54 79 70 | 65 20 66 69 72 73 74 20 |.m...Typ|e first |
|000014c0| 63 68 61 72 61 63 74 65 | 72 20 6f 66 22 96 00 00 |characte|r of"...|
|000014d0| 0c 72 01 73 01 0b 00 38 | 02 c1 00 03 00 00 0c 6d |.r.s...8|.......m|
|000014e0| 01 1c 00 63 68 6f 69 63 | 65 20 28 20 49 20 42 20 |...choic|e ( I B |
|000014f0| 48 20 45 20 53 20 51 20 | 54 20 3c 20 3e 20 29 96 |H E S Q |T < > ).|
|00001500| 00 00 0c 72 01 73 01 0b | 00 38 02 c1 00 03 00 00 |...r.s..|.8......|
|00001510| 0c 6d 01 1b 00 6f 72 20 | 45 53 43 20 6b 65 79 20 |.m...or |ESC key |
|00001520| 74 6f 20 65 6e 64 20 70 | 72 6f 67 72 61 6d 3a 20 |to end p|rogram: |
|00001530| 22 95 00 93 00 00 00 51 | 00 09 00 08 00 ff ff 04 |"......Q|........|
|00001540| 00 ff ff ff ff 1e 00 00 | 00 ff ff 02 0c 00 0a 00 |........|........|
|00001550| 42 75 62 62 6c 65 53 6f | 72 74 01 00 b8 84 02 00 |BubbleSo|rt......|
|00001560| 00 1b 00 ff ff c1 ff ff | ff 00 00 97 00 15 00 00 |........|........|
|00001570| 00 20 0d 1e 3d 20 42 75 | 62 62 6c 65 53 6f 72 74 |. ..= Bu|bbleSort|
|00001580| 20 0d 22 3d 00 00 00 97 | 00 4a 00 00 00 0d 04 20 | ."=....|.J..... |
|00001590| 54 68 65 20 42 75 62 62 | 6c 65 53 6f 72 74 20 61 |The Bubb|leSort a|
|000015a0| 6c 67 6f 72 69 74 68 6d | 20 63 79 63 6c 65 73 20 |lgorithm| cycles |
|000015b0| 74 68 72 6f 75 67 68 20 | 53 6f 72 74 41 72 72 61 |through |SortArra|
|000015c0| 79 2c 20 63 6f 6d 70 61 | 72 69 6e 67 20 61 64 6a |y, compa|ring adj|
|000015d0| 61 63 65 6e 74 00 00 97 | 00 48 00 00 00 0d 04 20 |acent...|.H..... |
|000015e0| 65 6c 65 6d 65 6e 74 73 | 20 61 6e 64 20 73 77 61 |elements| and swa|
|000015f0| 70 70 69 6e 67 20 70 61 | 69 72 73 20 74 68 61 74 |pping pa|irs that|
|00001600| 20 61 72 65 20 6f 75 74 | 20 6f 66 20 6f 72 64 65 | are out| of orde|
|00001610| 72 2e 20 20 49 74 20 63 | 6f 6e 74 69 6e 75 65 73 |r. It c|ontinues|
|00001620| 20 74 6f 00 00 97 00 28 | 00 00 00 0d 04 20 64 6f | to....(|..... do|
|00001630| 20 74 68 69 73 20 75 6e | 74 69 6c 20 6e 6f 20 70 | this un|til no p|
|00001640| 61 69 72 73 20 61 72 65 | 20 73 77 61 70 70 65 64 |airs are| swapped|
|00001650| 2e 00 00 97 00 06 00 00 | 00 20 0d 4c 3d 00 00 97 |........|. .L=...|
|00001660| 00 02 00 00 00 00 00 76 | 00 06 00 88 00 00 01 00 |.......v|........|
|00001670| 00 00 0c 0b 00 d4 02 0c | 00 1c 03 00 0c 46 00 00 |........|.....F..|
|00001680| 18 0b 00 27 02 0c 00 25 | 03 00 18 0b 00 77 01 64 |...'...%|.....w.d|
|00001690| 05 0b 00 1c 03 64 05 77 | 01 6e 01 56 00 ff ff ff |.....d.w|.n.V....|
|000016a0| ff 00 00 00 24 97 00 3f | 00 09 00 20 54 77 6f 20 |....$..?|... Two |
|000016b0| 61 64 6a 61 63 65 6e 74 | 20 65 6c 65 6d 65 6e 74 |adjacent| element|
|000016c0| 73 20 61 72 65 20 6f 75 | 74 20 6f 66 20 6f 72 64 |s are ou|t of ord|
|000016d0| 65 72 2c 20 73 6f 20 73 | 77 61 70 20 74 68 65 69 |er, so s|wap thei|
|000016e0| 72 20 76 61 6c 75 65 73 | 3d 00 24 97 00 1d 00 09 |r values|=.$.....|
|000016f0| 00 20 61 6e 64 20 72 65 | 64 72 61 77 20 74 68 6f |. and re|draw tho|
|00001700| 73 65 20 74 77 6f 20 62 | 61 72 73 3a 6f 00 24 0b |se two b|ars:o.$.|
|00001710| 00 77 01 0e 00 01 00 60 | 02 11 00 04 02 0b 00 77 |.w.....`|.......w|
|00001720| 01 64 05 00 01 0e 00 01 | 00 60 02 11 00 04 02 5f |.d......|.`....._|
|00001730| 01 61 00 00 00 00 30 0b | 00 77 01 0e 00 01 00 60 |.a....0.|.w.....`|
|00001740| 02 0b 00 77 01 64 05 00 | 01 0e 00 01 00 60 02 ed |...w.d..|.....`..|
|00001750| 00 ff ff 00 30 0b 00 77 | 01 0b 00 77 01 64 05 00 |....0..w|...w.d..|
|00001760| 01 38 00 02 00 c3 01 00 | 30 0b 00 77 01 0c 00 25 |.8......|0..w...%|
|00001770| 03 00 24 50 00 00 18 0b | 00 77 01 66 00 ff ff ff |..$P....|.w.f....|
|00001780| ff 00 00 00 18 97 00 3c | 00 06 00 20 53 6f 72 74 |.......<|... Sort|
|00001790| 20 6f 6e 20 6e 65 78 74 | 20 70 61 73 73 20 6f 6e | on next| pass on|
|000017a0| 6c 79 20 74 6f 20 77 68 | 65 72 65 20 74 68 65 20 |ly to wh|ere the |
|000017b0| 6c 61 73 74 20 73 77 69 | 74 63 68 20 77 61 73 20 |last swi|tch was |
|000017c0| 6d 61 64 65 3a 00 18 0b | 00 25 03 0c 00 1c 03 00 |made:...|.%......|
|000017d0| 0c 0b 00 25 03 64 00 ff | ff 00 00 00 00 51 00 09 |...%.d..|.....Q..|
|000017e0| 00 08 00 ff ff 04 00 ff | ff ff ff 1b 00 00 00 ff |........|........|
|000017f0| ff 02 0c 00 0b 00 43 68 | 65 63 6b 53 63 72 65 65 |......Ch|eckScree|
|00001800| 6e 01 00 b8 ca 02 00 00 | 1b 00 ff ff c1 ff ff ff |n.......|........|
|00001810| 00 00 97 00 16 00 00 00 | 20 0d 1e 3d 20 43 68 65 |........| ..= Che|
|00001820| 63 6b 53 63 72 65 65 6e | 20 0d 21 3d 00 00 97 00 |ckScreen| .!=....|
|00001830| 42 00 00 00 0d 05 20 43 | 68 65 63 6b 73 20 66 6f |B..... C|hecks fo|
|00001840| 72 20 74 79 70 65 20 6f | 66 20 6d 6f 6e 69 74 6f |r type o|f monito|
|00001850| 72 20 28 56 47 41 2c 20 | 45 47 41 2c 20 43 47 41 |r (VGA, |EGA, CGA|
|00001860| 2c 20 6f 72 20 6d 6f 6e | 6f 63 68 72 6f 6d 65 29 |, or mon|ochrome)|
|00001870| 20 61 6e 64 00 00 97 00 | 35 00 00 00 0d 05 20 73 | and....|5..... s|
|00001880| 74 61 72 74 69 6e 67 20 | 6e 75 6d 62 65 72 20 6f |tarting |number o|
|00001890| 66 20 73 63 72 65 65 6e | 20 6c 69 6e 65 73 20 28 |f screen| lines (|
|000018a0| 35 30 2c 20 34 33 2c 20 | 6f 72 20 32 35 29 2e 6e |50, 43, |or 25).n|
|000018b0| 00 00 97 00 06 00 00 00 | 20 0d 4c 3d 00 00 97 00 |........| .L=....|
|000018c0| 02 00 00 00 00 00 76 00 | 06 00 96 00 00 01 00 00 |......v.|........|
|000018d0| 00 00 00 0c 97 00 46 00 | 03 00 20 54 72 79 20 6c |......F.|.. Try l|
|000018e0| 6f 63 61 74 69 6e 67 20 | 74 6f 20 74 68 65 20 35 |ocating |to the 5|
|000018f0| 30 74 68 20 72 6f 77 3b | 20 69 66 20 74 68 61 74 |0th row;| if that|
|00001900| 20 66 61 69 6c 73 2c 20 | 74 72 79 20 74 68 65 20 | fails, |try the |
|00001910| 34 33 72 64 2e 20 46 69 | 6e 61 6c 6c 79 2c 00 0c |43rd. Fi|nally,..|
|00001920| 97 00 32 00 03 00 20 69 | 66 20 74 68 61 74 20 66 |..2... i|f that f|
|00001930| 61 69 6c 73 2c 20 74 68 | 65 20 75 73 65 72 20 77 |ails, th|e user w|
|00001940| 61 73 20 75 73 69 6e 67 | 20 32 35 2d 6c 69 6e 65 |as using| 25-line|
|00001950| 20 6d 6f 64 65 3a 00 0c | 65 01 32 00 0c 00 de 02 | mode:..|e.2.....|
|00001960| 00 0c 67 00 f6 02 00 0c | 73 01 0b 00 de 02 73 01 |..g.....|s.....s.|
|00001970| 64 05 c1 00 04 00 00 00 | 00 0c 97 00 43 00 03 00 |d.......|....C...|
|00001980| 20 54 72 79 20 61 20 53 | 43 52 45 45 4e 20 31 20 | Try a S|CREEN 1 |
|00001990| 73 74 61 74 65 6d 65 6e | 74 20 74 6f 20 73 65 65 |statemen|t to see|
|000019a0| 20 69 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | if the |current |
|000019b0| 61 64 61 70 74 65 72 20 | 68 61 73 20 63 6f 6c 6f |adapter |has colo|
|000019c0| 72 6c 00 0c 97 00 3b 00 | 03 00 20 67 72 61 70 68 |rl....;.|.. graph|
|000019d0| 69 63 73 3b 20 69 66 20 | 74 68 61 74 20 63 61 75 |ics; if |that cau|
|000019e0| 73 65 73 20 61 6e 20 65 | 72 72 6f 72 2c 20 72 65 |ses an e|rror, re|
|000019f0| 73 65 74 20 4d 61 78 43 | 6f 6c 6f 72 73 20 74 6f |set MaxC|olors to|
|00001a00| 20 32 3a 61 00 0c 65 01 | 0f 00 0c 00 e9 02 00 0c | 2:a..e.|........|
|00001a10| 67 00 00 03 00 0c 73 01 | 64 05 e7 00 02 00 00 0c |g.....s.|d.......|
|00001a20| 73 01 64 01 e7 00 02 00 | 00 00 00 0c 97 00 47 00 |s.d.....|......G.|
|00001a30| 03 00 20 53 65 65 20 69 | 66 20 34 33 2d 6c 69 6e |.. See i|f 43-lin|
|00001a40| 65 20 6d 6f 64 65 20 69 | 73 20 61 63 63 65 70 74 |e mode i|s accept|
|00001a50| 65 64 3b 20 69 66 20 6e | 6f 74 2c 20 72 75 6e 20 |ed; if n|ot, run |
|00001a60| 74 68 69 73 20 70 72 6f | 67 72 61 6d 20 69 6e 20 |this pro|gram in |
|00001a70| 32 35 2d 6c 69 6e 65 00 | 00 0c 97 00 08 00 03 00 |25-line.|........|
|00001a80| 20 6d 6f 64 65 3a 00 0c | 65 01 2b 00 0c 00 d4 02 | mode:..|e.+.....|
|00001a90| 00 0c 67 00 0c 03 00 0c | 65 01 50 00 0b 00 d4 02 |..g.....|e.P.....|
|00001aa0| f8 00 00 0c 67 00 ff ff | 97 00 1b 00 20 00 20 54 |....g...|.... . T|
|00001ab0| 75 72 6e 20 6f 66 66 20 | 65 72 72 6f 72 20 74 72 |urn off |error tr|
|00001ac0| 61 70 70 69 6e 67 2e 74 | 00 00 51 00 09 00 08 00 |apping.t|..Q.....|
|00001ad0| ff ff 04 00 ff ff ff ff | 1c 00 00 00 ff ff 02 0c |........|........|
|00001ae0| 00 09 00 44 72 61 77 46 | 72 61 6d 65 01 00 b8 aa |...DrawF|rame....|
|00001af0| 02 00 00 1b 00 ff ff c1 | ff ff ff 00 00 97 00 14 |........|........|
|00001b00| 00 00 00 20 0d 1e 3d 20 | 44 72 61 77 46 72 61 6d |... ..= |DrawFram|
|00001b10| 65 20 0d 23 3d 00 00 97 | 00 4e 00 00 00 20 20 20 |e .#=...|.N... |
|00001b20| 44 72 61 77 73 20 61 20 | 72 65 63 74 61 6e 67 75 |Draws a |rectangu|
|00001b30| 6c 61 72 20 66 72 61 6d | 65 20 75 73 69 6e 67 20 |lar fram|e using |
|00001b40| 74 68 65 20 68 69 67 68 | 2d 6f 72 64 65 72 20 41 |the high|-order A|
|00001b50| 53 43 49 49 20 63 68 61 | 72 61 63 74 65 72 73 20 |SCII cha|racters |
|00001b60| c9 20 28 32 30 31 29 20 | 2c 00 00 97 00 48 00 00 |. (201) |,....H..|
|00001b70| 00 20 20 20 bb 20 28 31 | 38 37 29 20 2c 20 c8 20 |. . (1|87) , . |
|00001b80| 28 32 30 30 29 20 2c 20 | bc 20 28 31 38 38 29 20 |(200) , |. (188) |
|00001b90| 2c 20 ba 20 28 31 38 36 | 29 20 2c 20 61 6e 64 20 |, . (186|) , and |
|00001ba0| cd 20 28 32 30 35 29 2e | 20 54 68 65 20 70 61 72 |. (205).| The par|
|00001bb0| 61 6d 65 74 65 72 73 00 | 00 97 00 48 00 00 00 20 |ameters.|...H... |
|00001bc0| 20 20 54 6f 70 53 69 64 | 65 2c 20 42 6f 74 74 6f | TopSid|e, Botto|
|00001bd0| 6d 53 69 64 65 2c 20 4c | 65 66 74 53 69 64 65 2c |mSide, L|eftSide,|
|00001be0| 20 61 6e 64 20 52 69 67 | 68 74 53 69 64 65 20 61 | and Rig|htSide a|
|00001bf0| 72 65 20 74 68 65 20 72 | 6f 77 20 61 6e 64 20 63 |re the r|ow and c|
|00001c00| 6f 6c 75 6d 6e 00 00 97 | 00 47 00 00 00 20 20 20 |olumn...|.G... |
|00001c10| 61 72 67 75 6d 65 6e 74 | 73 20 66 6f 72 20 74 68 |argument|s for th|
|00001c20| 65 20 75 70 70 65 72 2d | 6c 65 66 74 20 61 6e 64 |e upper-|left and|
|00001c30| 20 6c 6f 77 65 72 2d 72 | 69 67 68 74 20 63 6f 72 | lower-r|ight cor|
|00001c40| 6e 65 72 73 20 6f 66 20 | 74 68 65 20 66 72 61 6d |ners of |the fram|
|00001c50| 65 2e 6e 00 00 97 00 06 | 00 00 00 20 0d 4c 3d 00 |e.n.....|... .L=.|
|00001c60| 00 97 00 02 00 00 00 00 | 00 76 00 1e 00 a5 00 00 |........|.v......|
|00001c70| 01 04 00 b2 00 00 00 01 | 00 bd 00 00 00 01 00 cb |........|........|
|00001c80| 00 00 00 01 00 d7 00 00 | 00 01 00 00 0c 23 00 65 |........|.....#.e|
|00001c90| 01 c9 00 0c 00 2f 03 65 | 01 bb 00 0c 00 38 03 65 |...../.e|.....8.e|
|00001ca0| 01 c8 00 0c 00 42 03 65 | 01 bc 00 0c 00 4b 03 00 |.....B.e|.....K..|
|00001cb0| 0c 23 00 65 01 ba 00 0c | 00 55 03 65 01 cd 00 0c |.#.e....|.U.e....|
|00001cc0| 00 61 03 00 00 00 0c 0b | 00 d7 00 0b 00 cb 00 77 |.a......|.......w|
|00001cd0| 01 64 05 77 01 0c 00 6f | 03 00 0c 73 01 0b 00 b2 |.d.w...o|...s....|
|00001ce0| 00 73 01 0b 00 cb 00 c1 | 00 04 00 00 0c 0b 00 2f |.s......|......./|
|00001cf0| 03 09 01 95 00 0b 00 6f | 03 0b 00 61 03 53 01 95 |.......o|...a.S..|
|00001d00| 00 0b 00 38 03 09 01 95 | 00 93 00 00 0c 0b 00 77 |...8....|.......w|
|00001d10| 01 0b 00 b2 00 64 05 00 | 01 0b 00 bd 00 64 05 77 |.....d..|.....d.w|
|00001d20| 01 56 00 ff ff ff ff 00 | 18 73 01 0b 00 77 01 73 |.V......|.s...w.s|
|00001d30| 01 0b 00 cb 00 c1 00 04 | 00 00 18 0b 00 55 03 09 |........|.....U..|
|00001d40| 01 95 00 0b 00 6f 03 8f | 00 92 00 0b 00 55 03 09 |.....o..|.....U..|
|00001d50| 01 95 00 93 00 00 0c 0b | 00 77 01 66 00 ff ff ff |........|.w.f....|
|00001d60| ff 00 0c 73 01 0b 00 bd | 00 73 01 0b 00 cb 00 c1 |...s....|.s......|
|00001d70| 00 04 00 00 0c 0b 00 42 | 03 09 01 95 00 0b 00 6f |.......B|.......o|
|00001d80| 03 0b 00 61 03 53 01 95 | 00 0b 00 4b 03 09 01 95 |...a.S..|...K....|
|00001d90| 00 93 00 00 00 51 00 09 | 00 08 00 ff ff 04 00 ff |.....Q..|........|
|00001da0| ff ff ff 16 00 00 00 ff | ff 02 0c 00 0b 00 45 6c |........|......El|
|00001db0| 61 70 73 65 64 54 69 6d | 65 01 00 b8 1c 03 00 00 |apsedTim|e.......|
|00001dc0| 1b 00 ff ff c1 ff ff ff | 00 00 97 00 16 00 00 00 |........|........|
|00001dd0| 20 0d 1d 3d 20 45 6c 61 | 70 73 65 64 54 69 6d 65 | ..= Ela|psedTime|
|00001de0| 20 0d 22 3d 00 00 97 00 | 44 00 00 00 0d 04 20 50 | ."=....|D..... P|
|00001df0| 72 69 6e 74 73 20 73 65 | 63 6f 6e 64 73 20 65 6c |rints se|conds el|
|00001e00| 61 70 73 65 64 20 73 69 | 6e 63 65 20 74 68 65 20 |apsed si|nce the |
|00001e10| 67 69 76 65 6e 20 73 6f | 72 74 69 6e 67 20 72 6f |given so|rting ro|
|00001e20| 75 74 69 6e 65 20 73 74 | 61 72 74 65 64 2e 00 00 |utine st|arted...|
|00001e30| 97 00 46 00 00 00 0d 04 | 20 4e 6f 74 65 20 74 68 |..F.....| Note th|
|00001e40| 61 74 20 74 68 69 73 20 | 74 69 6d 65 20 69 6e 63 |at this |time inc|
|00001e50| 6c 75 64 65 73 20 62 6f | 74 68 20 74 68 65 20 74 |ludes bo|th the t|
|00001e60| 69 6d 65 20 69 74 20 74 | 61 6b 65 73 20 74 6f 20 |ime it t|akes to |
|00001e70| 72 65 64 72 61 77 20 74 | 68 65 00 00 97 00 44 00 |redraw t|he....D.|
|00001e80| 00 00 0d 04 20 62 61 72 | 73 20 70 6c 75 73 20 74 |.... bar|s plus t|
|00001e90| 68 65 20 70 61 75 73 65 | 20 77 68 69 6c 65 20 74 |he pause| while t|
|00001ea0| 68 65 20 53 4f 55 4e 44 | 20 73 74 61 74 65 6d 65 |he SOUND| stateme|
|00001eb0| 6e 74 20 70 6c 61 79 73 | 20 61 20 6e 6f 74 65 2c |nt plays| a note,|
|00001ec0| 20 61 6e 64 00 00 97 00 | 39 00 00 00 0d 04 20 74 | and....|9..... t|
|00001ed0| 68 75 73 20 69 73 20 6e | 6f 74 20 61 6e 20 61 63 |hus is n|ot an ac|
|00001ee0| 63 75 72 61 74 65 20 69 | 6e 64 69 63 61 74 69 6f |curate i|ndicatio|
|00001ef0| 6e 20 6f 66 20 73 6f 72 | 74 69 6e 67 20 73 70 65 |n of sor|ting spe|
|00001f00| 65 64 2e 61 00 00 97 00 | 06 00 00 00 20 0d 4c 3d |ed.a....|.... .L=|
|00001f10| 00 00 97 00 02 00 00 00 | 00 00 76 00 0c 00 e4 00 |........|..v.....|
|00001f20| 00 01 01 00 f3 00 00 00 | 01 00 00 0c 23 00 6d 01 |........|....#.m.|
|00001f30| 14 00 20 20 26 23 23 23 | 2e 23 23 23 20 73 65 63 |.. &###|.### sec|
|00001f40| 6f 6e 64 73 20 20 0c 00 | 7d 03 00 00 00 0c 97 00 |onds ..|}.......|
|00001f50| 3b 00 03 00 20 50 72 69 | 6e 74 20 63 75 72 72 65 |;... Pri|nt curre|
|00001f60| 6e 74 20 73 65 6c 65 63 | 74 69 6f 6e 20 61 6e 64 |nt selec|tion and|
|00001f70| 20 6e 75 6d 62 65 72 20 | 6f 66 20 73 65 63 6f 6e | number |of secon|
|00001f80| 64 73 20 65 6c 61 70 73 | 65 64 20 69 6e 3d 00 0c |ds elaps|ed in=..|
|00001f90| 97 00 11 00 03 00 20 72 | 65 76 65 72 73 65 20 76 |...... r|everse v|
|00001fa0| 69 64 65 6f 3a 73 00 0c | 73 01 0b 00 97 02 73 01 |ideo:s..|s.....s.|
|00001fb0| 0b 00 a5 02 a4 00 04 00 | 00 0c 73 01 0b 00 c7 02 |........|..s.....|
|00001fc0| 64 11 00 01 73 01 0b 00 | 38 02 64 09 77 01 c1 00 |d...s...|8.d.w...|
|00001fd0| 04 00 00 0c 0b 00 7d 03 | ff 00 0b 00 c7 02 0e 00 |......}.|........|
|00001fe0| 01 00 7b 02 95 00 56 01 | 0b 00 8a 02 77 01 95 00 |..{...V.|....w...|
|00001ff0| 93 00 00 00 00 0c 0b 00 | b3 02 61 00 00 00 00 18 |........|..a.....|
|00002000| 65 01 30 75 0b 00 be 02 | ec 00 97 00 1c 00 24 00 |e.0u....|......$.|
|00002010| 20 53 6f 75 6e 64 20 6f | 66 66 2c 20 73 6f 20 6a | Sound o|ff, so j|
|00002020| 75 73 74 20 70 61 75 73 | 65 2e 00 0c 49 00 ff ff |ust paus|e...I...|
|00002030| 00 18 65 01 3c 00 0b 00 | f3 00 70 01 0b 00 be 02 |..e.<...|..p.....|
|00002040| ec 00 97 00 21 00 24 00 | 20 53 6f 75 6e 64 20 6f |....!.$.| Sound o|
|00002050| 6e 2c 20 73 6f 20 70 6c | 61 79 20 61 20 6e 6f 74 |n, so pl|ay a not|
|00002060| 65 20 77 68 69 6c 65 65 | 00 0c 50 00 97 00 0b 00 |e whilee|..P.....|
|00002070| 24 00 20 70 61 75 73 69 | 6e 67 2e 00 00 00 00 0c |$. pausi|ng......|
|00002080| 73 01 0b 00 e9 02 73 01 | 64 01 a4 00 04 00 97 00 |s.....s.|d.......|
|00002090| 21 00 24 00 20 52 65 73 | 74 6f 72 65 20 72 65 67 |!.$. Res|tore reg|
|000020a0| 75 6c 61 72 20 66 6f 72 | 65 67 72 6f 75 6e 64 20 |ular for|eground |
|000020b0| 61 6e 64 6c 01 00 24 00 | 97 00 15 00 24 00 20 62 |andl..$.|....$. b|
|000020c0| 61 63 6b 67 72 6f 75 6e | 64 20 63 6f 6c 6f 72 73 |ackgroun|d colors|
|000020d0| 2e 65 00 00 51 00 09 00 | 08 00 ff ff 04 00 ff ff |.e..Q...|........|
|000020e0| ff ff 1a 00 00 00 ff ff | 02 0c 00 0c 00 45 78 63 |........|.....Exc|
|000020f0| 68 61 6e 67 65 53 6f 72 | 74 01 00 b8 ce 02 00 00 |hangeSor|t.......|
|00002100| 1b 00 ff ff c1 ff ff ff | 00 00 97 00 17 00 00 00 |........|........|
|00002110| 20 0d 1d 3d 20 45 78 63 | 68 61 6e 67 65 53 6f 72 | ..= Exc|hangeSor|
|00002120| 74 20 0d 21 3d 00 00 00 | 97 00 48 00 00 00 20 20 |t .!=...|..H... |
|00002130| 20 54 68 65 20 45 78 63 | 68 61 6e 67 65 53 6f 72 | The Exc|hangeSor|
|00002140| 74 20 63 6f 6d 70 61 72 | 65 73 20 65 61 63 68 20 |t compar|es each |
|00002150| 65 6c 65 6d 65 6e 74 20 | 69 6e 20 53 6f 72 74 41 |element |in SortA|
|00002160| 72 72 61 79 20 2d 20 73 | 74 61 72 74 69 6e 67 20 |rray - s|tarting |
|00002170| 77 69 74 68 00 00 97 00 | 45 00 00 00 20 20 20 74 |with....|E... t|
|00002180| 68 65 20 66 69 72 73 74 | 20 65 6c 65 6d 65 6e 74 |he first| element|
|00002190| 20 2d 20 77 69 74 68 20 | 65 76 65 72 79 20 66 6f | - with |every fo|
|000021a0| 6c 6c 6f 77 69 6e 67 20 | 65 6c 65 6d 65 6e 74 2e |llowing |element.|
|000021b0| 20 20 49 66 20 61 6e 79 | 20 6f 66 20 74 68 65 69 | If any| of thei|
|000021c0| 00 00 97 00 4c 00 00 00 | 20 20 20 66 6f 6c 6c 6f |....L...| follo|
|000021d0| 77 69 6e 67 20 65 6c 65 | 6d 65 6e 74 73 20 69 73 |wing ele|ments is|
|000021e0| 20 73 6d 61 6c 6c 65 72 | 20 74 68 61 6e 20 74 68 | smaller| than th|
|000021f0| 65 20 63 75 72 72 65 6e | 74 20 65 6c 65 6d 65 6e |e curren|t elemen|
|00002200| 74 2c 20 69 74 20 69 73 | 20 65 78 63 68 61 6e 67 |t, it is| exchang|
|00002210| 65 64 00 00 97 00 46 00 | 00 00 20 20 20 77 69 74 |ed....F.|.. wit|
|00002220| 68 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 65 6c |h the cu|rrent el|
|00002230| 65 6d 65 6e 74 20 61 6e | 64 20 74 68 65 20 70 72 |ement an|d the pr|
|00002240| 6f 63 65 73 73 20 69 73 | 20 72 65 70 65 61 74 65 |ocess is| repeate|
|00002250| 64 20 66 6f 72 20 74 68 | 65 20 6e 65 78 74 00 00 |d for th|e next..|
|00002260| 97 00 1a 00 00 00 20 20 | 20 65 6c 65 6d 65 6e 74 |...... | element|
|00002270| 20 69 6e 20 53 6f 72 74 | 41 72 72 61 79 2e 00 00 | in Sort|Array...|
|00002280| 97 00 06 00 00 00 20 0d | 4c 3d 00 00 97 00 02 00 |...... .|L=......|
|00002290| 00 00 00 00 76 00 06 00 | 01 01 00 01 00 00 00 0c |....v...|........|
|000022a0| 0b 00 77 01 64 05 0b 00 | d4 02 56 00 ff ff ff ff |..w.d...|..V.....|
|000022b0| 00 18 0b 00 77 01 0c 00 | 87 03 00 18 0b 00 96 03 |....w...|........|
|000022c0| 0b 00 77 01 64 05 00 01 | 0b 00 d4 02 56 00 ff ff |..w.d...|....V...|
|000022d0| ff ff 00 24 0b 00 96 03 | 0e 00 01 00 60 02 11 00 |...$....|....`...|
|000022e0| 04 02 0b 00 87 03 0e 00 | 01 00 60 02 11 00 04 02 |........|..`.....|
|000022f0| 63 01 61 00 00 00 00 30 | 0b 00 96 03 0c 00 87 03 |c.a....0|........|
|00002300| 00 30 0b 00 96 03 38 00 | 01 00 e4 00 00 24 50 00 |.0....8.|.....$P.|
|00002310| 00 18 0b 00 96 03 66 00 | ff ff ff ff 00 00 00 18 |......f.|........|
|00002320| 97 00 3a 00 06 00 20 46 | 6f 75 6e 64 20 61 20 72 |..:... F|ound a r|
|00002330| 6f 77 20 73 68 6f 72 74 | 65 72 20 74 68 61 6e 20 |ow short|er than |
|00002340| 74 68 65 20 63 75 72 72 | 65 6e 74 20 72 6f 77 2c |the curr|ent row,|
|00002350| 20 73 6f 20 73 77 61 70 | 20 74 68 6f 73 65 00 18 | so swap| those..|
|00002360| 97 00 16 00 06 00 20 74 | 77 6f 20 61 72 72 61 79 |...... t|wo array|
|00002370| 20 65 6c 65 6d 65 6e 74 | 73 3a 00 18 0b 00 87 03 | element|s:......|
|00002380| 0b 00 77 01 5f 01 61 00 | 00 00 00 24 0b 00 77 01 |..w._.a.|...$..w.|
|00002390| 0e 00 01 00 60 02 0b 00 | 87 03 0e 00 01 00 60 02 |....`...|......`.|
|000023a0| ed 00 ff ff 00 24 0b 00 | 77 01 0b 00 87 03 38 00 |.....$..|w.....8.|
|000023b0| 02 00 c3 01 00 18 50 00 | 00 0c 0b 00 77 01 66 00 |......P.|....w.f.|
|000023c0| ff ff ff ff 00 00 51 00 | 09 00 08 00 ff ff 04 00 |......Q.|........|
|000023d0| ff ff ff ff 1b 00 00 00 | ff ff 02 0c 00 08 00 48 |........|.......H|
|000023e0| 65 61 70 53 6f 72 74 01 | 00 b8 b8 05 00 00 1b 00 |eapSort.|........|
|000023f0| ff ff c1 ff ff ff 00 00 | 97 00 13 00 00 00 20 0d |........|...... .|
|00002400| 1f 3d 20 48 65 61 70 53 | 6f 72 74 20 0d 23 3d 00 |.= HeapS|ort .#=.|
|00002410| 00 00 97 00 4e 00 00 00 | 20 20 54 68 65 20 48 65 |....N...| The He|
|00002420| 61 70 53 6f 72 74 20 70 | 72 6f 63 65 64 75 72 65 |apSort p|rocedure|
|00002430| 20 77 6f 72 6b 73 20 62 | 79 20 63 61 6c 6c 69 6e | works b|y callin|
|00002440| 67 20 74 77 6f 20 6f 74 | 68 65 72 20 70 72 6f 63 |g two ot|her proc|
|00002450| 65 64 75 72 65 73 20 2d | 20 50 65 72 63 6f 6c 61 |edures -| Percola|
|00002460| 74 65 55 70 00 00 97 00 | 4c 00 00 00 20 20 61 6e |teUp....|L... an|
|00002470| 64 20 50 65 72 63 6f 6c | 61 74 65 44 6f 77 6e 2e |d Percol|ateDown.|
|00002480| 20 20 50 65 72 63 6f 6c | 61 74 65 55 70 20 74 75 | Percol|ateUp tu|
|00002490| 72 6e 73 20 53 6f 72 74 | 41 72 72 61 79 20 69 6e |rns Sort|Array in|
|000024a0| 74 6f 20 61 20 22 68 65 | 61 70 2c 22 20 77 68 69 |to a "he|ap," whi|
|000024b0| 63 68 20 68 61 73 00 00 | 97 00 31 00 00 00 20 20 |ch has..|..1... |
|000024c0| 74 68 65 20 70 72 6f 70 | 65 72 74 69 65 73 20 6f |the prop|erties o|
|000024d0| 75 74 6c 69 6e 65 64 20 | 69 6e 20 74 68 65 20 64 |utlined |in the d|
|000024e0| 69 61 67 72 61 6d 20 62 | 65 6c 6f 77 3a 61 00 00 |iagram b|elow:a..|
|000024f0| 97 00 02 00 00 00 00 00 | 97 00 11 00 00 00 0d 1f |........|........|
|00002500| 20 53 6f 72 74 41 72 72 | 61 79 28 31 29 20 00 00 | SortArr|ay(1) ..|
|00002510| 97 00 0a 00 00 00 0d 1f | 20 2f 0d 0a 20 5c 00 00 |........| /.. \..|
|00002520| 97 00 20 00 00 00 0d 14 | 20 53 6f 72 74 41 72 72 |.. .....| SortArr|
|00002530| 61 79 28 32 29 0d 0b 20 | 53 6f 72 74 41 72 72 61 |ay(2).. |SortArra|
|00002540| 79 28 33 29 00 00 97 00 | 12 00 00 00 0d 13 20 2f |y(3)....|...... /|
|00002550| 0d 0a 20 5c 0d 0c 20 2f | 0d 0a 20 5c 00 00 97 00 |.. \.. /|.. \....|
|00002560| 3d 00 00 00 0d 09 20 53 | 6f 72 74 41 72 72 61 79 |=..... S|ortArray|
|00002570| 28 34 29 20 20 20 53 6f | 72 74 41 72 72 61 79 28 |(4) So|rtArray(|
|00002580| 35 29 20 20 20 53 6f 72 | 74 41 72 72 61 79 28 36 |5) Sor|tArray(6|
|00002590| 29 20 20 53 6f 72 74 41 | 72 72 61 79 28 37 29 65 |) SortA|rray(7)e|
|000025a0| 00 00 97 00 22 00 00 00 | 0d 0a 20 2f 0d 06 20 5c |...."...|.. /.. \|
|000025b0| 0d 07 20 2f 0d 07 20 5c | 0d 07 20 2f 0d 06 20 5c |.. /.. \|.. /.. \|
|000025c0| 0d 06 20 2f 0d 06 20 5c | 00 00 97 00 31 00 00 00 |.. /.. \|....1...|
|000025d0| 0d 08 20 2e 2e 2e 0d 06 | 20 2e 2e 2e 20 20 20 2e |.. .....| ... .|
|000025e0| 2e 2e 0d 07 20 2e 2e 2e | 20 20 20 2e 2e 2e 0d 06 |.... ...| .....|
|000025f0| 20 2e 2e 2e 20 20 2e 2e | 2e 0d 06 20 2e 2e 2e 53 | ... ..|... ...S|
|00002600| 00 00 97 00 02 00 00 00 | 00 00 97 00 02 00 00 00 |........|........|
|00002610| 00 00 97 00 4b 00 00 00 | 20 20 77 68 65 72 65 20 |....K...| where |
|00002620| 65 61 63 68 20 22 70 61 | 72 65 6e 74 20 6e 6f 64 |each "pa|rent nod|
|00002630| 65 22 20 69 73 20 67 72 | 65 61 74 65 72 20 74 68 |e" is gr|eater th|
|00002640| 61 6e 20 65 61 63 68 20 | 6f 66 20 69 74 73 20 22 |an each |of its "|
|00002650| 63 68 69 6c 64 20 6e 6f | 64 65 73 22 3b 20 66 6f |child no|des"; fo|
|00002660| 72 73 00 00 97 00 47 00 | 00 00 20 20 65 78 61 6d |rs....G.|.. exam|
|00002670| 70 6c 65 2c 20 53 6f 72 | 74 41 72 72 61 79 28 31 |ple, Sor|tArray(1|
|00002680| 29 20 69 73 20 67 72 65 | 61 74 65 72 20 74 68 61 |) is gre|ater tha|
|00002690| 6e 20 53 6f 72 74 41 72 | 72 61 79 28 32 29 20 6f |n SortAr|ray(2) o|
|000026a0| 72 20 53 6f 72 74 41 72 | 72 61 79 28 33 29 2c 20 |r SortAr|ray(3), |
|000026b0| 00 00 97 00 4c 00 00 00 | 20 20 53 6f 72 74 41 72 |....L...| SortAr|
|000026c0| 72 61 79 28 33 29 20 69 | 73 20 67 72 65 61 74 65 |ray(3) i|s greate|
|000026d0| 72 20 74 68 61 6e 20 53 | 6f 72 74 41 72 72 61 79 |r than S|ortArray|
|000026e0| 28 36 29 20 6f 72 20 53 | 6f 72 74 41 72 72 61 79 |(6) or S|ortArray|
|000026f0| 28 37 29 2c 20 61 6e 64 | 20 73 6f 20 66 6f 72 74 |(7), and| so fort|
|00002700| 68 2e 00 00 97 00 02 00 | 00 00 00 00 97 00 4a 00 |h.......|......J.|
|00002710| 00 00 20 20 54 68 65 72 | 65 66 6f 72 65 2c 20 6f |.. Ther|efore, o|
|00002720| 6e 63 65 20 74 68 65 20 | 66 69 72 73 74 20 46 4f |nce the |first FO|
|00002730| 52 2e 2e 2e 4e 45 58 54 | 20 6c 6f 6f 70 20 69 6e |R...NEXT| loop in|
|00002740| 20 48 65 61 70 53 6f 72 | 74 20 69 73 20 66 69 6e | HeapSor|t is fin|
|00002750| 69 73 68 65 64 2c 20 74 | 68 65 00 00 97 00 27 00 |ished, t|he....'.|
|00002760| 00 00 20 20 6c 61 72 67 | 65 73 74 20 65 6c 65 6d |.. larg|est elem|
|00002770| 65 6e 74 20 69 73 20 69 | 6e 20 53 6f 72 74 41 72 |ent is i|n SortAr|
|00002780| 72 61 79 28 31 29 2e 54 | 00 00 97 00 02 00 00 00 |ray(1).T|........|
|00002790| 00 00 97 00 4c 00 00 00 | 20 20 54 68 65 20 73 65 |....L...| The se|
|000027a0| 63 6f 6e 64 20 46 4f 52 | 2e 2e 2e 4e 45 58 54 20 |cond FOR|...NEXT |
|000027b0| 6c 6f 6f 70 20 69 6e 20 | 48 65 61 70 53 6f 72 74 |loop in |HeapSort|
|000027c0| 20 73 77 61 70 73 20 74 | 68 65 20 65 6c 65 6d 65 | swaps t|he eleme|
|000027d0| 6e 74 20 69 6e 20 53 6f | 72 74 41 72 72 61 79 28 |nt in So|rtArray(|
|000027e0| 31 29 00 00 97 00 4a 00 | 00 00 20 20 77 69 74 68 |1)....J.|.. with|
|000027f0| 20 74 68 65 20 65 6c 65 | 6d 65 6e 74 20 69 6e 20 | the ele|ment in |
|00002800| 4d 61 78 52 6f 77 2c 20 | 72 65 62 75 69 6c 64 73 |MaxRow, |rebuilds|
|00002810| 20 74 68 65 20 68 65 61 | 70 20 28 77 69 74 68 20 | the hea|p (with |
|00002820| 50 65 72 63 6f 6c 61 74 | 65 44 6f 77 6e 29 20 66 |Percolat|eDown) f|
|00002830| 6f 72 00 00 97 00 4a 00 | 00 00 20 20 4d 61 78 52 |or....J.|.. MaxR|
|00002840| 6f 77 20 2d 20 31 2c 20 | 74 68 65 6e 20 73 77 61 |ow - 1, |then swa|
|00002850| 70 73 20 74 68 65 20 65 | 6c 65 6d 65 6e 74 20 69 |ps the e|lement i|
|00002860| 6e 20 53 6f 72 74 41 72 | 72 61 79 28 31 29 20 77 |n SortAr|ray(1) w|
|00002870| 69 74 68 20 74 68 65 20 | 65 6c 65 6d 65 6e 74 20 |ith the |element |
|00002880| 69 6e 00 00 97 00 4b 00 | 00 00 20 20 4d 61 78 52 |in....K.|.. MaxR|
|00002890| 6f 77 20 2d 20 31 2c 20 | 72 65 62 75 69 6c 64 73 |ow - 1, |rebuilds|
|000028a0| 20 74 68 65 20 68 65 61 | 70 20 66 6f 72 20 4d 61 | the hea|p for Ma|
|000028b0| 78 52 6f 77 20 2d 20 32 | 2c 20 61 6e 64 20 63 6f |xRow - 2|, and co|
|000028c0| 6e 74 69 6e 75 65 73 20 | 69 6e 20 74 68 69 73 20 |ntinues |in this |
|000028d0| 77 61 79 00 00 00 97 00 | 1e 00 00 00 20 20 75 6e |way.....|.... un|
|000028e0| 74 69 6c 20 74 68 65 20 | 61 72 72 61 79 20 69 73 |til the |array is|
|000028f0| 20 73 6f 72 74 65 64 2e | 00 00 97 00 06 00 00 00 | sorted.|........|
|00002900| 20 0d 4c 3d 00 00 97 00 | 02 00 00 00 00 00 76 00 | .L=....|......v.|
|00002910| 06 00 11 01 00 01 00 00 | 00 0c 0b 00 17 03 64 09 |........|......d.|
|00002920| 0b 00 d4 02 56 00 ff ff | ff ff 00 18 0b 00 17 03 |....V...|........|
|00002930| 38 00 01 00 59 01 00 0c | 0b 00 17 03 66 00 ff ff |8...Y...|....f...|
|00002940| ff ff 00 00 00 0c 0b 00 | 17 03 0b 00 d4 02 64 09 |........|......d.|
|00002950| 64 05 78 01 57 00 ff ff | ff ff 00 18 64 05 0e 00 |d.x.W...|....d...|
|00002960| 01 00 60 02 0b 00 17 03 | 0e 00 01 00 60 02 ed 00 |..`.....|....`...|
|00002970| ff ff 00 18 64 05 0b 00 | 17 03 38 00 02 00 c3 01 |....d...|..8.....|
|00002980| 00 18 0b 00 17 03 64 05 | 77 01 38 00 01 00 3c 01 |......d.|w.8...<.|
|00002990| 00 0c 0b 00 17 03 66 00 | ff ff ff ff 00 00 51 00 |......f.|......Q.|
|000029a0| 09 00 08 00 ff ff 04 00 | ff ff ff ff 28 00 00 00 |........|....(...|
|000029b0| ff ff 02 0c 00 0a 00 49 | 6e 69 74 69 61 6c 69 7a |.......I|nitializ|
|000029c0| 65 01 00 b8 a8 06 00 00 | 1b 00 ff ff c1 ff ff ff |e.......|........|
|000029d0| 00 00 97 00 15 00 00 00 | 20 0d 1e 3d 20 49 6e 69 |........| ..= Ini|
|000029e0| 74 69 61 6c 69 7a 65 20 | 0d 22 3d 00 00 00 97 00 |tialize |."=.....|
|000029f0| 4a 00 00 00 0d 04 20 49 | 6e 69 74 69 61 6c 69 7a |J..... I|nitializ|
|00002a00| 65 73 20 74 68 65 20 53 | 6f 72 74 42 61 63 6b 75 |es the S|ortBacku|
|00002a10| 70 20 61 6e 64 20 4f 70 | 74 69 6f 6e 54 69 74 6c |p and Op|tionTitl|
|00002a20| 65 20 61 72 72 61 79 73 | 2e 20 20 49 74 20 61 6c |e arrays|. It al|
|00002a30| 73 6f 20 63 61 6c 6c 73 | 20 74 68 65 00 00 97 00 |so calls| the....|
|00002a40| 33 00 00 00 0d 04 20 43 | 68 65 63 6b 53 63 72 65 |3..... C|heckScre|
|00002a50| 65 6e 2c 20 42 6f 78 49 | 6e 69 74 2c 20 61 6e 64 |en, BoxI|nit, and|
|00002a60| 20 52 61 6e 64 49 6e 74 | 25 20 70 72 6f 63 65 64 | RandInt|% proced|
|00002a70| 75 72 65 73 2e 61 00 00 | 97 00 06 00 00 00 20 0d |ures.a..|...... .|
|00002a80| 4c 3d 00 00 97 00 02 00 | 00 00 00 00 76 00 06 00 |L=......|....v...|
|00002a90| 1d 01 00 01 00 00 00 0c | 7d 01 ff ff 64 05 65 01 |........|}...d.e.|
|00002aa0| 2b 00 10 00 02 00 9b 03 | 00 00 00 0c 38 00 00 00 |+.......|....8...|
|00002ab0| 96 00 97 00 26 00 20 00 | 20 43 68 65 63 6b 20 66 |....&. .| Check f|
|00002ac0| 6f 72 20 6d 6f 6e 6f 63 | 68 72 6f 6d 65 20 6f 72 |or monoc|hrome or|
|00002ad0| 20 45 47 41 20 61 6e 64 | 20 73 65 74 01 00 20 00 | EGA and| set.. .|
|00002ae0| 97 00 20 00 20 00 20 6d | 61 78 69 6d 75 6d 20 6e |.. . . m|aximum n|
|00002af0| 75 6d 62 65 72 20 6f 66 | 20 74 65 78 74 20 6c 69 |umber of| text li|
|00002b00| 6e 65 73 2e 00 0c 0b 00 | 17 03 64 05 0b 00 d4 02 |nes.....|..d.....|
|00002b10| 56 00 ff ff ff ff 00 18 | 0b 00 17 03 0b 00 17 03 |V.......|........|
|00002b20| 0f 00 01 00 9b 03 00 0c | 0b 00 17 03 66 00 ff ff |........|....f...|
|00002b30| ff ff 00 00 00 0c 0b 00 | d4 02 0c 00 a8 03 00 00 |........|........|
|00002b40| 00 0c 56 01 e1 00 97 00 | 24 00 20 00 20 53 65 65 |..V.....|$. . See|
|00002b50| 64 20 74 68 65 20 72 61 | 6e 64 6f 6d 2d 6e 75 6d |d the ra|ndom-num|
|00002b60| 62 65 72 20 67 65 6e 65 | 72 61 74 6f 72 2e 00 0c |ber gene|rator...|
|00002b70| 0b 00 17 03 64 05 0b 00 | d4 02 56 00 ff ff ff ff |....d...|..V.....|
|00002b80| 00 00 00 18 97 00 40 00 | 06 00 20 43 61 6c 6c 20 |......@.|.. Call |
|00002b90| 52 61 6e 64 49 6e 74 25 | 20 74 6f 20 66 69 6e 64 |RandInt%| to find|
|00002ba0| 20 61 20 72 61 6e 64 6f | 6d 20 65 6c 65 6d 65 6e | a rando|m elemen|
|00002bb0| 74 20 69 6e 20 54 65 6d | 70 41 72 72 61 79 20 62 |t in Tem|pArray b|
|00002bc0| 65 74 77 65 65 6e 20 31 | 00 18 97 00 44 00 06 00 |etween 1|....D...|
|00002bd0| 20 61 6e 64 20 4d 61 78 | 49 6e 64 65 78 2c 20 74 | and Max|Index, t|
|00002be0| 68 65 6e 20 61 73 73 69 | 67 6e 20 74 68 65 20 76 |hen assi|gn the v|
|00002bf0| 61 6c 75 65 20 69 6e 20 | 74 68 61 74 20 65 6c 65 |alue in |that ele|
|00002c00| 6d 65 6e 74 20 74 6f 20 | 42 61 72 4c 65 6e 67 74 |ment to |BarLengt|
|00002c10| 68 3a 00 18 64 05 0b 00 | a8 03 0e 04 02 00 60 00 |h:..d...|......`.|
|00002c20| 0c 00 b4 03 00 18 0b 00 | b4 03 0e 00 01 00 9b 03 |........|........|
|00002c30| 0c 00 bd 03 00 00 00 18 | 97 00 3c 00 06 00 20 4f |........|..<... O|
|00002c40| 76 65 72 77 72 69 74 65 | 20 74 68 65 20 76 61 6c |verwrite| the val|
|00002c50| 75 65 20 69 6e 20 54 65 | 6d 70 41 72 72 61 79 28 |ue in Te|mpArray(|
|00002c60| 49 6e 64 65 78 29 20 77 | 69 74 68 20 74 68 65 20 |Index) w|ith the |
|00002c70| 76 61 6c 75 65 20 69 6e | 00 18 97 00 3a 00 06 00 |value in|....:...|
|00002c80| 20 54 65 6d 70 41 72 72 | 61 79 28 4d 61 78 49 6e | TempArr|ay(MaxIn|
|00002c90| 64 65 78 29 20 73 6f 20 | 74 68 65 20 76 61 6c 75 |dex) so |the valu|
|00002ca0| 65 20 69 6e 20 54 65 6d | 70 41 72 72 61 79 28 49 |e in Tem|pArray(I|
|00002cb0| 6e 64 65 78 29 20 69 73 | 00 18 97 00 14 00 06 00 |ndex) is|........|
|00002cc0| 20 63 68 6f 73 65 6e 20 | 6f 6e 6c 79 20 6f 6e 63 | chosen |only onc|
|00002cd0| 65 3a 00 18 0b 00 a8 03 | 0e 00 01 00 9b 03 0b 00 |e:......|........|
|00002ce0| b4 03 0f 00 01 00 9b 03 | 00 00 00 18 97 00 43 00 |........|......C.|
|00002cf0| 06 00 20 44 65 63 72 65 | 61 73 65 20 74 68 65 20 |.. Decre|ase the |
|00002d00| 76 61 6c 75 65 20 6f 66 | 20 4d 61 78 49 6e 64 65 |value of| MaxInde|
|00002d10| 78 20 73 6f 20 74 68 61 | 74 20 54 65 6d 70 41 72 |x so tha|t TempAr|
|00002d20| 72 61 79 28 4d 61 78 49 | 6e 64 65 78 29 20 63 61 |ray(MaxI|ndex) ca|
|00002d30| 6e 27 74 3a 00 18 97 00 | 2f 00 06 00 20 62 65 20 |n't:....|/... be |
|00002d40| 63 68 6f 73 65 6e 20 6f | 6e 20 74 68 65 20 6e 65 |chosen o|n the ne|
|00002d50| 78 74 20 70 61 73 73 20 | 74 68 72 6f 75 67 68 20 |xt pass |through |
|00002d60| 74 68 65 20 6c 6f 6f 70 | 3a 72 00 18 0b 00 a8 03 |the loop|:r......|
|00002d70| 64 05 77 01 0c 00 a8 03 | 00 00 00 18 97 00 40 00 |d.w.....|......@.|
|00002d80| 06 00 20 41 73 73 69 67 | 6e 20 74 68 65 20 42 61 |.. Assig|n the Ba|
|00002d90| 72 4c 65 6e 67 74 68 20 | 76 61 6c 75 65 20 74 6f |rLength |value to|
|00002da0| 20 74 68 65 20 2e 4c 65 | 6e 67 74 68 20 65 6c 65 | the .Le|ngth ele|
|00002db0| 6d 65 6e 74 2c 20 74 68 | 65 6e 20 73 74 6f 72 65 |ment, th|en store|
|00002dc0| 00 18 97 00 3f 00 06 00 | 20 61 20 73 74 72 69 6e |....?...| a strin|
|00002dd0| 67 20 6f 66 20 42 61 72 | 4c 65 6e 67 74 68 20 62 |g of Bar|Length b|
|00002de0| 6c 6f 63 6b 20 63 68 61 | 72 61 63 74 65 72 73 20 |lock cha|racters |
|00002df0| 28 41 53 43 49 49 20 32 | 32 33 3a 20 df 29 20 69 |(ASCII 2|23: .) i|
|00002e00| 6e 20 74 68 65 65 00 18 | 97 00 16 00 06 00 20 2e |n thee..|...... .|
|00002e10| 42 61 72 53 74 72 69 6e | 67 20 65 6c 65 6d 65 6e |BarStrin|g elemen|
|00002e20| 74 3a 00 18 0b 00 bd 03 | 0b 00 17 03 0e 00 01 00 |t:......|........|
|00002e30| 6d 02 12 00 04 02 00 18 | 0b 00 bd 03 65 01 df 00 |m.......|....e...|
|00002e40| 53 01 0b 00 17 03 0e 00 | 01 00 6d 02 12 00 1a 02 |S.......|..m.....|
|00002e50| 00 00 00 18 97 00 3e 00 | 06 00 20 53 74 6f 72 65 |......>.|.. Store|
|00002e60| 20 74 68 65 20 61 70 70 | 72 6f 70 72 69 61 74 65 | the app|ropriate|
|00002e70| 20 63 6f 6c 6f 72 20 76 | 61 6c 75 65 20 69 6e 20 | color v|alue in |
|00002e80| 74 68 65 20 2e 43 6f 6c | 6f 72 56 61 6c 20 65 6c |the .Col|orVal el|
|00002e90| 65 6d 65 6e 74 3a 00 18 | 0b 00 e9 02 64 09 5f 01 |ement:..|....d._.|
|00002ea0| 61 00 00 00 00 24 0b 00 | bd 03 0b 00 e9 02 6f 01 |a....$..|......o.|
|00002eb0| 6e 01 64 05 00 01 0b 00 | 17 03 0e 00 01 00 6d 02 |n.d.....|......m.|
|00002ec0| 12 00 0e 02 00 18 49 00 | ff ff 00 24 0b 00 e9 02 |......I.|...$....|
|00002ed0| 0b 00 17 03 0e 00 01 00 | 6d 02 12 00 0e 02 00 18 |........|m.......|
|00002ee0| 50 00 00 0c 0b 00 17 03 | 66 00 ff ff ff ff 00 00 |P.......|f.......|
|00002ef0| 00 0c 0b 00 17 03 64 05 | 0b 00 46 02 56 00 ff ff |......d.|..F.V...|
|00002f00| ff ff 97 00 28 00 20 00 | 20 52 65 61 64 20 53 4f |....(. .| Read SO|
|00002f10| 52 54 20 44 45 4d 4f 20 | 6d 65 6e 75 20 6f 70 74 |RT DEMO |menu opt|
|00002f20| 69 6f 6e 73 20 61 6e 64 | 20 73 74 6f 72 65 00 18 |ions and| store..|
|00002f30| 0b 00 17 03 0e 00 01 00 | 7b 02 e2 00 97 00 21 00 |........|{.....!.|
|00002f40| 20 00 20 74 68 65 6d 20 | 69 6e 20 74 68 65 20 4f | . them |in the O|
|00002f50| 70 74 69 6f 6e 54 69 74 | 6c 65 20 61 72 72 61 79 |ptionTit|le array|
|00002f60| 2e 73 00 0c 0b 00 17 03 | 66 00 ff ff ff ff 00 00 |.s......|f.......|
|00002f70| 00 0c 73 01 a3 00 00 0c | 38 00 00 00 9a 01 97 00 |..s.....|8.......|
|00002f80| 34 00 18 00 20 41 73 73 | 69 67 6e 20 76 61 6c 75 |4... Ass|ign valu|
|00002f90| 65 73 20 69 6e 20 53 6f | 72 74 42 61 63 6b 75 70 |es in So|rtBackup|
|00002fa0| 20 74 6f 20 53 6f 72 74 | 41 72 72 61 79 20 61 6e | to Sort|Array an|
|00002fb0| 64 20 64 72 61 77 00 60 | 97 00 1f 00 18 00 20 75 |d draw.`|...... u|
|00002fc0| 6e 73 6f 72 74 65 64 20 | 62 61 72 73 20 6f 6e 20 |nsorted |bars on |
|00002fd0| 74 68 65 20 73 63 72 65 | 65 6e 2e 61 00 0c 0b 00 |the scre|en.a....|
|00002fe0| 27 02 0c 00 b3 02 00 0c | 64 09 0c 00 be 02 97 00 |'.......|d.......|
|00002ff0| 34 00 18 00 20 49 6e 69 | 74 69 61 6c 69 7a 65 20 |4... Ini|tialize |
|00003000| 50 61 75 73 65 20 74 6f | 20 32 20 63 6c 6f 63 6b |Pause to| 2 clock|
|00003010| 20 74 69 63 6b 73 20 28 | 40 20 31 2f 39 20 73 65 | ticks (|@ 1/9 se|
|00003020| 63 6f 6e 64 29 2e 00 0c | 38 00 00 00 7d 00 97 00 |cond)...|8...}...|
|00003030| 32 00 18 00 20 44 72 61 | 77 20 66 72 61 6d 65 20 |2... Dra|w frame |
|00003040| 66 6f 72 20 74 68 65 20 | 73 6f 72 74 20 6d 65 6e |for the |sort men|
|00003050| 75 20 61 6e 64 20 70 72 | 69 6e 74 20 6f 70 74 69 |u and pr|int opti|
|00003060| 6f 6e 73 2e 00 00 00 00 | 51 00 09 00 08 00 ff ff |ons.....|Q.......|
|00003070| 04 00 ff ff ff ff 3c 00 | 00 00 ff ff 02 0c 00 0d |......<.|........|
|00003080| 00 49 6e 73 65 72 74 69 | 6f 6e 53 6f 72 74 01 00 |.Inserti|onSort..|
|00003090| b8 06 04 00 00 1b 00 ff | ff c1 ff ff ff 00 00 97 |........|........|
|000030a0| 00 18 00 00 00 20 0d 1d | 3d 20 49 6e 73 65 72 74 |..... ..|= Insert|
|000030b0| 69 6f 6e 53 6f 72 74 20 | 0d 20 3d 00 00 97 00 47 |ionSort |. =....G|
|000030c0| 00 00 00 20 20 20 54 68 | 65 20 49 6e 73 65 72 74 |... Th|e Insert|
|000030d0| 69 6f 6e 53 6f 72 74 20 | 70 72 6f 63 65 64 75 72 |ionSort |procedur|
|000030e0| 65 20 63 6f 6d 70 61 72 | 65 73 20 74 68 65 20 6c |e compar|es the l|
|000030f0| 65 6e 67 74 68 20 6f 66 | 20 65 61 63 68 20 73 75 |ength of| each su|
|00003100| 63 63 65 73 73 69 76 65 | 3d 00 00 97 00 49 00 00 |ccessive|=....I..|
|00003110| 00 20 20 20 65 6c 65 6d | 65 6e 74 20 69 6e 20 53 |. elem|ent in S|
|00003120| 6f 72 74 41 72 72 61 79 | 20 77 69 74 68 20 74 68 |ortArray| with th|
|00003130| 65 20 6c 65 6e 67 74 68 | 73 20 6f 66 20 61 6c 6c |e length|s of all|
|00003140| 20 74 68 65 20 70 72 65 | 63 65 64 69 6e 67 20 65 | the pre|ceding e|
|00003150| 6c 65 6d 65 6e 74 73 2e | 00 00 00 97 00 4b 00 00 |lements.|.....K..|
|00003160| 00 20 20 20 57 68 65 6e | 20 74 68 65 20 70 72 6f |. When| the pro|
|00003170| 63 65 64 75 72 65 20 66 | 69 6e 64 73 20 74 68 65 |cedure f|inds the|
|00003180| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 70 6c 61 | appropr|iate pla|
|00003190| 63 65 20 66 6f 72 20 74 | 68 65 20 6e 65 77 20 65 |ce for t|he new e|
|000031a0| 6c 65 6d 65 6e 74 2c 20 | 69 74 00 00 00 97 00 4b |lement, |it.....K|
|000031b0| 00 00 00 20 20 20 69 6e | 73 65 72 74 73 20 74 68 |... in|serts th|
|000031c0| 65 20 65 6c 65 6d 65 6e | 74 20 69 6e 20 69 74 73 |e elemen|t in its|
|000031d0| 20 6e 65 77 20 70 6c 61 | 63 65 2c 20 61 6e 64 20 | new pla|ce, and |
|000031e0| 6d 6f 76 65 73 20 61 6c | 6c 20 74 68 65 20 6f 74 |moves al|l the ot|
|000031f0| 68 65 72 20 65 6c 65 6d | 65 6e 74 73 00 00 00 97 |her elem|ents....|
|00003200| 00 14 00 00 00 20 20 20 | 64 6f 77 6e 20 6f 6e 65 |..... |down one|
|00003210| 20 70 6c 61 63 65 2e 00 | 00 97 00 06 00 00 00 20 | place..|....... |
|00003220| 0d 4c 3d 00 00 97 00 02 | 00 00 00 00 00 76 00 06 |.L=.....|.....v..|
|00003230| 00 2b 01 00 01 00 00 00 | 0c 7d 01 ff ff 15 00 f8 |.+......|.}......|
|00003240| 01 0f 00 0d 00 ca 03 00 | 0c 0b 00 77 01 64 09 0b |........|...w.d..|
|00003250| 00 d4 02 56 00 ff ff ff | ff 00 18 0b 00 77 01 0e |...V....|.....w..|
|00003260| 00 01 00 60 02 0c 00 ca | 03 00 18 0b 00 ca 03 11 |...`....|........|
|00003270| 00 04 02 0c 00 d5 03 00 | 18 0b 00 96 03 0b 00 77 |........|.......w|
|00003280| 01 64 09 64 05 78 01 57 | 00 ff ff ff ff 00 00 00 |.d.d.x.W|........|
|00003290| 24 97 00 41 00 09 00 20 | 41 73 20 6c 6f 6e 67 20 |$..A... |As long |
|000032a0| 61 73 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |as the l|ength of|
|000032b0| 20 74 68 65 20 4a 2d 31 | 73 74 20 65 6c 65 6d 65 | the J-1|st eleme|
|000032c0| 6e 74 20 69 73 20 67 72 | 65 61 74 65 72 20 74 68 |nt is gr|eater th|
|000032d0| 61 6e 20 74 68 65 3d 00 | 24 97 00 42 00 09 00 20 |an the=.|$..B... |
|000032e0| 6c 65 6e 67 74 68 20 6f | 66 20 74 68 65 20 6f 72 |length o|f the or|
|000032f0| 69 67 69 6e 61 6c 20 65 | 6c 65 6d 65 6e 74 20 69 |iginal e|lement i|
|00003300| 6e 20 53 6f 72 74 41 72 | 72 61 79 28 52 6f 77 29 |n SortAr|ray(Row)|
|00003310| 2c 20 6b 65 65 70 20 73 | 68 69 66 74 69 6e 67 00 |, keep s|hifting.|
|00003320| 24 97 00 1b 00 09 00 20 | 74 68 65 20 61 72 72 61 |$...... |the arra|
|00003330| 79 20 65 6c 65 6d 65 6e | 74 73 20 64 6f 77 6e 3a |y elemen|ts down:|
|00003340| 6c 00 24 0b 00 96 03 64 | 05 77 01 0e 00 01 00 60 |l.$....d|.w.....`|
|00003350| 02 11 00 04 02 0b 00 d5 | 03 5f 01 61 00 00 00 00 |........|._.a....|
|00003360| 30 0b 00 96 03 64 05 77 | 01 0e 00 01 00 60 02 0b |0....d.w|.....`..|
|00003370| 00 96 03 0f 00 01 00 60 | 02 00 30 0b 00 96 03 38 |.......`|..0....8|
|00003380| 00 01 00 68 01 97 00 15 | 00 28 00 20 50 72 69 6e |...h....|.(. Prin|
|00003390| 74 20 74 68 65 20 6e 65 | 77 20 62 61 72 2e 00 00 |t the ne|w bar...|
|000033a0| 30 0b 00 96 03 38 00 01 | 00 e4 00 97 00 1a 00 28 |0....8..|.......(|
|000033b0| 00 20 50 72 69 6e 74 20 | 74 68 65 20 65 6c 61 70 |. Print |the elap|
|000033c0| 73 65 64 20 74 69 6d 65 | 2e 00 00 00 24 97 00 27 |sed time|....$..'|
|000033d0| 00 09 00 20 4f 74 68 65 | 72 77 69 73 65 2c 20 65 |... Othe|rwise, e|
|000033e0| 78 69 74 20 74 68 65 20 | 46 4f 52 2e 2e 2e 4e 45 |xit the |FOR...NE|
|000033f0| 58 54 20 6c 6f 6f 70 3a | 72 00 24 49 00 ff ff 00 |XT loop:|r.$I....|
|00003400| 30 54 00 ff ff 00 24 50 | 00 00 18 0b 00 96 03 66 |0T....$P|.......f|
|00003410| 00 ff ff ff ff 00 00 00 | 18 97 00 3f 00 06 00 20 |........|...?... |
|00003420| 49 6e 73 65 72 74 20 74 | 68 65 20 6f 72 69 67 69 |Insert t|he origi|
|00003430| 6e 61 6c 20 76 61 6c 75 | 65 20 6f 66 20 53 6f 72 |nal valu|e of Sor|
|00003440| 74 41 72 72 61 79 28 52 | 6f 77 29 20 69 6e 20 53 |tArray(R|ow) in S|
|00003450| 6f 72 74 41 72 72 61 79 | 28 4a 29 3a 69 00 18 0b |ortArray|(J):i...|
|00003460| 00 ca 03 0b 00 96 03 0f | 00 01 00 60 02 00 18 0b |........|...`....|
|00003470| 00 96 03 38 00 01 00 68 | 01 00 18 0b 00 96 03 38 |...8...h|.......8|
|00003480| 00 01 00 e4 00 00 0c 0b | 00 77 01 66 00 ff ff ff |........|.w.f....|
|00003490| ff 00 00 51 00 09 00 08 | 00 ff ff 04 00 ff ff ff |...Q....|........|
|000034a0| ff 24 00 00 00 ff ff 02 | 0c 00 0d 00 50 65 72 63 |.$......|....Perc|
|000034b0| 6f 6c 61 74 65 44 6f 77 | 6e 01 00 b8 3e 04 00 00 |olateDow|n...>...|
|000034c0| 1b 00 ff ff c1 ff ff ff | 00 00 97 00 18 00 00 00 |........|........|
|000034d0| 20 0d 1c 3d 20 50 65 72 | 63 6f 6c 61 74 65 44 6f | ..= Per|colateDo|
|000034e0| 77 6e 20 0d 21 3d 00 00 | 97 00 4d 00 00 00 20 20 |wn .!=..|..M... |
|000034f0| 20 54 68 65 20 50 65 72 | 63 6f 6c 61 74 65 44 6f | The Per|colateDo|
|00003500| 77 6e 20 70 72 6f 63 65 | 64 75 72 65 20 72 65 73 |wn proce|dure res|
|00003510| 74 6f 72 65 73 20 74 68 | 65 20 65 6c 65 6d 65 6e |tores th|e elemen|
|00003520| 74 73 20 6f 66 20 53 6f | 72 74 41 72 72 61 79 20 |ts of So|rtArray |
|00003530| 66 72 6f 6d 20 31 20 74 | 6f 3d 00 00 97 00 48 00 |from 1 t|o=....H.|
|00003540| 00 00 20 20 20 4d 61 78 | 4c 65 76 65 6c 20 74 6f |.. Max|Level to|
|00003550| 20 61 20 22 68 65 61 70 | 22 20 28 73 65 65 20 74 | a "heap|" (see t|
|00003560| 68 65 20 64 69 61 67 72 | 61 6d 20 77 69 74 68 20 |he diagr|am with |
|00003570| 74 68 65 20 48 65 61 70 | 53 6f 72 74 20 70 72 6f |the Heap|Sort pro|
|00003580| 63 65 64 75 72 65 29 2e | 00 00 97 00 06 00 00 00 |cedure).|........|
|00003590| 20 0d 4c 3d 00 00 97 00 | 02 00 00 00 00 00 76 00 | .L=....|......v.|
|000035a0| 0c 00 3c 01 00 01 01 00 | 4d 01 00 00 01 00 00 0c |..<.....|M.......|
|000035b0| 64 05 0c 00 17 03 00 00 | 00 0c 97 00 3c 00 03 00 |d.......|....<...|
|000035c0| 20 4d 6f 76 65 20 74 68 | 65 20 76 61 6c 75 65 20 | Move th|e value |
|000035d0| 69 6e 20 53 6f 72 74 41 | 72 72 61 79 28 31 29 20 |in SortA|rray(1) |
|000035e0| 64 6f 77 6e 20 74 68 65 | 20 68 65 61 70 20 75 6e |down the| heap un|
|000035f0| 74 69 6c 20 69 74 20 68 | 61 73 00 0c 97 00 45 00 |til it h|as....E.|
|00003600| 03 00 20 72 65 61 63 68 | 65 64 20 69 74 73 20 70 |.. reach|ed its p|
|00003610| 72 6f 70 65 72 20 6e 6f | 64 65 20 28 74 68 61 74 |roper no|de (that|
|00003620| 20 69 73 2c 20 75 6e 74 | 69 6c 20 69 74 20 69 73 | is, unt|il it is|
|00003630| 20 6c 65 73 73 20 74 68 | 61 6e 20 69 74 73 20 70 | less th|an its p|
|00003640| 61 72 65 6e 74 3d 00 0c | 97 00 4a 00 03 00 20 6e |arent=..|..J... n|
|00003650| 6f 64 65 20 6f 72 20 75 | 6e 74 69 6c 20 69 74 20 |ode or u|ntil it |
|00003660| 68 61 73 20 72 65 61 63 | 68 65 64 20 4d 61 78 4c |has reac|hed MaxL|
|00003670| 65 76 65 6c 2c 20 74 68 | 65 20 62 6f 74 74 6f 6d |evel, th|e bottom|
|00003680| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00003690| 68 65 61 70 29 3a 00 0c | 46 00 00 18 64 09 0b 00 |heap):..|F...d...|
|000036a0| 17 03 70 01 0c 00 e3 03 | 97 00 28 00 20 00 20 47 |..p.....|..(. . G|
|000036b0| 65 74 20 74 68 65 20 73 | 75 62 73 63 72 69 70 74 |et the s|ubscript|
|000036c0| 20 66 6f 72 20 74 68 65 | 20 63 68 69 6c 64 20 6e | for the| child n|
|000036d0| 6f 64 65 2e 00 00 00 18 | 97 00 3a 00 06 00 20 52 |ode.....|..:... R|
|000036e0| 65 61 63 68 65 64 20 74 | 68 65 20 62 6f 74 74 6f |eached t|he botto|
|000036f0| 6d 20 6f 66 20 74 68 65 | 20 68 65 61 70 2c 20 73 |m of the| heap, s|
|00003700| 6f 20 65 78 69 74 20 74 | 68 69 73 20 70 72 6f 63 |o exit t|his proc|
|00003710| 65 64 75 72 65 3a 00 18 | 0b 00 e3 03 0b 00 4d 01 |edure:..|......M.|
|00003720| 5f 01 5d 00 00 00 53 00 | ff ff 00 00 00 18 97 00 |_.]...S.|........|
|00003730| 3e 00 06 00 20 49 66 20 | 74 68 65 72 65 20 61 72 |>... If |there ar|
|00003740| 65 20 74 77 6f 20 63 68 | 69 6c 64 20 6e 6f 64 65 |e two ch|ild node|
|00003750| 73 2c 20 66 69 6e 64 20 | 6f 75 74 20 77 68 69 63 |s, find |out whic|
|00003760| 68 20 6f 6e 65 20 69 73 | 20 62 69 67 67 65 72 3a |h one is| bigger:|
|00003770| 00 18 0b 00 e3 03 64 05 | 00 01 0b 00 4d 01 62 01 |......d.|....M.b.|
|00003780| 61 00 00 00 00 24 0b 00 | e3 03 64 05 00 01 0e 00 |a....$..|..d.....|
|00003790| 01 00 60 02 11 00 04 02 | 0b 00 e3 03 0e 00 01 00 |..`.....|........|
|000037a0| 60 02 11 00 04 02 5f 01 | 61 00 00 00 00 30 0b 00 |`....._.|a....0..|
|000037b0| e3 03 64 05 00 01 0c 00 | e3 03 00 24 50 00 00 18 |..d.....|...$P...|
|000037c0| 50 00 00 00 00 18 97 00 | 43 00 06 00 20 4d 6f 76 |P.......|C... Mov|
|000037d0| 65 20 74 68 65 20 76 61 | 6c 75 65 20 64 6f 77 6e |e the va|lue down|
|000037e0| 20 69 66 20 69 74 20 69 | 73 20 73 74 69 6c 6c 20 | if it i|s still |
|000037f0| 6e 6f 74 20 62 69 67 67 | 65 72 20 74 68 61 6e 20 |not bigg|er than |
|00003800| 65 69 74 68 65 72 20 6f | 6e 65 20 6f 66 20 00 18 |either o|ne of ..|
|00003810| 97 00 10 00 06 00 20 69 | 74 73 20 63 68 69 6c 64 |...... i|ts child|
|00003820| 72 65 6e 3a 00 18 0b 00 | 17 03 0e 00 01 00 60 02 |ren:....|......`.|
|00003830| 11 00 04 02 0b 00 e3 03 | 0e 00 01 00 60 02 11 00 |........|....`...|
|00003840| 04 02 63 01 61 00 00 00 | 00 24 0b 00 17 03 0e 00 |..c.a...|.$......|
|00003850| 01 00 60 02 0b 00 e3 03 | 0e 00 01 00 60 02 ed 00 |..`.....|....`...|
|00003860| ff ff 00 24 0b 00 17 03 | 0b 00 e3 03 38 00 02 00 |...$....|....8...|
|00003870| c3 01 00 24 0b 00 e3 03 | 0c 00 17 03 00 00 00 18 |...$....|........|
|00003880| 97 00 47 00 06 00 20 4f | 74 68 65 72 77 69 73 65 |..G... O|therwise|
|00003890| 2c 20 53 6f 72 74 41 72 | 72 61 79 20 68 61 73 20 |, SortAr|ray has |
|000038a0| 62 65 65 6e 20 72 65 73 | 74 6f 72 65 64 20 74 6f |been res|tored to|
|000038b0| 20 61 20 68 65 61 70 20 | 66 72 6f 6d 20 31 20 74 | a heap |from 1 t|
|000038c0| 6f 20 4d 61 78 4c 65 76 | 65 6c 2c 70 00 18 97 00 |o MaxLev|el,p....|
|000038d0| 0b 00 06 00 20 73 6f 20 | 65 78 69 74 3a 65 00 18 |.... so |exit:e..|
|000038e0| 49 00 ff ff 00 24 53 00 | ff ff 00 18 50 00 00 0c |I....$S.|....P...|
|000038f0| 62 00 ff ff 00 00 51 00 | 09 00 08 00 ff ff 04 00 |b.....Q.|........|
|00003900| ff ff ff ff 27 00 00 00 | ff ff 02 0c 00 0b 00 50 |....'...|.......P|
|00003910| 65 72 63 6f 6c 61 74 65 | 55 70 01 00 b8 8c 03 00 |ercolate|Up......|
|00003920| 00 1b 00 ff ff c1 ff ff | ff 00 00 97 00 16 00 00 |........|........|
|00003930| 00 20 0d 1e 3d 20 50 65 | 72 63 6f 6c 61 74 65 55 |. ..= Pe|rcolateU|
|00003940| 70 20 0d 21 3d 00 00 97 | 00 4a 00 00 00 20 20 20 |p .!=...|.J... |
|00003950| 54 68 65 20 50 65 72 63 | 6f 6c 61 74 65 55 70 20 |The Perc|olateUp |
|00003960| 70 72 6f 63 65 64 75 72 | 65 20 63 6f 6e 76 65 72 |procedur|e conver|
|00003970| 74 73 20 74 68 65 20 65 | 6c 65 6d 65 6e 74 73 20 |ts the e|lements |
|00003980| 66 72 6f 6d 20 31 20 74 | 6f 20 4d 61 78 4c 65 76 |from 1 t|o MaxLev|
|00003990| 65 6c 20 69 6e 00 00 97 | 00 4b 00 00 00 20 20 20 |el in...|.K... |
|000039a0| 53 6f 72 74 41 72 72 61 | 79 20 69 6e 74 6f 20 61 |SortArra|y into a|
|000039b0| 20 22 68 65 61 70 22 20 | 28 73 65 65 20 74 68 65 | "heap" |(see the|
|000039c0| 20 64 69 61 67 72 61 6d | 20 77 69 74 68 20 74 68 | diagram| with th|
|000039d0| 65 20 48 65 61 70 53 6f | 72 74 20 70 72 6f 63 65 |e HeapSo|rt proce|
|000039e0| 64 75 72 65 29 2e 00 00 | 00 97 00 06 00 00 00 20 |dure)...|....... |
|000039f0| 0d 4c 3d 00 00 97 00 02 | 00 00 00 00 00 76 00 0c |.L=.....|.....v..|
|00003a00| 00 59 01 00 01 01 00 4d | 01 00 00 01 00 00 0c 0b |.Y.....M|........|
|00003a10| 00 4d 01 0c 00 17 03 00 | 00 00 0c 97 00 41 00 03 |.M......|.....A..|
|00003a20| 00 20 4d 6f 76 65 20 74 | 68 65 20 76 61 6c 75 65 |. Move t|he value|
|00003a30| 20 69 6e 20 53 6f 72 74 | 41 72 72 61 79 28 4d 61 | in Sort|Array(Ma|
|00003a40| 78 4c 65 76 65 6c 29 20 | 75 70 20 74 68 65 20 68 |xLevel) |up the h|
|00003a50| 65 61 70 20 75 6e 74 69 | 6c 20 69 74 20 68 61 73 |eap unti|l it has|
|00003a60| 3d 00 0c 97 00 44 00 03 | 00 20 72 65 61 63 68 65 |=....D..|. reache|
|00003a70| 64 20 69 74 73 20 70 72 | 6f 70 65 72 20 6e 6f 64 |d its pr|oper nod|
|00003a80| 65 20 28 74 68 61 74 20 | 69 73 2c 20 75 6e 74 69 |e (that |is, unti|
|00003a90| 6c 20 69 74 20 69 73 20 | 67 72 65 61 74 65 72 20 |l it is |greater |
|00003aa0| 74 68 61 6e 20 65 69 74 | 68 65 72 00 0c 97 00 47 |than eit|her....G|
|00003ab0| 00 03 00 20 6f 66 20 69 | 74 73 20 63 68 69 6c 64 |... of i|ts child|
|00003ac0| 20 6e 6f 64 65 73 2c 20 | 6f 72 20 75 6e 74 69 6c | nodes, |or until|
|00003ad0| 20 69 74 20 68 61 73 20 | 72 65 61 63 68 65 64 20 | it has |reached |
|00003ae0| 31 2c 20 74 68 65 20 74 | 6f 70 20 6f 66 20 74 68 |1, the t|op of th|
|00003af0| 65 20 68 65 61 70 29 3a | 3d 00 0c 0b 00 17 03 64 |e heap):|=......d|
|00003b00| 05 03 01 47 00 ff ff 00 | 18 0b 00 17 03 64 09 60 |...G....|.....d.`|
|00003b10| 01 0c 00 ec 03 97 00 29 | 00 20 00 20 47 65 74 20 |.......)|. . Get |
|00003b20| 74 68 65 20 73 75 62 73 | 63 72 69 70 74 20 66 6f |the subs|cript fo|
|00003b30| 72 20 74 68 65 20 70 61 | 72 65 6e 74 20 6e 6f 64 |r the pa|rent nod|
|00003b40| 65 2e 20 00 00 00 18 97 | 00 42 00 06 00 20 54 68 |e. .....|.B... Th|
|00003b50| 65 20 76 61 6c 75 65 20 | 61 74 20 74 68 65 20 63 |e value |at the c|
|00003b60| 75 72 72 65 6e 74 20 6e | 6f 64 65 20 69 73 20 73 |urrent n|ode is s|
|00003b70| 74 69 6c 6c 20 62 69 67 | 67 65 72 20 74 68 61 6e |till big|ger than|
|00003b80| 20 74 68 65 20 76 61 6c | 75 65 20 61 74 00 18 97 | the val|ue at...|
|00003b90| 00 35 00 06 00 20 69 74 | 73 20 70 61 72 65 6e 74 |.5... it|s parent|
|00003ba0| 20 6e 6f 64 65 2c 20 73 | 6f 20 73 77 61 70 20 74 | node, s|o swap t|
|00003bb0| 68 65 73 65 20 74 77 6f | 20 61 72 72 61 79 20 65 |hese two| array e|
|00003bc0| 6c 65 6d 65 6e 74 73 3a | 20 00 18 0b 00 17 03 0e |lements:| .......|
|00003bd0| 00 01 00 60 02 11 00 04 | 02 0b 00 ec 03 0e 00 01 |...`....|........|
|00003be0| 00 60 02 11 00 04 02 5f | 01 61 00 00 00 00 24 0b |.`....._|.a....$.|
|00003bf0| 00 ec 03 0e 00 01 00 60 | 02 0b 00 17 03 0e 00 01 |.......`|........|
|00003c00| 00 60 02 ed 00 ff ff 00 | 24 0b 00 ec 03 0b 00 17 |.`......|$.......|
|00003c10| 03 38 00 02 00 c3 01 00 | 24 0b 00 ec 03 0c 00 17 |.8......|$.......|
|00003c20| 03 00 00 00 18 97 00 43 | 00 06 00 20 4f 74 68 65 |.......C|... Othe|
|00003c30| 72 77 69 73 65 2c 20 74 | 68 65 20 65 6c 65 6d 65 |rwise, t|he eleme|
|00003c40| 6e 74 20 68 61 73 20 72 | 65 61 63 68 65 64 20 69 |nt has r|eached i|
|00003c50| 74 73 20 70 72 6f 70 65 | 72 20 70 6c 61 63 65 20 |ts prope|r place |
|00003c60| 69 6e 20 74 68 65 20 68 | 65 61 70 2c 00 00 18 97 |in the h|eap,....|
|00003c70| 00 1a 00 06 00 20 73 6f | 20 65 78 69 74 20 74 68 |..... so| exit th|
|00003c80| 69 73 20 70 72 6f 63 65 | 64 75 72 65 3a 00 18 49 |is proce|dure:..I|
|00003c90| 00 ff ff 00 24 53 00 ff | ff 00 18 50 00 00 0c 62 |....$S..|...P...b|
|00003ca0| 00 ff ff 00 00 51 00 09 | 00 08 00 ff ff 04 00 ff |.....Q..|........|
|00003cb0| ff ff ff 1d 00 00 00 ff | ff 02 0c 00 0b 00 50 72 |........|......Pr|
|00003cc0| 69 6e 74 4f 6e 65 42 61 | 72 01 00 b8 18 01 00 00 |intOneBa|r.......|
|00003cd0| 1b 00 ff ff c1 ff ff ff | 00 00 97 00 16 00 00 00 |........|........|
|00003ce0| 20 0d 1e 3d 20 50 72 69 | 6e 74 4f 6e 65 42 61 72 | ..= Pri|ntOneBar|
|00003cf0| 20 0d 21 3d 00 00 97 00 | 43 00 00 00 20 20 50 72 | .!=....|C... Pr|
|00003d00| 69 6e 74 73 20 53 6f 72 | 74 41 72 72 61 79 28 52 |ints Sor|tArray(R|
|00003d10| 6f 77 29 2e 42 61 72 53 | 74 72 69 6e 67 20 61 74 |ow).BarS|tring at|
|00003d20| 20 74 68 65 20 72 6f 77 | 20 69 6e 64 69 63 61 74 | the row| indicat|
|00003d30| 65 64 20 62 79 20 74 68 | 65 20 52 6f 77 00 00 00 |ed by th|e Row...|
|00003d40| 97 00 3a 00 00 00 20 20 | 70 61 72 61 6d 65 74 65 |..:... |paramete|
|00003d50| 72 2c 20 75 73 69 6e 67 | 20 74 68 65 20 63 6f 6c |r, using| the col|
|00003d60| 6f 72 20 69 6e 20 53 6f | 72 74 41 72 72 61 79 28 |or in So|rtArray(|
|00003d70| 52 6f 77 29 2e 43 6f 6c | 6f 72 56 61 6c 2e 00 00 |Row).Col|orVal...|
|00003d80| 97 00 06 00 00 00 20 0d | 4c 3d 00 00 97 00 02 00 |...... .|L=......|
|00003d90| 00 00 00 00 76 00 0c 00 | 68 01 00 01 01 00 77 01 |....v...|h.....w.|
|00003da0| 00 00 01 00 00 0c 73 01 | 0b 00 77 01 73 01 64 05 |......s.|..w.s.d.|
|00003db0| c1 00 04 00 00 0c 73 01 | 0b 00 77 01 0e 00 01 00 |......s.|..w.....|
|00003dc0| 60 02 11 00 0e 02 a4 00 | 02 00 00 0c 0b 00 77 01 |`.......|......w.|
|00003dd0| 0e 00 01 00 60 02 11 00 | 1a 02 95 00 93 00 00 00 |....`...|........|
|00003de0| 51 00 09 00 08 00 ff ff | 04 00 ff ff ff ff 0b 00 |Q.......|........|
|00003df0| 00 00 ff ff 02 0c 00 09 | 00 51 75 69 63 6b 53 6f |........|.QuickSo|
|00003e00| 72 74 01 00 38 b2 06 00 | 00 1b 00 ff ff c1 ff ff |rt..8...|........|
|00003e10| ff 00 00 97 00 14 00 00 | 00 20 0d 1e 3d 20 51 75 |........|. ..= Qu|
|00003e20| 69 63 6b 53 6f 72 74 20 | 0d 23 3d 00 00 97 00 4b |ickSort |.#=....K|
|00003e30| 00 00 00 20 20 20 51 75 | 69 63 6b 53 6f 72 74 20 |... Qu|ickSort |
|00003e40| 77 6f 72 6b 73 20 62 79 | 20 70 69 63 6b 69 6e 67 |works by| picking|
|00003e50| 20 61 20 72 61 6e 64 6f | 6d 20 22 70 69 76 6f 74 | a rando|m "pivot|
|00003e60| 22 20 65 6c 65 6d 65 6e | 74 20 69 6e 20 53 6f 72 |" elemen|t in Sor|
|00003e70| 74 41 72 72 61 79 2c 20 | 74 68 65 6e 3d 00 00 97 |tArray, |then=...|
|00003e80| 00 4c 00 00 00 20 20 20 | 6d 6f 76 69 6e 67 20 65 |.L... |moving e|
|00003e90| 76 65 72 79 20 65 6c 65 | 6d 65 6e 74 20 74 68 61 |very ele|ment tha|
|00003ea0| 74 20 69 73 20 62 69 67 | 67 65 72 20 74 6f 20 6f |t is big|ger to o|
|00003eb0| 6e 65 20 73 69 64 65 20 | 6f 66 20 74 68 65 20 70 |ne side |of the p|
|00003ec0| 69 76 6f 74 2c 20 61 6e | 64 20 65 76 65 72 79 00 |ivot, an|d every.|
|00003ed0| 00 97 00 49 00 00 00 20 | 20 20 65 6c 65 6d 65 6e |...I... | elemen|
|00003ee0| 74 20 74 68 61 74 20 69 | 73 20 73 6d 61 6c 6c 65 |t that i|s smalle|
|00003ef0| 72 20 74 6f 20 74 68 65 | 20 6f 74 68 65 72 20 73 |r to the| other s|
|00003f00| 69 64 65 2e 20 20 51 75 | 69 63 6b 53 6f 72 74 20 |ide. Qu|ickSort |
|00003f10| 69 73 20 74 68 65 6e 20 | 63 61 6c 6c 65 64 65 00 |is then |callede.|
|00003f20| 00 97 00 4a 00 00 00 20 | 20 20 72 65 63 75 72 73 |...J... | recurs|
|00003f30| 69 76 65 6c 79 20 77 69 | 74 68 20 74 68 65 20 74 |ively wi|th the t|
|00003f40| 77 6f 20 73 75 62 64 69 | 76 69 73 69 6f 6e 73 20 |wo subdi|visions |
|00003f50| 63 72 65 61 74 65 64 20 | 62 79 20 74 68 65 20 70 |created |by the p|
|00003f60| 69 76 6f 74 2e 20 20 4f | 6e 63 65 20 74 68 65 00 |ivot. O|nce the.|
|00003f70| 00 97 00 4d 00 00 00 20 | 20 20 6e 75 6d 62 65 72 |...M... | number|
|00003f80| 20 6f 66 20 65 6c 65 6d | 65 6e 74 73 20 69 6e 20 | of elem|ents in |
|00003f90| 61 20 73 75 62 64 69 76 | 69 73 69 6f 6e 20 72 65 |a subdiv|ision re|
|00003fa0| 61 63 68 65 73 20 74 77 | 6f 2c 20 74 68 65 20 72 |aches tw|o, the r|
|00003fb0| 65 63 75 72 73 69 76 65 | 20 63 61 6c 6c 73 20 65 |ecursive| calls e|
|00003fc0| 6e 64 00 00 00 97 00 1d | 00 00 00 20 20 20 61 6e |nd......|... an|
|00003fd0| 64 20 74 68 65 20 61 72 | 72 61 79 20 69 73 20 73 |d the ar|ray is s|
|00003fe0| 6f 72 74 65 64 2e 73 00 | 00 97 00 06 00 00 00 20 |orted.s.|....... |
|00003ff0| 0d 4c 3d 00 00 97 00 02 | 00 00 00 00 00 76 00 12 |.L=.....|.....v..|
|00004000| 00 7e 01 00 01 02 00 8b | 01 00 00 01 00 92 01 00 |.~......|........|
|00004010| 00 01 00 00 0c 0b 00 8b | 01 0b 00 92 01 63 01 61 |........|.....c.a|
|00004020| 00 00 00 00 00 00 18 97 | 00 46 00 06 00 20 4f 6e |........|.F... On|
|00004030| 6c 79 20 74 77 6f 20 65 | 6c 65 6d 65 6e 74 73 20 |ly two e|lements |
|00004040| 69 6e 20 74 68 69 73 20 | 73 75 62 64 69 76 69 73 |in this |subdivis|
|00004050| 69 6f 6e 3b 20 73 77 61 | 70 20 74 68 65 6d 20 69 |ion; swa|p them i|
|00004060| 66 20 74 68 65 79 20 61 | 72 65 20 6f 75 74 20 6f |f they a|re out o|
|00004070| 66 00 18 97 00 23 00 06 | 00 20 6f 72 64 65 72 2c |f....#..|. order,|
|00004080| 20 74 68 65 6e 20 65 6e | 64 20 72 65 63 75 72 73 | then en|d recurs|
|00004090| 69 76 65 20 63 61 6c 6c | 73 3a 69 00 18 0b 00 92 |ive call|s:i.....|
|000040a0| 01 0b 00 8b 01 77 01 64 | 05 03 01 61 00 00 00 00 |.....w.d|...a....|
|000040b0| 24 0b 00 8b 01 0e 00 01 | 00 60 02 11 00 04 02 0b |$.......|.`......|
|000040c0| 00 92 01 0e 00 01 00 60 | 02 11 00 04 02 5f 01 61 |.......`|....._.a|
|000040d0| 00 00 00 00 30 0b 00 8b | 01 0e 00 01 00 60 02 0b |....0...|.....`..|
|000040e0| 00 92 01 0e 00 01 00 60 | 02 ed 00 ff ff 00 30 0b |.......`|......0.|
|000040f0| 00 8b 01 0b 00 92 01 38 | 00 02 00 c3 01 00 24 50 |.......8|......$P|
|00004100| 00 00 18 49 00 ff ff 00 | 00 00 24 97 00 3b 00 09 |...I....|..$..;..|
|00004110| 00 20 50 69 63 6b 20 61 | 20 70 69 76 6f 74 20 65 |. Pick a| pivot e|
|00004120| 6c 65 6d 65 6e 74 20 61 | 74 20 72 61 6e 64 6f 6d |lement a|t random|
|00004130| 2c 20 74 68 65 6e 20 6d | 6f 76 65 20 69 74 20 74 |, then m|ove it t|
|00004140| 6f 20 74 68 65 20 65 6e | 64 3a 20 00 24 0b 00 8b |o the en|d: .$...|
|00004150| 01 0b 00 92 01 0e 04 02 | 00 60 00 0c 00 f6 03 00 |........|.`......|
|00004160| 24 0b 00 92 01 0e 00 01 | 00 60 02 0b 00 f6 03 0e |$.......|.`......|
|00004170| 00 01 00 60 02 ed 00 ff | ff 00 24 0b 00 92 01 0b |...`....|..$.....|
|00004180| 00 f6 03 38 00 02 00 c3 | 01 00 24 0b 00 92 01 0e |...8....|..$.....|
|00004190| 00 01 00 60 02 11 00 04 | 02 0c 00 03 04 00 24 46 |...`....|......$F|
|000041a0| 00 00 00 00 30 97 00 35 | 00 0c 00 20 4d 6f 76 65 |....0..5|... Move|
|000041b0| 20 69 6e 20 66 72 6f 6d | 20 62 6f 74 68 20 73 69 | in from| both si|
|000041c0| 64 65 73 20 74 6f 77 61 | 72 64 73 20 74 68 65 20 |des towa|rds the |
|000041d0| 70 69 76 6f 74 20 65 6c | 65 6d 65 6e 74 3a 65 00 |pivot el|ement:e.|
|000041e0| 30 0b 00 8b 01 0c 00 17 | 03 06 00 0b 00 92 01 0c |0.......|........|
|000041f0| 00 96 03 00 30 0b 00 17 | 03 0b 00 96 03 63 01 6e |....0...|.....c.n|
|00004200| 01 0b 00 17 03 0e 00 01 | 00 60 02 11 00 04 02 0b |........|.`......|
|00004210| 00 03 04 62 01 6e 01 01 | 01 48 00 ff ff 00 3c 0b |...b.n..|.H....<.|
|00004220| 00 17 03 64 05 00 01 0c | 00 17 03 00 30 62 00 ff |...d....|....0b..|
|00004230| ff 00 30 0b 00 96 03 0b | 00 17 03 5f 01 6e 01 0b |..0.....|..._.n..|
|00004240| 00 96 03 0e 00 01 00 60 | 02 11 00 04 02 0b 00 03 |.......`|........|
|00004250| 04 5e 01 6e 01 01 01 48 | 00 ff ff 00 3c 0b 00 96 |.^.n...H|....<...|
|00004260| 03 64 05 77 01 0c 00 96 | 03 00 30 62 00 ff ff 00 |.d.w....|..0b....|
|00004270| 00 00 30 97 00 3d 00 0c | 00 20 49 66 20 77 65 20 |..0..=..|. If we |
|00004280| 68 61 76 65 6e 27 74 20 | 72 65 61 63 68 65 64 20 |haven't |reached |
|00004290| 74 68 65 20 70 69 76 6f | 74 20 65 6c 65 6d 65 6e |the pivo|t elemen|
|000042a0| 74 2c 20 69 74 20 6d 65 | 61 6e 73 20 74 68 61 74 |t, it me|ans that|
|000042b0| 20 74 77 6f 00 00 30 97 | 00 3a 00 0c 00 20 65 6c | two..0.|.:... el|
|000042c0| 65 6d 65 6e 74 73 20 6f | 6e 20 65 69 74 68 65 72 |ements o|n either|
|000042d0| 20 73 69 64 65 20 61 72 | 65 20 6f 75 74 20 6f 66 | side ar|e out of|
|000042e0| 20 6f 72 64 65 72 2c 20 | 73 6f 20 73 77 61 70 20 | order, |so swap |
|000042f0| 74 68 65 6d 3a 00 30 0b | 00 17 03 0b 00 96 03 63 |them:.0.|.......c|
|00004300| 01 61 00 00 00 00 3c 0b | 00 17 03 0e 00 01 00 60 |.a....<.|.......`|
|00004310| 02 0b 00 96 03 0e 00 01 | 00 60 02 ed 00 ff ff 00 |........|.`......|
|00004320| 3c 0b 00 17 03 0b 00 96 | 03 38 00 02 00 c3 01 00 |<.......|.8......|
|00004330| 30 50 00 00 24 0b 00 17 | 03 0b 00 96 03 63 01 64 |0P..$...|.....c.d|
|00004340| 00 ff ff 00 00 00 24 97 | 00 40 00 09 00 20 4d 6f |......$.|.@... Mo|
|00004350| 76 65 20 74 68 65 20 70 | 69 76 6f 74 20 65 6c 65 |ve the p|ivot ele|
|00004360| 6d 65 6e 74 20 62 61 63 | 6b 20 74 6f 20 69 74 73 |ment bac|k to its|
|00004370| 20 70 72 6f 70 65 72 20 | 70 6c 61 63 65 20 69 6e | proper |place in|
|00004380| 20 74 68 65 20 61 72 72 | 61 79 3a 00 24 0b 00 17 | the arr|ay:.$...|
|00004390| 03 0e 00 01 00 60 02 0b | 00 92 01 0e 00 01 00 60 |.....`..|.......`|
|000043a0| 02 ed 00 ff ff 00 24 0b | 00 17 03 0b 00 92 01 38 |......$.|.......8|
|000043b0| 00 02 00 c3 01 00 00 00 | 24 97 00 3d 00 09 00 20 |........|$..=... |
|000043c0| 52 65 63 75 72 73 69 76 | 65 6c 79 20 63 61 6c 6c |Recursiv|ely call|
|000043d0| 20 74 68 65 20 51 75 69 | 63 6b 53 6f 72 74 20 70 | the Qui|ckSort p|
|000043e0| 72 6f 63 65 64 75 72 65 | 20 28 70 61 73 73 20 74 |rocedure| (pass t|
|000043f0| 68 65 20 73 6d 61 6c 6c | 65 72 61 00 24 97 00 2e |he small|era.$...|
|00004400| 00 09 00 20 73 75 62 64 | 69 76 69 73 69 6f 6e 20 |... subd|ivision |
|00004410| 66 69 72 73 74 20 74 6f | 20 75 73 65 20 6c 65 73 |first to| use les|
|00004420| 73 20 73 74 61 63 6b 20 | 73 70 61 63 65 29 3a 00 |s stack |space):.|
|00004430| 24 0b 00 17 03 0b 00 8b | 01 77 01 6e 01 0b 00 92 |$.......|.w.n....|
|00004440| 01 0b 00 17 03 77 01 6e | 01 63 01 61 00 00 00 00 |.....w.n|.c.a....|
|00004450| 30 0b 00 8b 01 0b 00 17 | 03 64 05 77 01 38 00 02 |0.......|.d.w.8..|
|00004460| 00 7e 01 00 30 0b 00 17 | 03 64 05 00 01 0b 00 92 |.~..0...|.d......|
|00004470| 01 38 00 02 00 7e 01 00 | 24 49 00 ff ff 00 30 0b |.8...~..|$I....0.|
|00004480| 00 17 03 64 05 00 01 0b | 00 92 01 38 00 02 00 7e |...d....|...8...~|
|00004490| 01 00 30 0b 00 8b 01 0b | 00 17 03 64 05 77 01 38 |..0.....|...d.w.8|
|000044a0| 00 02 00 7e 01 00 24 50 | 00 00 18 50 00 00 0c 50 |...~..$P|...P...P|
|000044b0| 00 00 00 51 00 09 00 08 | 00 ff ff 04 00 ff ff ff |...Q....|........|
|000044c0| ff 3e 00 00 00 ff ff 02 | 0c 00 0c 00 52 65 69 6e |.>......|....Rein|
|000044d0| 69 74 69 61 6c 69 7a 65 | 01 00 b8 66 01 00 00 1b |itialize|...f....|
|000044e0| 00 ff ff c1 ff ff ff 00 | 00 97 00 17 00 00 00 20 |........|....... |
|000044f0| 0d 1e 3d 20 52 65 69 6e | 69 74 69 61 6c 69 7a 65 |..= Rein|itialize|
|00004500| 20 0d 20 3d 00 00 00 97 | 00 46 00 00 00 20 20 20 | . =....|.F... |
|00004510| 52 65 73 74 6f 72 65 73 | 20 74 68 65 20 61 72 72 |Restores| the arr|
|00004520| 61 79 20 53 6f 72 74 41 | 72 72 61 79 20 74 6f 20 |ay SortA|rray to |
|00004530| 69 74 73 20 6f 72 69 67 | 69 6e 61 6c 20 75 6e 73 |its orig|inal uns|
|00004540| 6f 72 74 65 64 20 73 74 | 61 74 65 2c 20 74 68 65 |orted st|ate, the|
|00004550| 6e 00 00 97 00 24 00 00 | 00 20 20 20 70 72 69 6e |n....$..|. prin|
|00004560| 74 73 20 74 68 65 20 75 | 6e 73 6f 72 74 65 64 20 |ts the u|nsorted |
|00004570| 63 6f 6c 6f 72 20 62 61 | 72 73 2e 00 00 97 00 06 |color ba|rs......|
|00004580| 00 00 00 20 0d 4c 3d 00 | 00 97 00 02 00 00 00 00 |... .L=.|........|
|00004590| 00 76 00 06 00 9a 01 00 | 01 00 00 00 0c 0b 00 17 |.v......|........|
|000045a0| 03 64 05 0b 00 d4 02 56 | 00 ff ff ff ff 00 18 0b |.d.....V|........|
|000045b0| 00 17 03 0e 00 01 00 6d | 02 0b 00 17 03 0f 00 01 |.......m|........|
|000045c0| 00 60 02 00 0c 0b 00 17 | 03 66 00 ff ff ff ff 00 |.`......|.f......|
|000045d0| 00 00 0c 0b 00 17 03 64 | 05 0b 00 d4 02 56 00 ff |.......d|.....V..|
|000045e0| ff ff ff 00 18 73 01 0b | 00 17 03 73 01 64 05 c1 |.....s..|...s.d..|
|000045f0| 00 04 00 00 18 73 01 0b | 00 17 03 0e 00 01 00 60 |.....s..|.......`|
|00004600| 02 11 00 0e 02 a4 00 02 | 00 00 18 0b 00 17 03 0e |........|........|
|00004610| 00 01 00 60 02 11 00 1a | 02 95 00 93 00 00 0c 0b |...`....|........|
|00004620| 00 17 03 66 00 ff ff ff | ff 00 00 00 0c 73 01 0b |...f....|.....s..|
|00004630| 00 e9 02 73 01 64 01 a4 | 00 04 00 00 00 51 00 09 |...s.d..|.....Q..|
|00004640| 00 08 00 ff ff 04 00 ff | ff ff ff 13 00 00 00 ff |........|........|
|00004650| ff 02 0c 00 09 00 53 68 | 65 6c 6c 53 6f 72 74 01 |......Sh|ellSort.|
|00004660| 00 b8 52 04 00 00 1b 00 | ff ff c1 ff ff ff 00 00 |..R.....|........|
|00004670| 97 00 14 00 00 00 20 0d | 1f 3d 20 53 68 65 6c 6c |...... .|.= Shell|
|00004680| 53 6f 72 74 20 0d 22 3d | 00 00 97 00 4d 00 00 00 |Sort ."=|....M...|
|00004690| 20 20 54 68 65 20 53 68 | 65 6c 6c 53 6f 72 74 20 | The Sh|ellSort |
|000046a0| 70 72 6f 63 65 64 75 72 | 65 20 69 73 20 73 69 6d |procedur|e is sim|
|000046b0| 69 6c 61 72 20 74 6f 20 | 74 68 65 20 42 75 62 62 |ilar to |the Bubb|
|000046c0| 6c 65 53 6f 72 74 20 70 | 72 6f 63 65 64 75 72 65 |leSort p|rocedure|
|000046d0| 2e 20 20 48 6f 77 65 76 | 65 72 2c 3d 00 00 97 00 |. Howev|er,=....|
|000046e0| 4b 00 00 00 20 20 53 68 | 65 6c 6c 53 6f 72 74 20 |K... Sh|ellSort |
|000046f0| 62 65 67 69 6e 73 20 62 | 79 20 63 6f 6d 70 61 72 |begins b|y compar|
|00004700| 69 6e 67 20 65 6c 65 6d | 65 6e 74 73 20 74 68 61 |ing elem|ents tha|
|00004710| 74 20 61 72 65 20 66 61 | 72 20 61 70 61 72 74 20 |t are fa|r apart |
|00004720| 28 73 65 70 61 72 61 74 | 65 64 20 62 79 72 00 00 |(separat|ed byr..|
|00004730| 97 00 4a 00 00 00 20 20 | 74 68 65 20 76 61 6c 75 |..J... |the valu|
|00004740| 65 20 6f 66 20 74 68 65 | 20 4f 66 66 73 65 74 20 |e of the| Offset |
|00004750| 76 61 72 69 61 62 6c 65 | 2c 20 77 68 69 63 68 20 |variable|, which |
|00004760| 69 73 20 69 6e 69 74 69 | 61 6c 6c 79 20 68 61 6c |is initi|ally hal|
|00004770| 66 20 74 68 65 20 64 69 | 73 74 61 6e 63 65 00 00 |f the di|stance..|
|00004780| 97 00 49 00 00 00 20 20 | 62 65 74 77 65 65 6e 20 |..I... |between |
|00004790| 74 68 65 20 66 69 72 73 | 74 20 61 6e 64 20 6c 61 |the firs|t and la|
|000047a0| 73 74 20 65 6c 65 6d 65 | 6e 74 29 2c 20 74 68 65 |st eleme|nt), the|
|000047b0| 6e 20 63 6f 6d 70 61 72 | 69 6e 67 20 65 6c 65 6d |n compar|ing elem|
|000047c0| 65 6e 74 73 20 74 68 61 | 74 20 61 72 65 65 00 00 |ents tha|t aree..|
|000047d0| 97 00 4d 00 00 00 20 20 | 63 6c 6f 73 65 72 20 74 |..M... |closer t|
|000047e0| 6f 67 65 74 68 65 72 20 | 28 77 68 65 6e 20 4f 66 |ogether |(when Of|
|000047f0| 66 73 65 74 20 69 73 20 | 6f 6e 65 2c 20 74 68 65 |fset is |one, the|
|00004800| 20 6c 61 73 74 20 69 74 | 65 72 61 74 69 6f 6e 20 | last it|eration |
|00004810| 6f 66 20 74 68 69 73 20 | 70 72 6f 63 65 64 75 72 |of this |procedur|
|00004820| 65 00 00 00 97 00 1d 00 | 00 00 20 20 69 73 20 6d |e.......|.. is m|
|00004830| 65 72 65 6c 79 20 61 20 | 62 75 62 62 6c 65 20 73 |erely a |bubble s|
|00004840| 6f 72 74 29 2e 73 00 00 | 97 00 06 00 00 00 20 0d |ort).s..|...... .|
|00004850| 4c 3d 00 00 97 00 02 00 | 00 00 00 00 76 00 06 00 |L=......|....v...|
|00004860| aa 01 00 01 00 00 00 00 | 00 0c 97 00 44 00 03 00 |........|....D...|
|00004870| 20 53 65 74 20 63 6f 6d | 70 61 72 69 73 6f 6e 20 | Set com|parison |
|00004880| 6f 66 66 73 65 74 20 74 | 6f 20 68 61 6c 66 20 74 |offset t|o half t|
|00004890| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 72 65 63 |he numbe|r of rec|
|000048a0| 6f 72 64 73 20 69 6e 20 | 53 6f 72 74 41 72 72 61 |ords in |SortArra|
|000048b0| 79 3a 00 0c 0b 00 d4 02 | 64 09 60 01 0c 00 10 04 |y:......|d.`.....|
|000048c0| 00 00 00 0c 0b 00 10 04 | 64 01 5f 01 48 00 ff ff |........|d._.H...|
|000048d0| 97 00 22 00 20 00 20 4c | 6f 6f 70 20 75 6e 74 69 |..". . L|oop unti|
|000048e0| 6c 20 6f 66 66 73 65 74 | 20 67 65 74 73 20 74 6f |l offset| gets to|
|000048f0| 20 7a 65 72 6f 2e 00 18 | 0b 00 d4 02 0b 00 10 04 | zero...|........|
|00004900| 77 01 0c 00 1c 03 00 18 | 46 00 00 24 0b 00 27 02 |w.......|F..$..'.|
|00004910| 0c 00 25 03 97 00 25 00 | 20 00 20 41 73 73 75 6d |..%...%.| . Assum|
|00004920| 65 20 6e 6f 20 73 77 69 | 74 63 68 65 73 20 61 74 |e no swi|tches at|
|00004930| 20 74 68 69 73 20 6f 66 | 66 73 65 74 2e 2e 00 00 | this of|fset....|
|00004940| 00 24 97 00 31 00 09 00 | 20 43 6f 6d 70 61 72 65 |.$..1...| Compare|
|00004950| 20 65 6c 65 6d 65 6e 74 | 73 20 61 6e 64 20 73 77 | element|s and sw|
|00004960| 69 74 63 68 20 6f 6e 65 | 73 20 6f 75 74 20 6f 66 |itch one|s out of|
|00004970| 20 6f 72 64 65 72 3a 63 | 00 24 0b 00 77 01 64 05 | order:c|.$..w.d.|
|00004980| 0b 00 1c 03 56 00 ff ff | ff ff 00 30 0b 00 77 01 |....V...|...0..w.|
|00004990| 0e 00 01 00 60 02 11 00 | 04 02 0b 00 77 01 0b 00 |....`...|....w...|
|000049a0| 10 04 00 01 0e 00 01 00 | 60 02 11 00 04 02 5f 01 |........|`....._.|
|000049b0| 61 00 00 00 00 3c 0b 00 | 77 01 0e 00 01 00 60 02 |a....<..|w.....`.|
|000049c0| 0b 00 77 01 0b 00 10 04 | 00 01 0e 00 01 00 60 02 |..w.....|......`.|
|000049d0| ed 00 ff ff 00 3c 0b 00 | 77 01 0b 00 77 01 0b 00 |.....<..|w...w...|
|000049e0| 10 04 00 01 38 00 02 00 | c3 01 00 3c 0b 00 77 01 |....8...|...<..w.|
|000049f0| 0c 00 25 03 00 30 50 00 | 00 24 0b 00 77 01 66 00 |..%..0P.|.$..w.f.|
|00004a00| ff ff ff ff 00 00 00 24 | 97 00 38 00 09 00 20 53 |.......$|..8... S|
|00004a10| 6f 72 74 20 6f 6e 20 6e | 65 78 74 20 70 61 73 73 |ort on n|ext pass|
|00004a20| 20 6f 6e 6c 79 20 74 6f | 20 77 68 65 72 65 20 6c | only to| where l|
|00004a30| 61 73 74 20 73 77 69 74 | 63 68 20 77 61 73 20 6d |ast swit|ch was m|
|00004a40| 61 64 65 3a 00 24 0b 00 | 25 03 0b 00 10 04 77 01 |ade:.$..|%.....w.|
|00004a50| 0c 00 1c 03 00 18 0b 00 | 25 03 64 00 ff ff 00 00 |........|%.d.....|
|00004a60| 00 18 97 00 33 00 06 00 | 20 4e 6f 20 73 77 69 74 |....3...| No swit|
|00004a70| 63 68 65 73 20 61 74 20 | 6c 61 73 74 20 6f 66 66 |ches at |last off|
|00004a80| 73 65 74 2c 20 74 72 79 | 20 6f 6e 65 20 68 61 6c |set, try| one hal|
|00004a90| 66 20 61 73 20 62 69 67 | 3a 6d 00 18 0b 00 10 04 |f as big|:m......|
|00004aa0| 64 09 60 01 0c 00 10 04 | 00 0c 62 00 ff ff 00 00 |d.`.....|..b.....|
|00004ab0| 51 00 09 00 08 00 ff ff | 04 00 ff ff ff ff 25 00 |Q.......|......%.|
|00004ac0| 00 00 ff ff 02 0c 00 08 | 00 53 6f 72 74 4d 65 6e |........|.SortMen|
|00004ad0| 75 01 00 b8 64 07 00 00 | 1b 00 ff ff c1 ff ff ff |u...d...|........|
|00004ae0| 00 00 97 00 13 00 00 00 | 20 0d 1f 3d 20 53 6f 72 |........| ..= Sor|
|00004af0| 74 4d 65 6e 75 20 0d 23 | 3d 00 00 00 97 00 4a 00 |tMenu .#|=.....J.|
|00004b00| 00 00 20 20 20 54 68 65 | 20 53 6f 72 74 4d 65 6e |.. The| SortMen|
|00004b10| 75 20 70 72 6f 63 65 64 | 75 72 65 20 66 69 72 73 |u proced|ure firs|
|00004b20| 74 20 63 61 6c 6c 73 20 | 74 68 65 20 52 65 69 6e |t calls |the Rein|
|00004b30| 69 74 69 61 6c 69 7a 65 | 20 70 72 6f 63 65 64 75 |itialize| procedu|
|00004b40| 72 65 20 74 6f 20 6d 61 | 6b 65 00 00 97 00 49 00 |re to ma|ke....I.|
|00004b50| 00 00 20 20 20 73 75 72 | 65 20 74 68 65 20 53 6f |.. sur|e the So|
|00004b60| 72 74 41 72 72 61 79 20 | 69 73 20 69 6e 20 69 74 |rtArray |is in it|
|00004b70| 73 20 75 6e 73 6f 72 74 | 65 64 20 66 6f 72 6d 2c |s unsort|ed form,|
|00004b80| 20 74 68 65 6e 20 70 72 | 6f 6d 70 74 73 20 74 68 | then pr|ompts th|
|00004b90| 65 20 75 73 65 72 20 74 | 6f 65 00 00 97 00 27 00 |e user t|oe....'.|
|00004ba0| 00 00 20 20 20 6d 61 6b | 65 20 6f 6e 65 20 6f 66 |.. mak|e one of|
|00004bb0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 63 | the fol|lowing c|
|00004bc0| 68 6f 69 63 65 73 3a 74 | 00 00 97 00 02 00 00 00 |hoices:t|........|
|00004bd0| 00 00 97 00 24 00 00 00 | 0d 0f 20 2a 20 4f 6e 65 |....$...|.. * One|
|00004be0| 20 6f 66 20 74 68 65 20 | 73 6f 72 74 69 6e 67 20 | of the |sorting |
|00004bf0| 61 6c 67 6f 72 69 74 68 | 6d 73 00 00 97 00 1d 00 |algorith|ms......|
|00004c00| 00 00 0d 0f 20 2a 20 54 | 6f 67 67 6c 65 20 73 6f |.... * T|oggle so|
|00004c10| 75 6e 64 20 6f 6e 20 6f | 72 20 6f 66 66 6f 00 00 |und on o|r offo..|
|00004c20| 97 00 21 00 00 00 0d 0f | 20 2a 20 49 6e 63 72 65 |..!.....| * Incre|
|00004c30| 61 73 65 20 6f 72 20 64 | 65 63 72 65 61 73 65 20 |ase or d|ecrease |
|00004c40| 73 70 65 65 64 68 00 00 | 97 00 16 00 00 00 0d 0f |speedh..|........|
|00004c50| 20 2a 20 45 6e 64 20 74 | 68 65 20 70 72 6f 67 72 | * End t|he progr|
|00004c60| 61 6d 00 00 97 00 06 00 | 00 00 20 0d 4c 3d 00 00 |am......|.. .L=..|
|00004c70| 97 00 02 00 00 00 00 00 | 76 00 06 00 b7 01 00 01 |........|v.......|
|00004c80| 00 00 00 0c 65 01 1b 00 | 09 01 0c 14 1a 04 00 00 |....e...|........|
|00004c90| 00 0c 97 00 33 00 03 00 | 20 43 72 65 61 74 65 20 |....3...| Create |
|00004ca0| 61 20 73 74 72 69 6e 67 | 20 63 6f 6e 73 69 73 74 |a string| consist|
|00004cb0| 69 6e 67 20 6f 66 20 61 | 6c 6c 20 6c 65 67 61 6c |ing of a|ll legal|
|00004cc0| 20 63 68 6f 69 63 65 73 | 3a 3d 00 0c 6d 01 09 00 | choices|:=..m...|
|00004cd0| 49 42 48 45 53 51 3e 3c | 54 22 0b 14 1a 04 00 01 |IBHESQ><|T"......|
|00004ce0| 0c 14 24 04 00 00 00 0c | 46 00 00 00 00 18 97 00 |..$.....|F.......|
|00004cf0| 1b 00 06 00 20 4d 61 6b | 65 20 74 68 65 20 63 75 |.... Mak|e the cu|
|00004d00| 72 73 6f 72 20 76 69 73 | 69 62 6c 65 3a 45 00 18 |rsor vis|ible:E..|
|00004d10| 73 01 0b 00 46 02 64 21 | 00 01 73 01 0b 00 38 02 |s...F.d!|..s...8.|
|00004d20| 65 01 1b 00 00 01 73 01 | 64 05 c1 00 06 00 00 00 |e.....s.|d.......|
|00004d30| 00 18 64 05 22 01 59 01 | 0c 14 2e 04 97 00 20 00 |..d.".Y.|...... .|
|00004d40| 2b 00 20 47 65 74 20 74 | 68 65 20 75 73 65 72 27 |+. Get t|he user'|
|00004d50| 73 20 63 68 6f 69 63 65 | 20 61 6e 64 20 73 65 65 |s choice| and see|
|00004d60| 00 18 0b 14 24 04 0b 14 | 2e 04 24 01 0c 00 c7 02 |....$...|..$.....|
|00004d70| 97 00 23 00 2b 00 20 69 | 66 20 69 74 27 73 20 6f |..#.+. i|f it's o|
|00004d80| 6e 65 20 6f 66 20 74 68 | 65 20 6d 65 6e 75 20 6f |ne of th|e menu o|
|00004d90| 70 74 69 6f 6e 73 2e 73 | 00 00 00 18 97 00 2c 00 |ptions.s|......,.|
|00004da0| 06 00 20 55 73 65 72 20 | 63 68 6f 73 65 20 6f 6e |.. User |chose on|
|00004db0| 65 20 6f 66 20 74 68 65 | 20 73 6f 72 74 69 6e 67 |e of the| sorting|
|00004dc0| 20 70 72 6f 63 65 64 75 | 72 65 73 3a 00 18 0b 00 | procedu|res:....|
|00004dd0| c7 02 64 05 5e 01 6e 01 | 0b 00 c7 02 0b 00 54 02 |..d.^.n.|......T.|
|00004de0| 62 01 6e 01 01 01 61 00 | 00 00 00 24 38 00 00 00 |b.n...a.|...$8...|
|00004df0| 9a 01 97 00 17 00 2b 00 | 20 52 65 73 63 72 61 6d |......+.| Rescram|
|00004e00| 62 6c 65 20 74 68 65 20 | 62 61 72 73 2e 69 00 24 |ble the |bars.i.$|
|00004e10| 72 01 72 01 73 01 64 01 | c1 00 04 00 97 00 1d 00 |r.r.s.d.|........|
|00004e20| 2b 00 20 4d 61 6b 65 20 | 74 68 65 20 63 75 72 73 |+. Make |the curs|
|00004e30| 6f 72 20 69 6e 76 69 73 | 69 62 6c 65 2e 65 00 24 |or invis|ible.e.$|
|00004e40| 64 01 0c 00 97 02 97 00 | 1c 00 2b 00 20 53 65 74 |d.......|..+. Set|
|00004e50| 20 72 65 76 65 72 73 65 | 2d 76 69 64 65 6f 20 76 | reverse|-video v|
|00004e60| 61 6c 75 65 73 2e 00 24 | 64 1d 0c 00 a5 02 00 24 |alues..$|d......$|
|00004e70| 56 01 0c 00 8a 02 97 00 | 1c 00 2b 00 20 52 65 63 |V.......|..+. Rec|
|00004e80| 6f 72 64 20 74 68 65 20 | 73 74 61 72 74 69 6e 67 |ord the |starting|
|00004e90| 20 74 69 6d 65 2e 00 18 | 50 00 00 00 00 18 97 00 | time...|P.......|
|00004ea0| 42 00 06 00 20 42 72 61 | 6e 63 68 20 74 6f 20 74 |B... Bra|nch to t|
|00004eb0| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 70 |he appro|priate p|
|00004ec0| 72 6f 63 65 64 75 72 65 | 20 64 65 70 65 6e 64 69 |rocedure| dependi|
|00004ed0| 6e 67 20 6f 6e 20 74 68 | 65 20 6b 65 79 20 74 79 |ng on th|e key ty|
|00004ee0| 70 65 64 3a 00 18 0b 14 | 2e 04 74 00 ff ff 00 24 |ped:....|..t....$|
|00004ef0| 6d 01 01 00 49 22 3b 00 | 00 30 38 00 00 00 2b 01 |m...I";.|.08...+.|
|00004f00| 00 24 6d 01 01 00 42 22 | 3b 00 00 30 38 00 00 00 |.$m...B"|;..08...|
|00004f10| 88 00 00 24 6d 01 01 00 | 48 22 3b 00 00 30 38 00 |...$m...|H";..08.|
|00004f20| 00 00 11 01 00 24 6d 01 | 01 00 45 22 3b 00 00 30 |.....$m.|..E";..0|
|00004f30| 38 00 00 00 01 01 00 24 | 6d 01 01 00 53 22 3b 00 |8......$|m...S";.|
|00004f40| 00 30 38 00 00 00 aa 01 | 00 24 6d 01 01 00 51 22 |.08.....|.$m...Q"|
|00004f50| 3b 00 00 30 64 05 0b 00 | d4 02 38 00 02 00 7e 01 |;..0d...|..8...~.|
|00004f60| 00 24 6d 01 01 00 3e 22 | 3b 00 00 00 00 30 97 00 |.$m...>"|;....0..|
|00004f70| 3e 00 0c 00 20 44 65 63 | 72 65 61 73 65 20 70 61 |>... Dec|rease pa|
|00004f80| 75 73 65 20 6c 65 6e 67 | 74 68 20 74 6f 20 73 70 |use leng|th to sp|
|00004f90| 65 65 64 20 75 70 20 73 | 6f 72 74 69 6e 67 20 74 |eed up s|orting t|
|00004fa0| 69 6d 65 2c 20 74 68 65 | 6e 20 72 65 64 72 61 77 |ime, the|n redraw|
|00004fb0| 00 30 97 00 41 00 0c 00 | 20 74 68 65 20 6d 65 6e |.0..A...| the men|
|00004fc0| 75 20 74 6f 20 63 6c 65 | 61 72 20 61 6e 79 20 74 |u to cle|ar any t|
|00004fd0| 69 6d 69 6e 67 20 72 65 | 73 75 6c 74 73 20 28 73 |iming re|sults (s|
|00004fe0| 69 6e 63 65 20 74 68 65 | 79 20 77 6f 6e 27 74 20 |ince the|y won't |
|00004ff0| 63 6f 6d 70 61 72 65 3a | 00 30 97 00 18 00 0c 00 |compare:|.0......|
|00005000| 20 77 69 74 68 20 66 75 | 74 75 72 65 20 72 65 73 | with fu|ture res|
|00005010| 75 6c 74 73 29 3a 00 30 | 64 09 0b 00 be 02 70 01 |ults):.0|d.....p.|
|00005020| 6e 01 64 0d 02 01 0c 00 | be 02 00 30 38 00 00 00 |n.d.....|...08...|
|00005030| 7d 00 00 00 00 24 6d 01 | 01 00 3c 22 3b 00 00 00 |}....$m.|..<";...|
|00005040| 00 30 97 00 3f 00 0c 00 | 20 49 6e 63 72 65 61 73 |.0..?...| Increas|
|00005050| 65 20 70 61 75 73 65 20 | 6c 65 6e 67 74 68 20 74 |e pause |length t|
|00005060| 6f 20 73 6c 6f 77 20 64 | 6f 77 6e 20 73 6f 72 74 |o slow d|own sort|
|00005070| 69 6e 67 20 74 69 6d 65 | 2c 20 74 68 65 6e 20 72 |ing time|, then r|
|00005080| 65 64 72 61 77 72 00 30 | 97 00 41 00 0c 00 20 74 |edrawr.0|..A... t|
|00005090| 68 65 20 6d 65 6e 75 20 | 74 6f 20 63 6c 65 61 72 |he menu |to clear|
|000050a0| 20 61 6e 79 20 74 69 6d | 69 6e 67 20 72 65 73 75 | any tim|ing resu|
|000050b0| 6c 74 73 20 28 73 69 6e | 63 65 20 74 68 65 79 20 |lts (sin|ce they |
|000050c0| 77 6f 6e 27 74 20 63 6f | 6d 70 61 72 65 00 00 30 |won't co|mpare..0|
|000050d0| 97 00 18 00 0c 00 20 77 | 69 74 68 20 66 75 74 75 |...... w|ith futu|
|000050e0| 72 65 20 72 65 73 75 6c | 74 73 29 3a 00 30 64 0d |re resul|ts):.0d.|
|000050f0| 0b 00 be 02 70 01 6e 01 | 64 09 02 01 0c 00 be 02 |....p.n.|d.......|
|00005100| 00 30 38 00 00 00 7d 00 | 00 00 00 24 6d 01 01 00 |.08...}.|...$m...|
|00005110| 54 22 3b 00 00 30 65 01 | 0c 00 0b 00 38 02 65 01 |T";..0e.|....8.e.|
|00005120| 0c 00 00 01 38 00 02 00 | df 01 00 00 00 24 0b 14 |....8...|.....$..|
|00005130| 1a 04 3b 00 00 00 00 30 | 97 00 39 00 0c 00 20 55 |..;....0|..9... U|
|00005140| 73 65 72 20 70 72 65 73 | 73 65 64 20 45 53 43 2c |ser pres|sed ESC,|
|00005150| 20 73 6f 20 65 78 69 74 | 20 74 68 69 73 20 70 72 | so exit| this pr|
|00005160| 6f 63 65 64 75 72 65 20 | 61 6e 64 20 72 65 74 75 |ocedure |and retu|
|00005170| 72 6e 20 74 6f 20 00 30 | 97 00 10 00 0c 00 20 6d |rn to .0|...... m|
|00005180| 6f 64 75 6c 65 20 6c 65 | 76 65 6c 3a 00 30 53 00 |odule le|vel:.0S.|
|00005190| ff ff 00 00 00 24 3a 00 | 00 00 00 30 97 00 0e 00 |.....$:.|...0....|
|000051a0| 0c 00 20 49 6e 76 61 6c | 69 64 20 6b 65 79 00 18 |.. Inval|id key..|
|000051b0| 52 00 00 00 00 18 0b 00 | c7 02 64 05 5e 01 6e 01 |R.......|..d.^.n.|
|000051c0| 0b 00 c7 02 0b 00 54 02 | 62 01 6e 01 01 01 61 00 |......T.|b.n...a.|
|000051d0| 00 00 00 24 0b 00 e9 02 | 0c 00 97 02 97 00 1a 00 |...$....|........|
|000051e0| 2b 00 20 54 75 72 6e 20 | 6f 66 66 20 72 65 76 65 |+. Turn |off reve|
|000051f0| 72 73 65 20 76 69 64 65 | 6f 2e 00 24 64 01 0c 00 |rse vide|o..$d...|
|00005200| a5 02 00 24 64 01 38 00 | 01 00 e4 00 97 00 14 00 |...$d.8.|........|
|00005210| 2b 00 20 50 72 69 6e 74 | 20 66 69 6e 61 6c 20 74 |+. Print| final t|
|00005220| 69 6d 65 2e 00 18 50 00 | 00 00 00 0c 62 00 ff ff |ime...P.|....b...|
|00005230| 00 00 00 00 51 00 09 00 | 08 00 ff ff 04 00 ff ff |....Q...|........|
|00005240| ff ff 58 00 00 00 ff ff | 02 0c 00 08 00 53 77 61 |..X.....|.....Swa|
|00005250| 70 42 61 72 73 01 00 b8 | f8 00 00 00 1b 00 ff ff |pBars...|........|
|00005260| c1 ff ff ff 00 00 97 00 | 13 00 00 00 20 0d 1f 3d |........|.... ..=|
|00005270| 20 53 77 61 70 42 61 72 | 73 20 0d 23 3d 00 00 00 | SwapBar|s .#=...|
|00005280| 97 00 45 00 00 00 20 20 | 20 43 61 6c 6c 73 20 50 |..E... | Calls P|
|00005290| 72 69 6e 74 4f 6e 65 42 | 61 72 20 74 77 69 63 65 |rintOneB|ar twice|
|000052a0| 20 74 6f 20 73 77 69 74 | 63 68 20 74 68 65 20 74 | to swit|ch the t|
|000052b0| 77 6f 20 62 61 72 73 20 | 69 6e 20 52 6f 77 31 20 |wo bars |in Row1 |
|000052c0| 61 6e 64 20 52 6f 77 32 | 2c 3d 00 00 97 00 2a 00 |and Row2|,=....*.|
|000052d0| 00 00 20 20 20 74 68 65 | 6e 20 63 61 6c 6c 73 20 |.. the|n calls |
|000052e0| 74 68 65 20 45 6c 61 70 | 73 65 64 54 69 6d 65 20 |the Elap|sedTime |
|000052f0| 70 72 6f 63 65 64 75 72 | 65 2e 00 00 97 00 06 00 |procedur|e.......|
|00005300| 00 00 20 0d 4c 3d 00 00 | 97 00 02 00 00 00 00 00 |.. .L=..|........|
|00005310| 76 00 12 00 c3 01 00 01 | 02 00 cf 01 00 00 01 00 |v.......|........|
|00005320| d7 01 00 00 01 00 00 0c | 0b 00 cf 01 38 00 01 00 |........|....8...|
|00005330| 68 01 00 0c 0b 00 d7 01 | 38 00 01 00 68 01 00 0c |h.......|8...h...|
|00005340| 0b 00 cf 01 38 00 01 00 | e4 00 00 00 51 00 09 00 |....8...|....Q...|
|00005350| 08 00 ff ff 04 00 ff ff | ff ff 0b 00 00 00 ff ff |........|........|
|00005360| 02 0c 00 0b 00 54 6f 67 | 67 6c 65 53 6f 75 6e 64 |.....Tog|gleSound|
|00005370| 01 00 b8 34 01 00 00 1b | 00 ff ff c1 ff ff ff 00 |...4....|........|
|00005380| 00 97 00 16 00 00 00 20 | 0d 1e 3d 20 54 6f 67 67 |....... |..= Togg|
|00005390| 6c 65 53 6f 75 6e 64 20 | 0d 21 3d 00 00 97 00 48 |leSound |.!=....H|
|000053a0| 00 00 00 20 20 20 52 65 | 76 65 72 73 65 73 20 74 |... Re|verses t|
|000053b0| 68 65 20 63 75 72 72 65 | 6e 74 20 76 61 6c 75 65 |he curre|nt value|
|000053c0| 20 66 6f 72 20 4e 6f 53 | 6f 75 6e 64 2c 20 74 68 | for NoS|ound, th|
|000053d0| 65 6e 20 70 72 69 6e 74 | 73 20 74 68 61 74 20 76 |en print|s that v|
|000053e0| 61 6c 75 65 20 6e 65 78 | 74 00 00 97 00 33 00 00 |alue nex|t....3..|
|000053f0| 00 20 20 20 74 6f 20 74 | 68 65 20 22 54 6f 67 67 |. to t|he "Togg|
|00005400| 6c 65 20 53 6f 75 6e 64 | 22 20 6f 70 74 69 6f 6e |le Sound|" option|
|00005410| 20 6f 6e 20 74 68 65 20 | 73 6f 72 74 20 6d 65 6e | on the |sort men|
|00005420| 75 2e 72 00 00 97 00 06 | 00 00 00 20 0d 4c 3d 00 |u.r.....|... .L=.|
|00005430| 00 97 00 02 00 00 00 00 | 00 76 00 12 00 df 01 00 |........|.v......|
|00005440| 01 02 00 77 01 00 00 01 | 00 ee 01 00 00 01 00 00 |...w....|........|
|00005450| 0c 0b 00 b3 02 74 01 0c | 00 b3 02 00 0c 73 01 0b |.....t..|.....s..|
|00005460| 00 77 01 73 01 0b 00 ee | 01 c1 00 04 00 00 0c 0b |.w.s....|........|
|00005470| 00 b3 02 61 00 00 00 00 | 18 6d 01 05 00 3a 20 4f |...a....|.m...: O|
|00005480| 46 46 22 95 00 93 00 00 | 0c 49 00 ff ff 00 18 6d |FF".....|.I.....m|
|00005490| 01 05 00 3a 20 4f 4e 20 | 22 95 00 93 00 00 0c 50 |...: ON |"......P|
|000054a0| 00 00 00 51 00 09 00 08 | 00 ff ff 04 00 ff ff ff |...Q....|........|
|000054b0| ff 0f 00 00 00 ff ff 02 | 0c |........|. |
+--------+-------------------------+-------------------------+--------+--------+