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 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
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