| | |
C++ code to MIPS code (assembly)
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Solved Threads: 0
Hi all, I have given this program to convert it to MIPS code in SPIM and print anapshot of the registers and the results
. and then assemble the MIPS instructions to machine code writing the out put in HEX format
thank you for help
//this program compile with C++
. and then assemble the MIPS instructions to machine code writing the out put in HEX format
thank you for help
//this program compile with C++
C++ Syntax (Toggle Plain Text)
#define N10 main() { int i; int array[N]={2.4,7,8,14,5,13 ,23}; int accumulate =0; for(i=N-1;i>=0;i-- { accumulate += array[i]; } cout<<"the result is"<<accumulate<<endl; }
Last edited by Ancient Dragon; Sep 13th, 2007 at 12:36 am. Reason: add code tags
If you use a compiler such as VC++ 2005 (Pro edition) or eVC++ 2.0, or eVC++ 3.0, or eVC++ 4.0 you can have it generate the MIPS assembly code.
>>and print anapshot of the registers and the results
Not sure how to do that because the value of the registers change on every instruction executed.
>>and print anapshot of the registers and the results
Not sure how to do that because the value of the registers change on every instruction executed.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- What's wrong with this code? (C#)
- please help me check code Tasm fibonacci (Assembly)
- URGENT: Code for 32 Bit Division (Assembly)
- Python Byte Code (Python)
- Compiling Source Code? (Assembly)
- stopwatch code using mips (urgently neede) (Assembly)
- Assembly, machine code and compilers (Assembly)
- Mips Assembly porting from C (Assembly)
Other Threads in the C++ Forum
- Previous Thread: another error need help please!
- Next Thread: need some help in pocket pc dialog!!!
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






