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

  • Home
  • SEARCH
  • 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 6611427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:58:05+00:00 2026-05-25T19:58:05+00:00

I am Plotting a pixel on the screen from the following code using Assembly

  • 0

I am Plotting a pixel on the screen from the following code using Assembly Language of x86 processor in C++. I dont want to use any function or method from C++ as I use this code for the boot loader program. here is the code:

/**********************************
 * Mainvainsoft 2011.             *
 * Writen By: Farid-ur-Rahman     *
 * On: 24 Sep At: 1:34 AM.        *
 **********************************/
 #include <conio.h>
 void main ()
 {
 // Setting Video mode to 256 colours at 320 X 200
 _asm {
 mov ah , 0x00 // Setting Video mode or Clear Screen
 mov al , 0x13 // Setting Video mode to 256 Color Mode
 int        0x10 // Call the Registor

 mov ah , 0x0c // Plot the Pixel
 mov al , 4    // Color
 mov cx , 160  // X-Axis
 mov dx , 100  // Y-Axis
 int        0x10 // Call the Registor
}
getch();     // Wait for the key press
}

I want to use the RGB colors to display on the pixel.

  • 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-25T19:58:06+00:00Added an answer on May 25, 2026 at 7:58 pm

    Mode 13h uses a palette with 256 18-bit RGB (6 bits for each) entries. So you can set for example entry 4 to the RGB color you want and the plot the pixel as you are doing with color 4.

    See here for an example of how to set a palette entry. After setting the video mode you can do something like:

    // Set entry 4
    mov dx, 0x3c8
    mov al, 4
    out dx, al
    
    inc dx
    mov al, Red 
    out dx, al
    mov al, Green
    out dx, al
    mov al, Blue
    out dx, al
    
    // draw pixel
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am plotting a confusion matrix with matplotlib with the following code: from numpy
I am plotting a 7x7 pixel 'image' in MATLAB, using the imagesc command: imagesc(conf_matrix,
When plotting a graph with a discontinuity/asymptote/singularity/whatever, is there any automatic way to prevent
I'm plotting a group of curves, using facet in ggplot2. I'd like to have
I am plotting a financial candlestick chart using this MATLAB function: http://www.mathworks.com/help/toolbox/finance/candlefts.html How do
I am plotting a simple histogram of data sampled at, say, 10%. I want
I am plotting two lines using plot(x, y, type = l, color = red)
I'm plotting a TimeTableXYDataset using a StackedXYBarRenderer . Unfortunately the colours of each series
I'd like to export plotting symbols from R as a png graphic. But I
How would one go plotting a plane in matlab or matplotlib from a normal

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.