📄 macro.asm
字号:
;==================================================================================
; The information contained herein is the exclusive property of
; Sunplus Technology Co. And shall not be distributed, reproduced,
; or disclosed in whole in part without prior written permission.
; (C) COPYRIGHT 2004 SUNPLUS TECHNOLOGY CO.
; ALL RIGHTS RESERVED
; The entire notice above must be reproduced on all authorized copies.
;==================================================================================
;==================================================================================
; Program Name : macro.asm
; Description : The program define some MACRO.
; Reference : SPMC65P2404A/2408A Data Sheet
; Revision history :
;----------------------------------------------------------------------------------
; Version Date Description
; 1.0.0 2004-9-11 First Edition
;===================================================================================
;.SYNTAX 6502 ;process standard 6502 addressing syntax
;.LINKLIST ;generate linklist information
;.SYMBOLS ;generate symbolic debug information
;**********************************************************************************
;.PAGE0
;.DATA ;define data storage section
;**********************************************************************************
.CODE
;************************************************************************************
;* *
;* Macro Area *
;* *
;************************************************************************************
;==============================================
; bit clear
;==============================================
M_BitClr: .macro arg1,arg2
lda #1<<arg2
eor #$FF
and arg1
sta arg1
.endm
;==============================================
; bit set
;==============================================
M_BitSet: .macro arg1,arg2
lda #1<<arg2
ora arg1
sta arg1
.endm
;==============================================
; bit inverse
;==============================================
M_BitInv: .macro arg1,arg2
lda #1<<arg2
eor arg1
sta arg1
.endm
;==============================================
; bit test
;==============================================
M_Bittst: .macro arg1,arg2
lda #1<<arg2
and arg1
.endm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -