Gast
#19606
Hi!
Leider verstehe ich absolut nichts von Assembler, portiere jedoch gerade
ein C++-Projekt nach VB. Ich möchte jedoch reinen VB-Code draus machen.
Das klappt bist jetzt ganz gut, nur diese eine Assemblerfunktion versteh
ich überhaupt nicht.
SWORD get_svalue(BYTE k)
// k>0 always
// Takes k bits out of the BIT stream (wordval), and makes them a signed
value
{
_asm {
xor ecx, ecx
mov cl,k
mov eax,[wordval]
shl eax,cl
shr eax, 16
dec cl
bt eax,ecx
jc end_macro
signed_value:inc cl
mov ebx,[start_neg_pow2]
add ax,word ptr [ebx+ecx*2]
end_macro:
}
}
Also wordval ist schon mal eine globale Variable aus dem restlichen C++
Code, k wird übergeben und in cl gespeichert, das hab ich schon
verstanden. Dann wird wordval in eax gespeichert und einmal nach links
und nach rechts geshiftet, dann cl um eins verringert. Gut, was machen
nun die anderen Zeilen?
Grüße Dominik