"att asm stdin" Code Answer's

You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "att asm stdin" answered properly. Developers are finding an appropriate answer about att asm stdin related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like att asm stdin. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on att asm stdin. 

att asm stdin

By chflechfle on Oct 29, 2020
        .text
        .global _start
_start:
        # read(STDIN_FILENO, buf, 1)
        movl    $1, %edx    # size_t nbyte
        movl    $buf, %ecx  # void *buf
        movl    $0, %ebx    # int filedes
        movl    $3, %eax    # sys_read
        int     $0x80

        cmp     $1, %eax    
        jne     bye         # EOF or read() error

        cmp     $'A', (%ecx)
        jl      output      # *buf < 'A'

        cmp     $'Z', (%ecx)
        jg      output      # *buf > 'Z'
        je      z           # *buf == 'Z'

        incl    (%ecx)      # *buf >= 'A' && *buf < 'Z'
        jmp     output

z:
        movl    $'A', (%ecx)

output:
        # write(STDOUT_FILENO, buf, 1)
        movl    $1, %ebx    # int filedes
        movl    $4, %eax    # sys_write
        int     $0x80
        jmp     _start

bye:
        # exit(0)
        movl    $0, %ebx    # int status
        movl    $1, %eax    # sys_exit
        int     $0x80

.data
buf:
        .byte 0

Source: stackoverflow.com

Add Comment

0

All those coders who are working on the Whatever based application and are stuck on att asm stdin can get a collection of related answers to their query. Programmers need to enter their query on att asm stdin related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about att asm stdin for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of att asm stdin while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "att asm stdin". Visit this developer's friendly online web community, CodeProZone, and get your queries like att asm stdin resolved professionally and stay updated to the latest Whatever updates. 

Whatever answers related to "att asm stdin"

View All Whatever queries

Whatever queries related to "att asm stdin"

Browse Other Code Languages

CodeProZone