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

use local variable(overlayable data segment) in assembly language

i write a test program,
i want to use a local variable in a assembly language. if i use c language,local variable can be overlayable,but use assembly language,it cannot pass. The overlayable segment do not
take effect.

the error message is:
*** ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: ?DT?EE?DD
LENGTH: 0001H


what should i do more?

NAME DD

?PR?dd?DD SEGMENT CODE
?DT?dd?DD SEGMENT DATA OVERLAYABLE
?PR?ee?DD SEGMENT CODE
?DT?ee?DD SEGMENT DATA OVERLAYABLE
?PR?main?DD SEGMENT CODE
?DT?DD SEGMENT DATA
EXTRN CODE (?C_STARTUP)
PUBLIC i
PUBLIC main
PUBLIC ee
PUBLIC dd

RSEG ?DT?dd?DD
?dd?BYTE:
j?040: DS 1

RSEG ?DT?ee?DD
?ee?BYTE:
i?141: DS 1

RSEG ?DT?DD
i: DS 119

RSEG ?PR?dd?DD
dd:
MOV j?040,#01H
RET


RSEG ?PR?ee?DD
ee:
MOV i?141,#01H
RET
RSEG ?PR?main?DD
main:
LCALL dd
LJMP ee

END

0