From 5618c61ce4e0fbf05bb3d66d6f42bb57718fe8da Mon Sep 17 00:00:00 2001 From: iridiumR Date: Sun, 5 Jun 2022 23:35:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(MCU=E8=AF=BE=E8=AE=BE):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=80=E4=B8=AAbug=E7=9A=84=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=8F=8A=E5=AD=98=E5=9C=A8=E4=B8=80=E5=A0=86bug=E7=9A=84?= =?UTF-8?q?=E4=BF=84=E7=BD=97=E6=96=AF=E6=96=B9=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MCU/MCU_REAL _FINAL/IMG/方块.bmp | Bin 0 -> 220 bytes MCU/MCU_REAL _FINAL/IMG/方块.psd | Bin 0 -> 21050 bytes MCU/MCU_REAL _FINAL/Listings/MCU_1.m51 | 1535 ++++++++++++------------ MCU/MCU_REAL _FINAL/block.c | 172 +-- MCU/MCU_REAL _FINAL/block.h | 23 +- MCU/MCU_REAL _FINAL/draw.c | 70 +- MCU/MCU_REAL _FINAL/draw.h | 8 +- MCU/MCU_REAL _FINAL/img.h | 8 + MCU/MCU_REAL _FINAL/main.c | 1 + MCU/MCU_REAL _FINAL/menu.c | 19 +- 10 files changed, 945 insertions(+), 891 deletions(-) create mode 100644 MCU/MCU_REAL _FINAL/IMG/方块.bmp create mode 100644 MCU/MCU_REAL _FINAL/IMG/方块.psd diff --git a/MCU/MCU_REAL _FINAL/IMG/方块.bmp b/MCU/MCU_REAL _FINAL/IMG/方块.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f458e0dcb8028f810c1279d04df28029d1352c3b GIT binary patch literal 220 zcmZ?ry~6+jQb39ah&h0ekwF3^_#Xp61VM7B0HP3848$W|9HlfzQfdGI literal 0 HcmV?d00001 diff --git a/MCU/MCU_REAL _FINAL/IMG/方块.psd b/MCU/MCU_REAL _FINAL/IMG/方块.psd new file mode 100644 index 0000000000000000000000000000000000000000..742434fe3318d022e76239427f983d7f157cd549 GIT binary patch literal 21050 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 oL9ok}VuKyIjG8%*rh#jUsi}sAbIRR!ZwR CALLED SEGMENT START LENGTH --------------------------------------------------- -?PR?TIME?MAIN ----- ----- +SEGMENT XDATA_GROUP + +--> CALLED SEGMENT START LENGTH +------------------------------------------------ +?PR?TIME?MAIN ----- ----- +--> ?PR?_DELAY?DELAY *** NEW ROOT *************************************************** -?C_C51STARTUP ----- ----- +?C_C51STARTUP ----- ----- +--> ?PR?MAIN?MAIN +--> ?C_INITSEG - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 3 - - -?PR?MAIN?MAIN ----- ----- +?PR?MAIN?MAIN ----- ----- +--> ?PR?DISPLAYINIT?DISPLAY +--> ?PR?CLEAR?DISPLAY +--> ?PR?MENUINIT?MENU -?PR?DISPLAYINIT?DISPLAY ----- ----- +?PR?DISPLAYINIT?DISPLAY ----- ----- +--> ?PR?WRITE?DISPLAY -?PR?WRITE?DISPLAY ----- ----- +?PR?WRITE?DISPLAY ----- ----- +--> ?PR?_DELAY?DELAY -?PR?CLEAR?DISPLAY 003BH 0004H +?PR?CLEAR?DISPLAY 0088H 0004H + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 3 + + +--> ?PR?WRITE?DISPLAY -?PR?MENUINIT?MENU ----- ----- +?PR?MENUINIT?MENU ----- ----- +--> ?PR?_M_STARTUP?MENU +--> ?PR?_M_MAINMENU?MENU + +--> ?PR?_M_BLOCK?MENU -?PR?_M_STARTUP?MENU 0038H 0003H +?PR?_M_STARTUP?MENU 0085H 0003H +--> ?PR?DRAWNAME?DRAW +--> ?PR?_DELAY?DELAY +--> ?PR?DRAWNUMBER?DRAW +--> ?PR?CLEAR?DISPLAY -?PR?DRAWNAME?DRAW 003BH 0002H +?PR?DRAWNAME?DRAW 0088H 0002H +--> ?PR?WRITE?DISPLAY +--> ?CO?DRAW -?PR?DRAWNUMBER?DRAW 003BH 0002H +?PR?DRAWNUMBER?DRAW 0088H 0002H +--> ?PR?WRITE?DISPLAY +--> ?CO?DRAW -?PR?_M_MAINMENU?MENU 0038H 0003H +?PR?_M_MAINMENU?MENU 0085H 0003H +--> ?PR?_DRAWMAINMENU?DRAW +--> ?PR?CLEAR?DISPLAY -?PR?_DRAWMAINMENU?DRAW 003BH 0003H +?PR?_DRAWMAINMENU?DRAW 0088H 0003H + +--> ?PR?WRITE?DISPLAY + +--> ?CO?DRAW + +?PR?_M_BLOCK?MENU 0085H 0003H + +--> ?PR?BLOCKINIT?BLOCK + +--> ?PR?DROPPIECE?BLOCK + +--> ?PR?DRAWBLOCK?BLOCK + +--> ?PR?_DELAY?DELAY + +?PR?DRAWBLOCK?BLOCK 0088H 0004H + +--> ?PR?_PLACEIMG_BLOCK?DRAW + +?PR?_PLACEIMG_BLOCK?DRAW 008CH 0004H +--> ?PR?WRITE?DISPLAY +--> ?CO?DRAW @@ -177,13 +179,13 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) B:00A8H.7 PUBLIC EA D:00A8H PUBLIC IE D:00B8H PUBLIC IP - X:0061H PUBLIC TH - X:0062H PUBLIC TL - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 4 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 4 - C:1035H PUBLIC main - C:0F78H PUBLIC time + X:009CH PUBLIC TH + X:009DH PUBLIC TL + C:0E5FH PUBLIC main + C:0DA2H PUBLIC time D:0098H PUBLIC SCON D:0089H PUBLIC TMOD D:0088H PUBLIC TCON @@ -194,190 +196,208 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) D:008AH PUBLIC TL0 B:0088H.4 PUBLIC TR0 D:00C8H PUBLIC T2CON - X:0063H PUBLIC freshScreenTriger + X:009EH 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:0FD9H PUBLIC int0 + C:0E03H PUBLIC int0 ------- PROC INT0 ------- DO D:0005H SYMBOL LS D:0007H SYMBOL CS D:0006H SYMBOL flag ------- ENDDO - 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 + C:0E03H LINE# 11 + C:0E18H LINE# 29 + C:0E1AH LINE# 30 + C:0E1EH LINE# 31 + C:0E21H LINE# 32 + C:0E21H LINE# 33 + C:0E26H LINE# 34 + C:0E28H LINE# 35 + C:0E2AH LINE# 36 + C:0E2FH LINE# 37 + C:0E2FH LINE# 38 + C:0E3AH LINE# 39 + C:0E3FH LINE# 40 + C:0E48H LINE# 41 + C:0E4CH LINE# 42 + C:0E4CH LINE# 44 ------- ENDPROC INT0 ------- PROC TIME - 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 + C:0DA2H LINE# 46 + C:0DBFH LINE# 48 + C:0DC1H LINE# 49 + C:0DC7H LINE# 50 + C:0DCDH LINE# 51 + C:0DD3H LINE# 53 + C:0DD6H LINE# 54 + C:0DD6H LINE# 55 + C:0DDDH LINE# 56 + C:0DE0H LINE# 57 + C:0DE6H LINE# 58 + C:0DE6H LINE# 59 + C:0DE8H LINE# 60 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 5 + + ------- ENDPROC TIME ------- PROC MAIN - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 5 - - - 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 + C:0E5FH LINE# 62 + C:0E5FH LINE# 63 + C:0E5FH LINE# 64 + C:0E65H LINE# 65 + C:0E69H LINE# 66 + C:0E6CH LINE# 67 + C:0E6EH LINE# 69 + C:0E71H LINE# 71 + C:0E73H LINE# 72 + C:0E75H LINE# 73 + C:0E77H LINE# 76 + C:0E79H LINE# 77 + C:0E7BH LINE# 79 + C:0E7DH LINE# 81 + C:0E80H LINE# 82 + C:0E83H LINE# 83 + C:0E86H LINE# 85 + C:0E86H LINE# 86 + C:0E86H LINE# 88 + C:0EB0H LINE# 90 ------- ENDPROC MAIN ------- ENDMOD MAIN ------- MODULE MENU C:0000H SYMBOL _ICE_DUMMY_ - X:0000H PUBLIC M_MAINMENU - X:0006H SYMBOL local - 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 + X:005CH PUBLIC M_MAINMENU + X:0062H SYMBOL local + X:006CH PUBLIC M_BLOCK + C:06C6H PUBLIC _m_mainmenu + X:0072H PUBLIC LAST + X:0075H PUBLIC M_BALL + C:0F50H PUBLIC menuInit + X:007BH PUBLIC opr + C:0EB2H PUBLIC _m_block + X:007CH PUBLIC M_STARTUP + C:0CBCH PUBLIC _m_startup + X:0082H PUBLIC NOW ------- PROC _M_STARTUP - 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 + X:0085H SYMBOL this + C:0CBCH LINE# 24 + C:0CC7H LINE# 25 + C:0CC7H LINE# 28 + C:0CEDH LINE# 29 + C:0CEDH LINE# 30 + C:0CFBH LINE# 32 + C:0CFEH LINE# 33 + C:0D05H LINE# 34 + C:0D08H LINE# 35 + C:0D08H LINE# 37 + C:0D10H LINE# 38 + C:0D10H LINE# 39 + C:0D13H LINE# 40 + C:0D2CH LINE# 41 + C:0D2FH LINE# 42 + C:0D2FH LINE# 44 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 6 + + ------- ENDPROC _M_STARTUP ------- PROC _M_MAINMENU - X:0038H SYMBOL this - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 6 - - - 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 + X:0085H SYMBOL this + C:06C6H LINE# 47 + C:06D1H LINE# 48 + C:06D1H LINE# 49 + C:06F7H LINE# 50 + C:06F7H LINE# 51 + C:0705H LINE# 52 + C:070DH LINE# 53 + C:070DH LINE# 55 + C:0715H LINE# 56 + C:0715H LINE# 57 + C:071BH LINE# 58 + C:0725H LINE# 59 + C:0728H LINE# 61 + C:072EH LINE# 62 + C:0736H LINE# 63 + C:0736H LINE# 64 + C:073CH LINE# 65 + C:073CH LINE# 66 + C:0742H LINE# 67 + C:0744H LINE# 69 + C:074AH LINE# 70 + C:0752H LINE# 71 + C:0752H LINE# 72 + C:075AH LINE# 73 + C:075AH LINE# 75 + C:076BH LINE# 76 + C:076BH LINE# 77 + C:076BH LINE# 79 + C:076BH LINE# 80 + C:0779H LINE# 81 + C:077BH LINE# 82 + C:077BH LINE# 83 + C:0789H LINE# 84 + C:078BH LINE# 85 + C:078BH LINE# 86 + C:0799H LINE# 87 + C:0799H LINE# 88 + C:0799H LINE# 90 + C:079EH LINE# 91 + C:07A1H LINE# 92 + C:07A7H LINE# 93 + C:07A7H LINE# 94 ------- ENDPROC _M_MAINMENU + ------- PROC _M_BLOCK + X:0085H SYMBOL this + C:0EB2H LINE# 98 + C:0EBDH LINE# 99 + C:0EBDH LINE# 100 + C:0EE3H LINE# 101 + C:0EE3H LINE# 102 + C:0EF1H LINE# 103 + C:0EF4H LINE# 104 + C:0EF4H LINE# 105 + C:0EF4H LINE# 106 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 7 + + + C:0EF4H LINE# 107 + C:0EF7H LINE# 108 + C:0EFAH LINE# 109 + C:0F01H LINE# 110 + ------- ENDPROC _M_BLOCK ------- PROC MENUINIT - 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 + C:0F50H LINE# 113 + C:0F50H LINE# 114 + C:0F50H LINE# 115 + C:0F5EH LINE# 116 + C:0F6AH LINE# 118 + C:0F78H LINE# 119 + C:0F86H LINE# 122 + C:0F94H LINE# 123 ------- ENDPROC MENUINIT ------- ENDMOD MENU ------- MODULE DELAY C:0000H SYMBOL _ICE_DUMMY_ - C:12C0H PUBLIC delay100us - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 7 - - - C:126BH PUBLIC _delay + C:0FEAH PUBLIC delay100us + C:0F95H PUBLIC _delay ------- PROC DELAY100US ------- DO D:0007H SYMBOL i D:0006H SYMBOL j ------- ENDDO - 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 + C:0FEAH LINE# 3 + C:0FEAH LINE# 4 + C:0FEAH LINE# 7 + C:0FEBH LINE# 8 + C:0FECH LINE# 9 + C:0FEEH LINE# 10 + C:0FF0H LINE# 12 + C:0FF0H LINE# 13 + C:0FF2H LINE# 14 + C:0FF4H LINE# 15 ------- ENDPROC DELAY100US ------- PROC _DELAY D:0006H SYMBOL n @@ -385,11 +405,11 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) D:0006H SYMBOL i D:0004H SYMBOL j ------- ENDDO - C:126BH LINE# 24 - C:126BH LINE# 26 - C:126BH LINE# 27 - C:1276H LINE# 28 - C:128AH LINE# 29 + C:0F95H LINE# 24 + C:0F95H LINE# 26 + C:0F95H LINE# 27 + C:0FA0H LINE# 28 + C:0FB4H LINE# 29 ------- ENDPROC _DELAY ------- ENDMOD DELAY @@ -398,195 +418,198 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) D:0090H PUBLIC P1 D:00A0H PUBLIC P2 D:00B0H PUBLIC P3 - C:0B9BH PUBLIC clear + C:07A8H PUBLIC clear + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 8 + + D:00A8H PUBLIC IE - C:128BH PUBLIC displayInit + C:0FB5H PUBLIC displayInit D:00B8H PUBLIC IP B:00A0H.0 PUBLIC RS B:00A0H.1 PUBLIC RW - C:12B0H PUBLIC write + C:0FDAH PUBLIC write D:0098H PUBLIC SCON D:0088H PUBLIC TCON - C:0C60H PUBLIC miniclear - C:0D25H PUBLIC test + C:086DH PUBLIC miniclear + C:0932H 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:12A7H SYMBOL L?0055 + C:0FD1H SYMBOL L?0055 ------- PROC L?0054 ------- ENDPROC L?0054 - C:12A7H SYMBOL L?0055 + C:0FD1H SYMBOL L?0055 ------- PROC WRITE - 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 + C:0FDAH LINE# 17 + C:0FDAH LINE# 18 + C:0FDAH LINE# 19 + C:0FDCH LINE# 20 + C:0FDEH LINE# 21 + C:0FE0H LINE# 22 + C:0FE7H LINE# 23 + C:0FE9H LINE# 24 ------- ENDPROC WRITE ------- PROC CLEAR ------- DO - X:003BH SYMBOL i - X:003DH SYMBOL j + X:0088H SYMBOL i + X:008AH SYMBOL j ------- ENDDO - 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 + C:07A8H LINE# 28 + C:07A8H LINE# 29 + C:07A8H LINE# 31 + C:07AAH LINE# 32 + C:07ACH LINE# 33 + C:07C3H LINE# 34 + C:07C3H LINE# 35 + C:07C3H LINE# 36 + C:07C3H LINE# 37 + C:07C3H LINE# 38 + C:07C6H LINE# 39 + C:07C9H LINE# 40 + C:07CCH LINE# 42 + C:07D3H LINE# 43 + C:07D3H LINE# 44 + C:07D5H LINE# 45 + C:07D7H LINE# 46 + C:07DAH LINE# 47 + C:07DDH LINE# 48 + C:07FAH LINE# 49 + C:080AH LINE# 50 + C:080CH LINE# 51 + C:080EH LINE# 52 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 9 + + + C:0825H LINE# 53 + C:0825H LINE# 54 + C:0825H LINE# 55 + C:0825H LINE# 56 + C:0825H LINE# 57 + C:0828H LINE# 58 + C:082BH LINE# 59 + C:082EH LINE# 61 + C:0835H LINE# 62 + C:0835H LINE# 63 + C:0837H LINE# 64 + C:0839H LINE# 65 + C:083CH LINE# 66 + C:083FH LINE# 67 + C:085CH LINE# 68 + C:086CH LINE# 69 ------- ENDPROC CLEAR ------- PROC MINICLEAR ------- DO - X:0051H SYMBOL i - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 9 - - - X:0053H SYMBOL j + X:0090H SYMBOL i + X:0092H SYMBOL j ------- ENDDO - 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 + C:086DH LINE# 72 + C:086DH LINE# 73 + C:086DH LINE# 75 + C:086FH LINE# 76 + C:0871H LINE# 77 + C:0888H LINE# 78 + C:0888H LINE# 79 + C:0888H LINE# 80 + C:0888H LINE# 81 + C:0888H LINE# 82 + C:088BH LINE# 83 + C:088EH LINE# 84 + C:0891H LINE# 86 + C:0898H LINE# 87 + C:0898H LINE# 88 + C:089AH LINE# 89 + C:089CH LINE# 90 + C:089FH LINE# 91 + C:08A2H LINE# 92 + C:08BFH LINE# 93 + C:08CFH LINE# 94 + C:08D1H LINE# 95 + C:08D3H LINE# 96 + C:08EAH LINE# 97 + C:08EAH LINE# 98 + C:08EAH LINE# 99 + C:08EAH LINE# 100 + C:08EAH LINE# 101 + C:08EDH LINE# 102 + C:08F0H LINE# 103 + C:08F3H LINE# 105 + C:08FAH LINE# 106 + C:08FAH LINE# 107 + C:08FCH LINE# 108 + C:08FEH LINE# 109 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 10 + + + C:0901H LINE# 110 + C:0904H LINE# 111 + C:0921H LINE# 112 + C:0931H LINE# 113 ------- ENDPROC MINICLEAR ------- PROC DISPLAYINIT - 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 - - + C:0FB5H LINE# 114 + C:0FB5H LINE# 115 + C:0FB5H LINE# 116 + C:0FB7H LINE# 117 + C:0FB9H LINE# 118 + C:0FBBH LINE# 119 + C:0FBDH LINE# 120 + C:0FBFH LINE# 121 + C:0FC2H LINE# 122 + C:0FC5H LINE# 124 + C:0FC7H LINE# 125 + C:0FC9H LINE# 126 + C:0FCBH LINE# 127 + C:0FCEH LINE# 128 ------- ENDPROC DISPLAYINIT ------- PROC TEST ------- DO - X:0055H SYMBOL i - X:0057H SYMBOL j + X:0094H SYMBOL i + X:0096H SYMBOL j ------- ENDDO - 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 + C:0932H LINE# 131 + C:0932H LINE# 132 + C:0932H LINE# 134 + C:0934H LINE# 135 + C:0936H LINE# 136 + C:094DH LINE# 137 + C:094DH LINE# 138 + C:094DH LINE# 139 + C:094DH LINE# 140 + C:094DH LINE# 141 + C:0950H LINE# 142 + C:0953H LINE# 143 + C:0956H LINE# 145 + C:095DH LINE# 146 + C:095DH LINE# 147 + C:095FH LINE# 148 + C:0961H LINE# 149 + C:0964H LINE# 150 + C:0967H LINE# 151 + C:0984H LINE# 152 + C:0994H LINE# 153 + C:0996H LINE# 154 + C:0998H LINE# 155 + C:09AFH LINE# 156 + C:09AFH LINE# 157 + C:09AFH LINE# 158 + C:09AFH LINE# 159 + C:09AFH LINE# 160 + C:09B2H LINE# 161 + C:09B5H LINE# 162 + C:09B8H LINE# 164 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 11 + + + C:09BFH LINE# 165 + C:09BFH LINE# 166 + C:09C1H LINE# 167 + C:09C3H LINE# 168 + C:09C6H LINE# 169 + C:09C9H LINE# 170 + C:09E6H LINE# 171 + C:09F6H LINE# 172 ------- ENDPROC TEST ------- ENDMOD DISPLAY @@ -595,452 +618,428 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) D:0090H PUBLIC P1 D:00A0H PUBLIC P2 D:00B0H PUBLIC P3 - C:05FFH PUBLIC MAINMANU_PAGE0 - 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 + C:0377H PUBLIC MAINMANU_PAGE0 + C:0397H PUBLIC MAINMANU_PAGE1 + C:03B7H PUBLIC MAINMANU_PAGE2 + C:03D7H PUBLIC MAINMANU_PAGE3 + C:03F7H PUBLIC MAINMANU_PAGE4 D:00A8H PUBLIC IE - C:069FH PUBLIC MAINMANU_PAGE5 - C:0296H PUBLIC _drawMAINMENU - C:06BFH PUBLIC MAINMANU_PAGE6 - C:06DFH PUBLIC MAINMANU_PAGE7 + C:0417H PUBLIC MAINMANU_PAGE5 + C:000EH PUBLIC _drawMAINMENU + C:0437H PUBLIC MAINMANU_PAGE6 + C:0457H PUBLIC MAINMANU_PAGE7 D:00B8H PUBLIC IP B:00A0H.0 PUBLIC RS B:00A0H.1 PUBLIC RW + C:0477H PUBLIC IMG_BLOCK D:0098H PUBLIC SCON + C:0D30H PUBLIC _placeIMG_BLOCK D:0088H PUBLIC TCON - C:05DFH PUBLIC NUMBER_RPAGE0 - C:05EFH PUBLIC NUMBER_RPAGE1 - C:04FFH PUBLIC NAME_PAGE0 - C:052FH PUBLIC NAME_PAGE1 - C:0DEAH PUBLIC drawNAME + C:0357H PUBLIC NUMBER_RPAGE0 + C:0367H PUBLIC NUMBER_RPAGE1 + C:0277H PUBLIC NAME_PAGE0 + C:02A7H PUBLIC NAME_PAGE1 + C:0A98H PUBLIC drawNAME B:00A0H.4 PUBLIC CSA B:00A0H.5 PUBLIC CSB D:00C8H PUBLIC T2CON D:00D0H PUBLIC PSW - C:055FH PUBLIC NUMBER_PAGE0 - C:059FH PUBLIC NUMBER_PAGE1 - C:08D6H PUBLIC drawNUMBER + C:02D7H PUBLIC NUMBER_PAGE0 + C:0317H PUBLIC NUMBER_PAGE1 + C:05ABH PUBLIC drawNUMBER ------- PROC DRAWNUMBER ------- DO - X:003BH SYMBOL j + X:0088H SYMBOL j ------- ENDDO - C:08D6H LINE# 12 - C:08D6H LINE# 13 - C:08D6H LINE# 15 - C:08DDH LINE# 16 - C:08DDH LINE# 19 - C:08DFH LINE# 20 - C:08E1H LINE# 21 - C:08E3H LINE# 22 - C:08E5H LINE# 23 - C:08E8H LINE# 24 - C:08EBH LINE# 25 - C:08F4H LINE# 26 - C:08F7H LINE# 28 - C:08F9H LINE# 29 - C:08FBH LINE# 30 - C:090FH LINE# 31 - C:0912H LINE# 33 - C:0914H LINE# 34 - C:0916H LINE# 35 - C:0919H LINE# 36 - C:091CH LINE# 37 - C:0925H LINE# 38 - C:0928H LINE# 40 - C:092AH LINE# 41 - C:092CH LINE# 42 - C:0940H LINE# 43 - C:0943H LINE# 46 - 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:05ABH LINE# 16 + C:05ABH LINE# 17 + C:05ABH LINE# 19 + C:05B2H LINE# 20 + C:05B2H LINE# 22 + C:05B4H LINE# 23 + C:05B6H LINE# 24 + C:05B8H LINE# 25 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 12 - C:096CH LINE# 52 - C:096EH LINE# 53 - C:0970H LINE# 54 - C:0972H LINE# 55 - C:0975H LINE# 56 - C:0978H LINE# 57 - C:0981H LINE# 58 - C:0984H LINE# 60 - C:0986H LINE# 61 - C:0988H LINE# 62 - C:099CH LINE# 63 - C:099FH LINE# 65 - C:09A1H LINE# 66 - C:09A3H LINE# 67 - C:09A6H LINE# 68 - C:09A9H LINE# 69 - C:09B2H LINE# 70 - C:09B5H LINE# 72 - C:09B7H LINE# 73 - C:09B9H LINE# 74 - C:09CDH LINE# 75 - C:09D0H LINE# 78 - C:09F0H LINE# 79 + C:05BAH LINE# 26 + C:05BDH LINE# 27 + C:05C0H LINE# 28 + C:05C9H LINE# 29 + C:05CCH LINE# 31 + C:05CEH LINE# 32 + C:05D0H LINE# 33 + C:05E4H LINE# 34 + C:05E7H LINE# 36 + C:05E9H LINE# 37 + C:05EBH LINE# 38 + C:05EEH LINE# 39 + C:05F1H LINE# 40 + C:05FAH LINE# 41 + C:05FDH LINE# 43 + C:05FFH LINE# 44 + C:0601H LINE# 45 + C:0615H LINE# 46 + C:0618H LINE# 48 + C:0638H LINE# 49 + C:063FH LINE# 50 + C:063FH LINE# 53 + C:0641H LINE# 54 + C:0643H LINE# 55 + C:0645H LINE# 56 + C:0647H LINE# 57 + C:064AH LINE# 58 + C:064DH LINE# 59 + C:0656H LINE# 60 + C:0659H LINE# 62 + C:065BH LINE# 63 + C:065DH LINE# 64 + C:0671H LINE# 65 + C:0674H LINE# 67 + C:0676H LINE# 68 + C:0678H LINE# 69 + C:067BH LINE# 70 + C:067EH LINE# 71 + C:0687H LINE# 72 + C:068AH LINE# 74 + C:068CH LINE# 75 + C:068EH LINE# 76 + C:06A2H LINE# 77 + C:06A5H LINE# 80 + C:06C5H LINE# 81 ------- ENDPROC DRAWNUMBER ------- PROC DRAWNAME ------- DO - X:003BH SYMBOL j + X:0088H SYMBOL j ------- ENDDO - 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 + C:0A98H LINE# 83 + C:0A98H LINE# 84 + C:0A98H LINE# 87 + C:0A9FH LINE# 88 + C:0A9FH LINE# 89 + C:0AA1H LINE# 90 + C:0AA3H LINE# 91 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 13 + + + C:0AA5H LINE# 92 + C:0AA7H LINE# 93 + C:0AAAH LINE# 94 + C:0AADH LINE# 95 + C:0AB6H LINE# 96 + C:0AB9H LINE# 98 + C:0ABBH LINE# 99 + C:0ABDH LINE# 100 + C:0AD1H LINE# 101 + C:0AD4H LINE# 103 + C:0AD6H LINE# 104 + C:0AD8H LINE# 105 + C:0ADBH LINE# 106 + C:0ADEH LINE# 107 + C:0AE7H LINE# 108 + C:0AEAH LINE# 110 + C:0AECH LINE# 111 + C:0AEEH LINE# 112 + C:0B02H LINE# 113 + C:0B05H LINE# 114 + C:0B25H LINE# 115 ------- ENDPROC DRAWNAME - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 13 - - ------- PROC _DRAWMAINMENU - X:003BH SYMBOL i + X:0088H SYMBOL i ------- DO - X:003CH SYMBOL j + X:0089H SYMBOL j ------- ENDDO - C:0296H LINE# 114 - C:029BH LINE# 115 - C:029BH LINE# 118 - C:02A0H LINE# 119 - C:02A0H LINE# 120 - C:02A2H LINE# 121 - C:02A4H LINE# 123 - C:02A6H LINE# 124 - C:02A8H LINE# 125 - C:02ABH LINE# 126 - C:02AEH LINE# 127 - C:02B7H LINE# 128 - C:02BAH LINE# 130 - C:02BCH LINE# 131 - C:02BEH LINE# 132 - C:02D2H LINE# 133 - C:02D5H LINE# 135 - C:02D7H LINE# 136 - C:02D9H LINE# 137 - C:02DCH LINE# 138 - C:02DFH LINE# 139 - C:02E8H LINE# 140 - C:02EBH LINE# 142 - C:02EDH LINE# 143 - C:02EFH LINE# 144 - C:0303H LINE# 145 - C:0306H LINE# 147 - C:0308H LINE# 148 - C:030AH LINE# 151 - C:030CH LINE# 152 - C:030EH LINE# 153 - C:0311H LINE# 154 - C:0314H LINE# 155 - C:031DH LINE# 156 - C:0320H LINE# 158 - C:0322H LINE# 159 - C:0324H LINE# 160 - C:032CH LINE# 161 - C:0341H LINE# 163 - C:0355H LINE# 164 - C:0358H LINE# 166 - C:035AH LINE# 167 - C:035CH LINE# 168 - C:035FH LINE# 169 - C:0362H LINE# 170 - C:036BH LINE# 171 - C:036EH LINE# 173 - C:0370H LINE# 174 - C:0372H LINE# 175 - 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:000EH LINE# 116 + C:0013H LINE# 117 + C:0013H LINE# 120 + C:0018H LINE# 121 + C:0018H LINE# 122 + C:001AH LINE# 123 + C:001CH LINE# 125 + C:001EH LINE# 126 + C:0020H LINE# 127 + C:0023H LINE# 128 + C:0026H LINE# 129 + C:002FH LINE# 130 + C:0032H LINE# 132 + C:0034H LINE# 133 + C:0036H LINE# 134 + C:004AH LINE# 135 + C:004DH LINE# 137 + C:004FH LINE# 138 + C:0051H LINE# 139 + C:0054H LINE# 140 + C:0057H LINE# 141 + C:0060H LINE# 142 + C:0063H LINE# 144 + C:0065H LINE# 145 + C:0067H LINE# 146 + C:007BH LINE# 147 + C:007EH LINE# 149 + C:0080H LINE# 150 + C:0082H LINE# 153 + C:0084H LINE# 154 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 14 - C:03A6H LINE# 181 - C:03A8H LINE# 182 - C:03AAH LINE# 183 - C:03ADH LINE# 184 - C:03B0H LINE# 185 - C:03B9H LINE# 186 - C:03BCH LINE# 188 - C:03BEH LINE# 189 - C:03C0H LINE# 190 - C:03C8H LINE# 191 - C:03DDH LINE# 193 - C:03F1H LINE# 194 - C:03F4H LINE# 196 - C:03F6H LINE# 197 - C:03F8H LINE# 198 - C:03FBH LINE# 199 - C:03FEH LINE# 200 - C:0407H LINE# 201 - C:040AH LINE# 203 - C:040CH LINE# 204 - C:040EH LINE# 205 - C:0416H LINE# 206 - C:042BH LINE# 208 - C:043FH LINE# 209 - C:0442H LINE# 211 - C:0444H LINE# 212 - C:0446H LINE# 213 - C:0449H LINE# 214 - C:044CH LINE# 215 - C:0455H LINE# 216 - C:0458H LINE# 218 - C:045AH LINE# 219 - C:045CH LINE# 220 - C:0464H LINE# 221 - C:0479H LINE# 223 - C:048DH LINE# 224 - C:0490H LINE# 226 - C:0492H LINE# 227 - C:0494H LINE# 228 - C:0497H LINE# 229 - C:049AH LINE# 230 - C:04A3H LINE# 231 - C:04A6H LINE# 233 - C:04A8H LINE# 234 - C:04AAH LINE# 235 - C:04B2H LINE# 236 - C:04C7H LINE# 238 - C:04DBH LINE# 239 - C:04DEH LINE# 240 - C:04FEH LINE# 242 + C:0086H LINE# 155 + C:0089H LINE# 156 + C:008CH LINE# 157 + C:0095H LINE# 158 + C:0098H LINE# 160 + C:009AH LINE# 161 + C:009CH LINE# 162 + C:00A4H LINE# 163 + C:00B9H LINE# 165 + C:00CDH LINE# 166 + C:00D0H LINE# 168 + C:00D2H LINE# 169 + C:00D4H LINE# 170 + C:00D7H LINE# 171 + C:00DAH LINE# 172 + C:00E3H LINE# 173 + C:00E6H LINE# 175 + C:00E8H LINE# 176 + C:00EAH LINE# 177 + C:00F2H LINE# 178 + C:0107H LINE# 180 + C:011BH LINE# 181 + C:011EH LINE# 183 + C:0120H LINE# 184 + C:0122H LINE# 185 + C:0125H LINE# 186 + C:0128H LINE# 187 + C:0131H LINE# 188 + C:0134H LINE# 190 + C:0136H LINE# 191 + C:0138H LINE# 192 + C:0140H LINE# 193 + C:0155H LINE# 195 + C:0169H LINE# 196 + C:016CH LINE# 198 + C:016EH LINE# 199 + C:0170H LINE# 200 + C:0173H LINE# 201 + C:0176H LINE# 202 + C:017FH LINE# 203 + C:0182H LINE# 205 + C:0184H LINE# 206 + C:0186H LINE# 207 + C:018EH LINE# 208 + C:01A3H LINE# 210 + C:01B7H LINE# 211 + C:01BAH LINE# 213 + C:01BCH LINE# 214 + C:01BEH LINE# 215 + C:01C1H LINE# 216 + C:01C4H LINE# 217 + C:01CDH LINE# 218 + C:01D0H LINE# 220 + C:01D2H LINE# 221 + C:01D4H LINE# 222 + C:01DCH LINE# 223 + C:01F1H LINE# 225 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 15 + + + C:0205H LINE# 226 + C:0208H LINE# 228 + C:020AH LINE# 229 + C:020CH LINE# 230 + C:020FH LINE# 231 + C:0212H LINE# 232 + C:021BH LINE# 233 + C:021EH LINE# 235 + C:0220H LINE# 236 + C:0222H LINE# 237 + C:022AH LINE# 238 + C:023FH LINE# 240 + C:0253H LINE# 241 + C:0256H LINE# 242 + C:0276H LINE# 244 ------- ENDPROC _DRAWMAINMENU + ------- PROC _PLACEIMG_BLOCK + X:008CH SYMBOL x + X:008DH SYMBOL y + ------- DO + X:008EH SYMBOL j + ------- ENDDO + C:0D30H LINE# 245 + C:0D38H LINE# 246 + C:0D38H LINE# 248 + C:0D3DH LINE# 249 + C:0D3DH LINE# 251 + C:0D3FH LINE# 252 + C:0D41H LINE# 253 + C:0D43H LINE# 254 + C:0D45H LINE# 255 + C:0D50H LINE# 256 + C:0D53H LINE# 257 + C:0D66H LINE# 258 + C:0D69H LINE# 260 + C:0D6BH LINE# 261 + C:0D6DH LINE# 262 + C:0D81H LINE# 263 + C:0D84H LINE# 264 + C:0DA1H LINE# 265 + ------- ENDPROC _PLACEIMG_BLOCK ------- ENDMOD DRAW ------- MODULE BLOCK C:0000H SYMBOL _ICE_DUMMY_ - 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:1215H PUBLIC groupInit - ------- PROC GROUPINIT - X:003FH SYMBOL g - X:0044H SYMBOL i - ------- DO - C:1215H SYMBOL retry - ------- ENDDO - 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 + X:0000H PUBLIC piece + X:0003H PUBLIC base + C:0B26H PUBLIC drawBlock + C:1000H PUBLIC dropPiece + C:0FF5H PUBLIC blockInit + C:09F7H PUBLIC genPiece + X:005BH PUBLIC regenPieceFlag + C:1007H PUBLIC blockDestroy ------- PROC BLOCKINIT - C:1166H LINE# 6 - C:1166H LINE# 7 - C:1166H LINE# 8 - C:1181H LINE# 9 + C:0FF5H LINE# 8 + C:0FF5H LINE# 9 + C:0FF5H LINE# 11 + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 16 + + + C:0FFBH LINE# 12 + C:0FFDH LINE# 13 + C:0FFFH LINE# 15 ------- ENDPROC BLOCKINIT + ------- PROC BLOCKDESTROY + C:1007H LINE# 17 + C:1007H LINE# 18 + C:1007H LINE# 19 + C:100CH LINE# 20 + ------- ENDPROC BLOCKDESTROY ------- PROC GENPIECE ------- DO - X:0064H SYMBOL i + X:009FH SYMBOL random + D:0002H SYMBOL len ------- ENDDO - C:1088H LINE# 12 - C:1088H LINE# 13 - C:1088H LINE# 14 - C:1099H LINE# 15 - C:10B4H LINE# 16 + C:09F7H LINE# 22 + C:09F7H LINE# 23 + C:09F7H LINE# 25 + C:0A09H LINE# 26 + C:0A1CH LINE# 29 + C:0A22H LINE# 30 + C:0A26H LINE# 35 + C:0A2CH LINE# 36 + C:0A2CH LINE# 37 + C:0A42H LINE# 38 + C:0A42H LINE# 39 + C:0A45H LINE# 40 + C:0A47H LINE# 42 + C:0A47H LINE# 43 + C:0A4AH LINE# 44 + C:0A4AH LINE# 45 + C:0A4AH LINE# 47 + C:0A50H LINE# 48 + C:0A50H LINE# 49 + C:0A5BH LINE# 50 + C:0A5BH LINE# 52 + C:0A61H LINE# 54 + C:0A63H LINE# 55 + C:0A69H LINE# 56 + C:0A69H LINE# 57 + C:0A6FH LINE# 58 + C:0A71H LINE# 59 + C:0A77H LINE# 60 + C:0A77H LINE# 62 + C:0A7DH LINE# 63 + C:0A7FH LINE# 64 + C:0A85H LINE# 65 + C:0A85H LINE# 66 + C:0A8BH LINE# 67 + C:0A8BH LINE# 68 + C:0A8BH LINE# 70 + C:0A91H LINE# 71 + C:0A91H LINE# 72 + C:0A97H LINE# 73 + C:0A97H LINE# 74 ------- ENDPROC GENPIECE - ------- PROC GENSHAPE - X:0031H SYMBOL g + ------- PROC DROPPIECE + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 17 + + + C:1000H LINE# 76 + C:1000H LINE# 77 + C:1000H LINE# 78 + C:1006H LINE# 98 + ------- ENDPROC DROPPIECE + ------- PROC DRAWBLOCK ------- DO - X:0036H SYMBOL random + X:0088H SYMBOL i + X:008AH SYMBOL j ------- ENDDO - C:06FFH LINE# 19 - C:06FFH LINE# 20 - C:06FFH LINE# 22 - C:0711H LINE# 25 - C:0719H LINE# 26 - C:0719H LINE# 27 - C:072FH LINE# 28 - C:072FH LINE# 29 - C:073CH LINE# 30 - C:074FH LINE# 31 - C:0757H LINE# 32 - C:075CH LINE# 33 - C:075EH LINE# 35 - 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 - C:078EH LINE# 43 - C:0799H LINE# 44 - C:0799H LINE# 45 - C:07AFH LINE# 46 - C:07AFH LINE# 47 - C:07BCH LINE# 48 - C:07CFH LINE# 49 - C:07D7H LINE# 50 - C:07DFH LINE# 51 - C:07E7H LINE# 52 - C:07ECH LINE# 53 - C:07EEH LINE# 55 - C:07EEH LINE# 56 - C:07FBH LINE# 57 - C:080EH LINE# 58 - C:0816H LINE# 59 - C:081EH LINE# 60 - C:0826H LINE# 61 - C:082EH LINE# 62 - C:082EH LINE# 63 - C:082EH LINE# 65 - C:0839H LINE# 66 - C:0839H LINE# 67 - C:0846H LINE# 68 - C:0846H LINE# 69 - C:0853H LINE# 70 - C:0866H LINE# 71 - C:086EH LINE# 72 - C:0876H LINE# 73 - C:087EH LINE# 74 - C:0886H LINE# 75 - C:088EH LINE# 76 - C:0893H LINE# 77 - C:0895H LINE# 79 - C:0895H LINE# 80 - C:08A2H LINE# 81 - C:08B5H LINE# 82 - C:08BDH LINE# 83 - C:08C5H LINE# 84 - C:08CDH LINE# 85 - C:08D5H LINE# 86 - C:08D5H LINE# 87 - C:08D5H LINE# 89 - ------- ENDPROC GENSHAPE + C:0B26H LINE# 101 + C:0B26H LINE# 102 + C:0B26H LINE# 104 + C:0B2DH LINE# 105 + C:0B46H LINE# 106 + C:0B6FH LINE# 107 + C:0BA9H LINE# 108 + ------- ENDPROC DRAWBLOCK ------- ENDMOD BLOCK - ------- MODULE ?C?COPY - C:00DEH PUBLIC ?C?COPY - ------- ENDMOD ?C?COPY - - ------- MODULE ?C?CSTPTR - 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 - ------- MODULE ?C?SIDIV - C:0138H PUBLIC ?C?SIDIV + C:047FH PUBLIC ?C?SIDIV ------- ENDMOD ?C?SIDIV + ------- MODULE ?C?OFFXADD + C:04B5H PUBLIC ?C?OFFXADD + ------- ENDMOD ?C?OFFXADD + ------- MODULE ?C?PLDPTR - C:016EH PUBLIC ?C?PLDPTR + C:04C1H PUBLIC ?C?PLDPTR ------- ENDMOD ?C?PLDPTR ------- MODULE ?C?PLDOPTR - C:018EH PUBLIC ?C?PLDOPTR + C:04E1H PUBLIC ?C?PLDOPTR ------- ENDMOD ?C?PLDOPTR ------- MODULE ?C?ICALL - C:01BEH PUBLIC ?C?ICALL - C:01C2H PUBLIC ?C?ICALL2 + C:0511H PUBLIC ?C?ICALL + C:0515H PUBLIC ?C?ICALL2 ------- ENDMOD ?C?ICALL ------- MODULE RAND - X:0059H PUBLIC ?SRAND?BYTE - C:10D7H PUBLIC RAND - C:1115H PUBLIC _SRAND + X:0098H PUBLIC ?SRAND?BYTE + C:0F03H PUBLIC RAND + C:0F41H PUBLIC _SRAND ------- ENDMOD RAND - ------- MODULE MALLOC - C:0ACAH PUBLIC _malloc - ------- ENDMOD MALLOC - - ------- MODULE CALLOC - C:1124H PUBLIC _calloc - ------- ENDMOD CALLOC - - ------- MODULE ?C?IMUL - C:01C4H PUBLIC ?C?IMUL - ------- ENDMOD ?C?IMUL - ------- MODULE ?C?UIDIV - C:01D6H PUBLIC ?C?UIDIV + C:0517H PUBLIC ?C?UIDIV ------- ENDMOD ?C?UIDIV ------- MODULE ?C?LLDXDATA - C:022BH PUBLIC ?C?LLDXDATA + C:056CH PUBLIC ?C?LLDXDATA ------- ENDMOD ?C?LLDXDATA ------- MODULE ?C?LSTXDATA - C:0237H PUBLIC ?C?LSTXDATA + C:0578H PUBLIC ?C?LSTXDATA + BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 23:34:21 PAGE 18 + + ------- ENDMOD ?C?LSTXDATA ------- MODULE ?C?PLDIDATA - C:0243H PUBLIC ?C?PLDIDATA + C:0584H PUBLIC ?C?PLDIDATA ------- ENDMOD ?C?PLDIDATA ------- MODULE ?C?PLDXDATA - C:024CH PUBLIC ?C?PLDXDATA - BL51 BANKED LINKER/LOCATER V6.22.2.0 06/05/2022 21:16:28 PAGE 18 - - + C:058DH PUBLIC ?C?PLDXDATA ------- ENDMOD ?C?PLDXDATA ------- MODULE ?C?PLDPDATA - C:0255H PUBLIC ?C?PLDPDATA + C:0596H PUBLIC ?C?PLDPDATA ------- ENDMOD ?C?PLDPDATA ------- MODULE ?C?PLDCODE - C:025EH PUBLIC ?C?PLDCODE + C:059FH PUBLIC ?C?PLDCODE ------- ENDMOD ?C?PLDCODE - ------- MODULE ?C?MEMSET - C:026AH PUBLIC ?C?MEMSET - ------- ENDMOD ?C?MEMSET - - ------- MODULE INIT_MEM - X:0029H PUBLIC __mem_avail__ - C:11A2H PUBLIC _init_mempool - ------- ENDMOD INIT_MEM - *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?DELAY100US?DELAY @@ -1051,16 +1050,10 @@ SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN) SEGMENT: ?PR?TEST?DISPLAY *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS - SEGMENT: ?PR?BLOCKINIT?BLOCK + SEGMENT: ?PR?BLOCKDESTROY?BLOCK *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?GENPIECE?BLOCK -*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS - SEGMENT: ?PR?GENSHAPE?BLOCK - -*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS - SEGMENT: ?PR?_INIT_MEMPOOL?INIT_MEM - -Program Size: data=9.0 xdata=101 code=4806 -LINK/LOCATE RUN COMPLETE. 7 WARNING(S), 0 ERROR(S) +Program Size: data=9.0 xdata=161 code=4104 +LINK/LOCATE RUN COMPLETE. 5 WARNING(S), 0 ERROR(S) diff --git a/MCU/MCU_REAL _FINAL/block.c b/MCU/MCU_REAL _FINAL/block.c index adbecee..6d5cc61 100644 --- a/MCU/MCU_REAL _FINAL/block.c +++ b/MCU/MCU_REAL _FINAL/block.c @@ -1,89 +1,109 @@ #include "block.h" +#include "draw.h" -Group *base; -Group *piece; +Group piece; +unsigned char regenPieceFlag = 0; +unsigned char base[8][11]={0}; //x*y void blockInit() { - base=(Group*)calloc(1,sizeof(Group)); - groupInit(*base,64); + +base[0][0]=1; +base[0][1]=1; +base[0][2]=1; +// genPiece(); +} + +void blockDestroy() +{ + piece.type=none; } void genPiece() { - unsigned char i=2+rand()%3; - piece=(Group*)calloc(1,sizeof(Group)); - groupInit(*piece,i); + //Ҫһ + int random = rand() % 4; + int len = 2 + rand() % 3; + + + piece.mother.x=4; + piece.mother.y=8; + + + + // + if(len == 2) + { + if(random % 2 == 0) + { + piece.type = two_v; // + } // + else + { + piece.type = two_h; //// + } + } + // + if(len == 3) + { + if(random == 0) + { + // + piece.type = three_h; // + // + } + else if(random == 1) + { + piece.type = three_v; ////// + } + else if(random == 2) + { + // + piece.type = three_l; //// + } + else if (random == 3) + { + piece.type = three_r; // + } //// + } + //ĸ + if(len == 3) + { + piece.type = four; //// + } //// } -void genShape(Group g) +void dropPiece() { - //Ҫһ - int random=rand()%4; - - // - if(g.len==2) - { - if(random%2==0) - { - g.list[0].x=4; // - g.list[0].y=8; // - g.list[1].x=4; - g.list[1].y=9; - } - else - { - g.list[0].x=4; //// - g.list[0].y=8; - g.list[1].x=5; - g.list[1].y=8; - } - } - // - if(g.len==3) - { - if(random%2==0) - { - g.list[0].x=4; // - g.list[0].y=8; // - g.list[1].x=4; // - g.list[1].y=9; - g.list[2].x=4; - g.list[2].y=10; - } - else - { - g.list[0].x=4; ////// - g.list[0].y=8; - g.list[1].x=5; - g.list[1].y=8; - g.list[2].x=4; - g.list[2].y=9; - } - } - //ĸ - if(g.len==3) - { - if(random==0) - { - g.list[0].x=4; // - g.list[0].y=8; // - g.list[1].x=4; //// - g.list[1].y=9; - g.list[2].x=4; - g.list[2].y=10; - g.list[3].x=5; - g.list[3].y=8; - } - else - { - g.list[0].x=4; - g.list[0].y=8; - g.list[1].x=5; - g.list[1].y=8; - g.list[2].x=4; - g.list[2].y=9; - } - } - +piece.mother.y--; +// int i; +// for(i = 0; i < len; i++) +// { +// //׻base +// if(piece.list[i].x == 0 || base[piece.list[i].x][piece.list[i].y - 1] == 1) +// { +// for(i = 0; i < len;i++) +// { +// //ȫתƵbase +// base[piece.list[i].x][piece.list[i].y] == 1; +// } +// // +// genPiece(); +// return; +// } +// else +// // +// piece.list[i].y--; +// } +} + + +void drawBlock() +{ + int i,j; + for(i=0;i<8;i++) + for(j=0;j<8;j++) + if(base[i][j]==1) + placeIMG_BLOCK(i,j); + placeIMG_BLOCK(piece.mother.x,piece.mother.y); } \ No newline at end of file diff --git a/MCU/MCU_REAL _FINAL/block.h b/MCU/MCU_REAL _FINAL/block.h index 6f14f41..4dd442f 100644 --- a/MCU/MCU_REAL _FINAL/block.h +++ b/MCU/MCU_REAL _FINAL/block.h @@ -1,11 +1,11 @@ #ifndef _BLOCK_H_ #define _BLOCK_H_ #include - +# include #define MAX_X 8 #define MAX_Y 8 - +enum BLK_TP {none,two_h,two_v,three_l,three_r,three_h,three_v,four}; // ṹ struct _dot { @@ -17,20 +17,13 @@ typedef struct _dot Dot; // ṹ struct _group { - unsigned char used;//ӵеĵ - unsigned char len; //ڴ泤 - Dot* list; + enum BLK_TP type; // + Dot mother; }; typedef struct _group Group; -void groupInit(Group g,unsigned char i) -{ - retry: - g.len=i; - g.used=0; - g.list=(Dot*)malloc(sizeof(Dot)*g.len); - if(!g.list) - goto retry; -} - +void genPiece(); +void blockInit(); +void dropPiece(); +void drawBlock(); #endif \ No newline at end of file diff --git a/MCU/MCU_REAL _FINAL/draw.c b/MCU/MCU_REAL _FINAL/draw.c index 02a7dd8..0a73065 100644 --- a/MCU/MCU_REAL _FINAL/draw.c +++ b/MCU/MCU_REAL _FINAL/draw.c @@ -2,6 +2,7 @@ #include "display.h" #include "draw.h" #include +#include "block.h" sbit RS = P2 ^ 0; sbit RW = P2 ^ 1; @@ -9,13 +10,15 @@ sbit E = P2 ^ 2; sbit CSA = P2 ^ 4; sbit CSB = P2 ^ 5; + +extern Group piece; + void drawNUMBER() { unsigned int j; for(j = 0 ; j < 64; j++) { - CSA = 1; CSB = 0; RS = 0; @@ -27,7 +30,7 @@ void drawNUMBER() RS = 1; RW = 0; - P1 = NUMBER_PAGE0[j - 1]; + P1 = NUMBER_PAGE0[j]; write(); RS = 0; @@ -39,10 +42,9 @@ void drawNUMBER() RS = 1; RW = 0; - P1 = NUMBER_PAGE1[j - 1]; + P1 = NUMBER_PAGE1[j]; write(); - } for(j = 0 ; j < 16; j++) { @@ -59,7 +61,7 @@ void drawNUMBER() RS = 1; RW = 0; - P1 = NUMBER_RPAGE0[j - 1]; + P1 = NUMBER_RPAGE0[j]; write(); RS = 0; @@ -71,7 +73,7 @@ void drawNUMBER() RS = 1; RW = 0; - P1 = NUMBER_RPAGE1[j - 1]; + P1 = NUMBER_RPAGE1[j]; write(); @@ -95,7 +97,7 @@ void drawNAME() RS = 1; RW = 0; - P1 = NAME_PAGE0[j - 1]; + P1 = NAME_PAGE0[j]; write(); RS = 0; @@ -107,7 +109,7 @@ void drawNAME() RS = 1; RW = 0; - P1 = NAME_PAGE1[j - 1]; + P1 = NAME_PAGE1[j]; write(); } } @@ -129,7 +131,7 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; - P1 = MAINMANU_PAGE0[j - 1]; + P1 = MAINMANU_PAGE0[j]; write(); RS = 0; @@ -141,7 +143,7 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; - P1 = MAINMANU_PAGE1[j - 1]; + P1 = MAINMANU_PAGE1[j]; write(); CSA = 1; @@ -158,9 +160,9 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; if(i==1) - P1 = ~MAINMANU_PAGE2[j - 1]; + P1 = ~MAINMANU_PAGE2[j]; else - P1 = MAINMANU_PAGE2[j - 1]; + P1 = MAINMANU_PAGE2[j]; write(); RS = 0; @@ -173,9 +175,9 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; if(i==1) - P1 = ~MAINMANU_PAGE3[j - 1]; + P1 = ~MAINMANU_PAGE3[j]; else - P1 = MAINMANU_PAGE3[j - 1]; + P1 = MAINMANU_PAGE3[j]; write(); RS = 0; @@ -188,9 +190,9 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; if(i==2) - P1 = ~MAINMANU_PAGE4[j - 1]; + P1 = ~MAINMANU_PAGE4[j]; else - P1 = MAINMANU_PAGE4[j - 1]; + P1 = MAINMANU_PAGE4[j]; write(); RS = 0; @@ -203,9 +205,9 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; if(i==2) - P1 = ~MAINMANU_PAGE5[j - 1]; + P1 = ~MAINMANU_PAGE5[j]; else - P1 = MAINMANU_PAGE5[j - 1]; + P1 = MAINMANU_PAGE5[j]; write(); RS = 0; @@ -218,9 +220,9 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; if(i==3) - P1 = ~MAINMANU_PAGE6[j - 1]; + P1 = ~MAINMANU_PAGE6[j]; else - P1 = MAINMANU_PAGE6[j - 1]; + P1 = MAINMANU_PAGE6[j]; write(); RS = 0; @@ -233,10 +235,32 @@ void drawMAINMENU(unsigned char i) RS = 1; RW = 0; if(i==3) - P1 = ~MAINMANU_PAGE7[j - 1]; + P1 = ~MAINMANU_PAGE7[j]; else - P1 = MAINMANU_PAGE7[j - 1]; + P1 = MAINMANU_PAGE7[j]; write(); } -} \ No newline at end of file + } +void placeIMG_BLOCK(unsigned char x,unsigned char y) +{ + unsigned int j; + for(j = 0 ; j < 8; j++) + { + + CSA = 1; + CSB = 0; + RS = 0; + RW = 0; + P1 = 0xb8 + 7 - y; + write(); + P1 = 0X40 + x*8 + j; + write(); //ҳ7-yx*8+jA + + RS = 1; + RW = 0; + P1 = IMG_BLOCK[j]; + write(); + } +} + diff --git a/MCU/MCU_REAL _FINAL/draw.h b/MCU/MCU_REAL _FINAL/draw.h index e7f864f..3418439 100644 --- a/MCU/MCU_REAL _FINAL/draw.h +++ b/MCU/MCU_REAL _FINAL/draw.h @@ -1,8 +1,12 @@ #ifndef _DRAW_H_ #define _DRAW_H_ - +////=================== ˵ ================== void drawNAME(); void drawNUMBER(); void drawMAINMENU(unsigned char); -void drawBLOCK(); + + +////=================== ================== + +void placeIMG_BLOCK(unsigned char x,unsigned char y); #endif \ No newline at end of file diff --git a/MCU/MCU_REAL _FINAL/img.h b/MCU/MCU_REAL _FINAL/img.h index 226a10e..c6f8663 100644 --- a/MCU/MCU_REAL _FINAL/img.h +++ b/MCU/MCU_REAL _FINAL/img.h @@ -87,4 +87,12 @@ code unsigned char MAINMANU_PAGE7[]={ 0x81,0x81,0x41,0x41,0x21,0x11,0x0D,0x03,0x0D,0x11,0x21,0x41,0x41,0x81,0x81,0x00, 0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; + +//=================== ================== +code unsigned char IMG_BLOCK[]={ +/*-- x߶=8x8 --*/ +0x81,0x7E,0x7E,0x7E,0x7A,0x72,0x7E,0x81, +}; + + #endif \ No newline at end of file diff --git a/MCU/MCU_REAL _FINAL/main.c b/MCU/MCU_REAL _FINAL/main.c index da9016f..7280e41 100644 --- a/MCU/MCU_REAL _FINAL/main.c +++ b/MCU/MCU_REAL _FINAL/main.c @@ -86,5 +86,6 @@ int main() { NOW->f(NOW); + } } \ No newline at end of file diff --git a/MCU/MCU_REAL _FINAL/menu.c b/MCU/MCU_REAL _FINAL/menu.c index c9da242..5c77019 100644 --- a/MCU/MCU_REAL _FINAL/menu.c +++ b/MCU/MCU_REAL _FINAL/menu.c @@ -4,6 +4,7 @@ #include "draw.h" #include #include +#include "block.h" Menu M_STARTUP; Menu M_MAINMENU;//˵ @@ -74,7 +75,7 @@ void m_mainmenu(struct _menu* this) switch(local[0]) { case 0: - break; + return; case 1: NOW = &M_BLOCK; //תһ˵ break; @@ -96,11 +97,18 @@ void m_mainmenu(struct _menu* this) //Ϸ void m_block(struct _menu* this) { - if(LAST != &M_MAINMENU) + if(LAST != &M_BLOCK) { - LAST = &M_MAINMENU; - drawBLOCK(); + LAST = &M_BLOCK; + blockInit(); } + while(1) + { + dropPiece(); + drawBlock(); + delay(200); + } + } void menuInit() { @@ -108,5 +116,8 @@ void menuInit() M_STARTUP.f = m_startup; M_MAINMENU.f = m_mainmenu; + M_BLOCK.f = m_block; + + NOW = &M_STARTUP; }