Atlas - INCOMP.DOC
Home / ext / JunkDrawer / DOS / BuildTools / v2.0 Lines: 1 | Size: 2688 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1 2Areas where 2.0 is not compatible with previous versions of 3the DOS. 4 5+ Direct calls to the BIOS 6 Any program which jumped directly to the BIOS by way 7 of the jump table at 40:0 will no longer work. 8 9+ FAT pointer calls 10 Programs which used system calls 27 and 28 to get a 11 pointer to the FAT will no longer work. Because the 12 FAT is now cached with other disk resources, there is 13 no fixed location in memory to pass the address of. 14 The calls still exist, however, and have the same 15 format. THEY CAN ONLY BE USED TO GET THE FAT ID BYTE. 16 On return ES:BX points to a FAT ID BYTE for the Drive. 17 Doing anything except READing this ONE byte will 18 probably crash the system. In order to get at the 19 FAT, programs will first call DSKRESET (call 13) to 20 flush out any dirty buffers, and then make a GETDPB 21 call (call 31 or 50) to find out which sector on the 22 disk the FAT starts at, how big it is, and how many 23 copies of it there are. Then INT 25H and INT 26H can 24 be used to transfer the FAT in and out of the programs 25 memory space. 26 27+ INT 25H and INT 26H 28 In order for the above to work, and in order to 29 maintain some order in the world of multi-surface 30 disks, it is required that INT 25H and 26H use the 31 MSDOS sector mapping rather than some rather arbitrary 32 head-cylinder-sector mapping. 33 34The following subroutine will read the fat into the area of 35memory specified by DS:BX. DL contains the drive number, DL=0 36means read the fat from the default drive, DL=1 indicates read 37from drive A:, and so on. 38 39getfat: 40 push bx ; save pointer to fat area 41 push ds 42 mov ah,50 ; request the dpb 43 int 21h 44 mov cx,[bx+15] ; get fat sector count 45 mov dx,[bx+6] ; first sector of fat 46 pop ds ; restore fat area pointer 47 pop bx 48 mov al,dl ; is it the default drive? 49 or al,al 50 jnz driveok ; if not, load fat 51 52 mov ah,19h ; ask for default drive 53 int 21h ; get the default drive 54 inc al ; map a=0 to a=1 55driveok: 56 dec al ; map a=1 to a=0 57 int 25h ; read the fat into DS:BX 58 pop ax ; clean up the stack 59 ret 60