Home | Gallery | Forum | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com Forum
OS2 World.Com Online Discussion Forum.
Index / OS/2 - General / Programming
author message
starting code in config.sys
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
kg
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 6
since: 31 Aug, 2004
1. starting code in config.sys
Reply to this topic with quote Modify your message
Hi all,

I need to start a piece of code to change a wrong bios settings related to serial port . This code must run before COM.SYS loads
my questions are the following
Is it possible to run an .exe or .com file in config.sys and how ?
or should i write a .sys file ?

thanks,
kg

Date: 31 Aug, 2004 on 16:50
abwillis
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 135
since: 21 Mar, 2003
2. Re:starting code in config.sys
Reply to this topic with quote Modify your message
Yes you can run an exe but it will start after the device drivers are loaded. I don't know of a way around that, though I think there are some things that will halt the config.sys to run stuff from the command line before continuing but I am not sure what stage it would stop it at (i.e. during device driver load or after). Veit has written a program that will load bios code, don't remember the name but it is on hobbes.
Andy
Date: 31 Aug, 2004 on 19:26
Bart
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 9
since: 25 Feb, 2003
3. Re:starting code in config.sys
Reply to this topic with quote Modify your message
I believe you can use the run= command for the config.sys to run your executable. The problem you may have is the processing order of the config.sys. It is a multi-pass startup and the run statement is near the end of the priority list. (your com.sys will still start first)

Page 15 (pdf page 43) of this link has a list of the startup order.
http://www.os2ecs.net/PROG/gos2-wdd.pdf

Regards,
Bart

Date: 31 Aug, 2004 on 20:49
kg
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 6
since: 31 Aug, 2004
4. Re:starting code in config.sys
Reply to this topic with quote Modify your message
thanks for the pdf ...
so i have to do a dev driver just to make a write in the BDA !
do you know where can i find a base OS2 device driver code ? and how to build it (plateform, compiler and tools )?

kg

Date: 01 Sep, 2004 on 09:13
Cris
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 124
since: 20 Nov, 2003
5. Re:starting code in config.sys
Reply to this topic with quote Modify your message
Hi,
wouldn't it be simpler to NOT START AT ALL com.sys and company (i.e. temporarily rem it out of config.sys), run your code (with a RUN= statement in config.sys if you want), restore com.sys and company (vcom.sys etc.) and reboot?
Sorry if I missed something obvious.
Bye

Cris

Date: 01 Sep, 2004 on 09:31
abwillis
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 135
since: 21 Mar, 2003
6. Re:starting code in config.sys
Reply to this topic with quote Modify your message
He is not flashing the bios, merely updating it so it has to be done each boot. I don't know if it would even hold through a warm reboot or not ... maybe.
Andy
Date: 01 Sep, 2004 on 14:47
abwillis
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 135
since: 21 Mar, 2003
7. Re:starting code in config.sys
Reply to this topic with quote Modify your message
See if http://hobbes.nmsu.edu/pub/os2/util/mboard/lmicro.zip does what you need.
Andy
Date: 01 Sep, 2004 on 14:48
kg
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 6
since: 31 Aug, 2004
8. Re:starting code in config.sys
Reply to this topic with quote Modify your message
My problem is to find a way to write the I/O adress of my second com port at MEM @ 0040:0002 before COM.SYS start
This has to be done at each boot.
Actually i do it manually with debug ( e 40:02 F8 02 ) then i do a warm reboot with int19 to start OS2
and it's really boring to do that each time.

Thanks Andy,
i have checked lmicro , it do things very different. ( And i need the source code ! )

I'am still looking for a solution and idea are still welcome !!

kg,

Date: 01 Sep, 2004 on 15:31
abwillis
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 135
since: 21 Mar, 2003
9. Re:starting code in config.sys
Reply to this topic with quote Modify your message
I don't know for certain but I figure if you sent an email to Veit he would likely send you the source code unless he has some constraint preventing it. I found the file I was thinking of that stops the config.sys but it stops it with an exec which is after the device drivers are installed.
Andy
Date: 01 Sep, 2004 on 20:08
devnul
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 35
since: 04 Jul, 2003
10. Re:starting code in config.sys
Reply to this topic with quote Modify your message

kg (01 Sep, 2004 15:31):
My problem is to find a way to write the I/O adress of my second com port at MEM @ 0040:0002 before COM.SYS start
,

Maybe you consider my suggestion unsportive. But how about adding a seperate COM adapter into one of your (PCI or ISA) slots and disabling COM2 at your Motherboard ?

Guess thats ways easier

Date: 01 Sep, 2004 on 23:21
kg
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 6
since: 31 Aug, 2004
11. Re:starting code in config.sys
Reply to this topic with quote Modify your message
last updated at 02 Sep, 2004 15:03 (1 times)
it's because i see the problem with this kind of device
Date: 02 Sep, 2004 on 09:20
warpcafe
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 350
since: 26 Nov, 2002
12. Re:starting code in config.sys
Reply to this topic with quote Modify your message
Hi,

maybe you should give a try to SIO.SYS instead of COM.SYS.
I'm not sure if Ray Gwinn's set of drivers ("sio") supports setting such resources in deep but it's worth a try at least for its diagnostic functions.

The URL is www.gwinn.com but I wasn't able to reach it at the moment... anyway a "special edition" of it is included with eCS1.1... otherwise it's shareware which requires registration but even if you don't consider registrating it, it will allow you to check if problems could be resolved by using it... and then register it...

Sorry if I completely misunderstood what you were trying to do! Anway: Keeping fingers crossed...

Greetings
Thomas

Date: 03 Sep, 2004 on 09:47
kg
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 6
since: 31 Aug, 2004
13. Re:starting code in config.sys
Reply to this topic with quote Modify your message
Finally i solved my problem
i have downloaded the ddk , with the help of a sample code, i have done a tiny driver to do that .

thanks

Date: 07 Sep, 2004 on 11:10
Kim
Team member
in staff

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.haverblad.se
posts: 2128
since: 10 Dec, 2000
14. Re:starting code in config.sys
Reply to this topic with quote Modify your message

kg (07 Sep, 2004 11:10):
Finally i solved my problem
i have downloaded the ddk , with the help of a sample code, i have done a tiny driver to do that .

Something that you would like to share?

Date: 07 Sep, 2004 on 12:19
kg
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 6
since: 31 Aug, 2004
15. Re:starting code in config.sys
Reply to this topic with quote Modify your message
yes,

a good starting point is here..

http://hobbes.nmsu.edu/cgi-bin/h-browse?sh=1&dir=//pub/os2/dev/drivers

phymem is a simple and good sample even if you are new to OS2 dev and DDK

Date: 07 Sep, 2004 on 13:28
starting code in config.sys
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
All times are CET+1. < Prev. | P. 1 | Next >
Go to:
 

Powered by UltraBoard 2000 Standard Edition,
Copyright © UltraScripts.com, Inc. 1999-2000.
Home | Gallery | Forums | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com 2000-2004