A Documenting of the Craps CHIP-8 Game This is documentation for the craps game provided in the sixth edition of VIPER magazine; follows is a view of the program when it is first loaded into the tool: 200-201 0512-0513 ßß Ü ß 6108 24840 V1  008 202-203 0514-0515 ÜßÜÜ ß 2258 08792 Call 0600 204-205 0516-0517 ßßÜ Üß 6112 24850 V1  018 206-207 0518-0519 ÜßÜÜ ß 2258 08792 Call 0600 208-209 0520-0521 ßßßßÛßÛ FE0A 65034 VE  key 20A-20B 0522-0523 ßß Ü Û 6109 24841 V1  009 20C-20D 0524-0525 ÜÛ ß 2260 08800 Call 0608 20E-20F 0526-0527 ß ßßß 8700 34560 V7  V0 210-211 0528-0529 ßßÜ ÜÛ 6113 24851 V1  019 212-213 0530-0531 ÜÛ ß 2260 08800 Call 0608 214-215 0532-0533 ß ß 8800 34816 V8  V0 216-217 0534-0535 Û ß ß 8980 35200 V9  V8 218-219 0536-0537 ßÜÜÜßÜ ß 8974 35188 V9  V9 + V7; VF  overflow 21A-21B 0538-0539 ß ß Üß 4902 18690 Skip next if V9 <> 002 21C-21D 0540-0541 Ü ÛÜÜß 129C 04764 Jump to 0668 21E-21F 0542-0543 ß ß ÜÛ 4903 18691 Skip next if V9 <> 003 220-221 0544-0545 Ü ÛÜÜß 129C 04764 Jump to 0668 222-223 0546-0547 ß ÛÜ ß 490C 18700 Skip next if V9 <> 012 224-225 0548-0549 Ü ÛÜÜß 129C 04764 Jump to 0668 226-227 0550-0551 ß ßÜÜÛ 4907 18695 Skip next if V9 <> 007 228-229 0552-0553 Ü ßÜÜß 128C 04748 Jump to 0652 22A-22B 0554-0555 ß Û ÜÛ 490B 18699 Skip next if V9 <> 011 22C-22D 0556-0557 Ü ßÜÜß 128C 04748 Jump to 0652 22E-22F 0558-0559 Û Üß ß 8A90 35472 VA  V9 230-231 0560-0561 Ûß 6040 24640 V0  064 232-233 0562-0563 ßßßÛ Ü Ü F015 61461 delay  V0 234-235 0564-0565 ßßßß ÜÜÜ F007 61447 V0  delay 236-237 0566-0567 ßß 3000 12288 Skip next if V0 = 000 238-239 0568-0569 ÜÛ Üß 1234 04660 Jump to 0564 23A-23B 0570-0571 ÜÛÜÜÜß 227C 08828 Call 0636 23C-23D 0572-0573 ßßßßÛßÛ FE0A 65034 VE  key 23E-23F 0574-0575 ßß Ü Û 6109 24841 V1  009 240-241 0576-0577 ÜÛ ß 2260 08800 Call 0608 242-243 0578-0579 ß ßßß 8700 34560 V7  V0 244-245 0580-0581 ßßÜ ÜÛ 6113 24851 V1  019 246-247 0582-0583 ÜÛ ß 2260 08800 Call 0608 248-249 0584-0585 ß ß 8800 34816 V8  V0 24A-24B 0586-0587 Û ß ß 8980 35200 V9  V8 24C-24D 0588-0589 ßÜÜÜßÜ ß 8974 35188 V9  V9 + V7; VF  overflow 24E-24F 0590-0591 Û Üßß ß 99A0 39328 Skip next if V9 <> VA 250-251 0592-0593 Ü ßÜÜß 128C 04748 Jump to 0652 252-253 0594-0595 ß ßÜÜÛ 4907 18695 Skip next if V9 <> 007 254-255 0596-0597 Ü ÛÜÜß 129C 04764 Jump to 0668 256-257 0598-0599 ÜÛ ß 1230 04656 Jump to 0560 258-259 0600-0601 ÛÜÛÜ ß A2F0 41712 I  0752 25A-25B 0602-0603 ßß Ü ß 6208 25096 V2  008 25C-25D 0604-0605 ßßÜß ÜÜÛ D127 53543 Draw 08x07 at V1,V2; VF  XOR 25E-25F 0606-0607 ÜÜÜ ÜÜÜ 00EE 00238 Return 260-261 0608-0609 ßß ßßÜ 6601 26113 V6  001 262-263 0610-0611 ßß Ü ßÜ 6209 25097 V2  009 264-265 0612-0613 ßß Ü 6001 24577 V0  001 266-267 0614-0615 ßßÛßÜ Ü F029 61481 I  digit sprite of V0 268-269 0616-0617 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 26A-26B 0618-0619 ßßßÛÜßß F618 63000 sound  V6 26C-26D 0620-0621 ßß ÜÛÛ C307 49927 V3  ??? AND 007 26E-26F 0622-0623 ß ßß 4300 17152 Skip next if V3 <> 000 270-271 0624-0625 ÜÜÜ ÜÜÜ 00EE 00238 Return 272-273 0626-0627 ßßß Ü 7001 28673 V0  V0 + 001 274-275 0628-0629 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 276-277 0630-0631 ßß ÜÜÜ 3007 12295 Skip next if V0 = 007 278-279 0632-0633 ÜÜß ÜÛ 1266 04710 Jump to 0614 27A-27B 0634-0635 ÜÜß Üß 1264 04708 Jump to 0612 27C-27D 0636-0637 ßß Ü ßÜ 6209 25097 V2  009 27E-27F 0638-0639 ßß Ü Û 6109 24841 V1  009 280-281 0640-0641 ßßÛßÜßßÛ F729 63273 I  digit sprite of V7 282-283 0642-0643 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 284-285 0644-0645 ßßÜ ÜÛ 6113 24851 V1  019 286-287 0646-0647 ßßÛßÛ Ü F829 63529 I  digit sprite of V8 288-289 0648-0649 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 28A-28B 0650-0651 ÜÜÜ ÜÜÜ 00EE 00238 Return 28C-28D 0652-0653 Û Û ÜÜß A2AC 41644 I  0684 28E-28F 0654-0655 ßß 6000 24576 V0  000 290-291 0656-0657 ßßÜ Ü Û 6115 24853 V1  021 292-293 0658-0659 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 294-295 0660-0661 Û ÛÜ ßÜ A2B1 41649 I  0689 296-297 0662-0663 ßß Ü 6008 24584 V0  008 298-299 0664-0665 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 29A-29B 0666-0667 Ü ÛÜ Û 129A 04762 Jump to 0666 29C-29D 0668-0669 Û ÛÜ ÜÛ A2B6 41654 I  0694 29E-29F 0670-0671 ßß 6000 24576 V0  000 2A0-2A1 0672-0673 ßßÜ ß 6110 24848 V1  016 2A2-2A3 0674-0675 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 2A4-2A5 0676-0677 Û ÛÜÜ ÛÜ A2BB 41659 I  0699 2A6-2A7 0678-0679 ßß Ü 6008 24584 V0  008 2A8-2A9 0680-0681 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 2AA-2AB 0682-0683 Ü ÜßÜ Û 12AA 04778 Jump to 0682 2AC-2AD 0684-0685 Û Û ßÛ 8B89 35721 2AE-2AF 0686-0687 Û Ü Û Û 89A9 35241 2B0-2B1 0688-0689 ÛßÜÛß Ûß DBB2 56242 Draw 08x02 at VB,VB; VF  XOR 2B2-2B3 0690-0691 ÛßÜ Û 322A 12842 Skip next if V2 = 042 2B4-2B5 0692-0693 Ü Û ÛÛ 26A6 09894 Call 1702 2B6-2B7 0694-0695 Û ÛßÛ 8E8A 36490 2B8-2B9 0696-0697 Û Û Û 8A8A 35466 2BA-2BB 0698-0699 ÛÛÛ ÛÛÛ EEEE 61166 2BC-2BD 0700-0701 ÛÜÜ ÛÜ 88EC 35052 2BE-2BF 0702-0703 ÜÜÛ ÛÜÜ 28EE 10478 Call 2286 Follows now is the fully annotated view of the program when it is loaded into the tool: 200-201 0512-0513 ßß Ü ß 6108 24840 V1  008 202-203 0514-0515 ÜßÜÜ ß 2258 08792 Call impotent 204-205 0516-0517 ßßÜ Üß 6112 24850 V1  018 206-207 0518-0519 ÜßÜÜ ß 2258 08792 Call impotent 208-209 0520-0521 ßßßßÛßÛ FE0A 65034 VE  key 20A-20B 0522-0523 ßß Ü Û 6109 24841 V1  009 20C-20D 0524-0525 ÜÛ ß 2260 08800 Call random draw 20E-20F 0526-0527 ß ßßß 8700 34560 V7  V0 210-211 0528-0529 ßßÜ ÜÛ 6113 24851 V1  019 212-213 0530-0531 ÜÛ ß 2260 08800 Call random draw 214-215 0532-0533 ß ß 8800 34816 V8  V0 216-217 0534-0535 Û ß ß 8980 35200 V9  V8 218-219 0536-0537 ßÜÜÜßÜ ß 8974 35188 V9  V9 + V7; VF  overflow 21A-21B 0538-0539 ß ß Üß 4902 18690 Skip next if V9 <> 002 21C-21D 0540-0541 Ü ÛÜÜß 129C 04764 Jump to lose 21E-21F 0542-0543 ß ß ÜÛ 4903 18691 Skip next if V9 <> 003 220-221 0544-0545 Ü ÛÜÜß 129C 04764 Jump to lose 222-223 0546-0547 ß ÛÜ ß 490C 18700 Skip next if V9 <> 012 224-225 0548-0549 Ü ÛÜÜß 129C 04764 Jump to lose 226-227 0550-0551 ß ßÜÜÛ 4907 18695 Skip next if V9 <> 007 228-229 0552-0553 Ü ßÜÜß 128C 04748 Jump to win 22A-22B 0554-0555 ß Û ÜÛ 490B 18699 Skip next if V9 <> 011 22C-22D 0556-0557 Ü ßÜÜß 128C 04748 Jump to win 22E-22F 0558-0559 Û Üß ß 8A90 35472 VA  V9 230-231 0560-0561 Ûß 6040 24640 again V0  064 232-233 0562-0563 ßßßÛ Ü Ü F015 61461 delay  V0 234-235 0564-0565 ßßßß ÜÜÜ F007 61447 delay V0  delay 236-237 0566-0567 ßß 3000 12288 Skip next if V0 = 000 238-239 0568-0569 ÜÛ Üß 1234 04660 Jump to delay 23A-23B 0570-0571 ÜÛÜÜÜß 227C 08828 Call deal draw 23C-23D 0572-0573 ßßßßÛßÛ FE0A 65034 VE  key 23E-23F 0574-0575 ßß Ü Û 6109 24841 V1  009 240-241 0576-0577 ÜÛ ß 2260 08800 Call random draw 242-243 0578-0579 ß ßßß 8700 34560 V7  V0 244-245 0580-0581 ßßÜ ÜÛ 6113 24851 V1  019 246-247 0582-0583 ÜÛ ß 2260 08800 Call random draw 248-249 0584-0585 ß ß 8800 34816 V8  V0 24A-24B 0586-0587 Û ß ß 8980 35200 V9  V8 24C-24D 0588-0589 ßÜÜÜßÜ ß 8974 35188 V9  V9 + V7; VF  overflow 24E-24F 0590-0591 Û Üßß ß 99A0 39328 Skip next if V9 <> VA 250-251 0592-0593 Ü ßÜÜß 128C 04748 Jump to win 252-253 0594-0595 ß ßÜÜÛ 4907 18695 Skip next if V9 <> 007 254-255 0596-0597 Ü ÛÜÜß 129C 04764 Jump to lose 256-257 0598-0599 ÜÛ ß 1230 04656 Jump to again 258-259 0600-0601 ÛÜÛÜ ß A2F0 41712 impotent I  0752 25A-25B 0602-0603 ßß Ü ß 6208 25096 V2  008 25C-25D 0604-0605 ßßÜß ÜÜÛ D127 53543 Draw 08x07 at V1,V2; VF  XOR 25E-25F 0606-0607 ÜÜÜ ÜÜÜ 00EE 00238 Return 260-261 0608-0609 ßß ßßÜ 6601 26113 random draw V6  001 262-263 0610-0611 ßß Ü ßÜ 6209 25097 V2  009 264-265 0612-0613 ßß Ü 6001 24577 over V0  001 266-267 0614-0615 ßßÛßÜ Ü F029 61481 from I  digit sprite of V0 268-269 0616-0617 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 26A-26B 0618-0619 ßßßÛÜßß F618 63000 sound  V6 26C-26D 0620-0621 ßß ÜÛÛ C307 49927 V3  ??? AND 007 26E-26F 0622-0623 ß ßß 4300 17152 Skip next if V3 <> 000 270-271 0624-0625 ÜÜÜ ÜÜÜ 00EE 00238 Return 272-273 0626-0627 ßßß Ü 7001 28673 V0  V0 + 001 274-275 0628-0629 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 276-277 0630-0631 ßß ÜÜÜ 3007 12295 Skip next if V0 = 007 278-279 0632-0633 ÜÜß ÜÛ 1266 04710 Jump to from 27A-27B 0634-0635 ÜÜß Üß 1264 04708 Jump to over 27C-27D 0636-0637 ßß Ü ßÜ 6209 25097 deal draw V2  009 27E-27F 0638-0639 ßß Ü Û 6109 24841 V1  009 280-281 0640-0641 ßßÛßÜßßÛ F729 63273 I  digit sprite of V7 282-283 0642-0643 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 284-285 0644-0645 ßßÜ ÜÛ 6113 24851 V1  019 286-287 0646-0647 ßßÛßÛ Ü F829 63529 I  digit sprite of V8 288-289 0648-0649 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 28A-28B 0650-0651 ÜÜÜ ÜÜÜ 00EE 00238 Return 28C-28D 0652-0653 Û Û ÜÜß A2AC 41644 win I  wi 28E-28F 0654-0655 ßß 6000 24576 V0  000 290-291 0656-0657 ßßÜ Ü Û 6115 24853 V1  021 292-293 0658-0659 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 294-295 0660-0661 Û ÛÜ ßÜ A2B1 41649 I  n 296-297 0662-0663 ßß Ü 6008 24584 V0  008 298-299 0664-0665 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 29A-29B 0666-0667 Ü ÛÜ Û 129A 04762 self Jump to self 29C-29D 0668-0669 Û ÛÜ ÜÛ A2B6 41654 lose I  lo 29E-29F 0670-0671 ßß 6000 24576 V0  000 2A0-2A1 0672-0673 ßßÜ ß 6110 24848 V1  016 2A2-2A3 0674-0675 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 2A4-2A5 0676-0677 Û ÛÜÜ ÛÜ A2BB 41659 I  se 2A6-2A7 0678-0679 ßß Ü 6008 24584 V0  008 2A8-2A9 0680-0681 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 2AA-2AB 0682-0683 Ü ÜßÜ Û 12AA 04778 end Jump to end 2AC 0684 Û Û ÛÛ 8B 139 wi 2AD 0685 Û Û Û 89 137 2AE 0686 Û Û Û 89 137 2AF 0687 Û Û Û Û A9 169 2B0 0688 ÛÛ ÛÛ ÛÛ DB 219 2B1 0689 Û ÛÛ Û B2 178 n 2B2 0690 ÛÛ Û 32 050 2B3 0691 Û Û Û 2A 042 2B4 0692 Û ÛÛ 26 038 2B5 0693 Û Û ÛÛ A6 166 2B6 0694 Û ÛÛÛ 8E 142 lo 2B7 0695 Û Û Û 8A 138 2B8 0696 Û Û Û 8A 138 2B9 0697 Û Û Û 8A 138 2BA 0698 ÛÛÛ ÛÛÛ EE 238 2BB 0699 ÛÛÛ ÛÛÛ EE 238 se 2BC 0700 Û Û 88 136 2BD 0701 ÛÛÛ ÛÛ EC 236 2BE 0702 Û Û 28 040 2BF 0703 ÛÛÛ ÛÛÛ EE 238 The register usage is as follows: V0 Manipulating the delay register; hold an integer returned from a routine. Horizontal positioning of some sprites. V1 Horizontal and vertical positioning of some sprites. V2 Vertical positioning of some sprites. V3 Store a random value. V4 Unused. V5 Unused. V6 Manipulating the sound register. V7 Store another register value. V8 Store another register value. V9 Store a sum. VA Store a sum. VB Unused. VC Unused. VD Unused. VE Store a key. VF Unused. The game begins by initializing register one, to parameterize the impotent routine, which doesn't do anything. It then halts until a key is pressed, but never uses the result: 200-201 0512-0513 ßß Ü ß 6108 24840 V1  008 202-203 0514-0515 ÜßÜÜ ß 2258 08792 Call impotent 204-205 0516-0517 ßßÜ Üß 6112 24850 V1  018 206-207 0518-0519 ÜßÜÜ ß 2258 08792 Call impotent 208-209 0520-0521 ßßßßÛßÛ FE0A 65034 VE  key The game then uses register one to parameterize the random draw routine, storing the results in zero to registers seven and eight across two calls: 20A-20B 0522-0523 ßß Ü Û 6109 24841 V1  009 20C-20D 0524-0525 ÜÛ ß 2260 08800 Call random draw 20E-20F 0526-0527 ß ßßß 8700 34560 V7  V0 210-211 0528-0529 ßßÜ ÜÛ 6113 24851 V1  019 212-213 0530-0531 ÜÛ ß 2260 08800 Call random draw 214-215 0532-0533 ß ß 8800 34816 V8  V0 The sum of the two calls are stored into register nine and winning or losing is then determined from this in an obvious way, with fall-through otherwise: 216-217 0534-0535 Û ß ß 8980 35200 V9  V8 218-219 0536-0537 ßÜÜÜßÜ ß 8974 35188 V9  V9 + V7; VF  overflow 21A-21B 0538-0539 ß ß Üß 4902 18690 Skip next if V9 <> 002 21C-21D 0540-0541 Ü ÛÜÜß 129C 04764 Jump to lose 21E-21F 0542-0543 ß ß ÜÛ 4903 18691 Skip next if V9 <> 003 220-221 0544-0545 Ü ÛÜÜß 129C 04764 Jump to lose 222-223 0546-0547 ß ÛÜ ß 490C 18700 Skip next if V9 <> 012 224-225 0548-0549 Ü ÛÜÜß 129C 04764 Jump to lose 226-227 0550-0551 ß ßÜÜÛ 4907 18695 Skip next if V9 <> 007 228-229 0552-0553 Ü ßÜÜß 128C 04748 Jump to win 22A-22B 0554-0555 ß Û ÜÛ 490B 18699 Skip next if V9 <> 011 22C-22D 0556-0557 Ü ßÜÜß 128C 04748 Jump to win The previous sum is stored in register ten and a 64/60 second delay is entered: 22E-22F 0558-0559 Û Üß ß 8A90 35472 VA  V9 230-231 0560-0561 Ûß 6040 24640 again V0  064 232-233 0562-0563 ßßßÛ Ü Ü F015 61461 delay  V0 234-235 0564-0565 ßßßß ÜÜÜ F007 61447 delay V0  delay 236-237 0566-0567 ßß 3000 12288 Skip next if V0 = 000 238-239 0568-0569 ÜÛ Üß 1234 04660 Jump to delay Afterwards, the deal draw routine is called; another key is collected for a delay, but unused again; and two calls to random draw are made again, just as earlier: 23A-23B 0570-0571 ÜÛÜÜÜß 227C 08828 Call deal draw 23C-23D 0572-0573 ßßßßÛßÛ FE0A 65034 VE  key 23E-23F 0574-0575 ßß Ü Û 6109 24841 V1  009 240-241 0576-0577 ÜÛ ß 2260 08800 Call random draw 242-243 0578-0579 ß ßßß 8700 34560 V7  V0 244-245 0580-0581 ßßÜ ÜÛ 6113 24851 V1  019 246-247 0582-0583 ÜÛ ß 2260 08800 Call random draw 248-249 0584-0585 ß ß 8800 34816 V8  V0 A sum is collected into register nine again and another table is used, with an identical sum to that previous resulting in a win and a sum of seven resulting in a loss, with fall-through leading to the earlier delay: 24A-24B 0586-0587 Û ß ß 8980 35200 V9  V8 24C-24D 0588-0589 ßÜÜÜßÜ ß 8974 35188 V9  V9 + V7; VF  overflow 24E-24F 0590-0591 Û Üßß ß 99A0 39328 Skip next if V9 <> VA 250-251 0592-0593 Ü ßÜÜß 128C 04748 Jump to win 252-253 0594-0595 ß ßÜÜÛ 4907 18695 Skip next if V9 <> 007 254-255 0596-0597 Ü ÛÜÜß 129C 04764 Jump to lose 256-257 0598-0599 ÜÛ ß 1230 04656 Jump to again The impotent routine draws a sprite from an unused memory location, achieving naught: 258-259 0600-0601 ÛÜÛÜ ß A2F0 41712 impotent I  0752 25A-25B 0602-0603 ßß Ü ß 6208 25096 V2  008 25C-25D 0604-0605 ßßÜß ÜÜÛ D127 53543 Draw 08x07 at V1,V2; VF  XOR 25E-25F 0606-0607 ÜÜÜ ÜÜÜ 00EE 00238 Return The random draw routine begins by initializing registers six, two, and zero: 260-261 0608-0609 ßß ßßÜ 6601 26113 random draw V6  001 262-263 0610-0611 ßß Ü ßÜ 6209 25097 V2  009 264-265 0612-0613 ßß Ü 6001 24577 over V0  001 The zeroeth register iterates from zero to seven in this routine. Register zero's digit is shown; a sound of 1/60 of a second is played; and register three is given one of eight random values, leading to a 1/8 chance that the routine won't exit afterwards: 266-267 0614-0615 ßßÛßÜ Ü F029 61481 from I  digit sprite of V0 268-269 0616-0617 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 26A-26B 0618-0619 ßßßÛÜßß F618 63000 sound  V6 26C-26D 0620-0621 ßß ÜÛÛ C307 49927 V3  ??? AND 007 26E-26F 0622-0623 ß ßß 4300 17152 Skip next if V3 <> 000 270-271 0624-0625 ÜÜÜ ÜÜÜ 00EE 00238 Return Otherwise, it continues by incrementing register zero, erasing the digit, and continues from the new value or restarts entirely, meaning it will loop between values one through six perhaps without end: 272-273 0626-0627 ßßß Ü 7001 28673 V0  V0 + 001 274-275 0628-0629 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 276-277 0630-0631 ßß ÜÜÜ 3007 12295 Skip next if V0 = 007 278-279 0632-0633 ÜÜß ÜÛ 1266 04710 Jump to from 27A-27B 0634-0635 ÜÜß Üß 1264 04708 Jump to over The deal draw routine merely displays the two values of registers seven and eight, both of which are between one and six, inclusive: 27C-27D 0636-0637 ßß Ü ßÜ 6209 25097 deal draw V2  009 27E-27F 0638-0639 ßß Ü Û 6109 24841 V1  009 280-281 0640-0641 ßßÛßÜßßÛ F729 63273 I  digit sprite of V7 282-283 0642-0643 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 284-285 0644-0645 ßßÜ ÜÛ 6113 24851 V1  019 286-287 0646-0647 ßßÛßÛ Ü F829 63529 I  digit sprite of V8 288-289 0648-0649 ßßÜß Ü Û D125 53541 Draw 08x05 at V1,V2; VF  XOR 28A-28B 0650-0651 ÜÜÜ ÜÜÜ 00EE 00238 Return The win routine displays the wi and n sprites before entering an infinite loop: 28C-28D 0652-0653 Û Û ÜÜß A2AC 41644 win I  wi 28E-28F 0654-0655 ßß 6000 24576 V0  000 290-291 0656-0657 ßßÜ Ü Û 6115 24853 V1  021 292-293 0658-0659 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 294-295 0660-0661 Û ÛÜ ßÜ A2B1 41649 I  n 296-297 0662-0663 ßß Ü 6008 24584 V0  008 298-299 0664-0665 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 29A-29B 0666-0667 Ü ÛÜ Û 129A 04762 self Jump to self The lose routine is as for the win routine, but showing the lo and se sprites: 29C-29D 0668-0669 Û ÛÜ ÜÛ A2B6 41654 lose I  lo 29E-29F 0670-0671 ßß 6000 24576 V0  000 2A0-2A1 0672-0673 ßßÜ ß 6110 24848 V1  016 2A2-2A3 0674-0675 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 2A4-2A5 0676-0677 Û ÛÜÜ ÛÜ A2BB 41659 I  se 2A6-2A7 0678-0679 ßß Ü 6008 24584 V0  008 2A8-2A9 0680-0681 ßß Û Ü Ü D015 53269 Draw 08x05 at V0,V1; VF  XOR 2AA-2AB 0682-0683 Ü ÜßÜ Û 12AA 04778 end Jump to end The game ends with the wi, n, lo, and se sprites; these are the only sprites in the game: 2AC 0684 Û Û ÛÛ 8B 139 wi 2AD 0685 Û Û Û 89 137 2AE 0686 Û Û Û 89 137 2AF 0687 Û Û Û Û A9 169 2B0 0688 ÛÛ ÛÛ ÛÛ DB 219 2B1 0689 Û ÛÛ Û B2 178 n 2B2 0690 ÛÛ Û 32 050 2B3 0691 Û Û Û 2A 042 2B4 0692 Û ÛÛ 26 038 2B5 0693 Û Û ÛÛ A6 166 2B6 0694 Û ÛÛÛ 8E 142 lo 2B7 0695 Û Û Û 8A 138 2B8 0696 Û Û Û 8A 138 2B9 0697 Û Û Û 8A 138 2BA 0698 ÛÛÛ ÛÛÛ EE 238 2BB 0699 ÛÛÛ ÛÛÛ EE 238 se 2BC 0700 Û Û 88 136 2BD 0701 ÛÛÛ ÛÛ EC 236 2BE 0702 Û Û 28 040 2BF 0703 ÛÛÛ ÛÛÛ EE 238 This game nicely performs a dice roll, but uses a loop which can strictly run indefinitely, and this is poor. A better approach would've been to sum six one-bit random integers; summing a two-bit with two one-bit random integers; or summing three three-bit random integers, and shifting this summation to the right twice, as three examples. .