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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:06:11+00:00 2026-05-30T11:06:11+00:00

I recently made the Simpletron assignment from the Deitel and Deitel textbook. The Simpletron

  • 0

I recently made the Simpletron assignment
from the Deitel and Deitel textbook.

The Simpletron machine language has only one addressing mode which is direct addressing.
(That is, you have to specify the address you want to access in the operand part of the instruction.)

So I think there is no way of computing an address at run time and access it.

So doing something like this:

[pseudo-c]

int a[10];

...  

int i = 0;

while(a[i] > 100)  
{  

i++;

}  

..

would require some self modifying code or expanding the loop, am I correct?
So my question is:

The textbook presents Simpletron as very similar to early computers.

Were indirect addressing modes (such as register addressing) introduced in subsequent architectures to make programming easier?

  • 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-30T11:06:12+00:00Added an answer on May 30, 2026 at 11:06 am

    I believe that’s correct. But Simpletron is so trivial that self-modifying code is only three instructions:

    // address to load is in accumulator
    ADD loadinstruction // construct load instruction
    STORE $ + 1         // write instruction to next word of memory
    ...                 // placeholder filled in by write instruction
    // value is in accumulator
    
    loadinstruction: .data 2000
    

    This is only possible because Simpletron’s program shares memory with its data. Some computer architectures don’t do this; the PIC line of microcontrollers, for example. (Where the RAM is 8 bits wide but the program memory is 14 bits wide!) You also can’t modify the program if it’s in ROM, obviously enough.

    I don’t know if this was the specific reason why indirect addressing modes were developed, but it’s certainly an important one.

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

Sidebar

Related Questions

I recently made the insanely long overdue switch from tcsh to bash. The only
Having made the jump just recently from XEmacs to GNU Emacs, I'm really loving
I recently made the change from Dreamweaver to NetBeans and noticed this IDE doesn't
I recently made the move from Linux development to Windows development. And as much
So I have a website that I recently made changes to, and one of
I've recently made an UserControl , which took quite a long time, because I
I know that NULL isn't necessary in a programming language, and I recently made
I recently made a c# printer management tool that uses a WCF service which
I just recently made the move to Objective-C. I am doing some exercises from
I have recently made the transition from a Java web developer to a C#

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.