If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Assembler ebx,ecx registers do not work?
7 posts
• Page 1 of 1
Assembler ebx,ecx registers do not work?
Following code (while loop) works fine when eax is used, but crashes if any other register is used (in this example ebx). It also crashes if one of mentioned registers is in any way involved in counting loop index.
is this a bug? or am I doing something wrong?
even following code crashes:
it seems to me that "mov" instructions are buggy...
- Code: Select all
streamout out;
float F1=1;
push ebx;
mov ebx,32;
loopjmp:
sub ebx,32;
jl finish;
//this code doesn't matter (it only counts loop length)
movaps xmm0,out;
addps xmm0,F1;
movaps out,xmm0;
jmp loopjmp;
finish:
pop ebx;
is this a bug? or am I doing something wrong?
even following code crashes:
- Code: Select all
streamout out;
float F1=1;
push ebx;
mov eax,32;
mov ebx,eax;
loopjmp:
mov eax,ebx;
sub eax,32;
jl finish;
mov ebx,eax;
//this code doesn't matter (it only counts loop length)
movaps xmm0,out;
addps xmm0,F1;
movaps out,xmm0;
jmp loopjmp;
finish:
pop ebx;
it seems to me that "mov" instructions are buggy...
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Assembler ebx,ecx registers do not work?
Confirmed. Even an ASM hop will crash if you replace eax by ebx:
This works:
This crashes:
This works:
- Code: Select all
streamout dummy;
float F1=1;
mov eax,ecx; and eax,7; cmp eax,0; jnz end0;
movaps xmm0,dummy;
addps xmm0,F1;
movaps dummy,xmm0;
end0:
This crashes:
- Code: Select all
streamout dummy;
float F1=1;
mov ebx,ecx; and ebx,7; cmp ebx,0; jnz end0;
movaps xmm0,dummy;
addps xmm0,F1;
movaps dummy,xmm0;
end0:
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Assembler ebx,ecx registers do not work?
I think I know what the issue is:
there is no "sub reg, integer"
You can also now use ebx, ecx and edx in the following opcodes:
add reg, reg
add reg, var
sub reg, reg
there is no "sub reg, integer"
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Assembler ebx,ecx registers do not work?
The e-registers support is very chaotic... thought Malc would sort it out, but it got worse. eg. "sub reg,int" only works with eax, while "add reg,int" works only with eax and ebx, and "and reg,int" works with eax,ebx,ecx but not edx... and so on... you basically have to check if the opcode output has something in it for every instruction.
In the latest version, "add/sub reg,reg" also support edx, edi and ebp... although you can't push/pop them for rescuing content... and the opcode output for ebp and edi are the same, so they are obviously wrong.
It's such a mess...
In the latest version, "add/sub reg,reg" also support edx, edi and ebp... although you can't push/pop them for rescuing content... and the opcode output for ebp and edi are the same, so they are obviously wrong.
It's such a mess...
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: Assembler ebx,ecx registers do not work?
psrld
Work for you?
Work for you?
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 22 guests