| | |
Vesa in nasm
![]() |
•
•
Join Date: Jan 2007
Posts: 2
Reputation:
Solved Threads: 0
Hello!
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:
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
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: Assembly Syntax (Toggle Plain Text)
section .code start: mov ax,data mov ds,ax mov es,ax mov ax,stack mov ss,ax mov sp,stacktop jmp main PutPixel: 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 Lbl: pop ebx mov ax,0A000h mov es,ax mov [es:ecx],bl pop edx pop ecx pop es pop eax ret main: mov ax,0x4f02 mov bx,0x103 int 0x10 ;----------------------------------------- mov bl,1 ;color xor edx,edx LoopY: xor ecx,ecx LoopX: 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 stacktop:
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
•
•
Join Date: Apr 2009
Posts: 1
Reputation:
Solved Threads: 0
hi you should change the code to read I think the problem is your bios support for vesain mode 4f05h
Assembly Syntax (Toggle Plain Text)
mov ax,4f05h ;SetBank
Assembly Syntax (Toggle Plain Text)
mov ax,4f02h ;SetBank
![]() |
Similar Threads
- Nasm for 64 bit programming (Assembly)
- p2p chat using NASM help needed. (Assembly)
- NASM Problems on Ubuntu (Debian(Linux)) (Assembly)
- NASM Int 21 Function 9 Help (Assembly)
- newb and nasm (Assembly)
- Nasm to tasm code help (Assembly)
Other Threads in the Assembly Forum
- Previous Thread: Design/Coding of assembler using C-code.
- Next Thread: Learning assembly
| Thread Tools | Search this Thread |





