•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 426,802 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,888 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser: Programming Forums
Views: 3839 | Replies: 4
![]() |
•
•
Join Date: Mar 2005
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
thank you for reading the thread.
I need the help for my problem.
This is the question I am stuck with.
Memory contents in IAS computer.
Address////////Contents
08A//////////////010FA210FB
08B//////////////010FA0F08D
08C//////////////020FA210FB
the question is Show the assmbly code for the program
explain what this program does.
I really dont know the way to solve.
I need the help for my problem.
This is the question I am stuck with.
Memory contents in IAS computer.
Address////////Contents
08A//////////////010FA210FB
08B//////////////010FA0F08D
08C//////////////020FA210FB
the question is Show the assmbly code for the program
explain what this program does.
I really dont know the way to solve.
•
•
Join Date: Sep 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Address/////////Contents
08A//////////////010FA210FB
08B//////////////010FA0F08D
08C//////////////020FA210FB
Here is a simple way to understand this problem:
Contents are divided up into two 5 bit instructions, LH and RH
LH instruction = 010FA
opcode = 01
address = 0FA
RH instruction = 210FB
opcode = 21
address = 0FB
Since this is in hexadecimal form you have to convert the numbers to binary form: (use the IAS instruction set)
LH instruction:
01 = 00000001 = LOAD M(X)
M(X) refers to the memory address location 0FA
The first 5 bits of 08A should read - LOAD M(0FA)
RH instruction:
21 = 00100001 = STOR M(X)
M(X) refers to the memory address location 0FB
The second 5 bits of 08A should read - STOR M(0FB)
Now, do this for the contents in 08B and 08C and you will have your assembly language code which should look like this:
LOAD M(0FA)
STOR M(0FB)
LOAD M(0FA)
JUMP + M(08D, 0:19)
LOAD - M(0FA)
STOR M(0FB)
08A//////////////010FA210FB
08B//////////////010FA0F08D
08C//////////////020FA210FB
Here is a simple way to understand this problem:
Contents are divided up into two 5 bit instructions, LH and RH
LH instruction = 010FA
opcode = 01
address = 0FA
RH instruction = 210FB
opcode = 21
address = 0FB
Since this is in hexadecimal form you have to convert the numbers to binary form: (use the IAS instruction set)
LH instruction:
01 = 00000001 = LOAD M(X)
M(X) refers to the memory address location 0FA
The first 5 bits of 08A should read - LOAD M(0FA)
RH instruction:
21 = 00100001 = STOR M(X)
M(X) refers to the memory address location 0FB
The second 5 bits of 08A should read - STOR M(0FB)
Now, do this for the contents in 08B and 08C and you will have your assembly language code which should look like this:
LOAD M(0FA)
STOR M(0FB)
LOAD M(0FA)
JUMP + M(08D, 0:19)
LOAD - M(0FA)
STOR M(0FB)
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Address/////////Contents
08A//////////////010FA210FB
08B//////////////010FA0F08D
08C//////////////020FA210FB
Here is a simple way to understand this problem:
Contents are divided up into two 5 bit instructions, LH and RH
LH instruction = 010FA
opcode = 01
address = 0FA
RH instruction = 210FB
opcode = 21
address = 0FB
Since this is in hexadecimal form you have to convert the numbers to binary form: (use the IAS instruction set)
LH instruction:
01 = 00000001 = LOAD M(X)
M(X) refers to the memory address location 0FA
The first 5 bits of 08A should read - LOAD M(0FA)
RH instruction:
21 = 00100001 = STOR M(X)
M(X) refers to the memory address location 0FB
The second 5 bits of 08A should read - STOR M(0FB)
Now, do this for the contents in 08B and 08C and you will have your assembly language code which should look like this:
LOAD M(0FA)
STOR M(0FB)
LOAD M(0FA)
JUMP + M(08D, 0:19)
LOAD - M(0FA)
STOR M(0FB)
I didn't have any trouble figuring out the assembler. I'm stuck on the second part of the question though, explaining what it does. Specifically, the 4th step (JUMP + M(08D, 0:19)). It says "If number in the accumulator is nonnegative, take the next instruction from left half of M(X)" or the left half of 08D. I have two problems here. First, although I know the value in the accumulator came from 0FA, I don't know what the specific value of 0FA is, and thus I have no idea if it is positive or not. Secondly, if it is positive, I don't have 08D to go too (only 08A to 08C).
The only other think I can think of is that it's saying "Check the value of the accumulator. If it's positive, do the jump. If not, go to the next step." The next step being to Load the negative of 0FA into the accumulator, then store it to 0FB.... So it's saying "if it's negative, keep it negative. If it's positive, make it negative." is this right?
Thanks!
Last edited by Tronman : Sep 23rd, 2007 at 4:07 pm.
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Err...wait, maybe it's saying "if it's positive, keep it positive. If it's negative, make it positive".
Err....trying again, it loads 0FA into the accumulator. It then stores the accumulator into 0FB. It loads 0FA to the accumulator again. If 0FA is negative, store the negative of 0FA (thus the positive) into 0FB. So in any case, 0FB stores the positive of 0FA
Err....trying again, it loads 0FA into the accumulator. It then stores the accumulator into 0FB. It loads 0FA to the accumulator again. If 0FA is negative, store the negative of 0FA (thus the positive) into 0FB. So in any case, 0FB stores the positive of 0FA
Last edited by Tronman : Sep 23rd, 2007 at 4:18 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Computer Science and Software Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp blog business software computer dell design developer development erp systems experiment firefox howto india intel internet it java linux media microsoft mmorpg msdn networking news office open open-source operating programming project management rss science security software software selection source sql sun super system technology evaluation toread vista warez web wiki windows xp
- Computer Won't Function Properly (Troubleshooting Dead Machines)
- can you hook a computer up to a receiver for surround sound? (Troubleshooting Dead Machines)
- relation of mathematics with computer science (Computer Science and Software Design)
- How long do you use your computer each day? (Geeks' Lounge)
- Can my computer support this?!?!? (Motherboards, CPUs and RAM)
- Computer Club (Geeks' Lounge)
Other Threads in the Computer Science and Software Design Forum
- Previous Thread: algorithm problem in my thesis!!
- Next Thread: what the feature extraction from voice recognation


Linear Mode