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

📄 auto_con.asm

📁 VCP201_CODE is a FPGA source code.
💻 ASM
字号:
;----------------------
; 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_mask,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_mask,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
 
;-------------------------------
; set_auto_mask:
; copy the pb_auto bit to mask
;-------------------------------
set_auto_mask:
	movf	pb_auto0,W
	movwf	pb_auto0_mask
	movf	pb_auto1,W
	movwf	pb_auto1_mask
	
	return

;---------------------------
; for Aracde mode only (AUTO)
;
;--------------------------
arcade_auto:
	clrf	pb_auto0
        clrf	pb_auto1

	bcf	f_autled2
        bcf	f_autled1

	btfss	p1d,6	;L3=H/L. L for no auto
	goto	auto_exit1

	btfss	p1d,3	;R3?
        goto	full_auto
	
check_auto_push_switch:
	btfsc	p1d,5
	goto	auto_exit1

full_auto:
	bsf	f_autled2
        bsf	f_autled1

	movlw	0x3f
        movwf 	pb_auto1
        movlw	0xff
        movwf	pb_auto0

auto_exit1:
	movf	pb_auto0,W
	movwf	pb_auto0_mask
	movf	pb_auto1,W
	movwf	pb_auto1_mask

	return


	

⌨️ 快捷键说明

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