Results 1 to 8 of 8

Thread: Disk direct access possible?

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Unhappy

    I have a program written in vb 1.0 for dos that i would like to convert to 32-bit windows. The problem is this: The program does low-level interrupt calls to read and write disk sectors. Is there an api call that i can use to read a disk sector? I don't care how "protected mode" a hard drive is- it must be possible, or de-frag programs wouldn't work. If anyone has a clue, i would greatly appreciate it. I have searched many api references with no luck. The only .dll programs i have found are for vb 16-bit versions and i haven't been able to get them to work with vb5.
    (FYI: VB 1.0 took up 2 floppies)
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Lively Member Bios's Avatar
    Join Date
    Nov 1999
    Location
    Richton Park, IL, USA
    Posts
    71

    Question maybe...

    as for an API call...i have no idea...but...

    I'm really good at finding ways for finding a bootleg way of doing things, but I don't know exactly what your program does, and also I'm curious on how you low-level interrupts using VB 1.0 (I have it, but I'd have no clue on how) so I was wondering if you could post your code here, and I'll try to find a way to make it work, and will be informed :-)

    PS - I understand if you don't want to post it.
    Bios
    Age: 17
    Languages: (Q)BASIC, Visual Basic, Dark Basic,C/C++, Visual C++, Perl, Java Script, HTML, ASP

    "DO:BEEP:LOOP"

  3. #3

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    No problem. I used the interruptx command, which you have to include. It gives you direct access to system registers. I cant find anyway to do this in windows 95/98 in c or vb
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Maybe this will get you started.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  5. #5

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    Thanks, i'll check it out.
    My exact code(from an earlier version of my prog)
    TYPE RegType
    ax AS INTEGER
    bx AS INTEGER
    cx AS INTEGER
    dx AS INTEGER
    bp AS INTEGER
    si AS INTEGER
    di AS INTEGER
    flags AS INTEGER
    ds AS INTEGER
    es AS INTEGER
    END TYPE
    COMMON SHARED sector_data AS STRING * 512
    COMMON SHARED spare_data AS STRING * 512
    COMMON SHARED info_data AS STRING * 512
    DECLARE SUB interrupt (intnum%, iReg AS RegType, oReg AS RegType)
    DIM iReg AS RegType
    DIM oReg AS RegType
    read_sector:
    iReg.ax = drive
    iReg.bx = VARPTR(sector_data)
    iReg.cx = 1
    iReg.dx = sector
    iReg.es = VARSEG(sector_data)
    interrupt &H25, iReg, oReg
    GOSUB display_sector
    RETURN

    write_sector:
    iReg.ax = drive
    iReg.bx = VARPTR(sector_data)
    iReg.cx = 1
    iReg.dx = sector
    iReg.es = VARSEG(sector_data)
    interrupt &H26, iReg, oReg
    RETURN
    i can't find my newer code. The newer used interrupt 21 for support for
    any size of drive. This is my back-up (always keep backups, trust me)
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  6. #6

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    Thanks. That was just what i wanted. Now all i have to do is learn the ins and outs of 2 functions i never saw before (both very involved ones) and decode the message hidden in the tech bulletin...
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  7. #7
    Guest
    Sorry... Just my $0.02:

    Windows is a Multithreaded, Multitasking (and so on) OS. It won't give you (easily) direct access to system registers and this sorta stuff.... Closest you'll get in VB is (I think) in a "virtual machine mode"....

    Just my $0.02... No offense!

  8. #8

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    you forgot multi-paininthe***ing
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width