• Support PF! Buy your school textbooks, materials and every day products Here!

Assembly language coding problems .

  • #1
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

 

Answers and Replies

  • #2
berkeman
Mentor
56,647
6,547
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?
 
  • #3


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?
 
  • #4
vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
14,547
1,155


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.
 

Related Threads for: Assembly language coding problems .

  • Last Post
Replies
0
Views
2K
Replies
10
Views
780
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
20
Views
8K
  • Last Post
Replies
13
Views
4K
Replies
1
Views
2K
Replies
2
Views
5K
Top