怎么可能 MOVE.W 24 位值?

Cha*_*son 1 assembly 68000

我正在学习汇编并使用教程来指导我完成学习过程。在这种情况下,我正在学习Motorola 68000,在Sega Genesis上用VASM编译进行一些编程。

采取以下片段:

VDP_ctrl EQU $C00004   ;VDP control, word or longword writes only
MOVE.W (VDP_ctrl),D5   ;$C00004 read VDP status (interupt acknowledge)?
Run Code Online (Sandbox Code Playgroud)

了解这MOVE.W意味着将 16 位 WORD 值存入寄存器(D5在本例中),并且$C00004是 24 位十六进制值,这怎么可能?这可以在 Sega 模拟器 Fusion 上编译并运行。

有关完整上下文,本教程位于https://www.chibiakumas.com/68000/helloworld.php#LessonH1

预订跟随:https://www.amazon.com/gp/product/B08W7DWZB3

Tho*_*ger 5

这里没有操作 24 位数据。24位就是地址。指令

MOVE.W (VDP_ctrl),D5
Run Code Online (Sandbox Code Playgroud)

正在地址 处的字VDP_ctrl和寄存器之间移动数据D5

请注意括号。在汇编中,这些通常用于指示间接级别。类似地,(A0)表示正在访问 中保存的地址处的数据A0,而不是A0其本身的内容:

MOVEA.L D0, A0      ; Copies the contents of D0 into A0 (most assemblers accept MOVE.L)
MOVE.L  D0, (A0)    ; Copies the contents of D0 into the longword at address A0
Run Code Online (Sandbox Code Playgroud)