Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

get SVGA Information int10h/AX=4f01h

get SVGA Information int10h/AX=4f01h

get SVGA Information int10h/AX=4f01h


I am trying to get the SVGA information with the following code, but the return value (AH) is always false (1). Can someone point me the error? Much appreciated!

.model small
.stack 200h

ModeAttributes dw ?
WinAAttributes db ?
WinBAttributes db ?
WinGranularity dw ?
WinSize dw ?
WinASegment dw ? ; window A start segment
WinBSegment dw ?
WinFuncPtr dd ?
BytesPerScanLine dw ?
XResolution dw ? ; horizontal resolution
YResolution dw ? ; vertical resolution
XCharSize db ? ; character cell width
YCharSize db ? ; character cell height
NumberOfPlanes db ? ; number of memory planes
BitsPerPixel db ? ; bits per pixel
NumberOfBanks db ? ; number of banks
MemoryModel db ? ; memory model type
BankSize db ?
NumberOfImagePages db ?
Reserved1 db ?
RedMaskSize db ?
RedFieldPosition db ?
GreenMaskSize db ?
GreenFieldPosition db ?
BlueMaskSize db ?
BlueFieldPosition db ?
RsvdMaskSize db ?
DirectColorModeInfo db ?
Reserved2 db 216 DUP(?)

svga_mi SVGA_ModeInfo<>


mov ax, @DATA ; initialize data section
mov ds, ax

; get video mode
mov ax, 4f03h
int 10h

; get VGA Info
mov ax, 4f01h
mov cx, bx ; CX = BX = current mode
mov di, OFFSET svga_mi
int 10h

mov ax, 4C00h
int 21h

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close