(EE97)GET_BYTE 0000FD BRSET 0,PTA,GET_BYTE ;getbyte
EE9A AD32 BSR RCV_BIT_TO_C ;rcv_bit_to_c
EE9C 25F9 BCS GET_BYTE
EE9E A680 LDA #80
EEA0 AD2C BSR RCV_BIT_TO_C ;rcv_bit_to_c
EEA2 46 RORA
EEA3 9D NOP
EEA4 24FA BCC EEA0
EEA6 AD26 BSR RCV_BIT_TO_C ;rcv_bit_to_c
EEA8 24D7 BCC EE81
(EEAA)SEND_BYTE 89 PSHX ;send_byte
EEAB 87 PSHA
EEAC A60A LDA #0A
EEAE 0100FD BRCLR 0,PTA,EEAE
EEB1 AEA9 LDX #0A9
EEB3 5BFE DBNZX EEB3
EEB5 99 SEC
EEB6 2009 BRA EEC1
EEB8 9E6601 ROR 1,SP
EEBB 2404 BCC EEC1
EEBD 1104 BCLR 0,0004
EEBF 2004 BRA EEC5
EEC1 1004 BSET 0,0004
EEC3 2000 BRA EEC5
EEC5 AE4F LDX #4F
EEC7 5BFE DBNZX EEC7
EEC9 4BED DBNZA EEB8
EECB 86 PULA
EECC 88 PULX
EECD 81 RTS
(EECE)RCV_BIT_TO_C 89 PSHX ;rcv_bit_to_c
EECF 87 PSHA
EED0 A610 LDA #10
EED2 AE17 LDX #17
EED4 010000 BRCLR 0,PTA,EED7
EED7 A200 SBC #0
EED9 5BF9 DBNZX EED4
EEDB 49 ROLA
EEDC 86 PULA
EEDD 88 PULX
EEDE 81 RTS
;中断向量表
EEDF FF STX ,X
EEE0 FF STX ,X
EEE1 FF STX ,X
EEE2 FF STX ,X
EEE3 FF STX ,X
EEE4 FF STX ,X
EEE5 FF STX ,X
EEE6 FF STX ,X
EEE7 FF STX ,X
EEE8 FF STX ,X
EEE9 FF STX ,X
EEEA FF STX ,X
EEEB FF STX ,X
EEEC FF STX ,X
EEED FF STX ,X
EEEE FF STX ,X
EEEF FF STX ,X
EEF0 FF STX ,X
EEF1 FF STX ,X
EEF2 FF STX ,X
EEF3 FF STX ,X
EEF4 FF STX ,X
EEF5 FF STX ,X
EEF6 FF STX ,X
EEF7 FF STX ,X
EEF8 9D NOP
EEF9 9D NOP
EEFA 9D NOP
EEFB 04
EEFC FE28 DW FE28 ;SWI
EEFE FF DW FF00 ;ENTRY
EEFF 00
;监控模式的入口地址
ENTRY:
ef00 2F17 BIH EF19
EF02 3F36 CLR 0036 ;pll
EF04 1036 BSET 0,0036
EF06 1038 BSET 0,0038
EF08 A62C LDA #2C
EF0A B739 STA 0039
EF0C A680 LDA #80
EF0E B73A STA 003A
EF10 1A36 BSET 5,0036
EF12 1E37 BSET 7,0037
EF14 0D37FD BRCLR 6,0037,EF14
EF17 1836 BSET 4,0036
EF19 A7FA AIS #-6
EF1B 1100 BCLR 0,PTA TA0 = 0
EF1D 6EFF40 MOV #0FF,40 ;变量40=0xff
EF20 45FFF6 LDHX #0FFF6 ;密码开始地址
EF23 0E0002 BRSET 7,PTA,EF28 ;
EF26 1F40 BCLR 7,0040
EF28 51FE1A CBEQX #0FE,EF45
EF2B B600 LDA PTA
EF2D 0E4003 BRSET 7,0040,EF33
EF30 CDFE97 JSR GET_BYTE
EF33 9D NOP
EF34 71F2 CBEQ X+,EF28
EF36 51FE12 CBEQX #0FE,EF4B
EF39 B600 LDA PTA
EF3B 0E4003 BRSET 7,0040,EF41
EF3E CDFE97 JSR GET_BYTE
EF41 AF01 AIX #1
EF43 20F1 BRA EF36
EF45 AEFF LDX #0FF ;密码正确入口
EF47 9C RSP ;40.6=1
EF48 CCFE20 JMP FE20
EF4B 1D40 BCLR 6,0040 ;密码错误入口
EF4D AEFF LDX #0FF ;40.6=0
EF4F 9C RSP
EF50 CCFE21 JMP FE21 |