Input ,而不是硬件-寻找宏汇编程序。其中许多步骤比C的预处理器高出一两步,因此您可能最终要编写与以下步骤相同的步骤序列: MACRO nextBit source destination { lda source ; Read next bit from controller. lsr ; Move bit to carry. ror destination ; Roll bit from carry to top of local state. } ENDMACRO ; Get controllers to reload their shift registers. lda #1 sta $4016 lda #0 sta $4016 ; Copy shift registers to local memory. FOR n, 0, 8 nextBit $4016 controller1State nextBit $4017 controller2State NEXT

Input ,而不是硬件-寻找宏汇编程序。其中许多步骤比C的预处理器高出一两步,因此您可能最终要编写与以下步骤相同的步骤序列: MACRO nextBit source destination { lda source ; Read next bit from controller. lsr ; Move bit to carry. ror destination ; Roll bit from carry to top of local state. } ENDMACRO ; Get controllers to reload their shift registers. lda #1 sta $4016 lda #0 sta $4016 ; Copy shift registers to local memory. FOR n, 0, 8 nextBit $4016 controller1State nextBit $4017 controller2State NEXT,input,6502,nes,Input,6502,Nes,这是BBC Micro的特定实际汇编程序使用的宏语法,几乎可以肯定不是汇编程序使用的宏语法,因为几乎没有标准化。但是NES将有一个很好的宏编译器,宏编译器的工作是允许您在不复制和粘贴的情况下拼写出重复的部分。我不知道NES,但您提供的nesdev链接看起来是最佳的,并且对于理解6502汇编的人(例如我)来说,这是非常清楚的。您可能需要用您不了解的特定部分更新您的问题。我不知道NES,但您提供的nesdev链接看起来是最佳的,并且很清楚它对了解6502组装的人(例如我)的作用。你可能需要用你不理解

这是BBC Micro的特定实际汇编程序使用的宏语法,几乎可以肯定不是汇编程序使用的宏语法,因为几乎没有标准化。但是NES将有一个很好的宏编译器,宏编译器的工作是允许您在不复制和粘贴的情况下拼写出重复的部分。

我不知道NES,但您提供的nesdev链接看起来是最佳的,并且对于理解6502汇编的人(例如我)来说,这是非常清楚的。您可能需要用您不了解的特定部分更新您的问题。我不知道NES,但您提供的nesdev链接看起来是最佳的,并且很清楚它对了解6502组装的人(例如我)的作用。你可能需要用你不理解的部分更新你的问题。非常感谢!这有助于我理解(以类似C的方式)一些我不清楚的事情。非常感谢!这有助于我理解(以类似C的方式)一些我不清楚的事情。
MACRO nextBit source destination {
    lda source        ; Read next bit from controller.
    lsr               ; Move bit to carry.
    ror destination   ; Roll bit from carry to top of local state.
} ENDMACRO

; Get controllers to reload their shift registers.
lda #1
sta $4016
lda #0
sta $4016

; Copy shift registers to local memory.
FOR n, 0, 8
    nextBit $4016 controller1State
    nextBit $4017 controller2State
NEXT