IET
Decrease font size
Increase font size
Topic Title: Interrupt handling in real-mode DOS C programming
Topic Summary: Need help in programming a real-mode DOS shutdown utility
Created On: 24 November 2010 06:12 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 24 November 2010 06:12 AM
User is offline View Users Profile Print this message



deleted_1_Nimer

Posts: 223
Joined: 22 April 2006

I have a slight problem involving a DOS-bootable USB flash drive & a menu system that I've created.

I've created two programs & a batch file menu system for hardware testing. The purpose is to run a range of in-house computer hardware test utilities from a USB flash drive, in a rapid manner that's suitable for a quality control environment.

I've managed to get everything up & running as desired except for shutting down & rebooting the computers.

I've already created a shutdown utility (using assembly language, assembled on an IBM R51 laptop running 16-bit, real-mode DOS without any memory managers,) that's supposed to power-off any computer using BIOS interrupt 15. However, the program will only turn off my IBM R51; it won't operate on other machines (instead, it will abort the operation).

So, I've decided to use either DJGPP or Open Watcom to compile a shutdown utility in C language. This said, I'm unsure as to how to call the interrupt.

Any assistance in doing so for either compiler is greatly appreciate. Otherwise, any assistance with my faulty assembly language code is appreciated.

-------------------------
Technology: something that's hated & cursed at by all engineers, technologists & technicians!

( Lousy modern technology! )
 26 November 2010 10:16 AM
User is offline View Users Profile Print this message



jakegreenland

Posts: 66
Joined: 04 May 2009

given that you're trying to use the ACPI/APM interface to shut down the device are you 100% sure that APM/ACPI is supported within the bios of the machines you're trying to shut down, if so I can see how moving to C makes any difference over assembly [since the C based ACPI routines will simply call the same hardware features] or are you intending to interact directly with the ACPI controller on the southbridge - which is likely to be motherboard specific ?

-------------------------
Jake Greenland, CEng MIET.
CCIE #22595
 28 November 2010 03:07 AM
User is offline View Users Profile Print this message



deleted_1_Nimer

Posts: 223
Joined: 22 April 2006

Originally posted by: jakegreenland

given that you're trying to use the ACPI/APM interface to shut down the device are you 100% sure that APM/ACPI is supported within the bios of the machines you're trying to shut down, if so I can see how moving to C makes any difference over assembly [since the C based ACPI routines will simply call the same hardware features] or are you intending to interact directly with the ACPI controller on the southbridge - which is likely to be motherboard specific ?


I'm 100% sure that the computers in question all support the ACPI interface for their respective BIOSes. I also realised during my absence from this forum that the shutdown routine I was using was trying to take advantage of the APM interface (which is non-existent in the computers I'm testing on).

I've debugged the program & have finally managed to get it working; in consulting the computer service manuals, I found that their ACPI controllers somehow communicate with their hard drive controllers to initiate a full shutdown (including halting power to the HDD before entirely halting power to the CPU).

Thanks for your response, though; I'll be sure to post back if I find a glitch in my program.

-------------------------
Technology: something that's hated & cursed at by all engineers, technologists & technicians!

( Lousy modern technology! )
Statistics

See Also:



FuseTalk Standard Edition v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.