anyone know about interrupt 13h extensions?

This is a discussion on anyone know about interrupt 13h extensions? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; is there a library, for djgpp, that can handle interrupt 13h extensions? or a function built in? fcook1SPAMBLOCK@carolina.rr.com...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    11

    anyone know about interrupt 13h extensions?

    is there a library, for djgpp, that can handle interrupt 13h extensions?

    or a function built in?

    fcook1SPAMBLOCK@carolina.rr.com
    someone once told me i could make money at this ...

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    If you want to include assembly code into your programs, just do the following:

    ASM
    {
    ...
    }

    You could put the { right after ASM but that's all a matter of style- makes no difference. I'm not sure I completely understood the question, so if this doesn't help, please tell me.

  3. #3
    Registered User
    Join Date
    Jun 2002
    Posts
    11

    int 13h extensions

    13h extensions is the method of accessing a harddrive larger than
    8gb ...

    well, what i need to do is determine if 13hextensions is available, and if so use them.

    function biosdisk works fine on small drives u see, but leaves blank spots on larger drives because there are essentially more sectors. int 13h is the old access point, so to speak. there are now extensions to that, basically adding more commands i think.

    again what i need is:

    more information, detailed.
    a library which will essentially replace function biosdisk.
    -or-
    another function, possibly already existing, which i am
    unaware of.

    thanx for trying to help tho ... u peeps here is 2 kewl. i feel uneducated, versus unwanted; as i have felt in the past
    posting to newsgroups.
    someone once told me i could make money at this ...

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    I have no idea how to answer your question without some serious improvisation - try setting up some error control, and then run int 13h with it's extensions inside the ASM {...}. Then you'd know whether or not it works, but f it doesn't, it'll just continue.

  5. #5
    Registered User
    Join Date
    Jun 2002
    Posts
    11
    'tis a tough item i'll admit. seems like it may be a good way to get 'brushed up' on my C again.

    If anyone ahs an idea where i may find a library, or some info ...
    plz buzz in



    someone once told me i could make money at this ...

  6. #6
    Registered User
    Join Date
    Jun 2002
    Posts
    11
    is there ANY way to reuse code from another program?

    okok suppose that i have source for a program such as fdisk. well FreeFdisk ... i do have it. it's written in c++ me thinks, well at least its written in spaghetti, and i don't understand it. the int13h extensions are accessed as they should be and work properly. else large disk support wouldn't be there. can i simply write code calling his functions and then compile with his sources?????


    that would be cool ... and ez'r than writing my own.
    someone once told me i could make money at this ...

  7. #7
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Well, that is a general goal of OOP, and thus C++. If it's already compiled, I can think of one way, but it's probably illegal. Here's DEBUG, I was actually about to upload it for some other post. I forgot which one though.... I'll have to go find it. Anyway - use the following instructions:
    n [full path of the program]
    l
    u
    keep pushing u to view it's unassembled assembly code. As long as you can follow it well, you should be okay. The only way you're going to be able to do this easily, is if you hade partially compiled code, like *obj files or libraries.

  8. #8
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    I forgot to mention - press ? and enter for full instructions, and press q and enter at any prompt to quit. If it freezes or something, use CTRL+PAUSE/BREAK. This won't work on anything newer than Win 2000

  9. #9
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Sorry about the numerous posts - I keep forgetting stuff. Heres the file. Because the site doesn't allow *.exe, I just changed the extension to cpp. Use DOS or something change it back to a file type you can exectue. It's still in the right format.

  10. #10
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    Seems you can use int 13h with function 41h, if the carry flag is not set, then the machine has the extensions.

    http://home.teleport.com/~brainy/diskaccess.htm
    http://www.pcguide.com/ref/hdd/bios/...ensions-c.html

    But do you need a library for that? If the machine has the extionsions, you can use the machine's extensions.

  11. #11
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    You can use any of the MS extensions to int 13h. Be forewarned though that Windows locks all volumes so every invocation of this interrupt returns an error ERR_LOCKED_VOLUME or something like that.

    Actually you need to lock the volume (rather than unlock, as with most MS stuff). I have tried several of the RBIL entries that should do it, but to no avail. I have not been able to use direct disk access at all(except in my own bootstrap code) and eventually gave up on it under Windows.

    The problem is that when Windows boots, it hooks the int 13 vector and puts its own handler there. Who knows if it even saves the previous handler or just breaks the chain. The ideal method would be to bypass the Windows handler and get to the actual BIOS handler, but if Windows did not save the handler address this is next to impossible. Even if Windows did save the address it's prob not going to tell you what it was and for good reason.

    You should also query first to make sure the computer has the LBA extensions - most do - but its just a precaution.

    If you find out how to lock the darn volumes so Windows will shut up and let me do my thing with int 13h, let me know will ya.

  12. #12
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Aren't there functions equivalent to all the Service Table INterrupts?

  13. #13
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    There are other extensions that have been added such as VBE and another to control BIOS FLASH ROM. There is another set of extensions specifically dedicated to shutting down the computer (powering off), but I don't know what they are and have not found any information regarding these extensions. But since I reckon this would be the only way to shut down the system - via interrupt to the mobo and then the mobo takes care of the rest - I know they exist.

  14. #14
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    And also to add to my previous question: are thre C/C++ equivalents of these new interupts?

  15. #15
    Registered User
    Join Date
    Jun 2002
    Posts
    11
    biosdisk (bios.h) was the OLD 'equivelant, i too wanna know if the new extensions are interfaced with a C/C++ library function
    someone once told me i could make money at this ...

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer within a Struct
    By Bladactania in forum C Programming
    Replies: 11
    Last Post: 04-03-2009, 10:20 PM
  2. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 03:59 PM
  3. interrupt question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 02-08-2002, 08:25 PM
  4. interrupt handler functions in Visual C++ 6.0
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 01-07-2002, 06:06 PM
  5. Sound card interrupt problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-05-2001, 03:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21