Character gets a decimal - assembly

0

Someone help me add a decimal number into a string. Example: A word stored in a buffer, and the pointer esi will point at the beginning of a word and add the number 1. It will generate a new element of the ascii table ...

Specification - > Type word: balcony | Execution will reverse: adacas | var ++; var = 1 a = 97 c = 99 d = 100 s = 115 Buffer = balcony | buffer1 ----> (esi = start edi = end) | (97 + var = b) buffer1 = new element (bebdbt)

Implemented a part, now that it complicates. ;;;

insira o código asection .bss
buffer resb 100
buffer1 resb 100
qd resd 1

global main     main         mov edx, 100         mov ecx, buffer         mov ebx, 0         mov eax, 3         int 0x80         mov [qd], eax

    mov esi, 0
    mov edi, [qd]
      iniloop:
            dec  edi
    mov  al,[buffer+ esi]
    mov  [buffer1+edi], al
    cmp  edi, 0
    je   fim
    mov  al,[buffer + esi]
    mov  [buffer1+edi],al
    inc  esi
    jmp  iniloop
fim:
    mov eax, 1
    int 0x80
    
asked by anonymous 18.06.2018 / 04:34

0 answers