Menu
Coddy logo textTech

data.asm の作成

CoddyのAssemblyジャーニー「基礎」セクションの一部。レッスン 44/45。

challenge icon

チャレンジ

プログラムが Hello, World! followed by a newline を出力するための data.asm ファイルを作成します。
必要なもの:

  1. A .data section
  2. label msg を持ち、Hello, World! と newline (0x0a) を含む string
  3. msgLen called の constant that calculates the length automatically using $ - msg

これを別のファイルに入れる理由:

Chapter 0 の2ファイルパターンを思い出してください:

  • data.asm はすべての data definitions を保持します
  • main.asm%include "data.asm" を使ってこのファイルを include します(これは次のレッスンで扱います

自分で試してみよう

基礎のすべてのレッスン

自分で練習してみよう: Assemblyプレイグラウンド