Changes
== AMSDOS RAM 1 (always at BE40h..BE7Fh) ==
  BE40   2 Pointer to Disk Parameter Header CP/M DPH for Drive A and drive B  (A910h) (CPM:AE58h) (see below)  BE42   2 Pointer to Disk Parameter Block XPDB for Drive A  B                  (A890h) (CPM:ADD8h)
  BE44   2 Delay for Motor Spin-up in 1/50 seconds      (0032h)
  BE46   2 Delay for Motor Spin-down in 1/50 seconds    (00FAh)
  06h  2 DIRNUM Current Directory Number
  08h  2 DIRBUF Pointer to Directory Buffer (A930h)
  0Ah  2 DPB    Pointer to DPB XDPB (A890h/A8D0h for Drive A/B) Drive Param Block
  0Ch  2 CSV    Pointer to CSA (A8A9h/A8E9h for Drive A/B) Checksums
  0Eh  2 ALV    Pointer to ALT (A8B9h/A8F9h for Drive A/B) Allocation Table
== Finding the XDPB for a drive ==
The 2 byte pointer at &BE40 points to a list of DPH structures,  1 per drive, listed in order.
In most AMSTRAD dos there is space for 2 only.
To get the XDPB for a drive (this works on [[VDOS]], [[X-DDOS]], [[AMSDOS]] and [[Parados]]:
   ;; A = drive
   ld l,a 
   ld h,0
   add hl,hl
   add hl,hl
   add hl,hl
   add hl,hl
   ld de,(&be40)
   add hl,de
   ld de,&A
   add hl,de
   ld a,(hl)
   inc hl
   ld h,(hl)
   ld l,a
   ;; HL = address of XDPB
On VDOS, to access the XDPB for the 3rd drive, you need to use |S,1:|A and then read it.
On Dobbertin HD and Vortex HD you can't get the XDPB for the hard disc partitions using the above code.
[[Category:Programming]]
