Author Topic: Assembler insert strange instructions [At end of topic new question VESA BIOS]  (Read 18907 times)

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
To make the task easy I created a FreeBASIC DOS (DPMI) app that calls the first two functions. On my test system, running under Windows XP, the first function fails and the second function succeeds, although the output does not make sense.

Edit: For allocating the buffer in RM memory the size is supposed to be specified in paragraphs, so the instruction that loads BX should have been:
Code: [Select]
mov bx, 256/16

Code: [Select]
     256
     32
    0000    0953    01CF
    014F

    0000
    00000000
    0000
    00000000
    00000000
    00000000
    00000000
   
    004F
    80
    255
    0000000000111110
    0
    55
    54
    0
    0
    00000000

I tabbed the output away from the left edge so I could read the first character. I tried the app from a MS-DOS 6.22 boot diskette using hdpmi32 as a DPMI host, on the same system, but I could not get the display to work at all.
« Last Edit: December 16, 2013, 06:10:52 PM by MichaelW »
Well Microsoft, here’s another nice mess you’ve gotten us into.

FORTRANS

  • Member
  • ****
  • Posts: 945
Hi,

   Two results from my P-III, and one from a laptop.  Nulls were
replaced by ^@ characters.

Regards,

Steve

Code: [Select]
P_III, Matrox, NTVDM

               256

               32

              0000          0AA1          01CF

              FFFF

              ^@^@^@^@^@^@^@

              0000

              00000000

              0000

              00000000

              00000000

              00000000

              00000000



              FFFF

              0

              0

              0000000000000000

              0

              0

              0

              0

              0

              00000000


P-III, Matrox, VDM

               256

               32

              0000          1777          00F7

              FFFF

              ^@^@^@^@^@^@^@

              0000

              00000000

              0000

              00000000

              00000000

              00000000

              00000000



              FFFF

              0

              0

              0000000000000000

              0

              0

              0

              0

              0

              00000000


Intel(R) Pentium(R) M processor 1.70GHz, ATI, NTVDM

               256

               32

              0000          12FA          01CF

              004F

              VBE/FP 

              0100

              10100011

              0100

              C0004F8C

              C0004FA2

              C0004FA7

              C0000188



              004F

              1024

              768

              0000000000000101

              6

              6

              6

              0

              587270700

              000000F4






dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
i keep forgetting to examine the CF after DOS calls - lol

xp mce2005 sp3, P4 prescott w/htt
Code: [Select]
               256

               32

              0000          09F6          01CF

              4F11

                     

              0000

              00000000

              0000

              00000000

              00000000

              00000000

              00000000



              4F11

              0

              0

              0000000000000000

              0

              0

              0

              0

              0

              00000000

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
On my P3, with an old Matrox G400, I get AX unchanged AX=FFFFh and nulls for everything else.

What is needed is a copy of the published standard, and I don't see it listed here. It may have ended as a proposal, and never became a standard.
« Last Edit: December 16, 2013, 06:12:50 PM by MichaelW »
Well Microsoft, here’s another nice mess you’ve gotten us into.

kyoto008

  • Guest
I don't see it listed here.
I am too. :icon_confused: I will try something another when will fail to use BIOS FP, e.g. direct IO ports programming of LVDS flat panel on Intel GMA 3150. I don't know anything about it. It is very pity. What to study about it? Where Intel GMA 3150 specification?

sinsi

  • Member
  • ****
  • Posts: 996
All I could find about VBE/FP is here.
Quote
       The VESA flat panel interface ceased development at the proposal stage.
       panelid and panelsize  will  work  on  many  machines,  but  the  other
       arguments are unlikely to be implemented on available hardware.
I can walk on water but stagger on beer.

sinsi

  • Member
  • ****
  • Posts: 996
Disassembly of my video BIOS for AX=4F11 (NVidia GTX 580 with VBE 3)
Code: [Select]
seg001:5B4B                 mov     ax, 14Fh
seg001:5B4E                 retn
That's a generic return for functions 4F0C-4F0F, 4F11-4F13 and 4F16+
I can walk on water but stagger on beer.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
mine returned what was passed in AX
probably doesn't change it on the stack unless it fails

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
never played with VESA, much
but - isn't the status returned in the carry flag ?
we are so used to win32 results in EAX   :P

FORTRANS

  • Member
  • ****
  • Posts: 945
Hi Dave,

   VESA status is returned in AX, or AH and AL depending on
how you want to look at it.

Regards,

Steve N.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
it seems that every implementation of it works differently, too
probably why i haven't messed with it, much

in the days before win32, i remember writing code for a handful of different graphics chip-sets   ::)

FORTRANS

  • Member
  • ****
  • Posts: 945
in the days before win32, i remember writing code for a handful of different graphics chip-sets   ::)

Hi,

   The plethora of different video chips that had little, if anything,
in common was the reason VESA was formed to create a more
uniform programing environment.  And it seems to be better
documented than the chip sets were by the manufacturers.  There
was a steep leaning curve for me at the start.  But once I got things
straightened out a bit, the VESA calls ended up easier than some of
the screen addressing problems.

Regards,

Steve N.


dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
right - i knew it was more standardized
but, as it became better developed, i got away from graphics programming - lol
at the time, i didn't have any books on VESA
the book i had did cover the popular chip-sets though

kyoto008

  • Guest
I failed to use VESA BIOS FP for my display with my bios and my videocard.  :(

FORTRANS

  • Member
  • ****
  • Posts: 945
I failed to use VESA BIOS FP for my display with my bios and my videocard.  :(

Hi,

   Just out of curiosity, what VESA/FP function do you require?
The functions seem a bit specialized.  I just want to know what
the video card BIOS and VESA extensions does not provide that
you need.

Regards,

Steve N.