hi,after trying some forums on this problem, I'll give it a final ty with ASM.
what I post is simplified version of my project but yields the same error.

I've got two compiled BASIC modules which are almost identical.
module 1:  ' M1.BAS
COMMON CV$
CV$ = "some text"
F$ = SPACE$(15)
CALL MEMTEST(F$)
PRINT F$
CHAIN "M2"
STOP
END

module 2:  ' M2.BAS
COMMON CV$
F$ = SPACE$(15)
CALL MEMTEST(F$)
PRINT F$
STOP
END

both modules are linked the following assemby-module which looks like this

DGROUP GROUP DSEG
DSEG SEGMENT PUBLIC 'DATA'
NAME_DSEG DB 'DSEG',0
DSEG ENDS

CGROUP GROUP CSEG
CSEG segment public 'code'
assume CS:CGROUP,DS:DGROUP,ES:DGROUP

; ------------------------------
PUBLIC MEMTEST
MEMTEST PROC FAR
; ------------------------------
PUSH BP
MOV BP,SP

MOV DI,
MOV DI,
LEA SI,NAME_DSEG
@@:
MOV AL,BYTE PTR
CMP AL,0
JZ @F
MOV BYTE PTR ,AL
INC SI
INC DI
JMP @B
@@:
MOV SP,BP
POP BP
RET 2
    MEMTEST ENDP

CSEG ENDS
END

now the problem is :

the BASIC module 1 displays 'DSEG'
while module 2 displays some trash.
however if I elimnate CV$ = "some text"
module 2 also displays 'DSEG'
where is the error ?
any help appreciated



Posted on 2012-07-14 06:13:28 by aw48