Assembly language coding problems .

Click For Summary

Discussion Overview

The discussion revolves around assembly language coding problems, specifically focusing on machine code instructions for the IAS (Institute for Advanced Study) computer system. Participants are exploring the correct representation of a machine code instruction to load contents from a specific memory address.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant asks for the machine code instruction to load the contents of memory address 2 on the IAS system, proposing the code 00001001 and a symbolic representation of LOAD MQ, M(0010).
  • Another participant expresses confusion about the term IAS and distinguishes between assembly language and machine language, suggesting they are not the same.
  • A third participant provides historical context about the IAS computer, detailing its instruction set and memory structure, and proposes a machine code instruction of 000010010000000010, explaining the opcode and addressing.
  • There is a correction regarding the bit count in the proposed instruction, indicating that the initial submission was missing bits and suggesting a grouping method for clarity.
  • Participants clarify that "machine code" consists of binary digits while "Assembly Language" uses mnemonics like LOAD and ADD.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the correct machine code representation and the distinction between assembly and machine language. There is no consensus on the correct instruction format or the interpretation of the original question.

Contextual Notes

There are limitations in the clarity of the original question, as well as potential misunderstandings regarding the definitions of machine code and assembly language. The discussion also reflects varying levels of familiarity with the IAS system among participants.

bengaltiger14
Messages
135
Reaction score
0
Assembly language coding problems...

Homework Statement



I am an electrical engineering student and have some HW problems. On the IAS system, what would machine code instruction look like to load the contents of memory address 2??

I came up with 00001001. Does this look correct?? Also, symbolic respresentation would be: LOAD MQ, M(0010)


Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
So for those of us who don't understand what you are asking about, but are willing to help, could you please tell us what IAS is? I've coded a lot of assembly, but I'm unfamiliar with the term IAS. But it could be some new standard that I'm not familiar with yet.

And the title of your thread says "Assembly language" but you appear to be asking about a machine language byte. Those are not the same, correct?
 


I must be using the same textbook; I am also unsure of this one. berkeman - IAS is a kind of computer that was completed in 1952 and is the prototype of all subsequent general purpose computers. It had a total of 21 instructions and 1000 words of 40 bits each for memory. Each word has a left and right instruction, 20 bits each, first 8 bits are the opcode (tells it to ADD, STOR, SUB, MUL, LOAD, etc) and last 12 bits are the address.

For the above question I came up with 000010010000000010 or LOAD reg(1), mem(2). According to the IAS instruction chart provided in the book, 00001001 is the opcode for "LOAD MQ,M(X) (transfer contents of memory location X to register MQ)". and the remaining 12 bits I assume should say "2" because that's what memory location we want?

Also, just for clarification, "machine code" refers to ones and zeros, and "Assembly Language" is using instructions like LOAD, ADD, etc?
 


annika2450 said:
I must be using the same textbook; I am also unsure of this one. berkeman - IAS is a kind of computer that was completed in 1952 and is the prototype of all subsequent general purpose computers. It had a total of 21 instructions and 1000 words of 40 bits each for memory. Each word has a left and right instruction, 20 bits each, first 8 bits are the opcode (tells it to ADD, STOR, SUB, MUL, LOAD, etc) and last 12 bits are the address.

For the above question I came up with 000010010000000010 or LOAD reg(1), mem(2). According to the IAS instruction chart provided in the book, 00001001 is the opcode for "LOAD MQ,M(X) (transfer contents of memory location X to register MQ)". and the remaining 12 bits I assume should say "2" because that's what memory location we want?
You're missing a few bits. You have only 18, not 20, bits. It helps to group them in 4s to make it easier to read and count, e.g. 0000 1001 0000 0000 0010.

It's also possible that the question is referring to load the contents at location 2 into the accumulator: LOAD M(2).
Also, just for clarification, "machine code" refers to ones and zeros, and "Assembly Language" is using instructions like LOAD, ADD, etc?
Yeah.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 122 ·
5
Replies
122
Views
18K
  • · Replies 2 ·
Replies
2
Views
15K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 12 ·
Replies
12
Views
5K
Replies
5
Views
11K
  • · Replies 6 ·
Replies
6
Views
6K
Replies
8
Views
3K
Replies
13
Views
39K