title: Splitting a string on AT&T IA-32 Linux Assembler (gas)
body: <pre><code>.section .data
  
  astring: .asciz "11010101"
  format: .asciz "%d\n"
  
  .section .text
  .globl _start
  
  _start:
  
  xorl %ecx, %ecx
  
  movb astring(%ecx,1), %al
  movzbl %al, %eax
  
  pushl %eax
  pushl $format
  call printf
  addl $8, %esp
  
  
  movl $1, %eax
  movl $0, %ebx
  int $0x80
  </code></pre>
  
  <p>Suppose I wanna break the .asciz string 1101011 and get it's first one. How do I go about it? The code above ain't working, it prints 49 or something.</p>