This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

keil and assenmbly command

Hi, All:

I have a piece of old assembly code using a specific command SFE which is used to obtain code end address.

RSEG CODE
MOV	DPTR, #SFE CODE

Keil uvision2 said SEGMENT SYMBOL EXPECT in line 1 and SYNTAX ERROR in line 2.

Does anyone has ideas about these codes? Is CODE a specific keyword in Keil?

Thanks!

Parents
  • Start by fixing the first error: A51 (not uV2) needs a SEGMENT directive before you change to the segment defined by it with RSEG (CODE is not a predefined segment name, which your source seems to assume it is).

    For the second issue, there is AFIK no predefined solution in Keil tools, so you have to do it in several steps: create a separate segment holding essentially nothing but an "endOfCodeIsHere:" label, then tell the linker to put this segment as the last.

Reply
  • Start by fixing the first error: A51 (not uV2) needs a SEGMENT directive before you change to the segment defined by it with RSEG (CODE is not a predefined segment name, which your source seems to assume it is).

    For the second issue, there is AFIK no predefined solution in Keil tools, so you have to do it in several steps: create a separate segment holding essentially nothing but an "endOfCodeIsHere:" label, then tell the linker to put this segment as the last.

Children