Author Topic: im working on cloning hard drives for vb6 but it involves mixing assembly  (Read 13137 times)

Offline flyhigh427

  • Jr. Member
  • *
  • Posts: 60
hey yall and frank .
before i start ,can i do this using nasm or does anyone have any sugestions for me.
thanks

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
We "should" be able to get Nasm to produce any sequence of bytes we want, so we "should" be able to interface with anything we want - provided we know or can find out what the requirements are. I don't know much about VB6. My main question would be: "What do you need the VB6 for?" :)

Best,
Frank


Offline flyhigh427

  • Jr. Member
  • *
  • Posts: 60
hey frank id guess ive been taking the easy road to long,
should i use floppy drive or something bigger .i think ill start with a scan drive 4gig.
thanks

Offline flyhigh427

  • Jr. Member
  • *
  • Posts: 60
hey ive run into a problem using a usb drive. im getting a read error .
mov     dx,07h is right for drive H right?
thanks

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Good question. In what context? I ASSumed that "VB" implied Windows, but using dx rather than edx looks like 16-bit code. Is VB6 16-bit? (told ya I didn't know VB!) In any case, my recollection is that dos assigns drive letters based on... "drive C:" is whatever it boots from, then "drive D:" etc. are assigned... primary partitions first, then "extended" partitions (if any). I might remember that wrong. BIOS calls whatever it boots from "80h" (assuming it's a hard drive, not a floppy). Changing the "boot drive" in BIOS setup, and/or adding/subtracting partitions with fdisk, will change these assignments. I've been known to format the wrong drive!

I would think (guessing!) that to "clone" a drive, you'd be interested in physical drives, not partitions. I would think that BIOS interrupts would be much more useful than dos interrupts (pretty useless, I would expect!). As I recall, Windows has APIs for "raw disk" access, which is what you'd want, I think. "Fake dos" probably won't work (guessing!).

Where the heck are we?

Best,
Frank


Offline flyhigh427

  • Jr. Member
  • *
  • Posts: 60
hey im lost again frank ,im back to reading again
thanks