⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elsasm.asm

📁 辞典 dict3.asm.grammar.asm,newword.asm 学习 learn.asm 名片 userinf.asm 备忘 userinf.asm 提醒 userinf
💻 ASM
📖 第 1 页 / 共 2 页
字号:
; ***************************************************************************
; *     Project : Electronic Dictionary                                     *
; *        Date : 2003.9                                                    *
; *   File Name : ELSASM.ASM                                                *
; ***************************************************************************

        pw      128
        case    off
        externs on
        include st2202.def      ;; Include ST2100 I/O define.
        include Data.def        ;; Data RAM define.
        include Keydef.def
        include graph.def
        include bios.h
        include graphics.h

; ***************************************************************************
SCORE_POS       EQU     4
; ***************************************************************************

ps6    .section
BankNo          equ     elsasm_bank

    public  Sub_PrintNewImage
    public  sub_score
    public  Sub_Big_in_elsasm
    public  big7_smalltype2
    public  big7_smalltype1
    public  big6_smalltype2
    public  big6_smalltype1
    public  big5_smalltype2
    public  big5_smalltype1
    public  big4_smalltype4
    public  big4_smalltype3
    public  big4_smalltype2
    public  big4_smalltype1
    public  big3_smalltype4
    public  big3_smalltype3
    public  big3_smalltype2
    public  big3_smalltype1
    public  big2_smalltype4
    public  big2_smalltype3
    public  big2_smalltype2
    public  big2_smalltype1
    public  sub_big7
    public  sub_big6
    public  sub_big5
    public  sub_big4
    public  sub_big3
    public  sub_big2
    public  sub_big1
    public  disp_pre

;;InputBuff       equ     300h
GameState       equ     CData+1

Tag             equ 700h
TagBack         equ 400h
which_game      equ 83h
GameStartFlag   equ 84h
Row             equ 85h
Col             equ 86h
InitTypeEnable  equ 87h
TimerEnable     equ 88h
KeyEnable       equ 89h
BigType         equ 8ah
SmallType       equ 8bh
BlockInvertFlag equ 8ch
position1       equ 8dh
position2       equ 8eh
position3       equ 8fh
position4       equ 90h
CenterPos       equ 91h
BPos            equ 92h
DelRow          equ 93h
DelCol          equ 94h
BRow            equ 95h
KillFlag        equ 96h
DeBug           equ 97h
ZjwFlag         equ 98h
KeyDownFlag     equ 99h
EndGameFlag     equ 9ah
Tscore          equ 9bh
Hscore          equ 9ch
Mscore          equ 9dh
Lscore          equ 9eh
Pre             equ 9fh
ScoreFlag       equ 0a0h
ElsSpeed        equ 0a1h
ElsPause        equ 0a2h
ElsSplitFlag    equ 0a3h
ElsLeftContinue equ 0a4h
ElsRightContinue        equ 0a5h
;;ElsChangeContinue      equ 0a6h

disp_pre:
        lda <Row
        pha
        lda #15
        sta <Row
        lda <bigtype
        pha
        lda  <pre
        sta  <bigtype
        jsr Sub_Big_in_elsasm
        jsr sub_Back
        pla
        sta  <bigtype 
        pla
        sta  <row
        rts
Sub_Back:
        ldx #0ffh
        lda <position1
        jsr Sub_Back_Ok
        ldx #0ffh
        lda <position2
        jsr Sub_Back_Ok
        ldx #0ffh
        lda <position3
        jsr Sub_Back_Ok
        ldx #0ffh
        lda <position4
        jsr Sub_Back_Ok       
        Rts

Sub_Back_Ok:
?lopBack:
        sec
        sbc #10
        inx
        bcs ?lopBack
        adc #10
        inc
        sta <ox  
        asl   
        asl
        adc <ox
        adc #4+30+5-30
        sta <ox     
        txa
        sta <oy
        asl
        asl
        adc <oy
        sbc #15
        sta <oy
        LoPrintimage BasicImage
        rts

Sub_PrintNewImage:
        ;;lda <DelRow
        ;;dec
        ;;sta <BRow
        stz <BRow
Print15:
        stz <ZjwFlag
        stz <DelCol
        lda <BRow
        cmp #16
        bne ?loop15
        rts
?loop15:
        lda <BRow
        asl
        sta <Debug
        asl
        asl
        adc <Debug
        adc <DelCol
        tax
        dex
PrintNewIm:
        inx
        inc <DelCol
        lda Tag,x
        cmp TagBack,x
        beq gggg
        sta TagBack,x
        cmp #0
        bne ?jjj
        lda <BRow
        sta <oy
        asl
        asl
        adc <oy
        sta <oy
        lda <DelCol
        sta <ox
        asl
        asl
        adc <ox
        adc #4+50
        sta <ox
        phx
        loclrimage BasicImage
        plx
        jmp gggg
?jjj:

        lda <BRow
        sta <oy
        asl
        asl
        adc <oy
        sta <oy
        lda <DelCol
        sta <ox
        asl
        asl
        adc <ox
        adc #4+50
        sta <ox
        phx
        LoPrintimage BasicImage
        plx
gggg:
        inc <ZjwFlag
        lda <ZjwFlag
        tay
        cpy #10
        beq  ?dsfhdks
        jmp  PrintNewIm
?dsfhdks:
        inc <BRow
        jmp Print15
        rts

Score_show:       
        lda    #ds0bank
        sta    <drr
        lda #20
        sta <oy
        lda #SCORE_POS+24 ;32
        sta <ox 

        lda <Lscore
        ora #30h
        tax
        ldrawchar12       

        lda #SCORE_POS+16 ;24
        sta <ox
        lda <Mscore
        ora #30h
        tax
        ldrawchar12      

        lda #SCORE_POS+8 ;16
        sta <ox 
        lda <Hscore
        ora #30h
        tax
        ldrawchar12

        lda #SCORE_POS ;8
        sta <ox
        lda <Tscore
        ora #30h
        tax
        ldrawchar12

        rts

els_scorenum:
        db  0,1,3,5,8,8,8,8,8,8

Sub_Score:
        clc
        ldx <scoreFlag
        lda els_scorenum,x
        adc <Lscore
        sta <Lscore
        lda <Lscore
        cmp #10
        bcc ?NotLscore10

        lda <Lscore
        sbc #10
        sta <Lscore

        inc <Mscore
        lda <Mscore
        cmp #10
        bne ?NotMscore10

        inc <which_game
        lda <which_game
        cmp #10
        bne ?kkkkk
        dec <which_game
?kkkkk:
        lda #132
        sta <ox
        lda #20
        sta <oy
        ;;ldx <which_game
        lda <which_game
        ora #30h
        tax
        ldrawchar12

        ;;lda <which_game
        ;;asl
        ;;asl
        ;;sta <elsspeed
        ;;asl
        ;;asl
        ;;adc <elsspeed
        ;;sta <elsspeed
        ;;lda #200
        ;;sbc <elsspeed
        ;;tax
        ;;lsettimer
        stz <Mscore
        inc <Hscore
        lda <Hscore
        cmp #10
        bne ?NotHscore10

        stz <Hscore
        inc <Tscore
        lda <Tscore
        cmp #10
        bne ?aaaaaaaaaaaaaaa
        stz <lscore
        stz <mscore
        stz <hscore
        stz <tscore

?aaaaaaaaaaaaaaa:
?NotLscore10:
?NotMscore10:
?NotHscore10:
        jsr Score_show
        rts

Sub_Big_in_elsasm:
        lda  #ds0bank
        sta  <drr
        lda <BigType
        asl
        tax
        lda BigPosition+1,x
        pha
        lda BigPosition,x
        pha  
        Rts

Sub_Big1:
        lda <Row
        dec
        asl
        sta <position1
        asl
        asl
        adc <position1
        adc <Col
        sta <position1          ;;position1 = (Row - 1) * 10 + Col
        inc
        sta <position2          ;;position2 = (Row - 1) * 10 + Col + 1
        adc #10
        sta <position4          ;;position4 = Row * 10 + Col + 1
        dec
        sta <position3          ;;position3 = Row * 10 + Col
        sta <CenterPos
        Rts

Sub_Big2:
        lda <SmallType                  
        asl                            
        tax                             
        lda Big2Position+1,x           
        pha                             
        lda Big2Position,x             
        pha                            
        Rts                            
        
Big2_SmallType1:
        lda <Row
        dec
        asl
        sta <position1
        asl
        asl
        adc <position1
        adc <Col
        sta <position1          ;;position1= (Row - 1) * 10 + Col
        adc #9

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -