【BA4988】_72B6函式
反彙編:
UINT8 _72B6() { buff_point = 0x0400 X = 0 while (1) { Y = 0 A = 0 while (Y < 0xC0) { *buff_point = A Y += 1 } X += 1 if (X < 0x10) { A = 0xC0 A = buff_point buff_point = A } else { break } } buff_point = 0x1000 return *buff_point }
彙編:
72B6 [A9 00 85]: LDA #$00 @ 送累加器
72B8 [85 2F A9]: STA $2F = #$00 @ 存累加器
72BA [A9 04 85]: LDA #$04 @ 送累加器
72BC [85 30 A2]: STA $30 = #$04 @ 存累加器
72BE [A2 00 A0]: LDX #$00 @ 送變址暫存器X
72C0 [A0 00 A9]: LDY #$00 @ 送變址暫存器Y
72C2 [A9 00 C0]: LDA #$00 @ 送累加器
72C4 [C0 C0 B0]: CPY #$C0 @ 變址暫存器Y與儲存器比較
72C6 [B0 06 91]: BCS $72CE @ 進位為“1”分支
72C8 [91 2F C8]: STA ($2F),Y @ $0400 = #$00 @ 存累加器
72CA [C8 4C C4]: INY @ 變址暫存器Y加1
72CB [4C C4 72]: JMP $72C4 @ 轉移
72CE [E8 E0 10]: INX @ 變址暫存器X加1
72CF [E0 10 B0]: CPX #$10 @ 變址暫存器X與儲存暫存器比較
72D1 [B0 10 A9]: BCS $72E3 @ 進位為“1”分支
72D3 [A9 C0 18]: LDA #$C0 @ 送累加器
72D5 [18 65 2F]: CLC @ 清進位標誌
72D6 [65 2F 85]: ADC $2F = #$C8 @ 送累加器
72D8 [85 2F A9]: STA $2F = #$88 @ 存累加器
72DA [A9 00 65]: LDA #$00 @ 送累加器
72DC [65 30 85]: ADC $30 = #$17 @ 送累加器
72DE [85 30 4C]: STA $30 = #$17 @ 存累加器
72E0 [4C C0 72]: JMP $72C0 @ 轉移
72E3 [A9 00 85]: LDA #$00 @ 送累加器
72E5 [85 2F A9]: STA $2F = #$00 @ 存累加器
72E7 [A9 10 85]: LDA #$10 @ 送累加器
72E9 [85 30 A0]: STA $30 = #$10 @ 存累加器
72EB [A0 00 A9]: LDY #$00 @ 送變址暫存器Y
72ED [A9 00 91]: LDA #$00 @ 送累加器
72EF [91 2F 60]: STA ($2F),Y @ $1000 = #$00 @ 存累加器
72F1 [60 AD 18]: RTS @ 子程式返回