Welcome! Log In Create A New Profile

Advanced

Assignment 3 Question 2

Posted by esckay 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Assignment 3 Question 2
May 08, 2007 10:44PM
Hi,

I don't know if anybody if this far yet, but I am struggling allot with this question. It seems that I totally miss interpreted the sample programs that they provide in the study guide, because when I attempt this question nothing works.

I really don't hope that this is the type of questions we will be seeing in the exam !!!

Cheers,
Esckay
Re: Assignment 3 Question 2
May 08, 2007 11:06PM
If you give me an idea of which part you can't do, I think I can help you. I have a semi working version of the whole program, if i type my input as B7 I get MOV 23 and not MOV AL,[23]. So in effect my program gives the right answers but does not add in all the extra formatting.
To add the formatting is difficult for the following reason

PUSH 23 should be formatted as PUSH [23]
POP 23 should be formatted as POP 23
ADD 23 should be formatted as ADD AL,[23]
SUB 23 should be formatted as SUB AL,[23]
JMP 23 should be formatted as JMP 23
MOV 23 should be formatted as MOV AL,[23]
JE 23 should be formatted as JE 23
RET (No matter what number) should be formatted as just RET

So depending on the instruction the output needs to be formatted differently.
Re: Assignment 3 Question 2
May 11, 2007 03:03PM
Thanks for the offer, but it seems that I finally got some of it to work. Sounds like I am basically at the same point in the assignment as you are. I now just need to go and work on the final formatting, but I must say .... it is a mission trying to keep track of all the registers as you are coding !!!!!

Assembler just makes my appreciate 4th and 5th generation languages SOOOOOOOO MUCH more !!!!!
Re: Assignment 3 Question 2
May 28, 2007 08:50PM
Hi Guys

I am totally lost. Please point in a direction where I can find my feet.

I figured out how to read the characters from the keyboard and how to print to the screen.

I have no idea how to go about solving this.

Sanjiv
Re: Assignment 3 Question 2
May 29, 2007 02:15PM
How do you declare a array existing of 8 5-byte strings?
Re: Assignment 3 Question 2
May 29, 2007 05:50PM
Hi here's how I have done it. Try make lots of use of procedures to prevent getting lost in a jumble of code.

;------------- Array of Opcodes-------------------------------------
Opcode: db 'PUSH$','POP $','ADD $','SUB $','JMP $','MOV $','JE $','RET $'
;-------------------------------------------------------------------
Re: Assignment 3 Question 2
May 30, 2007 12:05PM
thats gr8. Thanks

Sanjiv
Sorry, only registered users may post in this forum.

Click here to login