There's a module coded in assembly (NASM0.98) and another coded in C (under
DOS, with BC++4). I link this little mess, with TLINK v7.1...
Here's the problem: when I execute the program it aborts with a "Null
pointer assignment" message.
It found that this problem comes from the declaration of variables in the
_BSS segment (in the assembly source), because when I move the declarations
in the _DATA segment it works well !
;For example this doesn't work
SEGMENT _BSS CLASS=BSS
cylinders resw 1
heads resw 1
sectors resw 1
lba resd 1
SEGMENT _DATA CLASS=DATA
drive dw 80h
Here's the link where I uploaded the source:
http://www.guetali.fr/home/nirvana8/melo/files/diskio006.zip
That's all,
forgive my english, it may be bad sometimes (frensh people!),
have fun coding,
bye...
mElo
EDIT, my old old friend... :-)
David
In fact, yes they are in the same group, I checked it in the MAP
file. It may be because I declare my CODE, DATA and BSS segment with
the same name as the OBJ files produced by the C compiler (BCC++4),
what is to say: _TEXT, _DATA, _BSS.
Anyway as you and Geezer noticed me, I should GROUP my segments in the
assembly files, like the compiler does: CGROUP and DGROUP.
Geezer wrote to me the solution:
>Here is your CC.BAT file:
> nasm -f obj diskio.asm
> nasm -f obj timer.asm
> bcc -3 -c -mt -v main.c partable.c
>
>-mt is for TINY memory model
>
>Here is your LK.BAT file:
> tlink /Tde /c /C /Lc:\tc\lib /s /v c0s diskio timer partable >main,t,,cs.lib
>
>c0s is for SMALL memory model
>
>You must change one of these!
>
>Also, maybe you need a GROUP statement in the .ASM files
>
>--
>geezer@ | http://www.execpc.com/~geezer
>execpc.com | http://www.execpc.com/~geezer/osd
Thanks
bye
mElo
> mElo wrote:
>
> > hi!
> ...