23.10.2014 Views

RealView - ARM Information Center

RealView - ARM Information Center

RealView - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

命 令 参 考<br />

7.3.6 DCD 和 DCDU<br />

DCD 命 令 分 配 一 个 或 多 个 字 的 存 储 器 , 在 四 个 字 节 的 边 界 上 对 齐 , 并 定 义 存 储 器<br />

的 运 行 时 初 值 。<br />

& 是 DCD 的 一 个 同 义 词 。<br />

DCDU 是 相 同 的 , 只 是 存 储 器 对 齐 是 任 意 的 。<br />

语 法<br />

{label} DCD{U} expr{,expr}<br />

其 中 :<br />

expr 可 以 是 :<br />

• 一 个 数 值 表 达 式 ( 请 参 阅 第 3-20 页 的 数 字 表 达 式 )。<br />

• 一 个 相 对 程 序 的 表 达 式 。<br />

用 法<br />

必 要 时 ,DCD 在 定 义 的 第 一 个 字 前 最 多 插 入 三 个 填 充 字 节 , 以 实 现 四 字 节 的 对<br />

齐 。<br />

如 果 不 需 要 对 齐 , 则 可 使 用 DCDU。<br />

另 请 参 阅 :<br />

• 第 7-18 页 的 DCB ;<br />

• 第 7-25 页 的 DCW 和 DCWU ;<br />

• 第 7-24 页 的 DCQ 和 DCQU ;<br />

• 第 7-17 页 的 SPACE。<br />

示 例<br />

data1 DCD 1,5,20 ; Defines 3 words containing<br />

; decimal values 1, 5, and 20<br />

data2 DCD mem06 + 4 ; Defines 1 word containing 4 +<br />

; the address of the label mem06<br />

AREA MyData, DATA, READWRITE<br />

DCB 255 ; Now misaligned ...<br />

data3 DCDU 1,5,20 ; Defines 3 words containing<br />

; 1, 5 and 20, not word aligned<br />

<strong>ARM</strong> DUI 0204BSC © 2002、 2003 <strong>ARM</strong> Limited 版 权 所 有 。 保 留 所 有 权 利 。 7-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!