ORG 0100H BDOS EQU 5 LF EQU 10 CR EQU 13 JP start DEFB 'Rubik cube Micro-80 May 82' DEFB ' originally written in BASIC and translated' DEFB ' by Ray Gale' start: LD C,6FH LD DE,m001 CALL BDOS CALL anykey CALL cube1 CALL stge1 LD C,9 LD DE,m010 CALL BDOS CALL anykey CALL stge1 CALL edge1 CALL red1 CALL blue1 CALL red2 CALL anykey CALL stge1 CALL edge1 CALL oran1 CALL blue1 CALL oran2 CALL anykey CALL stge1 CALL edge1 CALL yell1 CALL blue1 CALL yell2 CALL anykey CALL stge1 CALL edge1 CALL whit1 CALL blue1 CALL whit2 CALL anykey L230: CALL cls LD C,6FH LD DE,blue3 CALL BDOS CALL anykey CALL cube1 L260: CALL stge1 LD C,9 LD DE,corn1 CALL BDOS ask1: CALL getkey CP '1' JP Z,L350 CP '2' JP Z,L280 JP ask1 L280: CALL cls LD C,6FH LD DE,L281 CALL BDOS CALL anykey CALL stge1 CALL edge1 LD C,9 LD DE,L291 CALL BDOS ask2: CALL getkey CP '1' JP Z,L320 CP '2' JP Z,L330 CP '3' JP Z,L340 JP ask2 L320: CALL cls LD C,9 LD DE,L321 CALL BDOS CALL anykey JP L260 L330: CALL cls LD C,9 LD DE,L331 CALL BDOS CALL anykey JP L260 L340: CALL cls LD C,9 LD DE,L341 JP L330 L350: CALL stge1 CALL edge1 LD C,6FH LD DE,L351 CALL BDOS ask3: CALL getkey CP '1' JP Z,L380 CP '2' JP Z,L280 JP ask3 L380: CALL stge2 LD C,6FH LD DE,L381 CALL BDOS CALL anykey CALL cube1 L400: CALL stge2 LD C,9 LD DE,L401 CALL BDOS ask4: CALL getkey CP '1' JP Z,L450 CP '2' JP Z,L410 JP ask4 L410: CALL stge2 LD C,6FH LD DE,L411 CALL BDOS ask5: CALL getkey CP '1' JP Z,L430 CP '2' JP Z,L440 JP ask5 L430: CALL stge2 LD C,6FH LD DE,L431 CALL BDOS CALL anykey JP L400 L440: CALL stge2 LD C,6FH LD DE,L441 CALL BDOS CALL anykey JP L400 L450: CALL stge2 LD C,9 LD DE,L451 CALL BDOS ask6: CALL getkey CP '1' JP Z,L490 CP '2' JP Z,L460 JP ask6 L460: CALL stge2 LD C,6FH LD DE,L461 CALL BDOS CALL anykey CALL stge2 LD C,6FH LD DE,L470 CALL anykey JP L400 L490: CALL cls LD C,6FH LD DE,L491 CALL BDOS CALL anykey L500: CALL stge3c LD C,6FH LD DE,L501 CALL BDOS CALL anykey L560: CALL L810 LD C,9 LD DE,L561 CALL BDOS ask7: CALL getkey CP '1' JP Z,L580 CP '2' JP Z,L590 CP '3' JP Z,L600 CP '4' JP Z,L610 CP '5' JP Z,L620 JP ask7 L580: CALL stge3c LD C,6FH LD DE,L581 CALL BDOS CALL anykey JP L560 L590: CALL stge3c LD C,6FH LD DE,L591 CALL BDOS CALL anykey JP L560 L600: CALL stge3c LD C,6FH LD DE,L601 CALL BDOS CALL anykey JP L560 L610: CALL stge3c LD C,6FH LD DE,L611 CALL BDOS CALL anykey JP L560 L620: CALL cls CALL L810 LD C,6FH LD DE,L621 CALL BDOS ask8: CALL getkey CP '1' JP Z,L640 CP '2' JP Z,L650 CP '3' JP Z,L660 CP '4' JP Z,L670 CP '5' JP Z,L680 JP ask8 L640: CALL stge3e LD C,6FH LD DE,L641 CALL BDOS CALL anykey JP L620 L650: CALL stge3e LD C,6FH LD DE,L651 CALL BDOS CALL anykey JP L620 L660: CALL stge3e LD C,6FH LD DE,L661 CALL BDOS CALL anykey JP L620 L670: CALL stge3e LD C,6FH LD DE,L671 CALL BDOS CALL anykey JP L620 L680: CALL stge3f LD C,9 LD DE,L681 CALL BDOS CALL anykey L690: CALL stge3f LD C,6FH LD DE,L691 CALL BDOS CALL anykey L720: CALL stge3f LD C,6FH LD DE,L721 CALL BDOS ask9: CALL getkey CP '1' JP Z,L740 CP '2' JP Z,L690 CP '3' JP Z,L760 JP ask9 L740: CALL stge3f LD C,6FH LD DE,L741 CALL BDOS CALL anykey JP L720 L760: CALL stge3f LD C,6FH LD DE,L761 CALL BDOS CALL anykey CALL stge3f LD C,6FH LD DE,L765 CALL BDOS ask010: CALL getkey CP '1' JP Z,L760 CP '2' JP Z,L790 JP ask010 L790: CALL cls LD C,9 LD DE,grats CALL BDOS RET anykey: LD C,9 LD DE,m004 CALL BDOS CALL getkey RET getkey: LD C,1 CALL BDOS RET cls: LD C,9 LD DE,clscn CALL BDOS RET stge1: CALL cls LD C,9 LD DE,m005 CALL BDOS RET stge2: CALL cls LD C,9 LD DE,m006 CALL BDOS RET stge3c: CALL cls LD C,9 LD DE,m007 CALL BDOS RET cube1: CALL cls LD C,6FH LD DE,m008 CALL BDOS CALL anykey RET edge1: LD C,9 LD DE,edge2 CALL BDOS RET red1: LD C,9 LD DE,redm1 CALL BDOS RET blue1: LD C,9 LD DE,blue2 CALL BDOS RET red2: LD C,6FH LD DE,red2cb CALL BDOS RET oran1: LD C,9 LD DE,oranm1 CALL BDOS RET oran2: LD C,6FH LD DE,oran2b CALL BDOS RET yell1: LD C,9 LD DE,yellm1 CALL BDOS RET yell2: LD C,6FH LD DE,yell2b CALL BDOS RET whit1: LD C,9 LD DE,whitm1 CALL BDOS RET whit2: LD C,6FH LD DE,whit2b CALL BDOS RET L810: CALL cls LD C,6FH LD DE,L811 CALL BDOS RET stge3e: CALL cls LD C,9 LD DE,Le3e CALL BDOS RET stge3f: CALL cls LD C,9 LD DE,Le3f CALL BDOS RET L765: DEFW L766 DEFW L767 L766: DEFB ' ' DEFB 'Edge flips - Part 2',CR,LF,LF DEFB ' 1 Do not change the orientation of the cube.',CR,LF DEFB ' 2 Rotate the top face until the other cube of the ' DEFB 'pair being flipped is in the top right' DEFB ' position.',CR,LF DEFB ' 3 Right face a quarter turn anti-clockwise',CR,LF DEFB ' 4 Bottom face a half turn',CR,LF DEFB ' 5 Top face a half turn',CR,LF DEFB ' 6 Left face a half turn',CR,LF DEFB ' 7 Bottom face a quarter turn clockwise',CR,LF DEFB ' 8 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 9 Front face a quarter turn anti-clockwise',CR,LF,LF DEFB 'Press 1 to repeat or 2 if completed.' L767: EQU $-L766 L761: DEFW L762 DEFW L763 L762: DEFB ' ' DEFB 'Edge flips - to flip one pair',CR,LF,LF DEFB ' 1 Start with one of the pair in the top ' DEFB 'front position.',CR,LF DEFB ' 2 Front face a quarter turn clockwise',CR,LF DEFB ' 3 Top face a quarter turn clockwise',CR,LF DEFB ' 4 Bottom face a quarter turn anti-clockwise',CR,LF DEFB ' 5 Left face a half turn',CR,LF DEFB ' 6 Top face a half turn',CR,LF DEFB ' 7 Bottom face a half turn',CR,LF DEFB ' 8 Right face a quarter turn clockwise' L763: EQU $-L762 L741: DEFW L742 DEFW L743 L742: DEFB ' ' DEFB 'Clockwise corner twirl',CR,LF,LF DEFB ' 1 Right face a quarter turn anti-clockwise',CR,LF DEFB ' 2 Bottom face a quarter turn clockwise',CR,LF DEFB ' 3 Right face a quarter turn clockwise',CR,LF DEFB ' 4 Front face a quarter turn clockwise',CR,LF DEFB ' 5 Bottom face a quarter turn clockwise',CR,LF DEFB ' 6 Front face a quarter turn anti-clockwise',CR,LF DEFB ' 7 Rotate the top face until the small cube to ' DEFB 'be rotated anti-clockwise is at the top',CR,LF DEFB ' right hand corner.',CR,LF DEFB ' 8 Front face a quarter turn clockwise',CR,LF DEFB ' 9 Bottom face a quarter turn anti-clockwise',CR,LF DEFB '10 Front face a quarter turn anti-clockwise',CR,LF DEFB '11 Right face a quarter turn anti-clockwise',CR,LF DEFB '12 Bottom face a quarter turn anti-clockwise',CR,LF DEFB '13 Right face a quarter turn clockwise' L743: EQU $-L742 L721: DEFW L722 DEFW L723 L722: DEFB ' ' DEFB 'Corner Twirls',CR,LF,LF DEFB 'Press 1 for twirls (remember that if there ' DEFB 'are three corners to be twirled this sequence ' DEFB 'will need to be repeated until all the' DEFB ' cubes are twirled.)',CR,LF DEFB 'Press 2 to review the definitions.',CR,LF DEFB 'Press 3 to flip the edges.' L723: EQU $-L722 L691: DEFW L692 DEFW L693 L692: DEFB 'A twirl is determined as follows:',CR,LF DEFB '1 Hold the whole cube so that the small ' DEFB 'cube to be twirled is at the upper right',CR,LF DEFB ' position.',CR,LF DEFB '2 If the colour of the square on the front face' DEFB ' is the same as the colour of the centre square of' DEFB ' the top face, then this small cube will need to ' DEFB 'be twirled CLOCKWISE.',CR,LF DEFB '3 If the colour of the square on the right hand face' DEFB ' is the same as the colour of the top face, then this' DEFB ' small cube will need to be twirled ANTI-CLOCKWISE.' L693: EQU $-L692 L671: DEFW L672 DEFW L673 L672: DEFB ' 1 Right face a quarter turn clockwise',CR,LF DEFB ' 2 Rear face a quarter turn clockwise',CR,LF DEFB ' 3 Top face a quarter turn clockwise',CR,LF DEFB ' 4 Rear face a quarter turn anti-clockwise',CR,LF DEFB ' 5 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 6 Right face a half turn',CR,LF DEFB ' 7 Front face a quarter turn anti-clockwise',CR,LF DEFB ' 8 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 9 Front face a quarter turn clockwise',CR,LF DEFB '10 Top face a quarter turn clockwise',CR,LF DEFB '11 Right face a quarter turn clockwise' L673: EQU $-L672 L661: DEFW L662 DEFW L663 L662: DEFB ' 1 Right face a half turn',CR,LF DEFB ' 2 Left face a half turn',CR,LF DEFB ' 3 Bottom face a quarter turn clockwise',CR,LF DEFB ' 4 Right face a half turn',CR,LF DEFB ' 5 Left face a half turn',CR,LF DEFB ' 6 Top face a half turn',CR,LF DEFB ' 7 Right face a half turn',CR,LF DEFB ' 8 Left face a half turn',CR,LF DEFB ' 9 Bottom face a quarter turn clockwise',CR,LF DEFB '10 Right face a half turn',CR,LF DEFB '11 Left face a half turn' L663: EQU $-L662 L651: DEFW L652 DEFW L653 L652: DEFB ' 1 Left face a half turn',CR,LF DEFB ' 2 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 3 Front face a quarter turn anti-clockwise',CR,LF DEFB ' 4 Rear face a quarter turn clockwise',CR,LF DEFB ' 5 Left face a half turn',CR,LF DEFB ' 6 Front face a quarter turn clockwise',CR,LF DEFB ' 7 Rear face a quarter turn anti-clockwise',CR,LF DEFB ' 8 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 9 Left face a half turn' L653: EQU $-L652 L641: DEFW L642 DEFW L643 L642: DEFB ' 1 Left face a half turn',CR,LF DEFB ' 2 Top face a quarter turn clockwise',CR,LF DEFB ' 3 Front face a quarter turn anti-clockwise',CR,LF DEFB ' 4 Rear face a quarter turn clockwise',CR,LF DEFB ' 5 Left face a half turn',CR,LF DEFB ' 6 Front face a quarter turn clockwise',CR,LF DEFB ' 7 Rear face a quarter turn anti-clockwise',CR,LF DEFB ' 8 Top face a quarter turn clockwise',CR,LF DEFB ' 9 Left face a half turn' L643: EQU $-L642 Le3e: DEFB ' ' DEFB 'Stage 3 -- The last layer - edge cubes',CR,LF,LF,'$' L621: DEFW L622 DEFW L623 L622: DEFB CR,LF,' 1. 2 to 8 : 8 to 4 : 4 to 2',CR,LF DEFB ' 2. 2 to 4 : 4 to 8 : 8 to 2',CR,LF DEFB ' 3. 2 to 8 and 8 to 2 : 4 to 6 and 6 to 4',CR,LF DEFB ' 4. 2 to 6 and 6 to 2 : 4 to 8 and 8 to 4',CR,LF DEFB ' 5. To position colours once all this layer is located.',CR,LF L623: EQU $-L622 L611: DEFW L612 DEFW L613 L612: DEFB CR,LF,' 1 Top face a quarter turn clockwise',CR,LF DEFB ' 2 Front face a quarter turn clockwise',CR,LF DEFB ' 3 Top face a quarter turn clockwise',CR,LF DEFB ' 4 Right face a quarter turn clockwise',CR,LF DEFB ' 5 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 6 Right face a quarter turn anti-clockwise',CR,LF DEFB ' 7 Front face a quarter turn anti-clockwise' L613: EQU $-L612 L601: DEFW L602 DEFW L603 L602: DEFB CR,LF,' 1 Front face a quarter turn clockwise',CR,LF DEFB ' 2 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 3 Rear face a quarter turn anti-clockwise',CR,LF DEFB ' 4 Top face a quarter turn clockwise',CR,LF DEFB ' 5 Front face a quarter turn anti-clockwise',CR,LF DEFB ' 6 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 7 Rear face a quarter turn clockwise',CR,LF DEFB ' 8 Top face a half turn' L603: EQU $-L602 L591: DEFW L592 DEFW L593 L592: DEFB CR,LF,' 1 Top face a quarter turn clockwise',CR,LF DEFB ' 2 Right face a quarter turn clockwise',CR,LF DEFB ' 3 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 4 Left face a quarter turn anti-clockwise',CR,LF DEFB ' 5 Top face a quarter turn clockwise',CR,LF DEFB ' 6 Right face a quarter turn anti-clockwise',CR,LF DEFB ' 7 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 8 Left face a quarter turn clockwise' L593: EQU $-L592 L581: DEFW L582 DEFW L583 L582: DEFB CR,LF,' 1 Left face a quarter turn anti-clockwise',CR,LF DEFB ' 2 Top face a quarter turn clockwise',CR,LF DEFB ' 3 Right face a quarter turn clockwise',CR,LF DEFB ' 4 Top face a quarter turn anti-clockwise',CR,LF DEFB ' 5 Left face a quarter turn clockwise',CR,LF DEFB ' 6 Top face a quarter turn clockwise',CR,LF DEFB ' 7 Right face a quarter turn anti-clockwise',CR,LF DEFB ' 8 Top face a quarter turn anti-clockwise' L583: EQU $-L582 L811: DEFW L812 DEFW L813 L812: DEFB ' ' DEFB 'The cube position numbers for the movement sequences below' DEFB CR,LF,LF,' ' DEFB 134,138,138,138,138,138,138,138,138,142,138,138,138,138,138 DEFB 138,138,138,142,138,138,138,138,138,138,138,138,140,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 133,' 1 ',133,' 2 ',133,' 3 ',133,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 135,138,138,138,138,138,138,138,138,143,138,138,138,138,138 DEFB 138,138,138,143,138,138,138,138,138,138,138,138,141,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 133,' 4 ',133,' 5 ',133,' 6 ',133,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 135,138,138,138,138,138,138,138,138,143,138,138,138,138,138 DEFB 138,138,138,143,138,138,138,138,138,138,138,138,141,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 133,' 7 ',133,' 8 ',133,' 9 ',133,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 131,138,138,138,138,138,138,138,138,139,138,138,138,138,138 DEFB 138,138,138,139,138,138,138,138,138,138,138,138,137,CR,LF DEFB CR,LF,LF L813: EQU $-L812 L501: DEFW L502 DEFW L503 L502: DEFB 'Rotate the top face until at least one corner cube is in' DEFB ' the correct corner. Don',39,'t worry about position, ' DEFB 'just the corner. Now study the diagram that follows and ' DEFB 'determine the',CR,LF DEFB 'required movement. The sequence will be corner to' DEFB ' corner. Choose your situation and enter the ' DEFB 'appropriate number. Don',39,'t worry if the cube seems ' DEFB 'chaotic during a sequence.',CR,LF DEFB 'This will sort itself out by the end of the sequence.' L503: EQU $-L502 L491: DEFW L492 DEFW L493 L492: DEFB ' ' DEFB 'Stage 3 -- The last layer',CR,LF,LF,LF DEFB 'There is now only one layer to be ' DEFB 'completed. You will need to check which of ' DEFB 'the small cubes you need to move before you ' DEFB 'proceed. Some cubes will be in the right place but',CR,LF DEFB 'the wrong way round, whilst others will be in the wrong' DEFB ' position. You will need to check which sequence of ' DEFB 'movements you require. To do this we will have a ' DEFB 'look at a series of',CR,LF DEFB 'possibilities in relation to the single face of the cube.' DEFB ' When you feel that you have the correct shifting ' DEFB 'possibility just enter the number at the front of DEFB 'the sequence and the movements will then be given.',CR,LF DEFB 'After you have executed those moves you will return to the' DEFB ' diagram of possible moves. If you have all the corner ' DEFB 'cubes in place just press 5.' L493: EQU $-L492 L470: DEFW L471 DEFW L472 L471: DEFB CR,LF,' 1 Front face a quarter turn clockwise.',CR,LF DEFB ' 2 Top face a half turn.',CR,LF DEFB ' 3 Right face a quarter turn clockwise.',CR,LF DEFB ' 4 Top face a quarter turn clockwise.',CR,LF DEFB ' 5 Right face a quarter turn anti-clockwise.',CR,LF DEFB ' 6 Top face a half turn.',CR,LF DEFB ' 7 Front face a quarter turn anti-clockwise.' L472: EQU $-L471 L461: DEFW L462 DEFW L463 L462: DEFB CR,LF,'This sequence will remove an unwanted edge cube' DEFB ' from the middle layer and place it in a usable position.' DEFB CR,LF,CR,LF,'Turn the whole cube (keeping the blue face ' DEFB 'on the bottom) around until the small cube you ',CR,LF DEFB 'wish to shift is at the left hand front edge - ' DEFB 'that is facing you.' L463: EQU $-L462 L441: DEFW L442 DEFW L443 L442: DEFB ' ' DEFB 'Matching centre square of front face',CR,LF,LF DEFB ' 1 Front face a quarter turn clockwise.',CR,LF DEFB ' 2 Top face a half turn.',CR,LF DEFB ' 3 Right face a quarter turn clockwise.',CR,LF DEFB ' 4 Top face a quarter turn anti-clockwise.',CR,LF DEFB ' 5 Right face a quarter turn anti-clockwise.',CR,LF DEFB ' 6 Top face a half turn.',CR,LF DEFB ' 7 Front face a quarter turn anti-clockwise.' L443: EQU $-L442 L431: DEFW L432 DEFW L433 L432: DEFB ' ' DEFB 'Matching centre square of the left face',CR,LF,LF DEFB ' 1 Front face a quarter turn clockwise.',CR,LF DEFB ' 2 Top face a half turn.',CR,LF DEFB ' 3 Right face a quarter turn clockwise.',CR,LF DEFB ' 4 Top face a quarter turn clockwise.',CR,LF DEFB ' 5 Right face a quarter turn anti-clockwise.',CR,LF DEFB ' 6 Top face a half turn.',CR,LF DEFB ' 7 Front face a quarter turn anti-clockwise.' L433: EQU $-L432 L411: DEFW L412 DEFW L413 L412: DEFB CR,LF,' 1 Rotate the top face until the colours ' DEFB 'on the small edge cube are the same as the',CR,LF DEFB ' front face and the left face. Look at the top ' DEFB 'square of this edge cube you want',CR,LF DEFB ' to move.',CR,LF,'2 Press 1 if it matches the ' DEFB 'centre square of the left face.',CR,LF DEFB ' 3 Press 2 if it matches the centre square ' DEFB 'of the front face.',CR,LF L413: EQU $-L412 L381: DEFW L382 DEFW L383 L382: DEFB CR,LF,'Turn the cube upside down so that the blue face ' DEFB 'is on the bottom. From this point',CR,LF DEFB 'onwards we will not refer to specific colours but to' DEFB ' specific faces and locations.',CR,LF DEFB 'We will review the names of the individual squares' DEFB ' that go to make up a single face.',CR,LF DEFB 'Then we can continue.' L383: EQU $-L382 L351: DEFW L352 DEFW L353 L352: DEFB CR,LF,'Either you have finished and all the cubes ' DEFB 'in the top layer are in their correct',CR,LF DEFB 'position (in which case you press 1) otherwise you have' DEFB ' a small cube that has to be',CR,LF DEFB 'removed from and replaced in its correct position.',CR,LF DEFB ' 1 Turn the whole cube so that the small cube to be' DEFB ' moved is at the front upper right',CR,LF DEFB ' hand corner.',CR,LF DEFB ' 2 Right face a quarter turn anti-clockwise.',CR,LF DEFB ' 3 Bottom face a quarter turn clockwise.',CR,LF DEFB ' 4 Right face a quarter turn clockwise.',CR,LF DEFB 'Press 1 to move to next stage or 2 to continue this stage.',CR,LF L353: EQU $-L352 L281: DEFW L282 DEFW L283 L282: DEFB ' 1 Look at the three colours on this small' DEFB ' cube and determine the position to which you' DEFB ' require it to be moved. Keeping the blue face to the' DEFB ' top, rotate the cube so that the' DEFB ' new position is at the front upper right hand corner.',CR,LF DEFB ' ' DEFB '* * * You must remember the location of each face colour * * *' DEFB CR,LF,' 2 Turn the bottom face until the required ' DEFB 'small cube is at the front bottom right hand',CR,LF DEFB ' corner (directly under the required ' DEFB 'location of this small cube).' L283: EQU $-L282 blue3: DEFW blue4 DEFW blue5 blue4: DEFB 'We will need to explain two terms before proceeding with ' DEFB 'the remaining steps.',CR,LF,LF DEFB 'Clockwise turn - This is a turn in the direction of the' DEFB ' clock of a particular face',CR,LF DEFB ' when it is the face nearest to you.' DEFB CR,LF,' Be sure to remember that this ' DEFB 'direction will appear differently on',CR,LF DEFB ' other faces and in fact will appear to be' DEFB ' anticlockwise on the rear',CR,LF,' face.' DEFB CR,LF,LF,'Anticlockwise turn - This will be the ' DEFB 'opposite to the above.',CR,LF,LF,CR,LF DEFB 'We will review the face names' blue5: EQU $-blue4 whit2b: DEFW whit2m DEFW whit2e whit2m: DEFB ' white side is on the white face.',CR,LF DEFB ' Then rotate the white face until the blue side ' DEFB 'is on the blue face.',CR,LF DEFB '4 If the white side of this cube is on the bottom then' DEFB ' rotate through a quarter turn',CR,LF DEFB ' to bring the blue side of this small cube to a ' DEFB 'face adjacent to the white face.',CR,LF DEFB ' Then simply rotate this face until the white side of ' DEFB 'the small cube is on the ',CR,LF DEFB ' white face then turn the white face until the blue' DEFB ' side comes to the blue face.' whit2e: EQU $-whit2m yell2b: DEFW yell2m DEFW yell2e yell2m: DEFB ' yellow side is on the yellow face.',CR,LF DEFB ' Then rotate the yellow face until the blue side ' DEFB 'is on the blue face.',CR,LF DEFB '4 If the yellow side of this cube is on the bottom then' DEFB ' rotate through a quarter turn',CR,LF DEFB ' to bring the blue side of this small cube to a ' DEFB 'face adjacent to the yellow face.',CR,LF DEFB ' Then simply rotate this face until the yellow side of ' DEFB 'the small cube is on the ',CR,LF DEFB ' yellow face then turn the yellow face until the blue' DEFB ' side comes to the blue face.' yell2e: EQU $-yell2m oran2b: DEFW oran2m DEFW oran2e oran2m: DEFB ' orange side is on the orange face.',CR,LF DEFB ' Then rotate the orange face until the blue side ' DEFB 'is on the blue face.',CR,LF DEFB '4 If the orange side of this cube is on the bottom then' DEFB ' rotate through a quarter turn',CR,LF DEFB ' to bring the blue side of this small cube to a ' DEFB 'face adjacent to the orange face.',CR,LF DEFB ' Then simply rotate this face until the orange side of ' DEFB 'the small cube is on the ',CR,LF DEFB ' orange face then turn the orange face until the blue' DEFB ' side comes to the blue face.' oran2e: EQU $-oran2m red2cb: DEFW red2m DEFW red2e red2m: DEFB ' red side is on the red face.',CR,LF DEFB ' Then rotate the red face until the blue side ' DEFB 'is on the blue face.',CR,LF DEFB '4 If the red side of this cube is on the bottom then' DEFB ' rotate through a quarter turn',CR,LF DEFB ' to bring the blue side of this small cube to a ' DEFB 'face adjacent to the red face.',CR,LF DEFB ' Then simply rotate this face until the red side of ' DEFB 'the small cube is on the ',CR,LF DEFB ' red face then turn the red face until the blue' DEFB ' side comes to the blue face.' red2e: EQU $-red2m m001: DEFW m002 DEFW m003 m002: DEFB 27,'E',27,'H' DEFB ' ' DEFB '---=== Rubik Cube Solver ===---',CR,LF,LF,LF DEFB 'This program is a step by step method for solving Rubik' DEFB 39,'s Cube. It is a "repeatable step"method that will ' DEFB 'allow the user to repeat the ' DEFB 'steps in each stage until they have that',CR,LF DEFB 'particular stage solved. They can then move on' DEFB ' to the next stage until, finally, the cubeis solved.',CR,LF DEFB CR,LF,'First we will need to know the names of the small cubes.' m003: EQU $-m002 m008: DEFW m009 DEFW lm009 m009: DEFB ' ' DEFB 'A single face of the cube showing names',CR,LF,LF DEFB ' ' DEFB 134,138,138,138,138,138,138,138,138,142,138,138,138,138,138 DEFB 138,138,138,142,138,138,138,138,138,138,138,138,140,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 133,' Corner ',133,' Edge ',133,' Corner ',133,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 135,138,138,138,138,138,138,138,138,143,138,138,138,138,138 DEFB 138,138,138,143,138,138,138,138,138,138,138,138,141,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 133,' Edge ',133,' Centre ',133,' Edge ',133,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 135,138,138,138,138,138,138,138,138,143,138,138,138,138,138 DEFB 138,138,138,143,138,138,138,138,138,138,138,138,141,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 133,' Corner ',133,' Edge ',133,' Corner ',133,CR,LF DEFB ' ' DEFB 133,' ',133,' ',133,' ',133,CR,LF DEFB ' ' DEFB 131,138,138,138,138,138,138,138,138,139,138,138,138,138,138 DEFB 138,138,138,139,138,138,138,138,138,138,138,138,137 lm009: EQU $-m009 m004: DEFB CR,LF,LF,LF DEFB ' ' DEFB 'Press any key to continue $' m010: DEFB CR,LF,'Locate the blue centre square.',CR,LF,LF DEFB 'Turn the cube so that this square is on the top face.$' m005: DEFB ' ' DEFB 'Stage 1 -- Preparing the blue face',CR,LF,LF,'$' m006: DEFB ' ' DEFB 'Stage 2 -- The middle layer',CR,LF,LF,'$' m007: DEFB ' ' DEFB 'Stage 3 -- The last layer - corner cubes',CR,LF,LF,'$' redm1: DEFB '1 If the blue and red edge cube is on the bottom ' DEFB 'face then move to 3 else continue.',CR,LF,'$' edge2: DEFB ' ' DEFB 'First layer edge cubes',CR,LF,LF,'$' blue2: DEFB '2 Bring this cube to the bottom by turning ' DEFB 'the appropriate side face.',CR,LF DEFB '3 If the blue side of this cube is on the ' DEFB 'bottom then rotate the bottom face until the',CR,LF,'$' oranm1: DEFB '1 If the blue and orange edge cube is on the bottom ' DEFB 'face then move to 3 else continue.',CR,LF,'$' yellm1: DEFB '1 If the blue and yellow edge cube is on the bottom ' DEFB 'face then move to 3 else continue.',CR,LF,'$' whitm1: DEFB '1 If the blue and white edge cube is on the bottom ' DEFB 'face then move to 3 else continue.',CR,LF,'$' corn1: DEFB ' ' DEFB 'First layer corner cubes',CR,LF,LF DEFB '1 If there are no corner cubes in the bottom ' DEFB 'face press 1 else press 2.',CR,LF,'$' clscn: DEFB 27,'Y',35,32,27,'J$' grats: DEFB CR,LF,LF,' ' DEFB 'C O N G R A T U L A T I O N S$' L681: DEFB 'Now all that is needed is for you to position the colours' DEFB ' on each of the cubes in this final layer.',CR,LF DEFB 'Look at the cube very carefully.$' Le3f: DEFB ' ' DEFB 'Stage 3 -- The last layer - ' DEFB 'Edge flips and corner twirls',CR,LF,LF,'$' L561: DEFB CR,LF,' 1. 1 to 3 : 3 to 7 : 7 to 1',CR,LF DEFB ' 2. 1 to 7 : 7 to 3 : 3 to 1',CR,LF DEFB ' 3. 1 to 3 : 3 to 1',CR,LF DEFB ' 4. 3 to 7 : 7 to 3',CR,LF DEFB ' 5. Proceed to edge cubes',CR,LF,'$' L451: DEFB CR,LF,'If all the middle layer cubes are in their ' DEFB 'correct position press 1',CR,LF,LF DEFB 'If not then press 2',CR,LF,'$' L401: DEFB CR,LF,'First locate an edge cube in the top face ' DEFB 'required in the middle layer.',CR,LF DEFB 'If there are none press 1 otherwise press 2.',CR,LF,'$' L341: DEFB ' ' DEFB 'Blue square on the bottom face.',CR,LF,LF DEFB ' 1 Right face a quarter turn anti-clockwise.',CR,LF DEFB ' 2 Bottom face a quarter turn clockwise.,CR,LF DEFB ' 3 Right face a quarter turn clockwise.',CR,LF DEFB ' 4 Bottom face a half turn.',CR,LF,LF,'$' L331: DEFB ' ' DEFB 'Blue square on the right face.',CR,LF,LF DEFB ' 1 Right face a quarter turn anti-clockwise.',CR,LF DEFB ' 2 Bottom face a quarter turn anti-clockwise.',CR,LF DEFB ' 3 Right face a quarter turn clockwise.$' L321: DEFB ' ' DEFB 'Blue square on the front face.',CR,LF,LF DEFB ' 1 Front face a quarter turn clockwise.',CR,LF DEFB ' 2 Bottom face a quarter turn clockwise.',CR,LF DEFB ' 3 Right face a quarter turn anti-clockwise.$' L291: DEFB CR,LF,'Press 1 if the blue square is on the front face.' DEFB CR,LF,'Press 2 if the blue square is on the right face.' DEFB CR,LF,'Press 3 if the blue square is on the bottom face.' DEFB CR,LF,LF,'$' end