No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
7 Posted Topics
Since the cpu doesn't distinguish signed from unsigned integers, the only way to check that an unsigned overflow happened is through the carry flag. If the overflow flag is set, but not the carry flag, an unsigned overflow happened. It only depends on your interpretation of the data.
You can only use the conventional registers for whole numbers. If you need to program with floating points, you will need to work with the FPU-engine, which has seperate registers and instructions (many info is available online, look for 80x87 FPU). The solution is then: [CODE]... pi real4 3.14159265 temp …
Good news: you can make this much simpler ! I found a mathematical way to find it: The sum of ALL numbers until n is given by: n*(n+1)/2 Since we want only odd numbers, we can modify it like this: 1 2 3 4 5 ... 0 1 2 3 …
A mathematical formula for 1+2+...+2n-1 is (2n-1)*n , which is easy to program. The second one is the factorial. Because it gets large very fast, you will get an overflow for very small numbers already, especially in a 16-bit register (max you can get is 8!). If bigger is needed, …
Since you need to differentiate between min and max, I suggest you use something else instead of JNE. Suppose you want the max to be in AL, and min in DL then: [CODE] ... CMP AL,DL JG notequal ; max is in AL, nothing should be done JE equal ; …
It looks correct: R1 = R1 and R2; (D1 and D2) R1 = not R1; not (D1 and D2) = D1 nor D2;
Hi, We had to program a 8086 assembly program for an university project, for which I found a very good guide (Art of Assembly), which explains very well how to use the basic CPU & FPU instructions. I got very intrested in assembly language, and would like to learn how …
The End.
davio1