VESA "Crash"

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Jaapio
Posts: 2
Joined: Fri Oct 06, 2006 4:17 am

VESA "Crash"

Post by Jaapio »

Hi,
Im trying to put my "os" in graphical mode (640x400x256) I used the boot code from the Wiki to load my code. Im still in real mode.
Im using the folowing code.

Code: Select all

[BITS 16] 

ORG 0x00007E00 

cli 
xor ax,ax 
mov ss,ax 
sti 

jmp 0:flush_cs 

flush_cs: 

xor dx,dx 
xor cx,cx 
mov ax,0x4f02 
mov bx,0x100 
int 0x10 

mov dx,240 
mov cx,320 
mov al,14 
mov ah,0x0c 
int 0x10 
The screen resolution does not change, I just get an regular text screen with a white echo bar(like the blinking one in dos and linux only this time frozen).

The code is in the second sector and run, I tested it by executing the following code:

Code: Select all

[BITS 16] 

ORG 0x00007E00 

hellostr: db "Hello, world!", 13, 10, 24h

cli 
xor ax,ax 
mov ss,ax 
sti 

jmp 0:flush_cs 

flush_cs: 

mov ax, 0x0003
xor bx, bx
int 0x10

mov cx,0xD
mov bl,0x1
mov bp, hellostr
mov ax, 0x1301
int 0x10

Result: "Hello'flipped f like symbol', world!" in blue

Im compiling with nasm under linux. Both linux and the test system are running under vmware server.

What am I doing wrong, why doesnt the screen resolution change did I forget to set something?

Edit: Crap I forgot to mention the what problem was:P
Jaapio
Posts: 2
Joined: Fri Oct 06, 2006 4:17 am

Post by Jaapio »

Yes I see the was waiting for output, after drawing a pixel(or atreast trying to do so), the screens resolution changed
Post Reply