Menu
Coddy logo textTech

Writing data.asm

Part of the Fundamentals section of Coddy's Assembly journey — lesson 44 of 45.

challenge icon

Challenge

Create a data.asm file for a program that prints Hello, World! followed by a newline.
You need:

  1. A .data section
  2. A string with label msg containing Hello, World! and a newline (0x0a)
  3. A constant called msgLen that calculates the length automatically using $ - msg

Why this goes in a separate file:

Remember the two-file pattern from Chapter 0:

  • data.asm holds all data definitions
  • main.asm will include this file with %include "data.asm"

Try it yourself

All lessons in Fundamentals