📄 handy.mac
字号:
; ------------
; Handy macros
; ------------
LDREG MACRO ad,val ; Load accum with external memory value
mov a,val ; Example usage: LDREG EP4BCL,#80h
mov dptr,#ad
movx @dptr,a
ENDM
;
RDREG MACRO ad ; Read ext memory value into accum
mov dptr,#ad
movx a,@dptr
ENDM
;
JBH MACRO ad,b,des ; jump on bit high
mov dptr,#ad ; Example usage: JBH Regname,BitNum,Address
movx a,@dptr
jb acc.b,des
ENDM
JBL MACRO ad,b,des ; jump on bit low
mov dptr,#ad
movx a,@dptr
jnb acc.b,des
ENDM
;
L1_ON MACRO
mov dptr,#0B000h
movx a,@dptr
ENDM
L2_ON MACRO
mov dptr,#0A000h
movx a,@dptr
ENDM
L3_ON MACRO
mov dptr,#09000h
movx a,@dptr
ENDM
L4_ON MACRO
mov dptr,#08000h
movx a,@dptr
ENDM
L1_OFF MACRO
mov dptr,#0B100h
movx a,@dptr
ENDM
L2_OFF MACRO
mov dptr,#0A100h
movx a,@dptr
ENDM
L3_OFF MACRO
mov dptr,#09100h
movx a,@dptr
ENDM
L4_OFF MACRO
mov dptr,#08100h
movx a,@dptr
ENDM
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -