Recap: Write Setup
Part of the Fundamentals section of Coddy's Assembly journey — lesson 42 of 45.
Challenge
Write a complete program that prints:
<code>Start
<code>Middle
End
Each word on its own line. Use three separate strings and three write syscalls.
The exit syscall must be included.
Try it yourself
section .data
; TODO: Define three strings with newlines
; TODO: Define their lengths
section .text
global _start
_start:
; TODO: Print the lines listed in the instructions, one per TODO, in order
; TODO: Print the lines listed in the instructions, one per TODO, in order
; TODO: Print the exact text from the instructions
; TODO: Exit cleanlyAll lessons in Fundamentals
1The Machine
What is CPUMemoryRegisters vs MemoryHow instructions workTwo-File PatternThe x86-64 Architecture3First instruction - MOV
What is MOV?MOV ImmediateMOV Register to RegisterMOV Memory to RegisterMOV Register to MemoryLEA - Load AddressMOV with Different SizesPractice: Swap RegistersRecap: MOV Challenge6Write Syscall
Write Syscall (1)File Descriptor (rdi)Buffer Address (rsi)Byte Count (rdx)Putting It TogetherPrinting Two StringsNewline MattersRecap: Write Setup