nANx_Data EQU 80H
nCurrentProtectH EQU nANx_Data+0;#channel0 currentProtect
nCurrentProtectL EQU nANx_Data+1
nRoomTempBufH EQU nANx_Data+2;#channel1 roomTemp
nRoomTempBufL EQU nANx_Data+3
nPipeTempH EQU nANx_Data+4;#channel2 pipeTemp
nPipeTempL EQU nANx_Data+5
nHeatProtectH EQU nANx_Data+6;#channel3 heatProtect
nHeatProtectL EQU nANx_Data+7
nWaterLevel2H EQU nANx_Data+8;#channel4 waterLevel2
nWaterLevel2L EQU nANx_Data+9
nWaterLevel1H EQU nANx_Data+10;#channel5 waterLevel1
nWaterLevel1L EQU nANx_Data+11
nWaterLevel3H EQU nANx_Data+12;#channel6 waterLevel3
nWaterLevel3L EQU nANx_Data+13
nJumperValueH EQU nANx_Data+14;#channel7 JR3 value
nJumperValueL EQU nANx_Data+15; (for UL,CE)
把一個Byte(內容為[nADC_Buffer3,nADC_Buffer2])
保存到nANx_Data數組中的莫個單元,范圍(zWk0=0~7)
lda zWk0 ;offset address
addm zWk0
ldi rzDPL ,nANx_Data&0x0f ;head address
ldi rzDPM ,(nANx_Data>>4)&0x07
ldi rzDPH ,(nANx_Data>>7)&0x07
lda zWk0 ;absolute address(MSB)
addm rzDPL
eor rzDPL
adcm rzDPM
lda nADC_Buffer3 ;save value
sta rzINX
adim rzDPL ,0x01 ;absolute address(LSB)
eor rzDPL
adcm rzDPM
lda nADC_Buffer2 ;save value
sta rzINX |