macros.inc

来自「这是使用CYPRESS的7C637xx芯片完成USB鼠标的例子。」· INC 代码 · 共 46 行

INC
46
字号

;========================================================================
;   FILE: macros.inc 
;
;   contains useful macro definitions
;
;========================================================================

    ;clear carry
    MACRO CLEARC
    or    A,0
    ENDM

    ;set carry
    MACRO SETC
    cpl   A
    cpl   A
    ENDM




    ;delay macro is the front-end for a call to the delay subroutine
    ;The fixed overhead of the macro plus the subroutine is 3 us,
    ;so this technique is good for delays of 4us or greater.
    ;

    MACRO DELAY US
    push    A
    mov     A,(US-3)
    call    delay
    ENDM

;*****
; CLRC
;	Clears C bit
;*****
MACRO CLRC
	add	A,0	;Clear C-bit
			;*** END MACRO CLRC
ENDM




⌨️ 快捷键说明

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