/* Compute a new pointer to the buffer such that the next "len" bytes */
/* do not cross a page boundary, and the offset is zero */
/* (as required by DMA transfers) */
orig_off = 0;
orig_seg = seg;
/* reserve 4 bytes for the original pointer */
lin_addr = (orig_seg * 16L) + orig_off + 4L;
if((lin_addr & 0xF0000L) != ((lin_addr+len-1) & 0xF0000L))
lin_addr = (lin_addr+len-1)&0xF0000L;
else
lin_addr = (lin_addr+15) & 0xFFFF0L;
seg = (unsigned int)(lin_addr/16);
orig_ptr = (unsigned far *)MK_FP(seg-1,0x000C);
orig_ptr[0] = orig_off;
orig_ptr[1] = orig_seg;
ptr = MK_FP(seg, 0);