Queries in 80x86 Assembly Language Programming
8086 Assembly language programming posted Today 06:59 PM
(post #10)
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 invokes function 06h of BIOS int 10h to
create a window (with shadow). the width and height of the window depends on the coordinates passed into the stack. the color is also passed to the stack.
(i'll just strip the lines which gets parameters from the stack)
In assembly, I'll only invoke function 06 of int 10 like this:
module proc near
;(assume that these comment lines are the codes which get parameters
;(from the stack
mov ah, 06 ; create window
mov al, 00
mov bh, 17h ; assume that these are the actual parameters
mov cx, 0a14h
mov dx, 143dh
int 10h
ret
module endp
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?
__________________
Turn on. Tune in. Drop out.
thanks rcgreen. it works!
hi rcgreen. thanks for the nice tip. I see what you mean. Yes, there are four 'display pages' in video memory. and by using different video page other than the default page of my program, I I can 'pop-up' my window on the new video page and then switch to my default page to go back to my previous screen data. In this case, the data is preserved.
Yes it works!!!
But one thing I noticed is this: when i display the characters in a different video page, the old screen is 'lost' (it's as if I executed a command to clear the screen and then display the window afterwards. it would be very nice however if my window just 'float' above my screen data just like how other programs work) and i'm left with the single window on the new screen. ( but of course, when i switch back to my old screen page the data is back).
What I want to happen is this: to display the new window on top of my previous screen data without 'clearing the screen' and then remove the window without leaving a hollow area and return to my previous screen data.
I'll keep working on it and I'll tell you the update about my program in assembly. And then if I have some difficulty, I'll just tell you about it. Ok?
Thanks a lot.
In our country ( philippines ) we say 'salamat', which means thank you. :)
Again, salamat.