Motorola 68k:String ASCII 如何存储在地址寄存器 a0 中

Mortorola 68k : How String ASCII is stored in address register a0

我对 68k 中的汇编编程还很陌生。我正在使用 Easy68k。

我有一个程序:

    ORG    00
START:                

* Put program code here

    lea MSG,a1      ; loads MSG into address register a1
    move.b #14,d0   ; 14 gets coverted to hex E
    trap #15

    move.b #9,d1    ; 9 decimal gets converted t hex 9
    SIMHALT             ; halt simulator

* Put variables and constants here

MSG dc.b    'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout',0 

    END    START        ; last line of source

据我所知,地址寄存器a1可以存放长字长项。但是你看到字符串

"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout"

将其转换为 ASCII 格式,您将看到每个单词的十六进制如何超过长字长度。

那么这个字符串是如何存储的呢?我想了解程序集是如何存储字符串并将其显示到屏幕上的。

有人可以解释一下吗?

评论"loads MSG into address register a1"有点误导。您加载到 a1 的内容不是 MSG 的内容;您正在加载 MSG 的地址。标签(例如 MSG)只是程序中某个位置的名称,可以方便地引用该位置。

该地址具有适合寄存器的固定大小,并且与存储在该地址的数据无关。