Question: SRC code program Write a program that checks the memory status (read/write operation) of your SRC machine. Your program should fill one Kbyte of the



Write a program that checks the memory status (read/write operation) of your SRC machine. Your program should fill one Kbyte of the memory with a sequence of 1's and O's (i.e. 4 bytes of 1's followed by four bytes of O's). Then read that sequence again. If any error occurred while writing or reading the data, your program should output 0 to indicate an error in memory read/write operation. Otherwise, your program should output 1 to indicate a successful write-read sequence. Take a screenshots of: Write-operation . Instruction used: St Instruction . Value to write: One memory location is equal to 4 bytes=1 word = 8 hexadecimal digits=32 bits Sequence of 4 bytes of 1's in hexadecimal 11111111 which is equal in binary (11111111 11111111 11111111 11111111)b = -1 in decimal Followed by 4 bytes of O's in hexadecimal 00000000 which is equal in binary (0000000000000000 0000000000000000)b = 0 in decimal Counter for 1KB 1KB/8B=1024/8=128 Memory after writing operation was done . Loc Orte 00 Ost 04 ortset 0 Ora 0 016 1 0 -1 292 - -1 LOOB Read-operation Instruction used: ld Instruction . How to check that memory location has -1 as its content? One way is to add one to the content and branch if the result is zero. How to check that memory location has 0 as its content? One way is use branch if zero. Remember to use an indicator (can be register or variable stored in memory) after finishing the read operation. Indicator = 1 if the read operation was done and the correct sequence found in memory. Indicator = 0 if an error occurred while reading such as the sequence was incorrect. Equipments and Software Tools Required: 1. SRCToolsv3.1.1.jar 2. Java Runtime Environment (if not already installed on your PC)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
