Start New Discussion within our Software Development Community


3 weeks ago I started to search the secrets of vesa programming... and now I can forwrd with this problem.. :( I know I learning very slow, but... I think the important is that I want to learn :mrgreen: So here is my code:

section .code

  mov	ax,data
  mov	ds,ax
  mov	es,ax
  mov	ax,stack
  mov	ss,ax
  mov	sp,stacktop
  jmp	main

  push eax
  push es
  push ecx
  push edx
  push ebx
  lea eax,[edx+4*edx]
  lea eax,[eax+4*eax]
  xor edx,edx
  mov ebx,65536
  shl eax,5
  add eax,ecx  
  div ebx
  mov ecx,edx
  cmp eax,CurBank
  je Lbl
  mov [CurBank],eax
  mov dx,ax
  mov ax,4f05h   ;SetBank
  xor ebx,ebx
  int 10h
     pop ebx
     mov ax,0A000h
     mov es,ax
     mov [es:ecx],bl 
     pop edx 
     pop ecx
     pop es
     pop eax

  mov	ax,0x4f02
  mov	bx,0x103
  int	0x10

      mov bl,1            ;color
      xor edx,edx
         xor ecx,ecx
            call PutPixel
            inc ecx
            cmp ecx,800
            jne LoopX
         inc edx
         inc bl
         cmp edx,256
         jne LoopY
  xor  ah,ah
  int  16h

  xor	ah,ah
  mov	al,0x3
  int	0x10

  mov	ax,0x4c00
  int	0x21

section  .data
  s		resb	256
  CurBank  dd 	0
section .stack stack
 resb 2048

I wrote this code in nasm. And then used tlink. The problem is that this is very very slow for filling the screen... I know that I have to use the video memory.. but I can't.. :( I read many tutorials but I still can't use.. Tutorials didn't write an example :(
Please if somebody can help me to do a faster code or something... Thanks in forward

hi you should change the code

mov ax,4f05h   ;SetBank

to read

mov ax,4f02h   ;SetBank

I think the problem is your bios support for vesain mode 4f05h

This article has been dead for over six months. Start a new discussion instead.