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

📄 updatesc.asm

📁 辞典 dict3.asm.grammar.asm,newword.asm 学习 learn.asm 名片 userinf.asm 备忘 userinf.asm 提醒 userinf
💻 ASM
📖 第 1 页 / 共 4 页
字号:
        asl     <INDL
        rol     <INDH

        asl     <INDL
        rol     <INDH

        asl     <INDL
        rol     <INDH
        asl     <INDL
        rol     <INDH
        rol     <DRR
        rol     <DRRh

        asl     <INDL
        rol     <INDH
        rol     <DRR
        rol     <DRRh

        ldy     <INDL
        lda     <INDH
        ora     #80h
        tax
        asl     <INDH
        rol     <DRR
        rol     <DRRh
        clc
        lda     #<CFontBank
        adc     <DRR
        sta     <DRR
        lda     <DRRh
        adc     #>CFontBank
        sta     <DRRh
        rts

;;=========================================
?2222_next_rom:
        cpx     #0a2h
        bne     ?dfffffdffd
        cpy     #0fdh
        bne     ?dfffffdffd
        lda     #>ds0bank
        sta     <drrh
        lda     #<ds0bank
        sta     <drrl
        ldx     #>font_a2_fd
        ldy     #<font_a2_fd
        rts
?dfffffdffd:
        tya
        sec
        sbc     #0a1h
        tay

        txa
        sec
        sbc     #0a1h  ;;#0b0h
        sta     <INSL
        stz     <INSH

        stz     <INDL
        stz     <INDH

        ldx     #0
?2Multi_94:
        clc
        lda     <INSL
        adc     <INDL
        sta     <INDL
        lda     <INDH
        adc     #0
        sta     <INDH
        inx
        cpx     #94
        bne     ?2Multi_94

        clc
        tya
        adc     <INDL
        sta     <INDL
        lda     <INDH
        adc     #0
        sta     <INDH

        stz     <DRR
        stz     <drrh
        asl     <INDL
        rol     <INDH

        asl     <INDL
        rol     <INDH

        asl     <INDL
        rol     <INDH
        asl     <INDL
        rol     <INDH
        rol     <DRR
        rol     <DRRh

        asl     <INDL
        rol     <INDH
        rol     <DRR
        rol     <DRRh

        ldy     <INDL
        lda     <INDH
        ora     #80h
        tax
        asl     <INDH
        rol     <DRR
        rol     <DRRh
        clc
        lda     #<CFontBank2
        adc     <DRR
        sta     <DRR
        lda     <DRRh
        adc     #>CFontBank2
        sta     <DRRh
        rts

shift_r_image_dot_bug:
        lsr     <image_dot
        bcc     ?_1
        ror     <image_dot
        jsr     add_image_addr_bug
?_1:
        rts

add_image_addr_bug:
        inc     <image_addr
        bne     ?fsdafdsf
        inc     <image_addr+1
?fsdafdsf:
        rts

; ***************************************************************************
next_line_WX:
        stz     <ox
        lda     #16
        clc
        adc     <oy
        sta     <oy
        rts

; ***************************************************************************
        public  DrawText_WX
DrawText_WX:
        lda     <ox
        pha
        lda     <oy
        pha
        lda     <drr
        pha
        lda     <drrh
        pha
        stx     <StrInxH
        sty     <StrInxL
        ldy     #0
?drtx2:
        lda     (<StrInx),y
        beq     ?drtxe
        cmp     #0dh
        bne     ?dfdsfds
        jsr     next_line_WX
        bra     ?drtx7_bug
?dfdsfds:
        tax
        bpl     ?drtx5

        iny
        phy

        lda     (<StrInx),y
        tay
        bra     ?drtx6

?drtx5:
        phy
?drtx6:
        jsr     DrawChar_WX
        ply
?drtx7_bug:
        iny
        bra     ?drtx2
?drtxe:
        pla
        sta     <drrh
        pla
        sta     <drr
        pla
        sta     <oy
        pla
        sta     <ox
        rts

; ***************************************************************************
        PUBLIC  DrawChar_WX
DrawChar_WX:
        lda     <DRR
        pha
        lda     <DRRh
        pha

        jsr     DrawFont0_bug       ;; Draw out Font(Chinese or english).
drwche:
        pla
        sta     <DRRh
        pla
        sta     <DRR
        rts

; ***************************************************************************
print_block_at_anywhere_16:
        lda     #1
        sta     <image_dot
        lda     <oy
        sta     <lcd_oy
?_1:
        lda     <ox
        sta     <lcd_ox

        lda     #8
        sta     <image_width_temp
?_20:
        LDY     #1
        lda     (<image_addr),Y
        and     <image_dot
        beq     ?_30
        jsr     speed_PrintDot_bug
        bra     ?_40
?_30:
        jsr     speed_ClrDot_bug
?_40:
        jsr     shift_l_image_dot
        inc     <lcd_ox
        dec     <image_width_temp
        bne     ?_20

        lda     #8
        sta     <image_width_temp
?_21:
        lda     (<image_addr)
        and     <image_dot
        beq     ?_31
        jsr     speed_PrintDot_bug
        bra     ?_41
?_31:
        jsr     speed_ClrDot_bug
?_41:
        jsr     shift_l_image_dot
        inc     <lcd_ox
        dec     <image_width_temp
        bne     ?_21

        jsr     add_image_addr_bug
        jsr     add_image_addr_bug

        inc     <lcd_oy
        dec     <image_hight_temp
        bne     ?_1
?skip_write_any_data:
        rts

; ***************************************************************************
shift_l_image_dot:
        asl     <image_dot
        bcc     ?_1
        rol     <image_dot
?_1:
        rts

; ***************************************************************************
print_block_at_anywhere_8:
        lda     #1
        sta     <image_dot
        lda     <oy
        sta     <lcd_oy
?_1:
        lda     <ox
        sta     <lcd_ox

        lda     #8
        sta     <image_width_temp
?_21:
        lda     (<image_addr)
        and     <image_dot
        beq     ?_31
        jsr     speed_PrintDot_bug
        bra     ?_41
?_31:
        jsr     speed_ClrDot_bug
?_41:
        jsr     shift_l_image_dot
        inc     <lcd_ox
        dec     <image_width_temp
        bne     ?_21

        jsr     add_image_addr_bug

        inc     <lcd_oy
        dec     <image_hight_temp
        bne     ?_1
?skip_write_any_data:
        rts

; ***************************************************************************
;        PUBLIC  _BLOCK_INVERT
;_BLOCK_INVERT:
;        CLC
;        LDA     <OX
;        ADC     <image_width
;        CMP     #160
;        BCC     ?BLOCK_INVERT0
;        DEC     <image_width
;?BLOCK_INVERT0:
;        JSR     LJSR
;        DW      graphics_bank
;        DW      new_blockinvert-1
;        RTS

;;==========================================
        PUBLIC  _BLOCK_INVERT
_BLOCK_INVERT:
        lda     <image_hight_temp
        pha
        lda     <oy
        sta     <lcd_oy
new_speed_inv_x:
        lda     <image_width
        sta     <image_width_temp    ;;取出宽度
        lda     <ox
        sta     <lcd_ox
new_speed_inv_loop:
        lda     <lcd_ox
        and     #07h
        sta     <image_dot
        sec
        lda     #9
        sbc     <image_dot
        sta     <image_point

        lda     <image_width_temp
        cmp     <image_point
        bcc     ?get_less_width_to_inv
        lda     <image_point
        dec
?get_less_width_to_inv:
        sta     <image_point
        lda     <image_dot
        asl
        asl
        asl
        adc     <image_dot
        adc     <image_point
        tay
        jsr     invert_cnt_lcd_address

        sec
        lda     <image_width_temp
        sbc     <image_point
        sta     <image_width_temp
        clc
        lda     <lcd_ox
        adc     <image_point
        sta     <lcd_ox
        lda     (<image_addrl)
        eor     inv_in_position_0_bug,y
        sta     (<image_addrl)
        lda     <image_width_temp
        bne     new_speed_inv_loop
        inc     <lcd_oy
        dec     <image_hight_temp
        bne     new_speed_inv_x
        pla
        sta     <image_hight_temp
        rts

; ***************************************************************************
invert_cnt_lcd_address:
        lda     <lcd_oy
        asl
        tax

        lda     <lcd_ox
        lsr
        lsr
        lsr
        sta     <image_addrl

        lda     y_col_address_tab_5x10_bug,x
        sec
        sbc	<image_addrl
        sta     <image_addrl

        lda     y_col_address_tab_5x10_bug+1,x
        sbc	#0
        sta     <image_addrh
        rts

; ***************************************************************************
speed_clrlcdimage_bug:
        lda     #>DS0Bank
        sta     <DRRh
        lda     #<DS0Bank
        sta     <DRR
jgame_clrlcdimage:
        lda     (<image_addr)
        sta     <image_width
        jsr     add_image_addr_bug
        lda     (<image_addr)
        sta     <image_hight_temp    ;;取出高度
        jsr     add_image_addr_bug
clr_block_at_anywhere:
        lda     #10000000b
        sta     <image_dot
        lda     <oy
        sta     <lcd_oy
?_1:
        lda     <ox
        sta     <lcd_ox
        lda     <image_width
        sta     <image_width_temp
?_2:
        jsr     speed_ClrDot_bug
?_4:
        jsr     shift_r_image_dot_bug
        inc     <lcd_ox
        dec     <image_width_temp
        bne     ?_2
        inc     <lcd_oy
        dec     <image_hight_temp
        bne     ?_1
        rts

; ***************************************************************************
DrawNumS_bug:
        lda     <DRR
        pha
        lda     <DRRh
        pha
        lda     #>DS0Bank
        sta     <DRRh
        lda     #DS0Bank
        sta     <DRR
        cpx     #10
        bcs     ?3
        lda     #>FONT0S
        sta     <Image_Addrh
        lda     #<FONT0S
        sta     <Image_Addrl
?1:
        dex
        bmi     ?2
        clc
        lda     #7
        adc     <Image_Addrl
        sta     <Image_Addrl
        lda     #0
        adc     <Image_Addrh
        sta     <Image_Addrh
        bra     ?1
?2:
        jsr     jgame_printimagetolcd_bug
?3:
        pla
        sta     <DRRh
        pla
        sta     <DRR
        rts

; ***************************************************************************
        END
; ***************************************************************************

⌨️ 快捷键说明

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