Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7059049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:11:08+00:00 2026-05-28T04:11:08+00:00

I want to display an image in graphics mode. I have read the image

  • 0

I want to display an image in graphics mode. I have read the image to a buffer. I have made this code but how can I display the pixels on the screen? This code works to display a text file but how can I display the pixels?

readFIL PROC NEAR ; proc que escreve uma ficha
     mov ah, 3dh ;Open the file
    mov al, 0 ;Open for reading
    lea dx, FILENAM;Presume DS points at FILENAM
    int 21h ; segment.
    mov  FHAND, ax ;Save file handle
LP: mov ah,3fh ;Read data from the file
    lea dx, NAMEFLD ;Address of data NAMEFLD
    mov cx, 12 ;Read one byte
    mov bx,  FHAND ;Get file handle value
    int 21h

    cmp ax, cx ;EOF reached?
    jne EOF
    mov al, NAMEFLD ;Get character read   
    ;--------
    mov cx,0
    siga:


    ;----------------------

    mov al,NAMEFLD
    lea si , NAMEFLD
    MOV AH,09h 
    int 21h

    ;---------------------
    inc dx   ;->> move next caracter in buffer
    add cx, 1
    cmp cx,12
    jne siga

EOF: mov bx,  FHAND
     mov ah, 3eh ;Close file
     int 21h

 RET
readFIL ENDP

Need help for school but teacher don’t help us anyway 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:11:09+00:00Added an answer on May 28, 2026 at 4:11 am

    Set a graphics mode using BIOS interrupt 10h function 0.

    I recommend setting mode 13h (320x200x8bpp) because it’s the easiest to program and it should work on any VGA card or better.

    Then draw the image in the video buffer, pixel by pixel. The buffer starts at the physical address 0xA0000 and is 320*200=64000 bytes long.

    If you don’t need to support more than the “16 standard” colors (the ones you get by default in text modes) or you’re OK with black-and-white, you can avoid reprogramming the VGA palette in the VGA DAC and you can avoid finding the best color. Just convert the RGB triplets into brightness (add together 30% of the red value, 59% of the green value, and 11% of the blue value), scale the value to the range from 0 to 15 inclusive, add 16 to that and that’s the byte value you should write into the video buffer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to display an image using this php script on my server. $file
I want to display an image at the bottom of the screen and make
I want to display images in a TableView . I can display one image
I want to display an image in a QGraphicsView with a QGraphicsScene. My code
Hey peepz! I have this footer image, that I want to align to the
I want to display image using base64 encoding in IE using GWT If it
I want to display .jpg image in an Qt UI. I checked it online
I want to display an image in my MKMapView instead of little rock pin
I want to display an image in a functional programming style. Basically, I operate
If I want to display an image in my webpage and its src is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.