auto_con.asm

来自「VCP201_CODE is a FPGA source code.」· 汇编 代码 · 共 79 行

ASM
79
字号
;-----------------------------------
; auto_control:
;-----------------------------------
auto_control:

        bcf     f_autled1

	btfss	auto_dis_sw
	goto	auto_disable
	btfss	auto_en_sw
	goto	auto_enable
	btfss	auto_bit
        goto    auto_enable

auto_disable:
	goto	auto_control_end
	

auto_enable:
        bsf     f_autled1
        movlw	0xff
        movwf	pb_auto0
        movlw	0x0f
        movwf	pb_auto1

auto_control_end:
        return


;----------------------
; auto_chk_dir:
;----------------------
auto_chk_dir:
	movlw	d'8'
	movwf	temp_buf2
	movlw	b'1111110'
	movwf	temp_buf3

	incf	temp_buf1,F

auto_chk_dir_lp1:
	decfsz	temp_buf1,F
	goto	not_dir_val1

	movf	temp_buf3,W
	andwf	pb_auto0,F
	goto	auto_chk_done

not_dir_val1:
	bsf	STATUS,C
	rlf	temp_buf3,F
	decfsz	temp_buf2,F
	goto	auto_chk_dir_lp1



	movlw	d'4'
	movwf	temp_buf2
	movlw	b'1111110'
	movwf	temp_buf3

auto_chk_dir_lp2:
	decfsz	temp_buf1,F
	goto	not_dir_val2

	movf	temp_buf3,W
	andwf	pb_auto1,F
	goto	auto_chk_done

not_dir_val2:
	bsf	STATUS,C
	rlf	temp_buf3,F
	decfsz	temp_buf2,F
	goto	auto_chk_dir_lp2
	
auto_chk_done:
        return
                

⌨️ 快捷键说明

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