📄 dicadd.asm
字号:
sta <OX
?_onlyOneline:
LBlockinvert
jsr CharToYmode5
dey
jsr mode5R
rts
;;==================================
;;function:模式15 16 17
;;input:<blackflag <OX OY InvertW GuaiwanSTOX GuanWanSTLen
;;output:
;;==================================
mode15secondR:
lda #16
sta <InvertH
rmb0 <blackflag
bbr7 <Blackflag,?_onlyOneline
rmb7 <Blackflag
lda <OX
pha
lda <OY
pha
lda <InvertW
pha
lda GuaiwanSTOX
sta <OX
lda GuanWanSTLen
sta <InvertW
sec
lda <OY
sbc #16
sta <OY
LBlockinvert
pla
sta <InvertW
pla
sta <OY
pla
sta <OX
?_onlyOneline:
LBlockinvert
jsr CharToYmode15
dey
jsr mode15R
rts
;;======================================
;;function:保存多选时开始的textbuffor的偏移
;;input:GuaiWanSTOX <OX <OY bbr7 <Blackflag
;;output:DuoXuanstartY
;;======================================
Save_duoxuanStartY:
lda <OX ;02-10-29 12:07
pha
lda <OY
pha
bbs1 <BlackFlag,?_exit
bbr7 <Blackflag,?_InOneLine
lda GuaiWanSTOX
sta <OX
sec
lda <OY
sbc #16
sta <OY
?_InOneLine:
lda <Screenmode
dec
beq ?_mode1
lda <Screenmode
CMP #14
beq ?_mode1
bbs4 <Newflag,?_mode5
bbs5 <Newflag,?_mode15
jsr OXOYTOYmode4
bra ?_0
?_mode5:
jsr OXOYTOYmode5
bra ?_0
?_mode15:
jsr OXOYTOYmode15
bra ?_0
?_mode1:
jsr OXOYTOYmode1
?_0:
sty DuoXuanstartY
?_exit:
pla
sta <OY
pla
sta <OX
rts
;;=====================================
;;function:模式4连选Right Key
;;input:
;;output:
;;=====================================
mode4DuoXuanR:
jsr Save_duoxuanStartY
jsr CharToYmode4
dey
lda textbuffor,y
cmp #HanZiwei
bcs ?_hanzi
iny
lda textbuffor,y
cmp #HanZiQu
bcc ?_continue
rts
?_continue:
jsr judgeaz
beq ?_IlllegalChar
dey
jsr mode4R
smb1 <Blackflag
rts
?_IlllegalChar:
lda textbuffor,y ;连续三个空看作结束
cmp #' '
bne ?_NotKongge
iny
cpy #120
bcs ?_exit
lda textbuffor,y
cmp #' '
bne ?_checkNextKong
iny
cpy #120
bcs ?_exit
lda textbuffor,y
cmp #' '
beq ?_exit
dey
?_checkNextKong:
dey
?_NotKongge:
tya
tax
jsr XToOXOYmode4
iny
jsr YToCharmode4
;sec
;lda <CharL
;sbc <OX
;sta <InvertW
lda #8
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
?_hanzi:
iny
cpy #120
bcs ?_exit
lda textbuffor,y
cmp #PurityHanZiQu
bcs ?_continue1
cmp #' '
beq ?_CheckHanZiKong
?_exit:
rts
?_CheckHanZiKong:
iny
lda textbuffor,y
cmp #PurityHanZiQu
bcc ?_exit
phy
dey
tya
tax
jsr XToOXOYmode4
LBlockinvert 7,16
ply
tya
tax
iny
jsr XToOXOYmode4
iny
jsr YToCharmode4
lda #16
sta <InvertW
jsr blockinvert1
smb1 <Blackflag
rts
?_continue1:
cmp #LiQu ;到‘例’时停止
beq ?_exit
tya
tax
iny
jsr XToOXOYmode4
iny
jsr YToCharmode4
lda #16
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
;;=====================================
;;function:模式1连选Right Key
;;input:
;;output:
;;=====================================
mode1DuoXuanR:
jsr Save_duoxuanStartY
jsr CharToYmode1
dey
rmb0 <INSL
lda textbuffor,y
cmp #HanZiwei
bcs ?_hanzi
smb0 <INSL
iny
lda textbuffor,y
cmp #HanZiQu
bcc ?_continue
rts
?_continue:
jsr judgeaz
beq ?_IlllegalChar
dey
jsr mode1R
smb1 <Blackflag
rts
?_IlllegalChar:
lda textbuffor,y ;连续三个空看作结束
cmp #' '
bne ?_NotKongge
iny
cpy #100
bcs ?_exit
lda textbuffor,y
cmp #' '
bne ?_continuenext
?_dealKongLoop:
iny
cpy #100
bcs ?_exit
lda textbuffor,y
cmp #' '
beq ?_dealKongLoop
cmp #HanziQu
bcc ?_continue
bra ?_exit
?_continuenext:
dey
?_NotKongge:
tya
tax
jsr XToOXOYmode1
iny
jsr YToCharmode1
;sec
;lda <CharL
;sbc <OX
;sta <InvertW
lda #8
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
?_hanzi:
iny
cpy #100
bcs ?_exit
lda textbuffor,y
cmp #PurityHanZiQu
bcs ?_continue1
cmp #' '
beq ?_CheckHanZiKong
?_exit:
rts
?_CheckHanZiKong:
iny
lda textbuffor,y
cmp #PurityHanZiQu
bcc ?_exit
phy
dey
tya
tax
jsr XToOXOYmode1
LBlockinvert 7,16
ply
tya
tax
iny
jsr XToOXOYmode1
iny
jsr YToCharmode1
lda #16
sta <InvertW
jsr blockinvert1
smb1 <Blackflag
rts
?_continue1:
cmp #LiQu ;到‘例’时停止
beq ?_exit
tya
tax
iny
jsr XToOXOYmode1
iny
jsr YToCharmode1
lda #16
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
;;=====================================
;;function:模式5连选Right Key
;;input:
;;output:
;;=====================================
mode5DuoXuanR:
jsr Save_duoxuanStartY
jsr CharToYmode5
dey
lda textbuffor,y
cmp #HanZiwei
bcs ?_hanzi
iny
lda textbuffor,y
cmp #HanZiQu
bcc ?_continue
rts
?_continue:
jsr judgeaz
beq ?_IlllegalChar
dey
jsr mode5R
smb1 <Blackflag
rts
?_IlllegalChar:
lda textbuffor,y ;连续三个空看作结束
cmp #' '
bne ?_NotKongge
iny
cpy #140
bcs ?_exit
lda textbuffor,y
cmp #' '
bne ?_checkNextKong
iny
cpy #140
bcs ?_exit
lda textbuffor,y
cmp #' '
beq ?_exit
dey
?_checkNextKong:
dey
?_NotKongge:
tya
tax
jsr XToOXOYmode5
iny
jsr YToCharmode5
;sec
;lda <CharL
;sbc <OX
;sta <InvertW
lda #8
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
?_hanzi:
iny
cpy #140
bcs ?_exit
lda textbuffor,y
cmp #PurityHanZiQu
bcs ?_continue1
cmp #' '
beq ?_CheckHanZiKong
?_exit:
rts
?_CheckHanZiKong:
iny
lda textbuffor,y
cmp #PurityHanZiQu
bcc ?_exit
phy
dey
tya
tax
jsr XToOXOYmode5
LBlockinvert 7,16
ply
tya
tax
iny
jsr XToOXOYmode5
iny
jsr YToCharmode5
lda #16
sta <InvertW
jsr blockinvert1
smb1 <Blackflag
rts
?_continue1:
cmp #LiQu ;到‘例’时停止
beq ?_exit
tya
tax
iny
jsr XToOXOYmode5
iny
jsr YToCharmode5
lda #16
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
;;=====================================
;;function:模式15连选Right Key
;;input:
;;output:
;;=====================================
mode15DuoXuanR:
jsr Save_duoxuanStartY
jsr CharToYmode15
dey
lda textbuffor,y
cmp #HanZiwei
bcs ?_hanzi
iny
lda textbuffor,y
cmp #HanZiQu
bcc ?_continue
rts
?_continue:
jsr judgeaz
beq ?_IlllegalChar
dey
jsr mode15R
smb1 <Blackflag
rts
?_IlllegalChar:
lda textbuffor,y ;连续三个空看作结束
cmp #' '
bne ?_NotKongge
iny
cpy #160
bcs ?_exit
lda textbuffor,y
cmp #' '
bne ?_checkNextKong
iny
cpy #160
bcs ?_exit
lda textbuffor,y
cmp #' '
beq ?_exit
dey
?_checkNextKong:
dey
?_NotKongge:
tya
tax
jsr XToOXOYmode15
iny
jsr YToCharmode15
;sec
;lda <CharL
;sbc <OX
;sta <InvertW
lda #8
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
?_hanzi:
iny
cpy #160
bcs ?_exit
lda textbuffor,y
cmp #PurityHanZiQu
bcs ?_continue1
cmp #' '
beq ?_CheckHanZiKong
?_exit:
rts
?_CheckHanZiKong:
iny
lda textbuffor,y
cmp #PurityHanZiQu
bcc ?_exit
phy
dey
tya
tax
jsr XToOXOYmode15
LBlockinvert 7,16
ply
tya
tax
iny
jsr XToOXOYmode15
iny
jsr YToCharmode15
lda #16
sta <InvertW
jsr blockinvert1
smb1 <Blackflag
rts
?_continue1:
cmp #LiQu ;到‘例’时停止
beq ?_exit
tya
tax
iny
jsr XToOXOYmode15
iny
jsr YToCharmode15
lda #16
sta <InvertW
jsr blockinvert1
smb1 <blackflag
rts
;;=========================================
;;function:有<Char计算textbuffor的偏移Y
;;input:<INS
;;output:X:开始 Y:结束
;;==========================================
CharToYmode4:
lda <CharL
lsr
lsr
lsr
tax
lda <CharH
lsr
lsr
lsr
lsr
inc
asl
asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;=========================================
;;function:有<Char计算textbuffor的偏移Y
;;input:<INS
;;output:X:开始 Y:结束
;;==========================================
CharToYmode1:
lda <CharL
lsr
lsr
lsr
tax
lda <CharH
lsr
lsr
;lsr
;lsr
;asl
;asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;=========================================
;;function:有<Char计算textbuffor的偏移Y
;;input:<INS
;;output: Y:结束
;;==========================================
CharToYmode5:
lda <CharL
lsr
lsr
lsr
tax
lda <CharH
lsr
lsr
lsr
lsr
inc
inc
asl
asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;=========================================
;;function:有<Char计算textbuffor的偏移Y
;;input:<INS
;;output: Y:结束
;;==========================================
CharToYmode15:
lda <CharL
lsr
lsr
lsr
tax
lda <CharH
lsr
lsr
lsr
lsr
inc
inc
inc
asl
asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;============================
;;function:模式4<OX --->x <OY--->Y INY
;;input:<OX <OY
;;output:X Y
;;============================
OXOYToYmode4:
lda <OX
lsr
lsr
lsr
tax
lda <OY
lsr
lsr
lsr
lsr
inc
asl
asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;============================
;;function:模式1<OX --->x <OY--->Y INY
;;input:<OX <OY
;;output:X Y
;;============================
OXOYToYmode1:
lda <OX
lsr
lsr
lsr
tax
lda <OY
lsr
lsr
;lsr
;lsr
;asl
;asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;============================
;;function:模式5 9 10<OX --->x <OY--->Y INY
;;input:<OX <OY
;;output:X Y
;;============================
OXOYToYmode5:
lda <OX
lsr
lsr
lsr
tax
lda <OY
lsr
lsr
lsr
lsr
inc
inc
asl
asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;============================
;;function:模式15 16 17<OX --->x <OY--->Y INY
;;input:<OX <OY
;;output:X Y
;;============================
OXOYToYmode15:
lda <OX
lsr
lsr
lsr
tax
lda <OY
lsr
lsr
lsr
lsr
inc
inc
inc
asl
asl
sta tmpcount
asl
asl
clc
adc tmpcount
stx tmpcount
clc
adc tmpcount
tay
rts
;;====================================
;;function:有<OX OY <InvertW 反显
;;input:
;;output:
;;====================================
blockinvert1:
lda #16
sta <InvertH
clc
lda <OY
adc <InvertW
cmp #159
bcc ?_0
dec <InvertW
?_0:
LBlockinvert
smb0 <blackflag
rts
;;======================================
;;function:模式4的textbuffor 偏移X计算<OX OY
;;input:X
;;output:<OX <OY
;;======================================
XToOXOYmode4:
phy
txa
ldx #0ffh
?_loop:
tay
inx
sec
sbc #20
bpl ?_loop
txa
dec
asl
asl
asl
asl
sta <OY
tya
asl
asl
asl
sta <OX
ply
rts
;;======================================
;;function:模式1的textbuffor 偏移X计算<OX OY
;;input:X
;;output:<OX <OY
;;======================================
XToOXOYmode1:
phy
txa
ldx #0ffh
?_loop:
tay
inx
sec
sbc #20
bpl ?_loop
txa
asl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -