Mail Archives: djgpp/1998/08/17/03:15:47
"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
- Raw text -