Diagonal Output of Assembly programe

Posted by Yousuf Umar on Stack Overflow See other posts from Stack Overflow or by Yousuf Umar
Published on 2013-10-24T07:36:39Z Indexed on 2013/10/24 9:54 UTC
Read the original article Hit count: 200

Filed under:

i have this assembly programe and i want to diagonal ouptut of this programe but i dont know how to put tabspace in assembly

section    .text
    global _start         ;must be declared for using gcc

_start:                 ;tell linker entry point

    mov edx, len        ;message length
    mov ecx, msg        ;message to write
    mov ebx, 1          ;file descriptor (stdout)
    mov eax, 4          ;system call number (sys_write)
    int 0x80            ;call kernel

    mov eax, 1          ;system call number (sys_exit)
    int 0x80            ;call kernel

section .data

msg db  'Y',10,'O',10,'U',10,'S',10,'U',10,'F'  ;our dear string
len equ $ - msg         ;length of our dear string

output of my programe is

Y
O 
U 
S
U 
F

output shoud like this

Y
  O
    U
      S
        U
          F

or is there any other way to write this programe and get this output

© Stack Overflow or respective owner

Related posts about assembly