Changes

AMSDOS Memory Map

794 bytes added, 13 April
/* Extended Disk Parameter Block (DPB,CSA,ALT) for Drive A/B */
AMSDOS uses two memory blocks. The first is always at BE40h..BE7Fh (on the 464 this region was used as Stack). The second is allocated from User RAM, typically located at A700h..ABFFh (unless other expansion ROMs with higher ROM bank number have already allocated RAM at that locations).
== 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 and drive 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)
BE76 2 Pointer to 512-byte Sector I/O Buffer (A9B0h) (CPM:AEF8h)
BE78 1 Flag Enable/Disable Error Messages
BE79 1 Reserved, CPC+: 00h=Normal, FFh=Enable Keyboard Scanning during I/O
BE7A 1 Reserved, CPC+: 00h=No Disc (464+), FFh=Disc (6128+)
BE7B 2 Reserved
48h 2 Checksum accross [05h..47h]
== Disk Parameter Header (DPH) for Drive A/B == 00h 2 XLT Skew Factor Translation (physical-to-logical sector) (not used) 02h 2 TRACK Current Track (misused as DIRNUM by AMSDOS) 04h 2 SECTOR Current Sector 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 == Extended Disk Parameter Block (DPBXDPB,CSA,ALT) for Drive A/B ==
00h 2 SPT Records per Track (CPM/Data=36, IBM=32)
02h 1 BSH Block Shift (3) (records per block = 1 SHL N)
29h 23 ALT Block Allocation Table (23x8bit = 184bit) (only 180bit used)
== Disk Paramter Header (DPH) = Finding the XDPB for Drive A/B a drive === 00h The 2 XLT Skew Factor Translation (physical-byte pointer at &BE40 points to-logical sector) (not used) 02h a list of DPH structures, 1 per drive, listed in order.In most AMSTRAD dos there is space for 2 TRACK Current Track only. To get the XDPB for a drive (misused as DIRNUM by this works on [[VDOS]], [[X-DDOS]], [[AMSDOS)]] and [[ParaDOS]]: 04h 2 SECTOR Current Sector 06h 2 DIRNUM Current Directory Number ;; A = drive 08h 2 DIRBUF Pointer to Directory Buffer ld l,a ld h,0 add hl,hl add hl,hl add hl,hl add hl,hl ld de,(A930h&be40) 0Ah 2 DPB Pointer to DPB (A890h/A8D0h for Drive add hl,de ld de,&A/B add hl,de ld a,(hl) Drive Param Block 0Ch 2 CSV Pointer to CSA inc hl ld h,(A8A9h/A8E9h for Drive A/Bhl) Checksums 0Eh 2 ALV Pointer ld l,a ;; HL = address of XDPB On VDOS, to ALT (A8B9h/A8F9h access the XDPB for Drive the 3rd drive, you need to use |S,1:|A/B) Allocation Tableand 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]]
491
edits