// Wave-6 slice 6-assembler: .ascii/.asciz/.string/.unicode directives
// Expected exit code: 42
section .data
a_bytes:  .ascii "AB"        // 2 bytes, no terminator
z_bytes:  .asciz "HI"        // 3 bytes incl NUL
s_bytes:  .string "YO"       // 3 bytes incl NUL
u_bytes:  .unicode "MN"      // UTF-16LE: 4D 00 4E 00 00 00

section .text
global main
main:
    xor ebx, ebx
    movzx eax, byte [rel a_bytes]      ; 'A' = 65
    add ebx, eax
    movzx eax, byte [rel a_bytes+1]    ; 'B' = 66
    add ebx, eax
    movzx eax, byte [rel z_bytes+2]    ; NUL terminator of .asciz
    add ebx, eax                       ; +0
    movzx eax, byte [rel s_bytes+2]    ; NUL terminator of .string
    add ebx, eax                       ; +0
    movzx eax, byte [rel u_bytes]      ; 0x4D = 77 ('M')
    add ebx, eax
    movzx eax, byte [rel u_bytes+1]    ; 0x00 high byte
    add ebx, eax                       ; +0
    movzx eax, byte [rel u_bytes+2]    ; 0x4E = 78 ('N')
    add ebx, eax
    movzx eax, byte [rel u_bytes+4]    ; NUL16 low byte
    add ebx, eax                       ; +0
    ; ebx = 65 + 66 + 77 + 78 = 286
    cmp ebx, 286
    jne fail
    mov eax, 42
    ret
fail:
    mov eax, 1
    ret
