Projet - the expression written by the user that we are...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Paul Bertrand 01 December 2004 Thomas Nerrant [email protected] , [email protected] Computer Architecture Project Fall 2004, ECE 4551 Dr Veton Kepuska
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Introduction The purpose of this project is to write a program in assembly code that is able to perform simple arithmetic operations. The aim of having written the code in assembly language is that it is a low level language that enables us to work directly with registers, memory, stack and CPU instructions. It fits with the content of the computer architecture courses. Specifications The program has been written in MASM. The Microsoft Macro Assembler (MASM) provides several advantages over inline assembly. MASM contains a macro language with looping, arithmetic, text string processing, and so on, and MASM supports the instruction sets of the 386, 486, and Pentium processors, providing greater direct control over the hardware. MASM also prevents from extra time and memory overhead. The code is made of two main parts. The first part (getcommandtail) has to store
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the expression written by the user that we are going to calculate in a register. The second part will analyze recursively this string of character. It can deal with parenthesis, spaces and of course priorities of operators. For example, considering the string 5*4+3, the program will first evaluate 5*4 and will then add 3. If the string becomes 5*( ( ( (4+3)))), then the program will compute 4+3 in a first time and then multiply the result per 5. The string can be 250 characters long and the result is stored in a 32 bits register. For further details concerning the structure of the program, please refer the .asm file where all the comments have been made. To execute the program, launch the command dos windows (start, run, cmd). Write the path where the calculate.exe file is stored. Type “calculate –expression to calculate- “and then hit the “enter” key. Here is an example,:...
View Full Document

This note was uploaded on 02/10/2012 for the course ECE 4551 taught by Professor Johnhadjilogiou during the Fall '09 term at FIT.

Page1 / 3

Projet - the expression written by the user that we are...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online