Why we cannot do simple substraction in microprocessor 8085?
I have just started learning microprocessor and assembly language but when i was doing substraction i have to do it with 2's complement method but why we cannot do simple substraction Plz tell me and thanks in advance :)
9/1/2017 5:41:39 PM[email protected]
3 AnswersNew Answer
Subtraction is the addition of negative numbers, which in assembly, are best represented in 2's complement
Are you sure you are using an 8085? They stopped making them almost 30 years ago. Why are you using such an obsolete device? The 8085 has multiple subtraction instructions none of which require you to use two's complement numbers: SUB r (Subtract Register) SUB M (Subtract memory) SUI data (Subtract immediate) SBB r (Subtract Register with borrow) SBB M (Subtract memory with borrow) SBI data (Subtract immediate with borrow) See "The MCS80/85 Family User's Manual" http://www.bitsavers.org/components/intel/MCS80/MCS80_85_Users_Manual_Jan83.pdf Or "8080/8085 Assembly Language Programming" https://www.tramm.li/i8080/Intel%208080-8085%20Assembly%20Language%20Programming%201977%20Intel.pdf Posting your code along with details of the assembler you are using would also be helpful in diagnosing your problem.
I am still in 12 and in our book there is only microprocessor 8085 not other versions