OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:19 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: I'm unable to switch VESA VBE bank
PostPosted: Mon May 02, 2022 5:45 am 
Offline

Joined: Fri Apr 22, 2022 10:01 am
Posts: 7
Hello guys.

Before I switch to protected mode, I set 100h VESA VBE mode. My c code can write to its memory, but I need to switch banks.

With this code, to set VBE mode my kernel write something to display to 0xA0000 memory:
Code:
mov ax, 0x4F02
mov bx, 0x100
int 0x10


But if I use this code to switch bank, it doesnt work and write nothing to display:
Code:
mov ax, 0x4f05
mov bx, 0x0
mov dx, 0x1
int 0x10


Thank you for your help.


Top
 Profile  
 
 Post subject: Re: I'm unable to switch VESA VBE bank
PostPosted: Mon May 02, 2022 10:50 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Are you trying to use that code to switch banks in protected mode?


Top
 Profile  
 
 Post subject: Re: I'm unable to switch VESA VBE bank
PostPosted: Mon May 02, 2022 11:01 am 
Offline

Joined: Fri Apr 22, 2022 10:01 am
Posts: 7
No, I'm doing it before I switch to protected mode.


Top
 Profile  
 
 Post subject: Re: I'm unable to switch VESA VBE bank
PostPosted: Mon May 02, 2022 11:10 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
What are the first 12 bytes of the ModeInfoBlock?

What address are you trying to write to?

What value is returned in AX after calling INT 0x10 AX=0x4F05?


Top
 Profile  
 
 Post subject: Re: I'm unable to switch VESA VBE bank
PostPosted: Mon May 02, 2022 11:51 am 
Offline

Joined: Fri Apr 22, 2022 10:01 am
Posts: 7
I am writing to 0xA0000.
When i test for errors after setting bank with this:
Code:
cmp ax, 0x004F
jne err

It will not run err function.


Top
 Profile  
 
 Post subject: Re: I'm unable to switch VESA VBE bank
PostPosted: Mon May 02, 2022 12:26 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
What are the first 12 bytes of the ModeInfoBlock?

It sounds a lot like the bug isn't really related to the bank switch, and it's just a coincidence that adding a bank switch call causes your kernel to stop working...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], SemrushBot [Bot] and 59 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group