Question

In my program i need make mul with 2 variable. Memsize is only 1 byte. For example:
First = 63h
Second = 64h
Result is more then 1 byte. How can i make mul?
'helps Devolus'
Okay. Mul is simple. What about div
If I have 270F / 64. How can i do it with only 1 byte mem size?

Was it helpful?

Solution

mul ab

The value from the akkumulator is multiplied with the value in register B. The lower byte from the result is in the akkumulator and the higher byte is in B. So you must store your values appropriately.

So in your example 64h * 63h = 26ACh in Register B you will have 26 and in the akkumulator you will have AC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top