Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

How to move register to an array?

Intel_C_Intel
Employee
470 Views
I am using some inline assembly code in a C program, compiling with the Intel C++ compiler on Windows.
I need to move the contents of a register into an array.
char array[10];
char byte;
int index;
.
.
.
__asm
{
0 Kudos
1 Reply
dessa
Beginner
470 Views
It should be something like this
(just a general idea):

char array[10];
char val;
int index;
....
__asm {
mov bl, val
lea edi, array
mov eax, index
mov BYTE PTR edi[eax],bl
}
0 Kudos
Reply