Add Statement in high level assembly HLA
Pergunta
Hi I just want to add to variable and I can't figure out how to do it.
static
input: uns8;
i:real32;
noOfItems: uns8;
I want noOfItems=numberOfItems + i;
Solução 2
I have solved it by first saving the value in the register and then adding it like
mov( unitPrice, edx);
add(edx , totalunitPrice );
Outras dicas
You might want to read the HLA documentation before you move any further in your coding.
To increment a variable by 1, you can use the INC
command:
inc( noOfItems )
Otherwise use the ADD
command instead:
add( i, noOfItems )
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow