The memory is not continuous in all modes. You can't assume 32K is present all the time. You're supposed to use the page registers to switch hidden and visible pages as I mentioned in http://www.vcfed.org/forum/showthre...200-16-colors-programming&p=658284#post658284 .
Sorry I was testing that but I forgot to post about it.
Changing page registers, I was not able to activate 32K in the mode 8 (160x200), there is always a 16K page that wraps around. That 3df register works as expected, it changes visible pages and maps different ones to b800, but I guess mode 8 is just a 16K mode.
I found register 3dd which is supposed to do something about pages and sizes:
Code:
video D0 D7 D6
Descriptions 3DDH 3DFH 3DFH
8p 1 - 16K 0 0 0
8p 2 - 8K 0 0 1
4p 2 - 16K 0 1 0
4p 4 - 8K 0 1 1
4p 1 - 32K 1 0 0
2p 2 - 32K 1 0 1
So I tested that, but it didn't work. Mode 8 was always showing one 16K wrapping page.
Code:
union REGS regs;
byte CRT_Page = 0; //16K visible page.
byte Processor_Page = 0; //16K area accessible at B800h address for write/read.
byte Video_Address = 1; //00000001
byte page = (Video_Address << 6) | (Processor_Page << 3) | CRT_Page;
//Set mode 8 160x200
regs.h.ah = 0x00;
regs.h.al = 0x08;
int86(0x10, ®s, ®s);
//Set bit 0 of 3DDH to 1
asm MOV AH,0
asm MOV DX,03DDH
asm MOV AL,00000001b
asm OUT DX,AL
//Set page
asm MOV DX,03DFH
asm MOV AL,page
asm OUT DX,AL