assembly - Nasm x86 modified char in array -


i have defined array section .bss :

textlenght equ 1024 ; define length of line of  text data text resb textlenght ; define array hold text 

then use getchar put char file using stdin :

all getchar ; call getchar input stdin, char save in eax  cmp eax, -1 jle done     ; if return -1, @ eof mov [text+esi], eax; put char eax array add esi, 4    ; increase array index jmp read   ; loop function 

so how go shifting char in text 1 letter 'a' become 'b' ?

thank

add 1 eax before move array. or, if have put in array, , register x 4 times index, can do

add [text+x], 1 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -