|
|||||||||||
Technical Support Support Resources
Product Information |
C251: INC DRK Problems With the Intel 80C251SBInformation in this article applies to:
QUESTIONI'm using 80C251SB C-step device and have just discovered the "INC DR?,#2" problem. Is there an assembler or compiler directive to substitute ADD DR?,#2 automatically? ANSWERYES, there is. It is FIXDRK. You may use this directive with the A251 assembler and the C251 compiler. For example, the following assembly code:
when assembled normally in source mode generates the following output:
Note that the OBJect code generated is 0x0B and 0x0D. This decodes to...INC DR0, #2. When you assemble the same code using the FIXDRK directive, the assembler generates the following output:
And, when you decode the 0x2E, 0x08, 0x00, 0x02, you get ADD DR0, #0002h. Even though the ADD instruction is generated, the assembler listing file still shows INC DR0, #2. Don't let this confuse you. Note that the INC instruction only affects the N and Z flags while the ADD instruction affects N, Z, CY, AC, and OV. You may need to modify your assembly source code accordingly. This situation is handled in the compiler automatically. SEE ALSO
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.