16 bit code, shifting pages in dos, beginner

Alright I am currently writing a program to make a calendar as a project, to which using the ascii table to make borders and the such. So now I have a month completed, now I need to make a keyboard input to shift between a month foward and a month backwards. Like when the program loads it will show a calendar for the month of november, pressing a key and going back to the month of october, pressing the next key and going back to november then next again to december ect ect.

My problem is though I have no clue how to save a page(or calender month in this program) into memory and have it available for me to cycle between.

So lets take an easy program,

.model small
.stack 200h
.386
cseg segment 'code'
assume cs:cseg, ds:cseg
start:
mov ah,0
int 10h
mov ES,0B800h
mov ES,AX
mov byte ptr ES:[2], 'B'

mov ah,4ch
int 21h
cseg ends
end start

That will display the letter B op the top left hand corner of the screen in row 2, now how would I save that into memory and then make another page with say the letter P on it. This is all in 16-bit and only in 16-bit. We have learned about int 10h marginally, just that we were supposed to use that at the start and the textbook itself is absolutely no help(as there was no book required for the course but I went and picked one up which turned to be only marginally helpful). I hope you understand what I am trying to say and thanks in advance for any help that you might provide. If you need anymore information b4 you can help me feel free to ask.
[1650 byte] By [ninjikiran] at [2007-11-20 11:47:53]
# 1 Re: 16 bit code, shifting pages in dos, beginner
As far as I remember there is no BIOS/DOS function to save a page. Since you work in 16-bit unprotected mode you can however copy screen buffer (in text mode screen buffer starts at 0xB800:0000) to another location, clear the screen and then create the new one. To restore original screen just copy the saved data back to screen buffer. Size of screen buffer depends on number of lines/columns you have setup screen to be.

Or even better, allocate several screen buffers and set hardware to read from your buffer instead of the normal. I'll see if my old docs have ant information on how to do this.
S_M_A at 2007-11-10 3:55:02 >
# 2 Re: 16 bit code, shifting pages in dos, beginner
Oh, my memory was really bad... you don't have to handle this yourself.

With int10h function 5 (ah=5, al=page) you can select active text mode video page.

Page 0 - 7 are valid pages for B&W/color alpha mode 40*25, 0 - 3 for 80*25.

Edit: Here's a quite good bios reference page http://www.ctyme.com/intr/cat-003.htm
S_M_A at 2007-11-10 3:56:10 >
# 3 Re: 16 bit code, shifting pages in dos, beginner
edit: I figured out how it works, thanks =D!!!!!!!!!

Only thing I would like to know is how to hide the prompt,

C:\>_

I will probally be able to find my answer but might as well ask just in case. But yea my calender is looking smooth now page wise, now just need to get keyboard input working with int 16, a back button and a next button and of course an escape button but I am pretty sure I can get that working by my lonesome hehe.
ninjikiran at 2007-11-10 3:57:09 >
# 4 Re: 16 bit code, shifting pages in dos, beginner
Did you solve both prompt and int16 issues?

Int16 should be covered in the link but If you don't find how to hide the prompt programatically you can use the command line: prompt=$
S_M_A at 2007-11-10 3:58:07 >
# 5 Re: 16 bit code, shifting pages in dos, beginner
Yea I got keyboard support working last night.

Thanks for the prompt trick, i'll implement it when I get home after my long day of class's. Fun Fun *cough*
ninjikiran at 2007-11-10 3:59:06 >