배열 : 동일한 타입의 데이터 묶음
mov rax, a ; a의 첫번째 값의 주소값
; 연습문제 : a배열의 모든 데이터 출력해보기
xor ecx, ecx
LABEL_PRINT_A:
PRINT_HEX 1, [a+ecx]
NEWLINE
inc ecx ; add ecx, 1
cmp ecx, 5
jne LABEL_PRINT_A
xor ecx, ecx
LABEL_PRINT_B:
PRINT_HEX 2, [b+ecx*2]
NEWLINE
inc ecx
cmp ecx, 5
jne LABEL_PRINT_B
section .data
msg db 'Hello World', 0x00
a db 0x01, 0x02, 0x03, 0x04, 0x05 ; 5 * 1 바이트
; 0x01 0x00 -> 0x0001 little-endian
b times 5 dw 1 ; 5 * 2 = 10바이트
section .bss
num resb 10 ; 10바이트
주소
[시작 주소 + 인덱스 * 크기]