Hi,
Can anyone point me to a tutorial which explains how paging can be achieved using 80x25 text mode from protected mode?
I need to implement scrolling for up to 8 pages.
Thanks
Text mode paging
Text mode paging
H Technology Solutions - Business Operating System Specialists
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Text mode paging
Simple, keep a backbuffer somewhere else in the kernel's memory, and use memcpy to scroll.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Text mode paging
Thanks but I was hoping for a less memory consumptive solution.
I think I read somewhere that 8 pages (one page = 80*25) can be addressed from 0xb8000 and it's possible to send I/O commands to have the VGA controller select different pages to display. Is this possible?
I think I read somewhere that 8 pages (one page = 80*25) can be addressed from 0xb8000 and it's possible to send I/O commands to have the VGA controller select different pages to display. Is this possible?
H Technology Solutions - Business Operating System Specialists
Re: Text mode paging
Actually if there is way via ports to select pages, that anyway it is slower than memcpy (or memmove). In 80x25 mode displayed just 80*25 words. If you'll find way to change buffer address - great, but I guess all of us use simple memmove.
Don't think a ****, but in ukrainian schools English is TOO BAD!
Re: Text mode paging
Yes, but that only does full-page scrolling, not line-at-a-time. For the latter (or if you want more than 200 lines total, even less if you're doing multiple terminals like Linux can) you'll need to use memcpy; besides, a 4K memcpy isn't even going to be noticed, even with a 1-byte-at-a-time copy.jasonc122 wrote:I think I read somewhere that 8 pages (one page = 80*25) can be addressed from 0xb8000 and it's possible to send I/O commands to have the VGA controller select different pages to display. Is this possible?
Besides, storing the text separately and using memcpy makes it much easier to change to using a framebuffer console (80*25 text on a big screen is quite annoying, especially when a framebuffer console can probably get at least three or four times that in each dimension depending on screen size)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Text mode paging
Wrong!Selenic wrote:Yes, but that only does full-page scrolling, not line-at-a-time.jasonc122 wrote:I think I read somewhere that 8 pages (one page = 80*25) can be addressed from 0xb8000 and it's possible to send I/O commands to have the VGA controller select different pages to display. Is this possible?
Re: Text mode paging
Oh, interesting. That also allows (theoretically) 128K of characters, which is still a 16K buffer per terminal for eight virtual terminals (which I think is a very nice feature to have)Combuster wrote:Wrong!Selenic wrote:Yes, but that only does full-page scrolling, not line-at-a-time.jasonc122 wrote:I think I read somewhere that 8 pages (one page = 80*25) can be addressed from 0xb8000 and it's possible to send I/O commands to have the VGA controller select different pages to display. Is this possible?
Either way, framebuffers are even better, IMHO, because you can then mix graphics in really easily, and changing video mode doesn't screw everything up.