Hi again, > debug jam.sys > e 2d85 0a > e 2938 fd > e 2ccf 00 > w > q
After patching jam (change max version to 7.10 and allow the freedos OEM fd and allow patching jam) I ran a trace of JMOUNT in dosemu / FreeDOS 2038 FAT32... Apparently you CANNOT use JMOUNT with FAT32-enabled kernels, so I suggest to keep the max version at 7.00 (Win95 DOS, the last DOS which has no FAT32). Changed patch will be: > debug jam.sys > e 2938 fd > e 2ccf 00 > w > q For the technically interested, the annotated trace is shown below. I believe that the patched JAM and normal JMOUNT would work just find on the FAT16-only versions of the FreeDOS kernel but have not tested that :-). The FAT32 problem is that JMOUNT needs the raw location of the diskimage file represented in 16bit clusters... FAT32 aware kernels (says the RBIL) do not keep a 16bit cluster number in the SFT even for files on FAT16 disks. The JAM driver itself apparently creates FAT12 or FAT16 block devices depending on what you mount with it :-). Eric >>> technical lowlevel stuff follows <<< Dosemu trace of "jmount e:jam.dsk h:" after devloading jam as h: drive: INT21 jmount:015d: AX=301b, BX=d3fe, CX=b04, DX=1e1b, DS=e1b, ES=b91 check dos version - implicitly enables hma if a20 was off int21 jmount:0236: AX=4a00, BX=74b, CX=4, DX=920, DS=e1b, ES=b91 resize b91 to 74b0 bytes int21 jmount:1c62: AX=3000, BX=271, CX=0, DX=920, DS=e1b, ES=e1b checks dos version again! int21 jmount:206e: AX=404e, BX=2, CX=1, DX=4a4e, DS=e1b, ES=e1b version message ... int21 jmount:206e: AX=404e, BX=2, CX=1, DX=4a4e, DS=e1b, ES=e1b INT2F jmount:144b: AX=5200, BX=198, CX=3, DX=4a4e, DS=e1b, ES=e1b JAM install check, RBIL says: returns: ver bx=125 cx=124 dx=37e (devload) info structure / boot sec: BPB, 19h: drive, 20h label, 2bh FAT... string 33h sectors, 37h flags, 38h filename[80h], b8h fragcount, bah frags[16], 11ah host DPB pointer, 11eh free sectors, 122h status, 37h cmdline flags frags: structure of 2 start/size 24bit values (unit sectors) of diskimage status: 0 okay, 01..0d other other int 2f.52 functions: 01 get info ptr DSBX for DL (0 curr 1 A: ...) 02 mount DL using info structure at DSBX returns status AH 03 unmount DL, 04 lock DL, 05 unlock DL, 06 read DL DSBX, 07 write DL DSBX (read write data structure: dword sector, word sector count, dword pointer) int21 jmount:1442: AX=5225, BX=ffff, CX=124, DX=37e, DS=e1b, ES=e1b *** get list of lists *** INT2F jmount:1463: AX=5201, BX=1234, CX=1234, DX=8, DS=e1b, ES=d4 get jam drive info (ES still set from int 21.52) trash dx/bx, fill dsbx (bp 37e:862 here crashes 1.4.0.0 dosdebug when triggered??) Returns: 00 02 08 02 00 01 80 00 00 02 f8 01 00 00 00 00 (more 00s...) int21 jmount:12f5: AX=d00, BX=59b0, CX=1234, DX=8, DS=e1b, ES=d4 disk reset for all drives (ES ...) INT2F HMA:161c: AX=1120, BX=a089, CX=0, DX=0, DS=d4, ES=0 network flush all buffers (DS must be DOS DS according to RBIL) INT2F jmount:1539: AX=150b, BX=4a4e, CX=4, DX=125, DS=e1b, ES=e1b cdrom check for drive cx E: (drive where my diskimage is) - magic bx? int21 jmount:15b5: AX=4409, BX=5, CX=4, DX=125, DS=e1b, ES=e1b remote drive check drive bx E: int21 jmount:155d: AX=440e, BX=5, CX=4, DX=0, DS=e1b, ES=e1b get logical drive map drive bx E: returns al: 0 only one drive in this block device, otherwise last letter used for drive (DJ mechanism?) INT2F jmount:15bf: AX=4a11, BX=0, CX=1, DX=0, DS=e1b, ES=e1b dblspace install check INT2F jmount:1463: AX=5201, BX=135a, CX=1, DX=5, DS=e1b, ES=e1b get jam drive info drive dl E: int21 jmount:2053: AX=601b, BX=135a, CX=1, DX=5, DS=e1b, ES=e1b truename ds:si to es:di INT2F HMA:1674: AX=1123, BX=8d0, CX=8d0, DX=3be, DS=10da, ES=d4 network truename INT2F jmount:1463: AX=5201, BX=135a, CX=4, DX=1, DS=e1b, ES=e1b get jam drive info drive dl A: ... INT2F jmount:1463: AX=5201, BX=135a, CX=4, DX=11, DS=e1b, ES=e1b get jam drive info drive dl Q: int21 jmount:1408: AX=3201, BX=4a4e, CX=4, DX=5, DS=e1b, ES=e1b *** get DPB drive dl E: *** (cannot debug??) DISK read @1/0/0 (1) -> 0x17f0 OK. int21 jmount:20a6: AX=3d00, BX=1b62, CX=1bf6, DX=126c, DS=e1b, ES=d4 int21: open file "E:\JAM.DSK" INT2F HMA:1674: AX=1123, BX=8b6, CX=8b6, DX=3be, DS=f41, ES=d4 network truename INT2F HMA:1583: AX=1000, BX=183, CX=d4, DX=d4, DS=d4, ES=d4 share install check DISK read @0/2/12 (1) -> 0x17f0 OK. (huh?) (note: jmount has int 25 call with dx= cx=1 ax=cdcd once) int21 jmount:2109: AX=4201, BX=5, CX=0, DX=0, DS=e1b, ES=d4 seek current + 0 int21 jmount:2109: AX=4202, BX=5, CX=0, DX=0, DS=e1b, ES=d4 seek end + 0 int21 jmount:2109: AX=4200, BX=5, CX=0, DX=0, DS=e1b, ES=d4 seek start + 0 int21 jmount:206e: AX=3f5a, BX=5, CX=200, DX=135a, DS=e1b, ES=d4 read first sector of file handle bx DISK read @1/192/7 (1) -> 0xf50a OK. INT2F jmount:141e: AX=1220, BX=5, CX=0, DX=0, DS=e1b, ES=e1b get job file table entry handle bx returns esdi (JFT entry is a byte in PSP, with the SFT index of that handle or -1) INT2F jmount:142f: AX=1216, BX=3, CX=0, DX=0, DS=e1b, ES=b91 *** get system file table entry pointer bx to esdi/bx *** See RBIL table 01642 for normal SFT format of DOS 4.x 5.x 6.x Code at jmount file offset 0ce7 calls 160d (int 2f.1220/1216) Later: access to word pointer[0b] must be at least 2, RBIL says this is the start cluster of the file, 0 in FAT32 kernels (if test passed, ax is compared to somepointer[0d] etc etc) >>> does jmount give up here? accepts DOS 3.30 to 7.0/7.10 all fail <<< int21 jmount:206e: AX=40e2, BX=2, CX=1, DX=49e2, DS=e1b, ES=d4 print error ... int21 jmount:206e: AX=40e2, BX=2, CX=1, DX=49e2, DS=e1b, ES=d4 int21 jmount:206e: AX=40e2, BX=2, CX=1, DX=49e2, DS=e1b, ES=e1b print error ... int21 jmount:206e: AX=40e2, BX=2, CX=1, DX=49e2, DS=e1b, ES=e1b int21 jmount:206e: AX=40de, BX=2, CX=1, DX=49de, DS=e1b, ES=e1b int21 jmount:206e: AX=40e2, BX=2, CX=1, DX=49e2, DS=e1b, ES=e1b int21 jmount:20cf: AX=3e00, BX=0, CX=101, DX=49e2, DS=e1b, ES=e1b close input int21 jmount:20cf: AX=3e00, BX=1, CX=102, DX=e1b, DS=e1b, ES=e1b close output int21 jmount:20cf: AX=3e00, BX=2, CX=106, DX=e1b, DS=e1b, ES=e1b close error int21 jmount:20cf: AX=3e00, BX=3, CX=180, DX=e1b, DS=e1b, ES=e1b close ... int21 jmount:20cf: AX=3e00, BX=4, CX=102, DX=e1b, DS=e1b, ES=e1b close ... int21 jmount:1c7f: AX=3000, BX=114e, CX=0, DX=e1b, DS=e1b, ES=e1b check dos version int21 jmount:1c8c: AX=4c01, BX=fd26, CX=0, DX=e1b, DS=e1b, ES=e1b exit with errorlevel 1 idea: bp 37e:862 ... iret of non-inst-check jam handler part note: e1b is jmount CS plus 28a and is used as jmount DS/ES/SS ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Freedos-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-user
