From: silva AT dowco DOT com (Silva) Newsgroups: comp.lang.asm.x86,comp.lang.pascal.borland,comp.os.msdos.djgpp Subject: Re: How to align DOS memory block on page boundaries? Date: 16 Aug 1998 19:07:30 GMT Organization: dowco.com internet (ISP) Lines: 26 Approved: Message-ID: <6r7ali$ob4$1@winter.news.erols.com> References: <6r6m7l$qbs$7 AT winter DOT news DOT erols DOT com> NNTP-Posting-Host: 207-172-240-75.s12.as2.bsd.erols.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk "GiedriusS" wrote: >I want to allocate memory block (in DOS memory) which would be aligned >on page boundaries, but I don't know how. Yeah, I need such memory >block for DMA transfers. Put a 256 scratch-pad in front of your buffer. page 60,132 title 1K page buffer code segment assume cs:code, ds:code, ss:code, es:code org 0100h ;DOS .COM starts here start: mov dx,OFFSET DMApg ;point to a 1Kbyte page sub dl,dl ;note: cs:dx "now" points at a 1K page mov ax,4C00h ;exit to DOS with return(0) int 21h db 256 dup (?) ;spill-over DMApg: db 1000 dup (?) ;DMA page may start in spill-over code ends end start