Java教程

【BA4988】PI_ISR_routine函数

本文主要是介绍【BA4988】PI_ISR_routine函数,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

反汇编:

PI_ISR_routine()
{
    tmp1 = buff_point
    _ISR = 0x7F
    AutoPowerOffCount=AutoPowerOffValue
    if (_201B&0x04)
    {
        _AUDCON|=0xC0
        _TIER|=0x20
        _201B|=0x01
        _MTCT=0xFE
    }
    if (!(_KEYCODE&0x80))
    {
        tmp2 = _KEYCODE&0x3F
        _KEYCODE = 0x00
        if ((KeyBuffTop+0x01)&0x0F != KeyBuffBottom)
        {
            buff_point = &KeyBuffer
            Y = KeyBuffTop
            buff_point[Y]=tmp2
            KeyBuffTop+=1
            KeyBuffTop&=0x0F
            _2021|=0x01
        }
    }
    buff_point=tmp1
}

汇编:

[00E9E64D]764D [A5 2F 48]: LDA $2F = #$C8 @ 送累加器
[00E9E64F]764F [48 A5 30]: PHA @ 累加器压入堆栈
[00E9E650]7650 [A5 30 48]: LDA $30 = #$17 @ 送累加器
[00E9E652]7652 [48 A9 7F]: PHA @ 累加器压入堆栈
[00E9E653]7653 [A9 7F 85]: LDA #$7F @ 送累加器
[00E9E655]7655 [85 04 AD]: STA $04 = #$7F @ 存累加器
[00E9E657]7657 [AD 27 20]: LDA $2027 = #$04 @ 送累加器
[00E9E65A]765A [8D 28 20]: STA $2028 = #$04 @ 存累加器
[00E9E65D]765D [AD 1B 20]: LDA $201B = #$04 @ 送累加器
[00E9E660]7660 [29 04 F0]: AND #$04 @ 逻辑与
[00E9E662]7662 [F0 1D AD]: BEQ $7681 @ 结果为0分支
[00E9E664]7664 [AD 3F 02]: LDA $023F = #$C0 @ 送累加器
[00E9E667]7667 [09 C0 8D]: ORA #$C0 @ 逻辑或
[00E9E669]7669 [8D 3F 02]: STA $023F = #$C0 @ 存累加器
[00E9E66C]766C [AD 3B 02]: LDA $023B = #$21 @ 送累加器
[00E9E66F]766F [09 20 8D]: ORA #$20 @ 逻辑或
[00E9E671]7671 [8D 3B 02]: STA $023B = #$21 @ 存累加器
[00E9E674]7674 [AD 1B 20]: LDA $201B = #$04 @ 送累加器
[00E9E677]7677 [09 01 8D]: ORA #$01 @ 逻辑或
[00E9E679]7679 [8D 1B 20]: STA $201B = #$05 @ 存累加器
[00E9E67C]767C [A9 FE 8D]: LDA #$FE @ 送累加器
[00E9E67E]767E [8D 2B 02]: STA $022B = #$FE @ 存累加器
[00E9E681]7681 [AD 4E 02]: LDA $024E = #$0B @ 送累加器
[00E9E684]7684 [29 80 10]: AND #$80 @ 逻辑与
[00E9E686]7686 [10 3D AD]: BPL $76C5 @ 结果为正分支
[00E9E688]7688 [AD 4E 02]: LDA $024E = #$0B @ 送累加器
[00E9E68B]768B [29 3F 48]: AND #$3F @ 逻辑与
[00E9E68D]768D [48 A9 00]: PHA @ 累加器压入堆栈
[00E9E68E]768E [A9 00 8D]: LDA #$00 @ 送累加器
[00E9E690]7690 [8D 4E 02]: STA $024E = #$00 @ 存累加器
[00E9E693]7693 [AD 03 20]: LDA $2003 = #$0C @ 送累加器
[00E9E696]7696 [18 69 01]: CLC @ 清进位标志
[00E9E697]7697 [69 01 29]: ADC #$01 @ 带进位加
[00E9E699]7699 [29 0F CD]: AND #$0F @ 逻辑与
[00E9E69B]769B [CD 04 20]: CMP $2004 = #$0C @ 累加器与存储器比较
[00E9E69E]769E [F0 24 A9]: BEQ $76C4 @ 结果为0分支
[00E9E6A0]76A0 [A9 08 85]: LDA #$08 @ 送累加器
[00E9E6A2]76A2 [85 2F A9]: STA $2F = #$08 @ 存累加器
[00E9E6A4]76A4 [A9 20 85]: LDA #$20 @ 送累加器
[00E9E6A6]76A6 [85 30 AC]: STA $30 = #$20 @ 存累加器
[00E9E6A8]76A8 [AC 03 20]: LDY $2003 = #$0C @ 送变址寄存器Y
[00E9E6AB]76AB [68 91 2F]: PLA @ 堆栈弹回累加器
[00E9E6AC]76AC [91 2F EE]: STA ($2F),Y @ $2014 = #$0B @ 存累加器
[00E9E6AE]76AE [EE 03 20]: INC $2003 = #$0D @ 存储器加1
[00E9E6B1]76B1 [AD 03 20]: LDA $2003 = #$0D @ 送累加器
[00E9E6B4]76B4 [29 0F 8D]: AND #$0F @ 逻辑与
[00E9E6B6]76B6 [8D 03 20]: STA $2003 = #$0D @ 存累加器
[00E9E6B9]76B9 [AD 21 20]: LDA $2021 = #$07 @ 送累加器
[00E9E6BC]76BC [09 01 8D]: ORA #$01 @ 逻辑或
[00E9E6BE]76BE [8D 21 20]: STA $2021 = #$07 @ 存累加器
[00E9E6C1]76C1 [4C C5 76]: JMP $76C5 @ 转移$00E9E6C5
[00E9E6C4]76C4 [68 68 85]: PLA @ 堆栈弹回累加器
[00E9E6C5]76C5 [68 85 30]: PLA @ 堆栈弹回累加器
[00E9E6C6]76C6 [85 30 68]: STA $30 = #$17 @ 存累加器
[00E9E6C8]76C8 [68 85 2F]: PLA @ 堆栈弹回累加器
[00E9E6C9]76C9 [85 2F 60]: STA $2F = #$C8 @ 存累加器
[00E9E6CB]76CB [60 AD 04]: RTS @ 子程序返回
这篇关于【BA4988】PI_ISR_routine函数的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!