flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > CODE VESA IN REAL |
Author |
|
revolution 27 Sep 2010, 10:55
Return:
AL = 4Fh if function supported AH = status 00h successful 01h failed Code: ;... if(r.h.al==4f) exit(0);//have vesa ;... |
|||
27 Sep 2010, 10:55 |
|
sinsi 27 Sep 2010, 10:59
AL=4fh if supported, AH=0 if successful, AH=1 if failed
edit: hmmm, can I see previews? Your whole post wasn't there rev. |
|||
27 Sep 2010, 10:59 |
|
bitRAKE 27 Sep 2010, 15:10
Code: cmp ax,$004F jnz VESA_Error |
|||
27 Sep 2010, 15:10 |
|
TUAN_CD 08 Oct 2010, 10:29
Thank for friends:D.I test bottom code.Result is good.not display text ‘not support vesa on screen’.But I don’t know this code is true
Code: //in borland 3 void check_vesa(){ union REGS r; r.h.ah=0x00;// ah=00 this right ?when al=4f then display text r.h.al=0x4f; ;// al=4f int86(0x10,&r,&r); if(r.h.al==0x4f && r.h.ah==0x00){ exit(0); }else{ asm{ mov ah,0 mov al,13 int 10h } cout<<"not support vesa!"; } } void main(){ check_vesa(); getch(); } I try: Code: [bits 16];nasm mov AX, 0x4F02 mov BX,101 ;256 color INT 10h mov bx,0xA000 mov es,bx mov AX,0x4F05 mov BX,00 mov DX,01 INT 10h mov AX,0x4F05 mov BX,01 mov DX,01 INT 10h mov ah,0 int 16h ret result,screen is dark and display point blink.How to set position color ? win.dex of dexos is vesa :It run on my PC is good.I feel it >256 color Web have code in a86.I don’t know a86 End,I thanks for god friends:D. College 8,Vietnam .’1000 year Thanglong’ is big festival in Hanoi:D-10/2010.Do you know about this ? |
|||
08 Oct 2010, 10:29 |
|
DJ Mauretto 08 Oct 2010, 13:53
Try This....
Code: org 100h mov di,Vesa_Signature mov ax,4F00h int 10h cmp ax,004Fh jnz @Error_1 cmp Dword [Vesa_Signature],'VESA' ; VESA ? jnz @Error_1 mov ax,4F02h mov bx,0x101 ; 640*480 256 color int 10h cmp ax,004Fh jnz @Error_2 mov bx,0a000h mov es,bx ;--------------- ; Fill Screen ;--------------- xor dx,dx mov bp,4 @@: mov cx,8000h mov ax,0909h xor di,di rep stosw mov ax,4f05h xor bx,bx add dx,1 int 10h cmp ax,004Fh jnz @Error_3 sub bp,1 jnz @b mov cx,0b000h mov ax,0909h shr cx,1 xor di,di rep stosw ;------------ ; Wait Key ;------------- xor ax,ax int 16h ;------------- ; Bye Bye ;------------- mov ax,0003h int 10h ret ;----------- ; Error ;----------- @Error_1: mov ax,0003h int 10h mov si,Vesa_Ko call @Bios_tty xor ax,ax int 16h ret @Error_2: mov ax,0003h int 10h mov si,Vesa_Mode_Ko call @Bios_tty xor ax,ax int 16h ret @Error_3: mov ax,0003h int 10h mov si,Bank_ko call @Bios_tty xor ax,ax int 16h ret ;------------------ ; PROC ;------------------ @Bios_tty: lodsb test al,al jz @Bios_tty_Done @@: mov ah,0eh mov bx,0x0007 int 10h lodsb test al,al jnz @b @Bios_tty_Done: ret ;------------------ ; DATA ;------------------ Vesa_Signature db 'VBE2' ; VBE Signature 'VBE2' Vesa_Version dw ? ; VBE Version Vesa_OemStringPtr dd ? ; Pointer to OEM String Vesa_Capabilities dd ? ; Capabilities of graphics controller Vesa_VideoModePtr dd ? ; Pointer to VideoModeList Vesa_TotalMemory dw ? ; Number of 64kb memory blocks ; Added for VBE 2.0 Vesa_OemSoftwareRev dw ? ; VBE implementation Software revision Vesa_OemVendorNamePtr dd ? ; Pointer to Vendor Name String Vesa_OemProductNamePtr dd ? ; Pointer to Product Name String Vesa_OemProductRevPtr dd ? ; Pointer to Product Revision String Vesa_Reserved db 222 dup (?) ; Reserved for VBE implementation scratch area Vesa_OemData db 256 dup (?) ; Data Area for OEM Strings ;---------------- ; Error Message ;---------------- Vesa_Ko db "VBE Unsupported",0 Vesa_Mode_Ko db "VBE Mode 0x101 Unsupported",0 Bank_ko db "Bank Switch Error",0 Copy and paste this code in a file called vbe.asm Compile with fasm in this way: fasm vbe.asm _________________ Nil Volentibus Arduum |
|||
08 Oct 2010, 13:53 |
|
vid 08 Oct 2010, 15:09
TUAN_CS: please use [code] tags around your code to make it more readable.
|
|||
08 Oct 2010, 15:09 |
|
dosin 08 Oct 2010, 15:49
Quote: win.dex of dexos is vesa :It run on my PC is good.I feel it >256 color yes - dexos win.dex is vesa.. and runs greater than 256 color.. I see others have responded .. but if you still need help with vesa.. I can send you an example/demo.. just let me know |
|||
08 Oct 2010, 15:49 |
|
TUAN_CD 22 Oct 2010, 10:09
First,thank to DJ Mauretto,vid and dosin
This code is good.Result is not error,not text:’VBE Unsupporte’,’VBE Mode 0x101 Unsupported’,’Bank Switch Error’. I print information by other code: Currentmode=3h VesaStatus=4fh VesaSignature=vesa VesaVersion=300 OEMStringPtr= char.can not read Capabilities:DAC width ,with 6-bit per primary color totalMemory=125x64K mode=101h modeAttributes=155 modeAAttributes=7 modeBAttributes=6 modeGranularity=64 WinSize=64 WinASegment=-24576 winBSegment=0 winFuncPtr= char.can not read BytePerScanLine=640 Xresolution=640 Yresolution=480 XcharSize=8 YcharSize=16 NameOfImagePage=24 Reserved1=1 RedMaskSize=0 Cotinued RedFieldPosition=0 GreenMaskSize=0 GreenFieldPosition=0 BlueMaskSize=0 bluefieldFieldPosition=0 DirectColorInfo=0 It not action Part code not 004f Maybe my screen is Vesa.but It not display,I don’t know. I view code info vesa of dexos It not other your code.But win.dex can display.What is problem ?I read on web:vesa1.2 other vesa 2.0,vesa3.0 Or can DOS against vesa.Win.dex is magic Can I use palette vesa ?because: Capabilities:DAC width ,with 6-bit per primary color can DOS against vesa Who send code for vesa1.2,vesa 2.0 ,vesa 3.0 to me! |
|||
22 Oct 2010, 10:09 |
|
dosin 23 Oct 2010, 04:15
The vesa code for dexos - is for vesa 2 +
and also is written for protected mode.. if you want a protected mode example. I will post. I dont have any real mode examples anymore.. |
|||
23 Oct 2010, 04:15 |
|
TUAN_CD 29 Oct 2010, 10:24
can you send it to me ? thanks
|
|||
29 Oct 2010, 10:24 |
|
dosin 30 Oct 2010, 02:03
I sent it to you!
|
|||
30 Oct 2010, 02:03 |
|
TUAN_CD 08 Nov 2010, 09:51
Thank to good friends.I test your code vesa in real is nice.It display background with blue color. Can Dos against Vesa.
Your vesa is vesa 2+? Can you help me draw line(putpixel) by code? Can I putpixel 16bpp in real ?How ? mail:bach_ho_cry@yahoo.com You can send Pm vesa for me. |
|||
08 Nov 2010, 09:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.