|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
DISPLY: ;jBC BZ2,7,DISP
;RET
DISP: ;ORB BZ2,#80H
LDBZE AX,BZ
SHL AX,#2
ADD AX,#DSTART
BR [AX]
NOP
NOP
NOP
NOP
DSP1: LDB AH,#16
LD CX,#DS0
LD DX,#FDS0
DSP2: LDBZE BX,[CX]+
LDB AL,DDSEG[BX]
STB AL,[DX]+
DJNZ AH,DSP2
NOP
NOP
DEND: RET
nop
nop
nop
nop
RST
;...........................................................
DDSEG: DB 0C0H,0F9H,0A4H,0B0H ;0 1 2 3 DB
DB 099H,092H,082H,0F8H ;4 5 6 7 DB
DB 080H,090H,088H,0A8H ;8 9 A b DB
DB 0F0H,05EH,079H,071H ;C d E F DB
DB 03DH,036H,00EH,038H ;G H J L DB
DB 054H,05CH,073H,067H ;n o P q DB
DB 070H,01cH,078H,03EH ;r u t U DB
DB 06EH,058H,075H,0FFH ;y c h DB
DB 040H,079H,024H,030H ;0.1.2.3. DB
DB 019H,012H, 02H,078H ;4.5.6.7. DB
DB 00H,010H,040H,0BFH;8.9.- . - DB
NOP
RST
;------------------------------------------------------
DSTART: LJMP DP00
NOP
LJMP DP01 ;IMAX
NOP
LJMP DP02 ;IMIN
NOP
LJMP DP03 ;WMAX
NOP
LJMP DP04 ;WMIN
NOP
LJMP DP05 ;IDP0 BJ
NOP
LJMP DP06 ;WDP0 BJ
NOP
LJMP DP07 ;IDP0 WDP0 BJ
NOP
LJMP DEND ;08
NOP
LJMP DEND ;09
NOP
LJMP DEND ;0A
NOP
LJMP DEND ;0B
NOP
LJMP DEND ;0C
NOP
LJMP DEND ;0D
NOP
LJMP DEND ;0E
NOP
LJMP DEND ;0F
NOP
LJMP DEND
NOP
RET
;---------------------------------------------
DP01: NOP ;U ,W,COD UNDISPLY
LCALL D06
LCALL D08
LCALL D09
LCALL D013 ;IMAX DISPLY
LJMP DSP1
;---------------------------------------------
DP02: NOP ;U ,W,COD UNDISPLY
LCALL D06
LCALL D08
LCALL D09
LCALL D014 ;IMIN DISPLY
NOP
LJMP DSP1
;---------------------------------------------
DP03: LCALL D06
LCALL D07
LCALL D09
LCALL D015 ;WMAX DISPLY
LJMP DSP1
;---------------------------------------------
DP04: LCALL D06
LCALL D07
LCALL D09
LCALL D016 ;WMIN DISPLY
LJMP DSP1
;--------------------------------------------
DP00: LCALL D11 ;UDP0 DISPLY
LCALL D12 ;IDP0 DISPLY
LCALL D13 ;WDP0 DISPLY
LCALL D14 ;COS@ DISPLY
LJMP DSP1
;--------------------------------------------
DP05: LCALL D11 ;IDP0 NO
LCALL D13
LCALL D14
JBS XHJS1,1,DP050
LCALL D07
LJMP DSP1
DP050: LCALL D12
LJMP DSP1
;--------------------------------------------
DP06: LCALL D11 ;WDP0 NO
LCALL D12
LCALL D14
JBS XHJS1,1,DP060
LCALL D08
LJMP DSP1
DP060: LCALL D13
LJMP DSP1
;--------------------------------------------
DP07: LCALL D11 ;IDP0,WDP0 NO
LCALL D14
JBS XHJS1,1,DP070
LCALL D07
LCALL D13
LJMP DSP1
DP070: LCALL D12
LCALL D08
LJMP DSP1
;--------------------------------------------
D06: LDB DS0,#31 ;U window is dark
LDB DS1,#31
LDB DS2,#31
LDB DS3,#31
RET
;--------------------------------------------
D07: LDB DS4,#31 ;I window is dark
LDB DS5,#31
LDB DS6,#31
LDB DS7,#31
RET
;--------------------------------------------
D08: LDB DS8,#31 ;W window is dark
LDB DS9,#31
LDB DS0A,#31
LDB DS0B,#31
RET
;--------------------------------------------
D09: LDB DS0C,#31 ;COSD window is dark
LDB DS0D,#31
LDB DS0E,#31
LDB DS0F,#31
RET
;--------------------------------------------
D013: LD CX,IMAX
DSBCD1: CMP CX,#2000
JNC DSBCD0
LD DX,#00H
DIVU CX,#10
LCALL BCD
LDB DS4,CL
ADDB CH,#32
LDB DS5,CH
LDB DS6,DL
LDB DS7,DH
RET
DSBCD0: LCALL BCD
ADDB CL,#32
LDB DS4,CL
LDB DS5,CH
LDB DS6,DL
LDB DS7,DH
RET
;-------------------------------------
D014: LD CX,IMIN
SJMP DSBCD1
RET
;--------------------------------------
D015: LD CX,WMAX
DSBCD2: CMP CX,#2000
JNC DSBCD3
LD DX,#00H
DIVU CX,#10
LCALL BCD
DSBCD4: LDB DS8,CL
LDB DS9,CH
LDB DS0A,DL
LDB DS0B,DH
RET
DSBCD3: LCALL BCD
ADDB DL,#32
SJMP DSBCD4
;--------------------------------------
D016: LD CX,WMIN
LCALL DSBCD2
RET
;---------------------------------------------
D11: CMP UDP0,#30050 ;0AF1H
JLT D110
ORB BZ3,#20H
JBS XHJS1,1,D111
LDB DS0,#42
LDB DS1,#42
LDB DS2,#42
LDB DS3,#42
RET
D111: LDB DS0,#31
LDB DS1,#31
LDB DS2,#31
LDB DS3,#31
RET
D110: LD CX,UDP0
CMP CX,#10000
JNC D110_0
CLR DX
DIVU CX,#10
LCALL BCD
ADDB DL,#20H
SJMP D110_1
D110_0: LCALL BCD
ADDB CH,#20H
D110_1: LDB DS0,CL
LDB DS1,CH
LDB DS2,DL
LDB DS3,DH
CMPB DS0,R0
JNE D112
LDB DS0,#31
CMPB DS1,R0 ;5FH
JNE D112
LDB DS1,#31 ;00H
D112: RET
;------------------------------------------------
D12: LD CX,IDP0
LCALL BCD
LDB DS4,CL
LDB DS5,CH
LDB DS6,DL
LDB DS7,DH
JBC BZ2,6,D120 ; I>2A
ADDB DS5,#32
CMPB DS4,R0 ;00.00
JNE D125
LDB DS4,#31
D125: CMP IDP0,#2000 ;07D1H
JH D122
RET
D122: ORB BZ3,#20H
JBS XHJS1,0,D123
LD DS4,#2026H
LD DS6,#2020H
RET
D123: LDB DS4,#31
LDB DS5,#31
LDB DS6,#31
LDB DS7,#31
RET
D120: ADDB DS4,#20H ;0.00
CMP IDP0,#2000
JNH D121
LDB DS4,#31
LDB DS5,CL
ADDB DS5,#32
LDB DS6,CH
LDB DS7,DL
D121: RET
;------------------------------------------------
D13: LD CX,WDP0
CLR DX
CMP CX,#10000
JNC D13_0
DIVU CX,#10
LCALL BCD
SJMP DS13_1
D13_0: LCALL BCD
ADDB DL,#20H
DS13_1: CMPB CL,#0
JNE D132
LDB CL,#31
CMPB CH,R0L
JNE D132
LDB CH,#31
D132: LDB DS8,CL
LDB DS9,CH
LDB DS0A,DL
LDB DS0B,DH
RET
;------------------------------------------------
D14: JBS FLJD,0,D15
CMP COSD,#03E8H
JNC D141
LD COSD,#03E8H
D141: LD CX,COSD
LCALL BCD
D143: ADDB CL,#32 ;dian " . "
D144: LDB DS0C,CL
LDB DS0D,CH
LDB DS0E,DL
LDB DS0F,DH
RET
;------------------------------------------------
D15: LD CX,FDP0
LCALL BCD
ADDB DL,#20H
D150: CMPB CL,R0L
JNE DS151
LDB CL,#31
DS151: CMPB CH,R0L
JNE DS152
LDB CH,#31
DS152: SJMP D144
RET
;------------------------------------------------
BCD: CLR DX ;
DIVU CX,#1000 ;/1000 ,
DIVUB DX,#100 ;/100 ,
LDB CH,DL
LDBZE DX,DH
DIVUB DX,#10 ;1000 100 10 1
RET ;[Cl] [Ch] [Dl] [Dh]
KEY: LD CX,MKEY0
KEY00: CMP CX,#0FFFFH
JE KEY03
CMPB CL,#0FFH
JNE KEY02
SHLB CH,#4
ANDB CH,CL
ORB CH,#00001111B
LDB AH,CH
LDB AL,#0FFH
SJMP KEY1
KEY02: LDB AL,CL
LDB AH,#0FFH
SJMP KEY1
KEY03: LD AX,CX
KEY1: CMP AX,#0FFFFH
JNE KEYYES
LJMP KEYNO
;.........................................................
KEYYES: NOT AX
CLRB CL
LDB CH,#12
SJMP KEY004
KEY003: INCB CL
KEY004: SHR AX,#1
JC KEY005
DJNZ CH,KEY003
SJMP KEYEND
KEY005: CMPB CL,#2
JE KEYI
CMPB CL,#6
JE KEYI
JBC BZ3,7,KEY006
CMPB CL,#5
JE KEYI
CMPB CL,#1
JE KEYI
CMP WK0,R0
JE KEY006
CMP WK0,#DALAYS
JNH KEYEND
LD WK0,#DALAYS
LJMP KEYEND
KEY006: LD WK0,#DALAYS
LDB KEYCARD0,CL
LJMP KEYEND
;............................................
KEYI: CMPB CL,KEYCARD0 ;ID KEY
JNE KEYINO
CMP WK0,R0
JNE KEYEND
LD WK0,#DALAYM
LCALL KEYID ;ID KEY ZHI XING
LJMP KEYEND
KEYINO: CMP WK0,R0
JNE KEYEND
LDB KEYCARD0,CL
LD WK0,#DALAYL
LCALL KEYID ;FIRST ID KEY ZHI XIN
LJMP KEYEND
;..........................................................
KEYNO: CMPB KEYCARD0,#2 ;NO KEY
JE KEY011
CMPB KEYCARD0,#6
JE KEY011
JBC BZ3,7,KEY020
CMPB KEYCARD0,#5
JE KEY011
CMPB KEYCARD0,#1
JNE KEY020
KEY011: LDB KEYCARD0,#0FFH
LD WK0,#DALAYS
SJMP KEYEND
KEY020: NOP
CMP WK0,R0
JNE KEYEND
LD WK0,#DALAYS
LCALL KEYCG ; CG KEY ZHI XING
LDB KEYCARD0,#0FFH
KEYEND: RET
NOP
NOP
NOP
RST
;...............................................
KEYCG: |
|