| ??? 08/19/01 19:37 Read: times |
#14218 - RE: converting variable types |
The MUL AB produces a 16 bit result, which is what you need.
But, your code doesn't even attempt to do what you say. It adds 12 instead of 22. Then you put "00H" as the first byte of the result, instead of storing the result of the MUL AB, which is B:A. And you have not done a proper 2 byte addition, by not accounting for possible carry from the A to the B. So to fix this, you need to add 22, do a carry check to fix b, then store both A and B. |
| Topic | Author | Date |
| converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: converting variable types | 01/01/70 00:00 | |
| RE: Andy | 01/01/70 00:00 | |
RE: converting variable types | 01/01/70 00:00 |



