【发布时间】:2010-10-31 18:31:44
【问题描述】:
程序集信息:使用 Visual Studio 2010 编写嵌入到 C 中的内联程序集
你好, 我正在尝试在 C 中写入一个字符数组并尝试模仿此 C 代码的操作:
resNum[posNum3] = currNum3 + '0';
目前这是我所拥有的:
mov ebx, posNum3;
mov resNum[ebx], edx; //edx is currNum3
add resNum[ebx], 48; // add 48 because thats the value of the char '0'
我也试过这样做:
mov ebx, posNum3;
mov eax, resNum[ebx] ;// eax points to the beggining of the string
mov eax, edx; // = currnum3
add eax, 48; // + '0'
没有任何运气,非常感谢您的帮助!
【问题讨论】:
标签: arrays visual-studio-2010 assembly x86 inline-assembly