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

📄 graphics.asm

📁 辞典 dict3.asm.grammar.asm,newword.asm 学习 learn.asm 名片 userinf.asm 备忘 userinf.asm 提醒 userinf
💻 ASM
📖 第 1 页 / 共 3 页
字号:
        dw      Screen18Update-1   ;;新加显示模式
        dw      Screen19Update-1   ;;新加显示模式
        dw      Screen20Update-1   ;;新加显示模式
        dw      Screen21Update-1   ;;新加显示模式
        dw      Screen22Update-1   ;;新加显示模式
;;-----------------------------------------------------
;;       Screen mode #0
;;       Graphics mode.
;;       English & Chinese mode.
;;-----------------------------------------------------
Screen0Update:
        bra     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #1
;;       Text mode : 14(Char.) X 3(Line)
;;       English & Chinese mode.
;;       Row   height
;;        0      16      中、英、数。
;;        1      16      中、英、数。
;;        2      16      中、英、数。
;;        4      16      中、英、数。
;;        5      16      中、英、数。
;;-----------------------------------------------------
Screen14Update:
Screen2Update:
Screen1Update:
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        cpx     #textbuffer_num/2
        bcc     Screen1Update   ;; No !

EndScrUpdate:
        jsr     update_all_icon
        pla
        sta     <DRRh
        pla
        sta     <DRR
        pla
        sta     <OY
        pla
        sta     <OX

        jsr     update_draw_line
        jsr     update_all_icon
UpDate_quit:
        rmb7    <SysOpt
        rts

;;-----------------------------------------------------
Screen3Update:
        jsr     UpDate16        ;; Update one line for height 16.(English & Chinese).
s3u1:
        jsr     UpDate8         ;; Update one line for height 8.(English ).
        cpx     #textbuffer_num-20
        bcc     s3u1
        jmp     EndScrUpdate

Screen11update:
s11u1:
        jsr     UpDate8         ;; Update one line for height 8.(English ).
        cpx     #textbuffer_num ;; End of text buffor ?
        bcc     s11u1
        jmp     EndScrUpdate
;;-----------------------------------------------------
;;       Screen mode #4
;;       Text mode : 14(Char.) X 4(Line)
;;       English mode only.
;;
;;       Row   height
;;        0      8       英。
;;        1      8  (Phonetic)   音标。
;;        2      16      中、英、数。
;;        3      16      中、英、数。
;;-----------------------------------------------------
Screen4Update:
        jsr     UpDate8
        jsr     UpDate8Phonetic
        jsr     UpDate16
        jsr     UpDate16
        jsr     UpDate16
        jsr     UpDate16
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Text mode : 14(Char.) X 5(Line)
;;       English mode only.
;;
;;       Row   height
;;        0      8       英。
;;        1      8  (Phonetic)   音标。
;;        2      8  (Phonetic)   音标。
;;        3      8               英。
;;        4      16              中、英、数。
;;-----------------------------------------------------
Screen5Update:
        jsr     UpDate8
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8
        jsr     UpDate16
        jsr     UpDate16
        jsr     UpDate16
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #5
;;       Text mode : 14(Char.) X 5(Line)
;;       English mode only.
;;
;;       Row   height
;;        0      8       英。
;;        1      8  (Phonetic)   音标。
;;        2      8  (Phonetic)   音标。
;;        3      8               英。
;;        4      16              中、英、数。
;-----------------------------------------------------
Screen9Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #5
;;       Text mode : 14(Char.) X 5(Line)
;;       English mode only.
;;
;;       Row   height
;;        0      8       英。
;;        1      8  (Phonetic)   音标。
;;        2      8  (Phonetic)   音标。
;;        3      8               英。
;;        4      16              中、英、数。
;-----------------------------------------------------
Screen10Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #6
;;       Text mode : 14(Char.) X 4(Line)
;;
;;       Row   height
;;        0      16      中、英、数。
;;        1      8       英、数。
;;        2      8       英、数。
;;        4      16      中、英、数。
;;-----------------------------------------------------
Screen6Update:
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #7
;;       Text mode : 14(Char.) X 4(Line)
;;
;;       Row   height
;;        0      8       英、数。
;;        1      8       英、数。
;;        2      16      中、英、数。
;;        3      16      中、英、数。
;;-----------------------------------------------------
Screen7Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #8
;;       Text mode : 14(Char.) X 4(Line)
;;
;;       Row   height
;;        0      8       英、数。
;;        1      8       英、数。
;;        2      8       音标。
;;        3      16      中、英、数。
;;        4      8       英、数。
;;-----------------------------------------------------
Screen8Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #8
;;       Text mode : 14(Char.) X 4(Line)
;;
;;       Row   height
;;        0      8       英、数。
;;        1      8       英、数。
;;        2      8       音标。
;;        3      16      中、英、数。
;;        4      8       英、数。
;;-----------------------------------------------------
Screen12Update:
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16Phonetic ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jmp     EndScrUpdate

;;-----------------------------------------------------
;;       Screen mode #8
;;       Text mode : 14(Char.) X 4(Line)
;;
;;       Row   height
;;        0      8       英、数。
;;        1      8       英、数。
;;        2      8       音标。
;;        3      16      中、英、数。
;;        4      8       英、数。
;;-----------------------------------------------------
Screen13Update:
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16Phonetic ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jmp     EndScrUpdate

;;       Update one line for height 8.(DJ phonetic only.)
;;==========================================================================
Screen15Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16         ; Update one line for height 8.(English ).
        jmp     EndScrUpdate
;;==========================================================================
Screen16Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16         ; Update one line for height 8.(English ).
        jmp     EndScrUpdate
;;==========================================================================
Screen17Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16         ; Update one line for height 8.(English ).
        jmp     EndScrUpdate
;;==========================================================================
Screen18Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16         ; Update one line for height 8.(English ).
        jmp     EndScrUpdate
;;==========================================================================
Screen19Update:
        jsr     UpDate8         ; Update one line for height 8.(English ).
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate8Phonetic ; Update one line for height 8.(Phonetic)
        jsr     UpDate16        ; Update one line for height 16.(English & Chinese).
        jsr     UpDate16         ; Update one line for height 8.(English ).
        jsr     UpDate16         ; Update one line for height 8.(English ).
        jmp     EndScrUpdate
;;==========================================================================
Screen20Update:   ;;只用于测试字库
        jsr     UpDate16
        jsr     UpDate8
        jsr     UpDate8
        jsr     UpDate8
        jsr     UpDate8
        jsr     UpDate8
        jsr     UpDate8
        jsr     UpDate8
        jsr     UpDate8
        jmp     EndScrUpdate
;;==========================================================================
Screen21Update:   ;;只用于测试字库
        jsr     UpDate16
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jsr     UpDate8Phonetic
        jmp     EndScrUpdate
Screen22Update:   ;;只用于测试字库
        jsr     UpDate16
        jsr     UpDate16Phonetic
        jsr     UpDate16Phonetic
        jsr     UpDate16Phonetic
        jsr     UpDate16Phonetic
        jmp     EndScrUpdate
;;==========================================================================
UpDate16Phonetic:
        lda     #20-1
?_loop:
        pha
        phx

        lda     TextBuffor,x
        cmp     #20h+1
        bcs     ?1
        tax
        jsr     DrawChar16
        bra     ?2
?1:
        sec
;;      sbc     #3fh  ;;3fh = -5ah+1bh
;;      tax
        jsr     Draw8x16Phonetic  ;; Draw out a (X,Y) 8X8 font block.
?2:
        jsr     next_coordinate

        plx                     ;; Columm counter.
        inx
        pla
        dec
        bpl     ?_loop
        rts

Draw8x16Phonetic_test:
        jsr     Draw8x16Phonetic
        jmp     next_coordinate

UpDate16:
        phx
        lda     TextBuffor,x
        cmp     #0a1h
        bcs     ud16c
        tax
        jsr     DrawFont        ;; Draw out a (X,Y)font block.

ud166:  plx                     ;; Columm counter.
ud167:  inx
        txa
        ldy     #9
ud162:
        cmp     trowtab,y
        beq     ud161
        dey
        bpl     ud162
        bra     update16

ud161:
        rts

ud16c:
        pha                     ;; Store high byte of font code.
        lda     TextBuffor+1,x ;; Nonequal ! update low byte of font code.
ud16c6: tay                     ;; Set low byte of font code.
        plx                     ;; Get high byte of font code.

        jsr     DrawFont        ;; Draw English (or Chinese) font.

ud16c7  plx
        inx
        bra     ud167

UpDate8:
ud81:   phx
        lda     TextBuffor,x
        tax
        jsr     DrawFont8       ;; Draw out a (X,Y) 8X8 font block.
        bra     ud86

ud85:   ldx     #8              ;; OX += 8 , if OX >= 112 then OY+=1 , OX=0.
        ldy     #8
        jsr     DrawNxLoc

ud86:   plx                     ; Columm counter.
        inx
        txa
        ldy     #10
ud862:
        cmp     trowtab,y
        beq     ud861
        dey
        bpl     ud862
        bra     ud81
ud861:
        rts

UpDate8Phonetic:
ud8p1:  phx
        lda     TextBuffor,x
        tax
        jsr     DrawFont8Phonetic  ;; Draw out a (X,Y) 8X8 font block.

ud8p6:  plx                     ;; Columm counter.
        inx
        txa
        ldy     #9
ud8p6_0:
        cmp     trowtab,y
        beq     ud8p6_1
        dey
        bpl     ud8p6_0
        bra     ud8p1
ud8p6_1:
        rts

A2FontAddr:
        cpx     #0a1h
        bcs     A2CFontAddr
        phx

        lda     #>FontBank       ;; Select english font bank.
        sta     <DRRh
        lda     #<FontBank       ;; Select english font bank.
        sta     <DRR
        lda     <screenmode
        cmp     #2
        bne     ?not_cal_font
        ldx     #>ASC816Fontd
        ldy     #<ASC816Fontd
        bra     A2FontA_xx
?not_cal_font:
        cmp     #14
        bne     ?not_alarm_font
?_YingBiao:
        ldx     #>ASC816Font
        ldy     #<ASC816Font
        bra     A2FontA_xx
?not_alarm_font:
        cpx     #80h
        bcs     ?_YingBiao
        ldx     #>ASC816Font_yh
        ldy     #<ASC816Font_yh

A2FontA_xx:
        pla
A2FontA:
        stx     <INSH
        sty     <INSL

        stz     <INDH

        asl
        rol     <INDH
        asl
        rol     <INDH
        asl
        rol     <INDH
        asl
        rol     <INDH
        adc     <INSL
        tay
        lda     <INDH
        adc     <INSH
        tax
        rts

;;--------------------------------------------------------------
;; Chinese font address = (chinese code and 1fffh) * 30 or 8000h
;;--------------------------------------------------------------
A2CFontAddr:
        cpx     #0aeh
        bcs     ?1111
        bra     ?2222_next_rom
?1111:
        tya
        sec
        sbc     #0a1h
        tay

        txa
        sec

⌨️ 快捷键说明

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