hi
how i can change extended ASCII fonts in pmode?! (please describe with sample code)
and
is default mode 7? can i change fonts in this mode?!
sorry for bad english
change extended ascii fonts in pmode
Re: change extended ascii fonts in pmode
What do you mean by "default mode"? The video mode the system runs at startup? Its useually Mode 3.
You can technically change fonts in any mode via VGA programming.
You can technically change fonts in any mode via VGA programming.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: change extended ascii fonts in pmode
hi
i mean this (video mode at startup). but how can i change fonts in this mode ?(mode 3) (i must do it at pmode)
i mean this (video mode at startup). but how can i change fonts in this mode ?(mode 3) (i must do it at pmode)
-
- Member
- Posts: 116
- Joined: Wed Oct 22, 2008 2:21 am
- Location: Roma,Italy
Re: change extended ascii fonts in pmode
Ciao
You can change font before to switch in pmode by BIOS function .
Note that some video card ( example my ATI video card)
use card specific register not compatible with VGA.
I have disassembly my BIOS function and it use port 0xc000,this is not a VGA port.
Sure you can do it with classic VGA register , but it's not safe,anyway
the code is complex,note that you must recalculate everytime
the CRT with size of your character and so on.....
You can change font before to switch in pmode by BIOS function .
Note that some video card ( example my ATI video card)
use card specific register not compatible with VGA.
I have disassembly my BIOS function and it use port 0xc000,this is not a VGA port.
Sure you can do it with classic VGA register , but it's not safe,anyway
the code is complex,note that you must recalculate everytime
the CRT with size of your character and so on.....
- 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: change extended ascii fonts in pmode
BS. Almost all video cards support VGA and a card-specific method.
This question has been asked like 10 times in the past few months. I'm not going to provide links again.
This question has been asked like 10 times in the past few months. I'm not going to provide links again.
Re: change extended ascii fonts in pmode
Card-specific registers are of course not compatible with VGA. This does not mean the card doesn't support VGA.Note that some video card ( example my ATI video card)
use card specific register not compatible with VGA.
Fundamentally hardware programming is not safe. VGA is portable among all modern video cards hence is "more safe" to use then card-specific interfaces as it is more guaranteed to work.Sure you can do it with classic VGA register , but it's not safe,anyway
djmauretto mentioned the use of a bios interrupt (You can switch to real mode to use it or do it before switching to pmode.) or directly via VGA (or similar) programming. As Combuster posted, this has been asked quite a few times (You may even see posts on the first or second page) related to your question--do some searching.but how can i change fonts in this mode ?(mode 3) (i must do it at pmode)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}