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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:56:57+00:00 2026-06-09T17:56:57+00:00

I have stored specific data on memory location 0x4000 . I wanted to pass

  • 0

I have stored specific data on memory location 0x4000. I wanted to pass a byte from there to memory location 0xb800 so that the data is printed in the screen. The problem arises when I try to store in 0xb800:0 what would be my first byte that I assume is in 0x4000:0. The code I used as example is below:

mov ax, 0xb800
mov es, ax
mov byte [es:0], 'A'

This compiles fine and runs perfectly, but what I’m trying to adapt throws an “invalid segment override” error on NASM. Here is my non working code:

mov ax, 0xb800
mov es, ax
mov byte [es:0], byte [0x4000:0]

Is it possible to get a single byte from 0x4000:[offset] and feed it to 0xb800:[offset] by using ES segment? If so, how?

  • 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-06-09T17:56:58+00:00Added an answer on June 9, 2026 at 5:56 pm

    You can do this, but you can’t do it in a single instruction like you have. You’ll need to use another segment register, such as ds, plus an intermediate register (al here):

    mov ax, 0x4000
    mov ds, ax
    mov ax, 0xb800
    mov es, ax
    mov al, [ds:0]
    mov [es:0], al
    

    Note that if you’ve got ds pointed somewhere else, then you’ll have consider that too (such as by saving and restoring it).

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

Sidebar

Related Questions

I have an existing SQL Server database, where I store data from large specific
How can I read (and put into new variable) data stored at specific memory
Is there a specific data structure that a deque in the C++ STL is
I have a very odd issue. When I execute a specific database stored procedure
I have created an application that uses settings.settings to store some user specific settings
I have stored data in hidden <input> tags, but it caused reduction in performance.
I have stored a variable in database(sqlite) with datetime data type. Now I want
I have stored images from the net like this Documents/imagecache/domain1/original/path/inURI/foo.png Documents/imagecache/domain2/original/path/inURI/bar.png Documents/imagecache/... Documents/imagecache/... Now
Suppose I have some data stored in a container of unique_ptr s: struct MyData
I have an array of data that is returned as a JSON response. The

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.