| ??? 10/02/03 07:36 Read: times |
#55914 - RE: SUBB Responding to: ???'s previous message |
Hi,
Basically there is no "sub" instruction in the MCS-51 instruction set, okay, so you have to make sure the carry isnt set, to avoid inadvertant accounting of borrow value No. Assembler is cool tool, you know: MOV A,#2 ADD A,#-2 JNC, Label_1 SJMP Label_2 The idea is that for immediate values you always can replace substract with addition of negative value. As result you may not pay attention on carry flag state before command and delete CLR Ñ as well. This trick gives same result as substract with only one thing you should note: with it, the carry flag is set vice versa. Good days! |
| Topic | Author | Date |
| SUBB | 01/01/70 00:00 | |
| RE: SUBB | 01/01/70 00:00 | |
| RE: SUBB | 01/01/70 00:00 | |
| Read all about it! | 01/01/70 00:00 | |
| RE: SUBB | 01/01/70 00:00 | |
RE: SUBB | 01/01/70 00:00 |



