flat assembler
Message board for the users of flat assembler.

Index > DOS > How to set display start via VESA BIOS function 0x4F07

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 20 Aug 2019, 19:44
Code:
SetDisplayStart1:
        MOV     ECX,[X]
        MOV     EDX,[Y]
        MOV     EAX,$4F07
        XOR     EBX,EBX
        INT     $10
        RET

SetDisplayStart2:
        MOV     ECX,[X]
        MOV     EDX,[Y]

        MOV     EAX,$4F07
        XOR     EBX,EBX

        IMUL    EDX,[BytesPerLine]
        IMUL    ECX,[BytesPerPixel]
        ADD     EDX,ECX
        SHR     EDX,2
        
        MOVZX   ECX,DX
        SHR     EDX,16
        
        CALL    [PtrSetDispStart] ;PM32 function 0x4F07
        RET
    

The first procedure works in all modes. However, the second procedure does not work in 8-bit mode (blinking). Should something be improved?
Post 20 Aug 2019, 19:44
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4075
Location: vpcmpistri
bitRAKE 20 Aug 2019, 21:51
I'm sorry, don't understand this calculation:
Code:
        IMUL    EDX,BytesPerLine
        IMUL    ECX,BytesPerPixel
        ADD     EDX,ECX
        SHR     EDX,2    

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 20 Aug 2019, 21:51
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.