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 6888461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:01:09+00:00 2026-05-27T06:01:09+00:00

I am trying to write the letter ‘D’ in blue on a white background

  • 0

I am trying to write the letter ‘D’ in blue on a white background by moving it to the video buffer. What is wrong with this code?

INCLUDE Irvine16.inc

.code
main PROC

mov ax,@data
mov ds,ax

mov si, 0b800h
mov word ptr [si], 44h
mov word ptr [si+2] 0701h

mov ah, 08h
int 21h

exit

main ENDP

Made the changes to above. It now assembles, but displays nothing.

  • 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-27T06:01:11+00:00Added an answer on May 27, 2026 at 6:01 am

    Sample example:

    name "hello-world"
    org 100h
    
    ; set video mode     
    mov ax, 3     ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3) 
    int 10h       ; do it! 
    
    ; cancel blinking and enable all 16 colors: 
    mov ax, 1003h
    mov bx, 0
    int 10h
    
    
    ; set segment register: 
    mov     ax, 0b800h
    mov     ds, ax
    
    ; print "hello world" 
    ; first byte is ascii code, second byte is color code. 
    
    mov [02h], 'h'
    
    mov [04h], 'e'
    
    mov [06h], 'l'
    
    mov [08h], 'l'
    
    mov [0ah], 'o'
    
    mov [0ch], ','
    
    mov [0eh], 'w'
    
    mov [10h], 'o'
    
    mov [12h], 'r'
    
    mov [14h], 'l'
    
    mov [16h], 'd'
    
    mov [18h], '!'
    
    
    
    
    ; color all characters: 
    mov cx, 12  ; number of characters. 
    mov di, 03h ; start from byte after 'h' 
    
    c:  mov [di], 11101100b   ; light red(1100) on yellow(1110) 
        add di, 2 ; skip over next ascii code in vga memory. 
        loop c
    
    ; wait for any key press: 
    mov ah, 0
    int 16h
    
    ret
    

    Hope this sample helps you

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

Sidebar

Related Questions

Trying to write a code at the moment that basically tests to see if
I'm trying to write a function to convert 3-letter month abreviations to numeric values
How would you do this...? I am trying to write a string transformer, which
I'm trying to write a prediate that returns every third letter of a list.
I'm trying to write a piece of code that will do the following: Take
I am trying to write a program to find how many 1-letter, 2-letter, 3-letter,
I'm trying to write a batch file that takes the drive letter the batch
I am trying write a function that generates simulated data but if the simulated
Trying to write a couple of functions that will encrypt or decrypt a file
Trying to write out syslog entries containing strings but they don't register. // person.name

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.