[comp.sys.ibm.pc] Using dynamically allocated memory

cjdb@sphinx.uchicago.edu (Charles Blair) (08/27/87)

I am responsible for maintaining some code that uses a 24K internal
buffer for screen display (the program supports 6 pages of display).
I'd like to use int 21h function 48h (allocate memory) to grab the
memory I need after I load the program, so as to save disk space. If
the function succeeds, AX is supposed to contain the segment address
of the start of the allocated memory area. Now my question is, how do
I use this memory?

Currently the code I have knows the beginning of the buffer as an
offset from the start of the data segment. It also knows where the end
of the buffer is, since after the buffer is defined there is a
statement of the form buf_end equ $. So my question boils down to how
to convert the current code to something that makes use of dynamically
allocated memory. Does anyone have experience with this?

Thanks. E-mail responses O.K. 


-- 
Bitnet:	  	 lib.cb@uchicago.bitnet
Internet:      lib.cb@chip.uchicago.edu
uucp:	  ..!ihnp4!gargoyle!sphinx!cjdb