📄 yiyi.asm
字号:
; ***************************************************************************
; * Project : Electronic Dictionary *
; * Date : 2003.9 *
; * File Name : YIYI.ASM *
; ***************************************************************************
pw 128
case off
externs on
include st2202.def ;; Include ST2100 I/O define.
include Data.def ;; Data RAM define.
include DataBank.def ;; Data Bank define.
include KeyDef.def ;; Key code define.
include Bios.h
include Graphics.h
include Graph.def
public ReadOldContrast
public ContrastWriteToFlash_0
PS3 .SECTION
BankNo equ yiyiBank
ReadOldContrast:
lda <DRRh
pha
lda <DRR
pha
stz <drrh
lda #FlashBank
sta <DRR
lda 8002h
cmp #0ffh
bne ?1
lda #default_contrast
?1:
sta <Contrast
pla
sta <DRR
pla
sta <DRRh
rts
ContrastWriteToFlash_0:
lda #0b0h
sta <INDH
stz <INDL
jsr LJSR
dw BiosBank
dw SectorErase-1
lda #80h
sta <INSH
stz <INSL
?1:
lda (<INS)
tax
WriteByte_X
inc <INSL
bne ?1
inc <INSH
lda <INSH
cmp #90h
bcc ?1
lda #80h
sta <INDH
stz <INDL
jsr LJSR
dw BiosBank
dw SectorErase-1
ldx #55h
WriteByte_X
ldx #0aah
WriteByte_X
ldx <Contrast
WriteByte_X
lda #0b0h
sta <INSH
lda #3
sta <INSL
?2:
lda (<INS)
tax
WriteByte_X
inc <INSL
bne ?2
inc <INSH
lda <INSH
cmp #0c0h
bcc ?2
rts
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -