diff --git a/MCU/MCU_REAL _FINAL/Listings/MCU_1.m51 b/MCU/MCU_REAL _FINAL/Listings/MCU_1.m51 index 433cea1..98988d1 100644 --- a/MCU/MCU_REAL _FINAL/Listings/MCU_1.m51 +++ b/MCU/MCU_REAL _FINAL/Listings/MCU_1.m51 @@ -1,4 +1,4 @@ -BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 1 +BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 1 BL51 BANKED LINKER/LOCATER V6.22.2.0, INVOKED BY: @@ -51,22 +51,22 @@ LINK MAP OF MODULE: .\Objects\MCU_1 (MAIN) IDATA 0008H 0001H UNIT ?STACK * * * * * * * X D A T A M E M O R Y * * * * * * * - XDATA 0000H 0023H UNIT ?XD?MENU - XDATA 0023H 0008H UNIT ?XD?INIT_MEM - XDATA 002BH 0007H UNIT ?XD?GENSHAPE?BLOCK - XDATA 0032H 0007H UNIT _XDATA_GROUP_ - XDATA 0039H 0006H UNIT ?XD?GROUPINIT?BLOCK - XDATA 003FH 0006H UNIT ?XD?BLOCK - XDATA 0045H 0006H UNIT ?XD?_MALLOC?MALLOC - XDATA 004BH 0004H UNIT ?XD?MINICLEAR?DISPLAY - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 2 + XDATA 0000H 0029H UNIT ?XD?MENU + XDATA 0029H 0008H UNIT ?XD?INIT_MEM + XDATA 0031H 0007H UNIT ?XD?GENSHAPE?BLOCK + XDATA 0038H 0007H UNIT _XDATA_GROUP_ + XDATA 003FH 0006H UNIT ?XD?GROUPINIT?BLOCK + XDATA 0045H 0006H UNIT ?XD?BLOCK + XDATA 004BH 0006H UNIT ?XD?_MALLOC?MALLOC + XDATA 0051H 0004H UNIT ?XD?MINICLEAR?DISPLAY + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 2 - XDATA 004FH 0004H UNIT ?XD?TEST?DISPLAY - XDATA 0053H 0004H UNIT ?XD?RAND?RAND - XDATA 0057H 0004H UNIT ?XD?_CALLOC?CALLOC - XDATA 005BH 0003H UNIT ?XD?MAIN - XDATA 005EH 0001H UNIT ?XD?GENPIECE?BLOCK + XDATA 0055H 0004H UNIT ?XD?TEST?DISPLAY + XDATA 0059H 0004H UNIT ?XD?RAND?RAND + XDATA 005DH 0004H UNIT ?XD?_CALLOC?CALLOC + XDATA 0061H 0003H UNIT ?XD?MAIN + XDATA 0064H 0001H UNIT ?XD?GENPIECE?BLOCK * * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE @@ -78,29 +78,29 @@ LINK MAP OF MODULE: .\Objects\MCU_1 (MAIN) CODE 04FFH 0200H UNIT ?CO?DRAW CODE 06FFH 01D7H UNIT ?PR?GENSHAPE?BLOCK CODE 08D6H 011BH UNIT ?PR?DRAWNUMBER?DRAW - CODE 09F1H 00D1H UNIT ?PR?_MALLOC?MALLOC - CODE 0AC2H 00C5H UNIT ?PR?CLEAR?DISPLAY - CODE 0B87H 00C5H UNIT ?PR?MINICLEAR?DISPLAY - CODE 0C4CH 00C5H UNIT ?PR?TEST?DISPLAY - CODE 0D11H 008EH UNIT ?PR?DRAWNAME?DRAW - CODE 0D9FH 008CH UNIT ?C_C51STARTUP - CODE 0E2BH 0088H UNIT ?PR?_M_MAINMENU?MENU - CODE 0EB3H 0074H UNIT ?PR?_M_STARTUP?MENU - CODE 0F27H 0061H UNIT ?PR?TIME?MAIN - CODE 0F88H 005CH UNIT ?PR?INT0?MAIN - CODE 0FE4H 0053H UNIT ?PR?MAIN?MAIN - CODE 1037H 004FH UNIT ?PR?GENPIECE?BLOCK - CODE 1086H 004DH UNIT ?PR?RAND?RAND - CODE 10D3H 0042H UNIT ?PR?_CALLOC?CALLOC - CODE 1115H 003CH UNIT ?PR?BLOCKINIT?BLOCK - CODE 1151H 003CH UNIT ?PR?_INIT_MEMPOOL?INIT_MEM - CODE 118DH 0037H UNIT ?PR?MENUINIT?MENU - CODE 11C4H 002FH UNIT ?PR?GROUPINIT?BLOCK - CODE 11F3H 0027H UNIT ?C_INITSEG - CODE 121AH 0020H UNIT ?PR?_DELAY?DELAY - CODE 123AH 001CH UNIT ?PR?DISPLAYINIT?DISPLAY - CODE 1256H 0019H UNIT ?PR?WRITE?DISPLAY - CODE 126FH 000BH UNIT ?PR?DELAY100US?DELAY + CODE 09F1H 00D9H UNIT ?PR?_M_MAINMENU?MENU + CODE 0ACAH 00D1H UNIT ?PR?_MALLOC?MALLOC + CODE 0B9BH 00C5H UNIT ?PR?CLEAR?DISPLAY + CODE 0C60H 00C5H UNIT ?PR?MINICLEAR?DISPLAY + CODE 0D25H 00C5H UNIT ?PR?TEST?DISPLAY + CODE 0DEAH 008EH UNIT ?PR?DRAWNAME?DRAW + CODE 0E78H 008CH UNIT ?C_C51STARTUP + CODE 0F04H 0074H UNIT ?PR?_M_STARTUP?MENU + CODE 0F78H 0061H UNIT ?PR?TIME?MAIN + CODE 0FD9H 005CH UNIT ?PR?INT0?MAIN + CODE 1035H 0053H UNIT ?PR?MAIN?MAIN + CODE 1088H 004FH UNIT ?PR?GENPIECE?BLOCK + CODE 10D7H 004DH UNIT ?PR?RAND?RAND + CODE 1124H 0042H UNIT ?PR?_CALLOC?CALLOC + CODE 1166H 003CH UNIT ?PR?BLOCKINIT?BLOCK + CODE 11A2H 003CH UNIT ?PR?_INIT_MEMPOOL?INIT_MEM + CODE 11DEH 0037H UNIT ?PR?MENUINIT?MENU + CODE 1215H 002FH UNIT ?PR?GROUPINIT?BLOCK + CODE 1244H 0027H UNIT ?C_INITSEG + CODE 126BH 0020H UNIT ?PR?_DELAY?DELAY + CODE 128BH 001CH UNIT ?PR?DISPLAYINIT?DISPLAY + CODE 12A7H 0019H UNIT ?PR?WRITE?DISPLAY + CODE 12C0H 000BH UNIT ?PR?DELAY100US?DELAY @@ -119,7 +119,7 @@ SEGMENT XDATA_GROUP +--> ?PR?MAIN?MAIN +--> ?C_INITSEG - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 3 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 3 ?PR?MAIN?MAIN ----- ----- @@ -133,31 +133,32 @@ SEGMENT XDATA_GROUP ?PR?WRITE?DISPLAY ----- ----- +--> ?PR?_DELAY?DELAY -?PR?CLEAR?DISPLAY 0035H 0004H +?PR?CLEAR?DISPLAY 003BH 0004H +--> ?PR?WRITE?DISPLAY ?PR?MENUINIT?MENU ----- ----- +--> ?PR?_M_STARTUP?MENU +--> ?PR?_M_MAINMENU?MENU -?PR?_M_STARTUP?MENU 0032H 0003H +?PR?_M_STARTUP?MENU 0038H 0003H +--> ?PR?DRAWNAME?DRAW +--> ?PR?_DELAY?DELAY +--> ?PR?DRAWNUMBER?DRAW +--> ?PR?CLEAR?DISPLAY -?PR?DRAWNAME?DRAW 0035H 0002H +?PR?DRAWNAME?DRAW 003BH 0002H +--> ?PR?WRITE?DISPLAY +--> ?CO?DRAW -?PR?DRAWNUMBER?DRAW 0035H 0002H +?PR?DRAWNUMBER?DRAW 003BH 0002H +--> ?PR?WRITE?DISPLAY +--> ?CO?DRAW -?PR?_M_MAINMENU?MENU 0032H 0003H +?PR?_M_MAINMENU?MENU 0038H 0003H +--> ?PR?_DRAWMAINMENU?DRAW + +--> ?PR?CLEAR?DISPLAY -?PR?_DRAWMAINMENU?DRAW 0035H 0003H +?PR?_DRAWMAINMENU?DRAW 003BH 0003H +--> ?PR?WRITE?DISPLAY +--> ?CO?DRAW @@ -176,13 +177,13 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) B:00A8H.7 PUBLIC EA D:00A8H PUBLIC IE D:00B8H PUBLIC IP - X:005BH PUBLIC TH - X:005CH PUBLIC TL - C:0FE4H PUBLIC main - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 4 + X:0061H PUBLIC TH + X:0062H PUBLIC TL + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 4 - C:0F27H PUBLIC time + C:1035H PUBLIC main + C:0F78H PUBLIC time D:0098H PUBLIC SCON D:0089H PUBLIC TMOD D:0088H PUBLIC TCON @@ -193,74 +194,74 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) D:008AH PUBLIC TL0 B:0088H.4 PUBLIC TR0 D:00C8H PUBLIC T2CON - X:005DH PUBLIC freshScreenTriger + X:0063H PUBLIC freshScreenTriger B:00B0H.2 PUBLIC PIN_1 B:00B0H.4 PUBLIC PIN_3 D:00D0H PUBLIC PSW B:00B0H.5 PUBLIC PIN_4 - C:0F88H PUBLIC int0 + C:0FD9H PUBLIC int0 ------- PROC INT0 ------- DO D:0005H SYMBOL LS D:0007H SYMBOL CS D:0006H SYMBOL flag ------- ENDDO - C:0F88H LINE# 11 - C:0F9DH LINE# 29 - C:0F9FH LINE# 30 - C:0FA3H LINE# 31 - C:0FA6H LINE# 32 - C:0FA6H LINE# 33 - C:0FABH LINE# 34 - C:0FADH LINE# 35 - C:0FAFH LINE# 36 - C:0FB4H LINE# 37 - C:0FB4H LINE# 38 - C:0FBFH LINE# 39 - C:0FC4H LINE# 40 - C:0FCDH LINE# 41 - C:0FD1H LINE# 42 - C:0FD1H LINE# 44 + C:0FD9H LINE# 11 + C:0FEEH LINE# 29 + C:0FF0H LINE# 30 + C:0FF4H LINE# 31 + C:0FF7H LINE# 32 + C:0FF7H LINE# 33 + C:0FFCH LINE# 34 + C:0FFEH LINE# 35 + C:1000H LINE# 36 + C:1005H LINE# 37 + C:1005H LINE# 38 + C:1010H LINE# 39 + C:1015H LINE# 40 + C:101EH LINE# 41 + C:1022H LINE# 42 + C:1022H LINE# 44 ------- ENDPROC INT0 ------- PROC TIME - C:0F27H LINE# 46 - C:0F44H LINE# 48 - C:0F46H LINE# 49 - C:0F4CH LINE# 50 - C:0F52H LINE# 51 - C:0F58H LINE# 53 - C:0F5BH LINE# 54 - C:0F5BH LINE# 55 - C:0F62H LINE# 56 - C:0F65H LINE# 57 - C:0F6BH LINE# 58 - C:0F6BH LINE# 59 - C:0F6DH LINE# 60 + C:0F78H LINE# 46 + C:0F95H LINE# 48 + C:0F97H LINE# 49 + C:0F9DH LINE# 50 + C:0FA3H LINE# 51 + C:0FA9H LINE# 53 + C:0FACH LINE# 54 + C:0FACH LINE# 55 + C:0FB3H LINE# 56 + C:0FB6H LINE# 57 + C:0FBCH LINE# 58 + C:0FBCH LINE# 59 + C:0FBEH LINE# 60 ------- ENDPROC TIME ------- PROC MAIN - C:0FE4H LINE# 62 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 5 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 5 - C:0FE4H LINE# 63 - C:0FE4H LINE# 64 - C:0FEAH LINE# 65 - C:0FEEH LINE# 66 - C:0FF1H LINE# 67 - C:0FF3H LINE# 69 - C:0FF6H LINE# 71 - C:0FF8H LINE# 72 - C:0FFAH LINE# 73 - C:0FFCH LINE# 76 - C:0FFEH LINE# 77 - C:1000H LINE# 79 - C:1002H LINE# 81 - C:1005H LINE# 82 - C:1008H LINE# 83 - C:100BH LINE# 85 - C:100BH LINE# 86 - C:100BH LINE# 88 - C:1035H LINE# 89 + C:1035H LINE# 62 + C:1035H LINE# 63 + C:1035H LINE# 64 + C:103BH LINE# 65 + C:103FH LINE# 66 + C:1042H LINE# 67 + C:1044H LINE# 69 + C:1047H LINE# 71 + C:1049H LINE# 72 + C:104BH LINE# 73 + C:104DH LINE# 76 + C:104FH LINE# 77 + C:1051H LINE# 79 + C:1053H LINE# 81 + C:1056H LINE# 82 + C:1059H LINE# 83 + C:105CH LINE# 85 + C:105CH LINE# 86 + C:105CH LINE# 88 + C:1086H LINE# 89 ------- ENDPROC MAIN ------- ENDMOD MAIN @@ -268,109 +269,127 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:0000H SYMBOL _ICE_DUMMY_ X:0000H PUBLIC M_MAINMENU X:0006H SYMBOL local - C:0E2BH PUBLIC _m_mainmenu - X:0010H PUBLIC LAST - X:0013H PUBLIC M_PLAYMODE1 - C:118DH PUBLIC menuInit - X:0019H PUBLIC opr - X:001AH PUBLIC M_STARTUP - C:0EB3H PUBLIC _m_startup - X:0020H PUBLIC NOW + X:0010H PUBLIC M_BLOCK + C:09F1H PUBLIC _m_mainmenu + X:0016H PUBLIC LAST + X:0019H PUBLIC M_BALL + C:11DEH PUBLIC menuInit + X:001FH PUBLIC opr + X:0020H PUBLIC M_STARTUP + C:0F04H PUBLIC _m_startup + X:0026H PUBLIC NOW ------- PROC _M_STARTUP - X:0032H SYMBOL this - C:0EB3H LINE# 22 - C:0EBEH LINE# 23 - C:0EBEH LINE# 26 - C:0EE4H LINE# 27 - C:0EE4H LINE# 28 - C:0EF2H LINE# 30 - C:0EF5H LINE# 31 - C:0EFCH LINE# 32 - C:0EFFH LINE# 33 - C:0EFFH LINE# 35 - C:0F07H LINE# 36 - C:0F07H LINE# 37 - C:0F0AH LINE# 38 - C:0F23H LINE# 39 - C:0F26H LINE# 40 - C:0F26H LINE# 42 + X:0038H SYMBOL this + C:0F04H LINE# 23 + C:0F0FH LINE# 24 + C:0F0FH LINE# 27 + C:0F35H LINE# 28 + C:0F35H LINE# 29 + C:0F43H LINE# 31 + C:0F46H LINE# 32 + C:0F4DH LINE# 33 + C:0F50H LINE# 34 + C:0F50H LINE# 36 + C:0F58H LINE# 37 + C:0F58H LINE# 38 + C:0F5BH LINE# 39 + C:0F74H LINE# 40 + C:0F77H LINE# 41 + C:0F77H LINE# 43 ------- ENDPROC _M_STARTUP ------- PROC _M_MAINMENU - X:0032H SYMBOL this - C:0E2BH LINE# 44 - C:0E36H LINE# 45 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 6 + X:0038H SYMBOL this + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 6 - C:0E36H LINE# 46 - C:0E5CH LINE# 47 - C:0E5CH LINE# 48 - C:0E61H LINE# 49 - C:0E70H LINE# 50 - C:0E75H LINE# 51 - C:0E75H LINE# 53 - C:0E80H LINE# 54 - C:0E80H LINE# 55 - C:0E86H LINE# 56 - C:0E90H LINE# 57 - C:0E93H LINE# 58 - C:0E93H LINE# 59 - C:0E97H LINE# 60 - C:0E97H LINE# 61 - C:0E9DH LINE# 62 - C:0E9FH LINE# 63 - C:0E9FH LINE# 64 - C:0EA7H LINE# 65 - C:0EA7H LINE# 66 - C:0EAAH LINE# 67 - C:0EB2H LINE# 68 - C:0EB2H LINE# 69 + C:09F1H LINE# 46 + C:09FCH LINE# 47 + C:09FCH LINE# 48 + C:0A22H LINE# 49 + C:0A22H LINE# 50 + C:0A30H LINE# 51 + C:0A38H LINE# 52 + C:0A38H LINE# 54 + C:0A40H LINE# 55 + C:0A40H LINE# 56 + C:0A46H LINE# 57 + C:0A50H LINE# 58 + C:0A53H LINE# 60 + C:0A59H LINE# 61 + C:0A61H LINE# 62 + C:0A61H LINE# 63 + C:0A67H LINE# 64 + C:0A67H LINE# 65 + C:0A6DH LINE# 66 + C:0A6FH LINE# 68 + C:0A75H LINE# 69 + C:0A7DH LINE# 70 + C:0A7DH LINE# 71 + C:0A85H LINE# 72 + C:0A85H LINE# 74 + C:0A88H LINE# 75 + C:0A8EH LINE# 76 + C:0A9DH LINE# 77 + C:0A9DH LINE# 78 + C:0A9DH LINE# 79 + C:0A9DH LINE# 80 + C:0A9DH LINE# 81 + C:0AABH LINE# 82 + C:0AACH LINE# 83 + C:0AACH LINE# 84 + C:0ABAH LINE# 85 + C:0ABBH LINE# 86 + C:0ABBH LINE# 87 + C:0AC9H LINE# 88 + C:0AC9H LINE# 89 + C:0AC9H LINE# 90 + C:0AC9H LINE# 91 ------- ENDPROC _M_MAINMENU ------- PROC MENUINIT - C:118DH LINE# 72 - C:118DH LINE# 73 - C:118DH LINE# 74 - C:119BH LINE# 75 - C:11A7H LINE# 77 - C:11B5H LINE# 78 - C:11C3H LINE# 79 + C:11DEH LINE# 94 + C:11DEH LINE# 95 + C:11DEH LINE# 96 + C:11ECH LINE# 97 + C:11F8H LINE# 99 + C:1206H LINE# 100 + C:1214H LINE# 101 ------- ENDPROC MENUINIT ------- ENDMOD MENU ------- MODULE DELAY C:0000H SYMBOL _ICE_DUMMY_ - C:126FH PUBLIC delay100us - C:121AH PUBLIC _delay + C:12C0H PUBLIC delay100us + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 7 + + + C:126BH PUBLIC _delay ------- PROC DELAY100US ------- DO D:0007H SYMBOL i D:0006H SYMBOL j ------- ENDDO - C:126FH LINE# 3 - C:126FH LINE# 4 - C:126FH LINE# 7 - C:1270H LINE# 8 - C:1271H LINE# 9 - C:1273H LINE# 10 - C:1275H LINE# 12 - C:1275H LINE# 13 - C:1277H LINE# 14 - C:1279H LINE# 15 + C:12C0H LINE# 3 + C:12C0H LINE# 4 + C:12C0H LINE# 7 + C:12C1H LINE# 8 + C:12C2H LINE# 9 + C:12C4H LINE# 10 + C:12C6H LINE# 12 + C:12C6H LINE# 13 + C:12C8H LINE# 14 + C:12CAH LINE# 15 ------- ENDPROC DELAY100US ------- PROC _DELAY D:0006H SYMBOL n - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 7 - - ------- DO D:0006H SYMBOL i D:0004H SYMBOL j ------- ENDDO - C:121AH LINE# 24 - C:121AH LINE# 26 - C:121AH LINE# 27 - C:1225H LINE# 28 - C:1239H LINE# 29 + C:126BH LINE# 24 + C:126BH LINE# 26 + C:126BH LINE# 27 + C:1276H LINE# 28 + C:128AH LINE# 29 ------- ENDPROC _DELAY ------- ENDMOD DELAY @@ -379,195 +398,195 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) D:0090H PUBLIC P1 D:00A0H PUBLIC P2 D:00B0H PUBLIC P3 - C:0AC2H PUBLIC clear + C:0B9BH PUBLIC clear D:00A8H PUBLIC IE - C:123AH PUBLIC displayInit + C:128BH PUBLIC displayInit D:00B8H PUBLIC IP B:00A0H.0 PUBLIC RS B:00A0H.1 PUBLIC RW - C:125FH PUBLIC write + C:12B0H PUBLIC write D:0098H PUBLIC SCON D:0088H PUBLIC TCON - C:0B87H PUBLIC miniclear - C:0C4CH PUBLIC test + C:0C60H PUBLIC miniclear + C:0D25H PUBLIC test B:00A0H.2 PUBLIC E B:00A0H.4 PUBLIC CSA B:00A0H.5 PUBLIC CSB D:00C8H PUBLIC T2CON D:00D0H PUBLIC PSW - C:1256H SYMBOL L?0055 + C:12A7H SYMBOL L?0055 ------- PROC L?0054 ------- ENDPROC L?0054 - C:1256H SYMBOL L?0055 + C:12A7H SYMBOL L?0055 ------- PROC WRITE - C:125FH LINE# 17 - C:125FH LINE# 18 - C:125FH LINE# 19 - C:1261H LINE# 20 - C:1263H LINE# 21 - C:1265H LINE# 22 - C:126CH LINE# 23 - C:126EH LINE# 24 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 8 + + + C:12B0H LINE# 17 + C:12B0H LINE# 18 + C:12B0H LINE# 19 + C:12B2H LINE# 20 + C:12B4H LINE# 21 + C:12B6H LINE# 22 + C:12BDH LINE# 23 + C:12BFH LINE# 24 ------- ENDPROC WRITE ------- PROC CLEAR ------- DO - X:0035H SYMBOL i - X:0037H SYMBOL j + X:003BH SYMBOL i + X:003DH SYMBOL j ------- ENDDO - C:0AC2H LINE# 28 - C:0AC2H LINE# 29 - C:0AC2H LINE# 31 - C:0AC4H LINE# 32 - C:0AC6H LINE# 33 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 8 - - - C:0ADDH LINE# 34 - C:0ADDH LINE# 35 - C:0ADDH LINE# 36 - C:0ADDH LINE# 37 - C:0ADDH LINE# 38 - C:0AE0H LINE# 39 - C:0AE3H LINE# 40 - C:0AE6H LINE# 42 - C:0AEDH LINE# 43 - C:0AEDH LINE# 44 - C:0AEFH LINE# 45 - C:0AF1H LINE# 46 - C:0AF4H LINE# 47 - C:0AF7H LINE# 48 - C:0B14H LINE# 49 - C:0B24H LINE# 50 - C:0B26H LINE# 51 - C:0B28H LINE# 52 - C:0B3FH LINE# 53 - C:0B3FH LINE# 54 - C:0B3FH LINE# 55 - C:0B3FH LINE# 56 - C:0B3FH LINE# 57 - C:0B42H LINE# 58 - C:0B45H LINE# 59 - C:0B48H LINE# 61 - C:0B4FH LINE# 62 - C:0B4FH LINE# 63 - C:0B51H LINE# 64 - C:0B53H LINE# 65 - C:0B56H LINE# 66 - C:0B59H LINE# 67 - C:0B76H LINE# 68 - C:0B86H LINE# 69 + C:0B9BH LINE# 28 + C:0B9BH LINE# 29 + C:0B9BH LINE# 31 + C:0B9DH LINE# 32 + C:0B9FH LINE# 33 + C:0BB6H LINE# 34 + C:0BB6H LINE# 35 + C:0BB6H LINE# 36 + C:0BB6H LINE# 37 + C:0BB6H LINE# 38 + C:0BB9H LINE# 39 + C:0BBCH LINE# 40 + C:0BBFH LINE# 42 + C:0BC6H LINE# 43 + C:0BC6H LINE# 44 + C:0BC8H LINE# 45 + C:0BCAH LINE# 46 + C:0BCDH LINE# 47 + C:0BD0H LINE# 48 + C:0BEDH LINE# 49 + C:0BFDH LINE# 50 + C:0BFFH LINE# 51 + C:0C01H LINE# 52 + C:0C18H LINE# 53 + C:0C18H LINE# 54 + C:0C18H LINE# 55 + C:0C18H LINE# 56 + C:0C18H LINE# 57 + C:0C1BH LINE# 58 + C:0C1EH LINE# 59 + C:0C21H LINE# 61 + C:0C28H LINE# 62 + C:0C28H LINE# 63 + C:0C2AH LINE# 64 + C:0C2CH LINE# 65 + C:0C2FH LINE# 66 + C:0C32H LINE# 67 + C:0C4FH LINE# 68 + C:0C5FH LINE# 69 ------- ENDPROC CLEAR ------- PROC MINICLEAR ------- DO - X:004BH SYMBOL i - X:004DH SYMBOL j + X:0051H SYMBOL i + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 9 + + + X:0053H SYMBOL j ------- ENDDO - C:0B87H LINE# 72 - C:0B87H LINE# 73 - C:0B87H LINE# 75 - C:0B89H LINE# 76 - C:0B8BH LINE# 77 - C:0BA2H LINE# 78 - C:0BA2H LINE# 79 - C:0BA2H LINE# 80 - C:0BA2H LINE# 81 - C:0BA2H LINE# 82 - C:0BA5H LINE# 83 - C:0BA8H LINE# 84 - C:0BABH LINE# 86 - C:0BB2H LINE# 87 - C:0BB2H LINE# 88 - C:0BB4H LINE# 89 - C:0BB6H LINE# 90 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 9 - - - C:0BB9H LINE# 91 - C:0BBCH LINE# 92 - C:0BD9H LINE# 93 - C:0BE9H LINE# 94 - C:0BEBH LINE# 95 - C:0BEDH LINE# 96 - C:0C04H LINE# 97 - C:0C04H LINE# 98 - C:0C04H LINE# 99 - C:0C04H LINE# 100 - C:0C04H LINE# 101 - C:0C07H LINE# 102 - C:0C0AH LINE# 103 - C:0C0DH LINE# 105 - C:0C14H LINE# 106 - C:0C14H LINE# 107 - C:0C16H LINE# 108 - C:0C18H LINE# 109 - C:0C1BH LINE# 110 - C:0C1EH LINE# 111 - C:0C3BH LINE# 112 - C:0C4BH LINE# 113 + C:0C60H LINE# 72 + C:0C60H LINE# 73 + C:0C60H LINE# 75 + C:0C62H LINE# 76 + C:0C64H LINE# 77 + C:0C7BH LINE# 78 + C:0C7BH LINE# 79 + C:0C7BH LINE# 80 + C:0C7BH LINE# 81 + C:0C7BH LINE# 82 + C:0C7EH LINE# 83 + C:0C81H LINE# 84 + C:0C84H LINE# 86 + C:0C8BH LINE# 87 + C:0C8BH LINE# 88 + C:0C8DH LINE# 89 + C:0C8FH LINE# 90 + C:0C92H LINE# 91 + C:0C95H LINE# 92 + C:0CB2H LINE# 93 + C:0CC2H LINE# 94 + C:0CC4H LINE# 95 + C:0CC6H LINE# 96 + C:0CDDH LINE# 97 + C:0CDDH LINE# 98 + C:0CDDH LINE# 99 + C:0CDDH LINE# 100 + C:0CDDH LINE# 101 + C:0CE0H LINE# 102 + C:0CE3H LINE# 103 + C:0CE6H LINE# 105 + C:0CEDH LINE# 106 + C:0CEDH LINE# 107 + C:0CEFH LINE# 108 + C:0CF1H LINE# 109 + C:0CF4H LINE# 110 + C:0CF7H LINE# 111 + C:0D14H LINE# 112 + C:0D24H LINE# 113 ------- ENDPROC MINICLEAR ------- PROC DISPLAYINIT - C:123AH LINE# 114 - C:123AH LINE# 115 - C:123AH LINE# 116 - C:123CH LINE# 117 - C:123EH LINE# 118 - C:1240H LINE# 119 - C:1242H LINE# 120 - C:1244H LINE# 121 - C:1247H LINE# 122 - C:124AH LINE# 124 - C:124CH LINE# 125 - C:124EH LINE# 126 - C:1250H LINE# 127 - C:1253H LINE# 128 + C:128BH LINE# 114 + C:128BH LINE# 115 + C:128BH LINE# 116 + C:128DH LINE# 117 + C:128FH LINE# 118 + C:1291H LINE# 119 + C:1293H LINE# 120 + C:1295H LINE# 121 + C:1298H LINE# 122 + C:129BH LINE# 124 + C:129DH LINE# 125 + C:129FH LINE# 126 + C:12A1H LINE# 127 + C:12A4H LINE# 128 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 10 + + ------- ENDPROC DISPLAYINIT ------- PROC TEST ------- DO - X:004FH SYMBOL i - X:0051H SYMBOL j + X:0055H SYMBOL i + X:0057H SYMBOL j ------- ENDDO - C:0C4CH LINE# 131 - C:0C4CH LINE# 132 - C:0C4CH LINE# 134 - C:0C4EH LINE# 135 - C:0C50H LINE# 136 - C:0C67H LINE# 137 - C:0C67H LINE# 138 - C:0C67H LINE# 139 - C:0C67H LINE# 140 - C:0C67H LINE# 141 - C:0C6AH LINE# 142 - C:0C6DH LINE# 143 - C:0C70H LINE# 145 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 10 - - - C:0C77H LINE# 146 - C:0C77H LINE# 147 - C:0C79H LINE# 148 - C:0C7BH LINE# 149 - C:0C7EH LINE# 150 - C:0C81H LINE# 151 - C:0C9EH LINE# 152 - C:0CAEH LINE# 153 - C:0CB0H LINE# 154 - C:0CB2H LINE# 155 - C:0CC9H LINE# 156 - C:0CC9H LINE# 157 - C:0CC9H LINE# 158 - C:0CC9H LINE# 159 - C:0CC9H LINE# 160 - C:0CCCH LINE# 161 - C:0CCFH LINE# 162 - C:0CD2H LINE# 164 - C:0CD9H LINE# 165 - C:0CD9H LINE# 166 - C:0CDBH LINE# 167 - C:0CDDH LINE# 168 - C:0CE0H LINE# 169 - C:0CE3H LINE# 170 - C:0D00H LINE# 171 - C:0D10H LINE# 172 + C:0D25H LINE# 131 + C:0D25H LINE# 132 + C:0D25H LINE# 134 + C:0D27H LINE# 135 + C:0D29H LINE# 136 + C:0D40H LINE# 137 + C:0D40H LINE# 138 + C:0D40H LINE# 139 + C:0D40H LINE# 140 + C:0D40H LINE# 141 + C:0D43H LINE# 142 + C:0D46H LINE# 143 + C:0D49H LINE# 145 + C:0D50H LINE# 146 + C:0D50H LINE# 147 + C:0D52H LINE# 148 + C:0D54H LINE# 149 + C:0D57H LINE# 150 + C:0D5AH LINE# 151 + C:0D77H LINE# 152 + C:0D87H LINE# 153 + C:0D89H LINE# 154 + C:0D8BH LINE# 155 + C:0DA2H LINE# 156 + C:0DA2H LINE# 157 + C:0DA2H LINE# 158 + C:0DA2H LINE# 159 + C:0DA2H LINE# 160 + C:0DA5H LINE# 161 + C:0DA8H LINE# 162 + C:0DABH LINE# 164 + C:0DB2H LINE# 165 + C:0DB2H LINE# 166 + C:0DB4H LINE# 167 + C:0DB6H LINE# 168 + C:0DB9H LINE# 169 + C:0DBCH LINE# 170 + C:0DD9H LINE# 171 + C:0DE9H LINE# 172 ------- ENDPROC TEST ------- ENDMOD DISPLAY @@ -580,6 +599,9 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:061FH PUBLIC MAINMANU_PAGE1 C:063FH PUBLIC MAINMANU_PAGE2 C:065FH PUBLIC MAINMANU_PAGE3 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 11 + + C:067FH PUBLIC MAINMANU_PAGE4 D:00A8H PUBLIC IE C:069FH PUBLIC MAINMANU_PAGE5 @@ -595,20 +617,17 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:05EFH PUBLIC NUMBER_RPAGE1 C:04FFH PUBLIC NAME_PAGE0 C:052FH PUBLIC NAME_PAGE1 - C:0D11H PUBLIC drawNAME + C:0DEAH PUBLIC drawNAME B:00A0H.4 PUBLIC CSA B:00A0H.5 PUBLIC CSB D:00C8H PUBLIC T2CON - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 11 - - D:00D0H PUBLIC PSW C:055FH PUBLIC NUMBER_PAGE0 C:059FH PUBLIC NUMBER_PAGE1 C:08D6H PUBLIC drawNUMBER ------- PROC DRAWNUMBER ------- DO - X:0035H SYMBOL j + X:003BH SYMBOL j ------- ENDDO C:08D6H LINE# 12 C:08D6H LINE# 13 @@ -640,6 +659,9 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:0963H LINE# 47 C:096AH LINE# 48 C:096AH LINE# 51 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 12 + + C:096CH LINE# 52 C:096EH LINE# 53 C:0970H LINE# 54 @@ -659,9 +681,6 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:09B2H LINE# 70 C:09B5H LINE# 72 C:09B7H LINE# 73 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 12 - - C:09B9H LINE# 74 C:09CDH LINE# 75 C:09D0H LINE# 78 @@ -669,41 +688,44 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) ------- ENDPROC DRAWNUMBER ------- PROC DRAWNAME ------- DO - X:0035H SYMBOL j + X:003BH SYMBOL j ------- ENDDO - C:0D11H LINE# 81 - C:0D11H LINE# 82 - C:0D11H LINE# 85 - C:0D18H LINE# 86 - C:0D18H LINE# 87 - C:0D1AH LINE# 88 - C:0D1CH LINE# 89 - C:0D1EH LINE# 90 - C:0D20H LINE# 91 - C:0D23H LINE# 92 - C:0D26H LINE# 93 - C:0D2FH LINE# 94 - C:0D32H LINE# 96 - C:0D34H LINE# 97 - C:0D36H LINE# 98 - C:0D4AH LINE# 99 - C:0D4DH LINE# 101 - C:0D4FH LINE# 102 - C:0D51H LINE# 103 - C:0D54H LINE# 104 - C:0D57H LINE# 105 - C:0D60H LINE# 106 - C:0D63H LINE# 108 - C:0D65H LINE# 109 - C:0D67H LINE# 110 - C:0D7BH LINE# 111 - C:0D7EH LINE# 112 - C:0D9EH LINE# 113 + C:0DEAH LINE# 81 + C:0DEAH LINE# 82 + C:0DEAH LINE# 85 + C:0DF1H LINE# 86 + C:0DF1H LINE# 87 + C:0DF3H LINE# 88 + C:0DF5H LINE# 89 + C:0DF7H LINE# 90 + C:0DF9H LINE# 91 + C:0DFCH LINE# 92 + C:0DFFH LINE# 93 + C:0E08H LINE# 94 + C:0E0BH LINE# 96 + C:0E0DH LINE# 97 + C:0E0FH LINE# 98 + C:0E23H LINE# 99 + C:0E26H LINE# 101 + C:0E28H LINE# 102 + C:0E2AH LINE# 103 + C:0E2DH LINE# 104 + C:0E30H LINE# 105 + C:0E39H LINE# 106 + C:0E3CH LINE# 108 + C:0E3EH LINE# 109 + C:0E40H LINE# 110 + C:0E54H LINE# 111 + C:0E57H LINE# 112 + C:0E77H LINE# 113 ------- ENDPROC DRAWNAME + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 13 + + ------- PROC _DRAWMAINMENU - X:0035H SYMBOL i + X:003BH SYMBOL i ------- DO - X:0036H SYMBOL j + X:003CH SYMBOL j ------- ENDDO C:0296H LINE# 114 C:029BH LINE# 115 @@ -719,9 +741,6 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:02B7H LINE# 128 C:02BAH LINE# 130 C:02BCH LINE# 131 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 13 - - C:02BEH LINE# 132 C:02D2H LINE# 133 C:02D5H LINE# 135 @@ -760,6 +779,9 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:037AH LINE# 176 C:038FH LINE# 178 C:03A3H LINE# 179 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 14 + + C:03A6H LINE# 181 C:03A8H LINE# 182 C:03AAH LINE# 183 @@ -779,9 +801,6 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:03FEH LINE# 200 C:0407H LINE# 201 C:040AH LINE# 203 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 14 - - C:040CH LINE# 204 C:040EH LINE# 205 C:0416H LINE# 206 @@ -818,51 +837,51 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) ------- MODULE BLOCK C:0000H SYMBOL _ICE_DUMMY_ - X:003FH PUBLIC piece - X:0042H PUBLIC base - C:1037H PUBLIC genPiece - C:1115H PUBLIC blockInit + X:0045H PUBLIC piece + X:0048H PUBLIC base + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 15 + + + C:1088H PUBLIC genPiece + C:1166H PUBLIC blockInit C:06FFH PUBLIC genShape - C:11C4H PUBLIC groupInit + C:1215H PUBLIC groupInit ------- PROC GROUPINIT - X:0039H SYMBOL g - X:003EH SYMBOL i + X:003FH SYMBOL g + X:0044H SYMBOL i ------- DO - C:11C4H SYMBOL retry + C:1215H SYMBOL retry ------- ENDDO - C:11C4H LINE# 26 - C:11C4H LINE# 27 - C:11C4H LINE# 28 - C:11C4H LINE# 29 - C:11CCH LINE# 30 - C:11D1H LINE# 31 - C:11EEH LINE# 32 - C:11F2H LINE# 33 - C:11F2H LINE# 34 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 15 - - + C:1215H LINE# 26 + C:1215H LINE# 27 + C:1215H LINE# 28 + C:1215H LINE# 29 + C:121DH LINE# 30 + C:1222H LINE# 31 + C:123FH LINE# 32 + C:1243H LINE# 33 + C:1243H LINE# 34 ------- ENDPROC GROUPINIT ------- PROC BLOCKINIT - C:1115H LINE# 6 - C:1115H LINE# 7 - C:1115H LINE# 8 - C:1130H LINE# 9 + C:1166H LINE# 6 + C:1166H LINE# 7 + C:1166H LINE# 8 + C:1181H LINE# 9 ------- ENDPROC BLOCKINIT ------- PROC GENPIECE ------- DO - X:005EH SYMBOL i + X:0064H SYMBOL i ------- ENDDO - C:1037H LINE# 12 - C:1037H LINE# 13 - C:1037H LINE# 14 - C:1048H LINE# 15 - C:1063H LINE# 16 + C:1088H LINE# 12 + C:1088H LINE# 13 + C:1088H LINE# 14 + C:1099H LINE# 15 + C:10B4H LINE# 16 ------- ENDPROC GENPIECE ------- PROC GENSHAPE - X:002BH SYMBOL g + X:0031H SYMBOL g ------- DO - X:0030H SYMBOL random + X:0036H SYMBOL random ------- ENDDO C:06FFH LINE# 19 C:06FFH LINE# 20 @@ -880,6 +899,9 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:075EH LINE# 36 C:076BH LINE# 37 C:077EH LINE# 38 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 16 + + C:0786H LINE# 39 C:078EH LINE# 40 C:078EH LINE# 41 @@ -899,9 +921,6 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:07FBH LINE# 57 C:080EH LINE# 58 C:0816H LINE# 59 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 16 - - C:081EH LINE# 60 C:0826H LINE# 61 C:082EH LINE# 62 @@ -940,6 +959,9 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) C:0104H PUBLIC ?C?CSTPTR ------- ENDMOD ?C?CSTPTR + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 17 + + ------- MODULE ?C?CSTOPTR C:0116H PUBLIC ?C?CSTOPTR ------- ENDMOD ?C?CSTOPTR @@ -959,23 +981,20 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) ------- MODULE ?C?ICALL C:01BEH PUBLIC ?C?ICALL C:01C2H PUBLIC ?C?ICALL2 - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 17 - - ------- ENDMOD ?C?ICALL ------- MODULE RAND - X:0053H PUBLIC ?SRAND?BYTE - C:1086H PUBLIC RAND - C:10C4H PUBLIC _SRAND + X:0059H PUBLIC ?SRAND?BYTE + C:10D7H PUBLIC RAND + C:1115H PUBLIC _SRAND ------- ENDMOD RAND ------- MODULE MALLOC - C:09F1H PUBLIC _malloc + C:0ACAH PUBLIC _malloc ------- ENDMOD MALLOC ------- MODULE CALLOC - C:10D3H PUBLIC _calloc + C:1124H PUBLIC _calloc ------- ENDMOD CALLOC ------- MODULE ?C?IMUL @@ -1000,6 +1019,9 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) ------- MODULE ?C?PLDXDATA C:024CH PUBLIC ?C?PLDXDATA + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 18 + + ------- ENDMOD ?C?PLDXDATA ------- MODULE ?C?PLDPDATA @@ -1015,13 +1037,10 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) ------- ENDMOD ?C?MEMSET ------- MODULE INIT_MEM - X:0023H PUBLIC __mem_avail__ - C:1151H PUBLIC _init_mempool + X:0029H PUBLIC __mem_avail__ + C:11A2H PUBLIC _init_mempool ------- ENDMOD INIT_MEM - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:01:16 PAGE 18 - - *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?DELAY100US?DELAY @@ -1043,5 +1062,5 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_INIT_MEMPOOL?INIT_MEM -Program Size: data=9.0 xdata=95 code=4725 +Program Size: data=9.0 xdata=101 code=4806 LINK/LOCATE RUN COMPLETE. 7 WARNING(S), 0 ERROR(S) diff --git a/MCU/MCU_REAL _FINAL/draw.h b/MCU/MCU_REAL _FINAL/draw.h index 4a298ca..e7f864f 100644 --- a/MCU/MCU_REAL _FINAL/draw.h +++ b/MCU/MCU_REAL _FINAL/draw.h @@ -4,4 +4,5 @@ void drawNAME(); void drawNUMBER(); void drawMAINMENU(unsigned char); +void drawBLOCK(); #endif \ No newline at end of file diff --git a/MCU/MCU_REAL _FINAL/menu.c b/MCU/MCU_REAL _FINAL/menu.c index 451580f..c9da242 100644 --- a/MCU/MCU_REAL _FINAL/menu.c +++ b/MCU/MCU_REAL _FINAL/menu.c @@ -4,21 +4,22 @@ #include "draw.h" #include #include + Menu M_STARTUP; Menu M_MAINMENU;//主菜单 -Menu M_PLAYMODE1; //俄罗斯方块 - +Menu M_BLOCK; //俄罗斯方块 +Menu M_BALL; //弹球 Menu* NOW; //当前菜单指针 Menu* LAST = NULL; //上一个状态的菜单 -enum OPR opr = idle; +enum OPR opr = idle; static unsigned char local[10] = {0}; -//初始菜单 +//初始化显示 void m_startup(struct _menu* this) { @@ -32,7 +33,7 @@ void m_startup(struct _menu* this) drawNUMBER(); //绘制学号 } - if(opr == confirm) + if(opr == right) { opr = idle; NOW = this->n; //转向下一菜单 @@ -41,11 +42,11 @@ void m_startup(struct _menu* this) } +//主菜单 void m_mainmenu(struct _menu* this) { if(LAST != &M_MAINMENU) { - local[0] = 0; LAST = &M_MAINMENU; drawMAINMENU(local[0]); } @@ -55,20 +56,52 @@ void m_mainmenu(struct _menu* this) local[0]++; if(local[0] > 3) local[0] = 3; + + opr = idle; + drawMAINMENU(local[0]); } if(opr == left) { if(local[0] != 0) local[0]--; - } - if(opr != idle) - { + opr = idle; drawMAINMENU(local[0]); } + if(opr == confirm) + { + + switch(local[0]) + { + case 0: + break; + case 1: + NOW = &M_BLOCK; //转向下一菜单 + break; + case 2: + NOW = &M_BALL; //转向下一菜单 + break; + case 3: + NOW = &M_STARTUP; //转向下一菜单 + break; + } + + local[0]=0; + clear(); + opr = idle; + } } +//方块游戏 +void m_block(struct _menu* this) +{ + if(LAST != &M_MAINMENU) + { + LAST = &M_MAINMENU; + drawBLOCK(); + } +} void menuInit() { M_STARTUP.n = &M_MAINMENU;