flat assembler
Message board for the users of flat assembler.
Index
> Main > vesa example |
Author |
|
Madis731 27 Sep 2005, 11:31
I don't know if it helps but MenuetOS uses VESA - maybe a peek in the source-code can help?
http://menuetos.org/download.html - kernel sources An example 256-byte invaders in TASM: http://www.users.globalnet.co.uk/~jchap/tvproins.htm |
|||
27 Sep 2005, 11:31 |
|
bogdanontanu 27 Sep 2005, 17:29
I do not think this is related to WIndows.
Windows uses either GDI, or DirectX (DirectDraw or Direct3D) to setup video mode and draw smething on screen... VESA is not relevant for Windows environment... |
|||
27 Sep 2005, 17:29 |
|
estrose 29 Sep 2005, 06:54
Alright then. I thought this forum could be more helpful. But maybe i'm myself too lazy, who knows. Anyway i will search with google some example, i havent find yet. I have found some kind of not-vesa way programming examples, but the example i need and described above, i havent found.
|
|||
29 Sep 2005, 06:54 |
|
vid 29 Sep 2005, 11:09
also look at tomasz "kelvar" engine, search forum for it
|
|||
29 Sep 2005, 11:09 |
|
Rohan 30 Sep 2005, 12:43
Can I use Vesa2 when I programing in Windows?
|
|||
30 Sep 2005, 12:43 |
|
Madis731 30 Sep 2005, 13:15
Of course, but then Windows emulates console application for you. command.com in Windows 9x/ME and cmd.exe in Windows NT/2K/XP
|
|||
30 Sep 2005, 13:15 |
|
Dex4u 01 Oct 2005, 16:41
The code you need is here: http://board.flatassembler.net/topic.php?t=4118
Look for the post by "Dex4u", to draw the line you just add this code: Code: mov [color],0xffffffff mov edi,[ModeInfo_PhysBasePtr] add edi,640*10 ;Draw the line 10 lines down mov eax,[color] ;color cld mov ecx,20 ;size of line, this will be times by 4. rep stosd Note: the code is bootable and to be run from a floppy. |
|||
01 Oct 2005, 16:41 |
|
forsaken 10 Oct 2005, 15:57
ummm, correct me if im wrong but aint that color value invalid? whats the last 2 255's (FF's) for?
|
|||
10 Oct 2005, 15:57 |
|
Matrix 10 Oct 2005, 17:15
i whould say first 2 ff, but depends on from lsb or msb,
AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB msb => lsb this is the structure of argb 32 bit video mode 8:8:8:8 in 24 bit vesa mode you also ahve the alpha that does not much ... but is there |
|||
10 Oct 2005, 17:15 |
|
Dex4u 10 Oct 2005, 19:14
I will correct you, this is a valid number.
Here is why, the code is for vesa mode 640 x 480 8bpp, so each byte is a color, but instead of moving 1 byte at a time, i moved 4 bytes (as they have the same color) as in "rep stosd" so the line is 80 pixel long. Why do 80 stosb, when you can do 20 stosd ? . |
|||
10 Oct 2005, 19:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.