Hey guys, i'm writing a code in assembly language using Turbo Assembler 2.0. If anybody out there is using it too then maybe you can help me with my question. ( I just hope cheeseball can read this.)

I'm creating in assembly language a game. To provide a good user interface i have a module which creates a window (with shadow). the width and height of the window depends on the coordinates passed into the stack.
Now, because assembly language has no built-in functions, I have to write one which creates and destroys a window.

Let's say I'll create a window with blue background and white foreground with these parameters: row1 = 10, col1=20, row2=20, col2=60.

In assembly, I'll only invoke function 06 of int 10 like this:

mov ah, 06
mov al, 00
mov bh, 17h
mov cx, 0a14h
mov dx, 143dh
int 10h

now, my problem is when i try to remove the window, the underlying screen data is removed too.

how do i display this window so that when i remove it, the underlying data is also preserved?
And, how do I allocate memory dynamically in assembly?