flat assembler
Message board for the users of flat assembler.

Index > OS Construction > how to determine if video mode was set up correctly?

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 01 Aug 2006, 20:39
I want to set up video mode 6Ah (vesa mode 102h) in my boot loader, but i do not want to check if VBE are supported. is it possible to find out if a video mode was set up? AFAIK, INT 10h doesn't return anything, even CF isn't set if desired video mode is not supported...
The only thing that comes to my mind is to make routines that output messages with word wrap, and routines that draw ASCII frames (windows) with dynamic width control (for example to draw frame on 2/3 of the screen). If mode 6Ah cannot be set, then standard mode 3 will be used. I decided to make simple text mode user interface (but with high resolution) in boot loader, rather than GUI that will need much more resources and make my boot loader bulky. Thanks for any ideas...
Post 01 Aug 2006, 20:39
View user's profile Send private message Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 02 Aug 2006, 11:11
heh, the solution is obvious...

mov ax, 006Ah
int 10h
mov ah, 0Fh
int 10h
cmp al, 6Ah
jz @f
mov ax, 3
int 10h
@@:
...
Post 02 Aug 2006, 11:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.