求教 显示器控制按键调整
请各位大虾帮忙看一下显示器控制器的代码!用汇编的!ti的msp430x2xx,需要对各按键的功能进行调整,以达到与原控制板的同一位置按键的功能!主要代码部分如下:manage_key1_down:
bit #key1_already_down,R11
jnz manage_key1_down_back
mov #5000,R15
manage_key1_down_lp:
bit.b #key1_ctrl,&key_ctrl_Port
jnz manage_key1_down_back
dec R15
jnz manage_key1_down_lp
bis #key1_already_down,R11
mov #0x5af0,R13
call #tx_i2c_data_to_sub
jmp manage_key1_down_back
; mov #0x5a1e,R13
; call #tx_i2c_data_to_sub
;here_step:
; bit.b #scl_in,&scl_in_Port
; jz rx_sub_i2c_data
; jmp here_step
manage_key1_up:
bit #key1_already_down,R11
jz manage_key1_up_back
mov #5000,R15
manage_key1_up_lp:
bit.b #key1_ctrl,&key_ctrl_Port
jz manage_key1_up_back
dec R15
jnz manage_key1_up_lp
bic #key1_already_down,R11
mov #0x5aa5,R13
call #tx_i2c_data_to_sub
jmp manage_key1_up_back
;****************************************************************
manage_key2_down:
bit #key2_already_down,R11
jnz manage_key2_down_back
mov #5000,R15
manage_key2_down_lp:
bit.b #key2_ctrl,&key_ctrl_Port
jnz manage_key2_down_back
dec R15
jnz manage_key2_down_lp
bis #key2_already_down,R11
mov #0x5ae1,R13
call #tx_i2c_data_to_sub
jmp manage_key2_down_back
manage_key2_up:
bit #key2_already_down,R11
jz manage_key2_up_back
mov #5000,R15
manage_key2_up_lp:
bit.b #key2_ctrl,&key_ctrl_Port
jz manage_key2_up_back
dec R15
jnz manage_key2_up_lp
bic #key2_already_down,R11
mov #0x5a96,R13
call #tx_i2c_data_to_sub
jmp manage_key2_up_back
;****************************************************************
manage_key3_down:
bit #key3_already_down,R11
jnz manage_key3_down_back
mov #5000,R15
manage_key3_down_lp:
bit.b #key3_ctrl,&key_ctrl_Port
jnz manage_key3_down_back
dec R15
jnz manage_key3_down_lp
bis #key3_already_down,R11
mov #0x5ad2,R13
call #tx_i2c_data_to_sub
jmp manage_key3_down_back
manage_key3_up:
bit #key3_already_down,R11
jz manage_key3_up_back
mov #5000,R15
manage_key3_up_lp:
bit.b #key3_ctrl,&key_ctrl_Port
jz manage_key3_up_back
dec R15
jnz manage_key3_up_lp
bic #key3_already_down,R11
mov #0x5a87,R13
call #tx_i2c_data_to_sub
jmp manage_key3_up_back
;****************************************************************
manage_key4_down:
bit #key4_already_down,R11
jnz manage_key4_down_back
mov #5000,R15
manage_key4_down_lp:
bit.b #key4_ctrl,&key_ctrl_Port
jnz manage_key4_down_back
dec R15
jnz manage_key4_down_lp
bis #key4_already_down,R11
mov #0x5ac3,R13
call #tx_i2c_data_to_sub
jmp manage_key4_down_back
manage_key4_up:
bit #key4_already_down,R11
jz manage_key4_up_back
mov #5000,R15
manage_key4_up_lp:
bit.b #key4_ctrl,&key_ctrl_Port
jz manage_key4_up_back
dec R15
jnz manage_key4_up_lp
bic #key4_already_down,R11
mov #0x5a78,R13
call #tx_i2c_data_to_sub
jmp manage_key4_up_back
;****************************************************************
manage_key5_down:
bit #key5_already_down,R11
jnz manage_key5_down_back
mov #5000,R15
manage_key5_down_lp:
bit.b #key5_ctrl,&key_ctrl_Port
jnz manage_key5_down_back
dec R15
jnz manage_key5_down_lp
bis #key5_already_down,R11
mov #0x5ab4,R13
call #tx_i2c_data_to_sub
jmp manage_key5_down_back
manage_key5_up:
bit #key5_already_down,R11
jz manage_key5_up_back
mov #5000,R15
manage_key5_up_lp:
bit.b #key5_ctrl,&key_ctrl_Port
jz manage_key5_up_back
dec R15
jnz manage_key5_up_lp
bic #key5_already_down,R11
mov #0x5a69,R13
call #tx_i2c_data_to_sub
jmp manage_key5_up_back