Created
August 27, 2019 18:21
-
-
Save jterrazz/b4f34563ca3354902f7243bdf4a54c6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SECTION: Initialized data | |
.data | |
my_str db "001101",0 # You can save strings and adds the terminating /0 | |
my_var db 0 # The integer i is initialized to 0 | |
# db 1 declares 1 byte (b = byte) | |
# dw 1 declares 2 bytes (w = word) | |
# dd 1 declares 4 bytes (d = doubleword) | |
# dq 1 declares 8 bytes (q = quadword) | |
# SECTION: Constant data | |
.rodata | |
my_var db 6 | |
# Same as .data but the data can't be changed | |
# SECTION: Uninitialized data | |
.bss | |
my_var: resb 4 # Allocates 4 uninitialized bytes | |
# resb 1 allocates 1 byte (b = byte) | |
# resw 1 allocates 2 bytes (w = word) | |
# resd 1 allocates 4 bytes (d = doubleword) | |
# resq 1 allocates 8 bytes (q = quadword) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment