www.digitalmars.com         C & C++   DMDScript  

c++ - bios.h, inportb ...

reply Ben Barker <Ben_member pathlink.com> writes:
I've been given some code to control a couple of stepper motors as part of my
4th year project. It's old code, and only runs on 98 and older due to its use of
bios.h. 

I need to make some changes to it, but my attempts to rebuild using Digital Mars
give the following error during linking (compiling is fine):

Dualstep.obj(Dualstep)
Error 42: Symbol unidentified _outportb
Dualstep.obj(Dualstep)
Error 42: Symbol unidentified _inportb
Dualstep.obj(Dualstep)
Error 42: Symbol unidentified _delay

Any idea what this means? Unfortunately I don't know what compiler was
used to compile originally, so that may be the problem ...
Oct 28 2004
next sibling parent Ben Barker <Ben_member pathlink.com> writes:
Hmmm.... seems the original code was compiled using
Turbo C 3.0
..



In article <clr6tt$2ln0$1 digitaldaemon.com>, Ben Barker says...
I've been given some code to control a couple of stepper motors as part of my
4th year project. It's old code, and only runs on 98 and older due to its use of
bios.h. 

I need to make some changes to it, but my attempts to rebuild using Digital Mars
give the following error during linking (compiling is fine):

Dualstep.obj(Dualstep)
Error 42: Symbol unidentified _outportb
Dualstep.obj(Dualstep)
Error 42: Symbol unidentified _inportb
Dualstep.obj(Dualstep)
Error 42: Symbol unidentified _delay

Any idea what this means? Unfortunately I don't know what compiler was
used to compile originally, so that may be the problem ...

Oct 28 2004
prev sibling parent reply "Walter" <newshound digitalmars.com> writes:
You'll need to change the code to using _inp, _outp and sleep.

See www.digitalmars.com/rtk/dos2.html and www.digitalmars.com/rtl/time.html


"Ben Barker" <Ben_member pathlink.com> wrote in message
news:clr6tt$2ln0$1 digitaldaemon.com...
 I've been given some code to control a couple of stepper motors as part of

 4th year project. It's old code, and only runs on 98 and older due to its

 bios.h.

 I need to make some changes to it, but my attempts to rebuild using

 give the following error during linking (compiling is fine):

 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _outportb
 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _inportb
 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _delay

 Any idea what this means? Unfortunately I don't know what compiler was
 used to compile originally, so that may be the problem ...

Oct 28 2004
next sibling parent Ben Barker <Ben_member pathlink.com> writes:
Thanks - I'll try that. (Sorry for the double post)

A couple of questions though. Delay() took millisecond input, wheras sleep()
takes seconds. Is there a way around this...

Also, 

www.digitalmars.com/rtk/dos2.html

seems to be a dead link, although I'll try to find the intended page myself.

Cheers,

Ben


In article <clrhnv$546$1 digitaldaemon.com>, Walter says...
You'll need to change the code to using _inp, _outp and sleep.

See www.digitalmars.com/rtk/dos2.html and www.digitalmars.com/rtl/time.html


"Ben Barker" <Ben_member pathlink.com> wrote in message
news:clr6tt$2ln0$1 digitaldaemon.com...
 I've been given some code to control a couple of stepper motors as part of

 4th year project. It's old code, and only runs on 98 and older due to its

 bios.h.

 I need to make some changes to it, but my attempts to rebuild using

 give the following error during linking (compiling is fine):

 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _outportb
 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _inportb
 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _delay

 Any idea what this means? Unfortunately I don't know what compiler was
 used to compile originally, so that may be the problem ...


Oct 29 2004
prev sibling parent Ben Barker <Ben_member pathlink.com> writes:
Thanks  - that seems to have done the trick



In article <clrhnv$546$1 digitaldaemon.com>, Walter says...
You'll need to change the code to using _inp, _outp and sleep.

See www.digitalmars.com/rtk/dos2.html and www.digitalmars.com/rtl/time.html


"Ben Barker" <Ben_member pathlink.com> wrote in message
news:clr6tt$2ln0$1 digitaldaemon.com...
 I've been given some code to control a couple of stepper motors as part of

 4th year project. It's old code, and only runs on 98 and older due to its

 bios.h.

 I need to make some changes to it, but my attempts to rebuild using

 give the following error during linking (compiling is fine):

 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _outportb
 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _inportb
 Dualstep.obj(Dualstep)
 Error 42: Symbol unidentified _delay

 Any idea what this means? Unfortunately I don't know what compiler was
 used to compile originally, so that may be the problem ...


Oct 29 2004