下面程序是对RAM,LCDRAM进行清0 其中用到INX,TBR我看不明白,不知道在指定地址后, 如何对其进行清0操作, 请高手明示.66P51
;CLR RAM CLRRAM: LDI DPL,08H LDI DPM,02H LDI DPH,00H CLRRAM_1: LDI INX,00H ;?????????? ADIM DPL,01H LDI TBR,00 ;????????????? ADCM DPM,00H BA3 CLRRAM_2 JMP CLRRAM_3 CLRRAM_2: ADIM DPH,01H ANDIM DPM,0111B CLRRAM_3: SBI DPH,01H BNZ CLRRAM_1 SBI DPM,02H BNZ CLRRAM_1 SBI DPL,08H BNZ CLRRAM_1 ;************************************************** ;clr lcd reg 300H-33AH CLRLCD: LDI DPL,00H LDI DPM,00H LDI DPH,06H CLRLCD_1: LDI INX,00H ;????????? ADIM DPL,01H BNC CLRLCD_1 ADIM DPM,01H SBI DPM,03H BNZ CLRLCD_1 ;CLR LCD REG 300H-330H CLRLCD_2: LDI INX,00H ;????????? ADIM DPL,01H SBI DPL,0BH BNZ CLRLCD_2 ;CLR LCD REG 330H-33AH
|