rayii@mtuxo.UUCP (XMRJ4-R.HAYES) (01/31/88)
HELP I am currently writing a program that uses interrupt 13h function 05h. format track. At home i use a IBM PC/XT. After coding the proper values for all the registers and executing the program everything works fine. BUT when i execute the same code on pc6300 (at work) i receive an error 09h DMA BOUNDARY ERROR OCCURRED DATA DOES NOT RESIDE ON 64K BYTE DMA AREA I assumed that the interrupt after providing the seg operator for the es register would do the dirty work of figuring out the true 20 bit address of the data. I also page align the data segment and start the data area for the function at that point. What i need to know (i think) is exactly what the dma boundarys are. are they fixed (64k 128k etc..) are the bios between the two machines that incompatible. what am i doing wrong. Please send replies email vax135!mtuxo!rayii Thanks in advance RAYMOND P HAYES JR
dick@slvblc.UUCP (Dick Flanagan) (01/31/88)
In article <1236@mtuxo.UUCP> rayii@mtuxo.UUCP (XMRJ4-R.HAYES) writes: > I am currently writing a program that uses interrupt 13h function 05h. > format track. At home i use a IBM PC/XT. After coding the proper values > for all the registers and executing the program everything works fine. > BUT when i execute the same code on pc6300 (at work) i receive an error > 09h DMA BOUNDARY ERROR OCCURRED DATA DOES NOT RESIDE ON 64K BYTE DMA AREA The track buffer you are writing to/from must not cross a *PHYSICAL* 64Kb boundary within the 20-bit address space. Because the pc6300 has a different resident environment (smaller/larger OS, more/fewer BUFFERS, etc), your program's buffer happened to fall across one of those boundaries when it was loaded on that particular machine. One solution is to dynamically allocate (e.g., malloc()) the buffer and then test to see if it crosses a 20-bit 64Kb boundary. If it does, calculate where that boundary is within the buffer, and then how much larger the buffer would have to be if your I/O buffer were to start AT that 64Kb boundary. Finally, release the buffer you just allocated and allocate another one the size you just calculated would be large enough--taking care to adjust your I/O buffer to start AT the physical 64Kb boundary, not somewhere in front of it. In a static, single-user system like DOS, this should be sufficient. In a system where the memory you get from an allocation may not be the most recent memory you released, the test would need to be repeated and/or refined. Good luck--and welcome to the world of the classic "Gotcha's!" Dick -- Dick Flanagan, W6OLD GEnie: FLANAGAN UUCP: ...!sun!plx!slvblc!dick Voice: +1 408 336 3481 USPO: PO Box 155, Ben Lomond, CA 95005 LORAN: N37 05.5 W122 05.2 --