It does not work, because [a] is the address of the first cell of the array, which is stored somewhere else. And you perform operations with a pointer, not an array.
It is necessary to do the following:
__asm { push eax ; Сохранить состояние регистра eax mov eax, [b] ; Прочитать в него адрес первого элемента массива mov [eax], 's' ; Записать в память по оному адресу новое значение pop eax ; Восстановить состояние регистра eax }
Ah, yes, if the function consists entirely of this and then it is not necessary to save and restore the state of the register - the compiler will do everything by itself. I suspect that he will do it anyway, but you never know.