TCP1101: In this assignment, you will implement an assembly language interpreter that will run assembly language instructions: programming Assignment, MMU, Malaysia
University | Multimedia University (MMU) |
Subject | TCP1101 programming Assignment |
Assembly Language Interpreter
Introduction:
In this assignment, you will implement an assembly language interpreter that will run assembly language instructions with accordance to a given simplified virtual machine architecture. The interpreter is expected to execute an assembly program and generate a display of the content of the virtual machine after the execution of the program.
Get Solution of this Assessment. Hire Experts to solve this assignment for you Before Deadline.
The assembly language for the given virtual machine supports various operations such as:
1. Move operations,
2. Mathematical operations,
3. Rotation and shifting operations,
4. Basic I/O operations,
5. Loading data from memory,
6. Storing data to memory.
Virtual Machine Architecture:
The virtual machine includes 7 data general registers and a program counter where each of them is one byte wide (char), 4 flag registers (Overflow, Underflow, Carry, and Zero), and a main memory of 64 bytes.
Your virtual machine architecture will include the following components:
Are You Searching Answer of this Question? Request Malaysian Writers to Write a plagiarism Free Copy for You.
1. Data Registers:3
7 general-purpose data registers: R0, R1, R2, R3, R4, R5, R6. Each register is represented as a one byte (8 bits) in size. The contents of these registers are updated after executing each assembly instruction by the runner. These registers can contain signed bytes (values between -128 and 127)
2. Program Counter (PC)
The program counter starts always with the value 0, then it is incremented whenever the runner (interpreter) executes an assembly instruction.
3. Flags:
- Â Overflow Flag (OF): A single bit flag (or a byte) indicating arithmetic overflow. It is set when an arithmetic operation results in a value greater than 127.
- Underflow Flag (UF): A single bit flag (or byte) indicating arithmetic underflow. Set when an arithmetic operation results in a value smaller than -128.
- Â Carry Flag (CF): A single bit flag (or a byte) indicating carry in arithmetic operations. Set when an arithmetic operation results in a carry. An addition can generate a value larger then 8 bits, therefore the carry flag is set.
- Zero Flag (ZF): A single bit flag indicating the result of an operation is zero. Set when the result of an operation is zero.
4. Memory:
The memory can be represented as a one-dimensional array of 64 signed bytes. Memory addresses are numbered from 0 to 63. Memory can e accessed only by a load or store operations.
5. Assembly Language Runner (interpreter):
The interpreter reads an assembly program from a “.asm” file (text file). It must execute the instructions sequentially on the virtual machine updating the PC (program counter) after each instruction. At the end of execution, it will produce a dump of all registers and memory to the screen in addition to the output window (results of the I/O operations).
6. The assembly language instructions:
The assembly language is expected to support I/O operations, arithmetic operations, rotation, shifting, loading from memory (direct and register indirect addressing), and storing into memory
Input/Output operations:
Mov operations:
- MOV Rsrc, Rdst: copies the values stored in the source register to the destination register. The mov operation supports three modes only, these modes are explained in the following 3 examples.
Stuck in Completing this Assignment and feeling stressed ? Take our Private Writing Services.
Get Help By Expert
Need assistance with TCP1101 programming Assignment? Our programming assignment helper Malaysia service is here for you. We specialize in providing expert support as your trusted assignment helper. Malaysia students can confidently pay our experts for tailored assistance, ensuring success in their programming endeavors. Trust us to guide you through TCP1101 with confidence and ease.
Recent Solved Questions
- BNNS6433: The infection typically starts in the lower urinary tract as a urinary tract infection (UTI): Genitourinary & Endocrine Nursing Assignment, LUC, Malaysia
- Fundamentals Of Finance II Assignment, MUM, Malaysia Anwar owns 500 shares of frozen food Awesome Food Berhad which he purchased during the recession in January
- Property Management System Assignment, APU, Malaysia Identify a business domain for Condominium Property Management. Construct a software solution using
- TCP1101: In this assignment, you will implement an assembly language interpreter that will run assembly language: Programming Fundamentals Assignment, UM, Malaysia
- Big Data and Ethics Essay, APU, Malaysia The U.S. firm Apple operates a digital ecosystem with its own hardware and software. Part of this ecosystem is an app store
- BBGO4103: The purpose of this assignment is to enhance learners’ ability to apply and adapt the concept and theories of organisational behaviour: Organisational Behaviour, Assignment, OUM, Malaysia
- SMP10803: Principles of Marketing Assignment, UMP, Malaysia You are planning to venture into one of the agribusinesses in the area in which you live Discuss 3 (THREE) major external forces that will impact your future business.
- MPU3193: Why is equality important in playing the role of uniting Malaysian society? Give two (2) reasons with examples: Philosophy and Current Issues Assignment, WOU, Malaysia
- FBWFF1013: Fundamentals of Finance Case Study, UUM, Malaysia Taking into consideration the fact that the $98,000 home price will grow at 4% per year, what will be the future median home selling price
- CDDS2103: Bincangkan topik berkenaan di dalam forum dan hantar bukti penglibatan forum dalam perbincangan dalam talian: Pengenalan Kepada Struktur Data Assignment, OUM, Malaysia