Suppose the Vole communicates with a printer using the technique of memory-mapped I/O. Suppose also that address 0xFF is used to send characters to the printer, and address 0xFE is used to receive information about the printer’s status. In particular, suppose the least significant bit at the address 0xFE indicates whether the printer is ready to receive another character (with a 0 indicating “not ready” and a 1 indicating “ready”). Starting at address 0x00, write a machine language routine that waits until the printer is ready for another character and then sends the character represented by the bit pattern in register 0x5 to the printer.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Computer Science: An Overview (12th Edition)
Additional Engineering Textbook Solutions
Introduction to Programming Using Visual Basic (10th Edition)
Problem Solving with C++ (10th Edition)
Starting Out with Python (3rd Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Introduction To Programming Using Visual Basic (11th Edition)
- Consider a 32-bit hexadecimal number stored in memory as follows: Address Value 100 2A 101 C2 102 08 103 1B a) If the machine is big endian and uses two's complement representation for integers, write the 32-bit integer number stored at address 100 (you may write the number in hex). b) If the machine is big endian and the number is an IEEE single-precision floating-point value, is the number positive or negative? c) If the machine is big endian and the number is an IEEE single-precision floating-point value, determine the decimal equivalent of the number stored at address 100 (you may leave answer in scientific notation form, as a number times a power of two). d) If the machine is little endian and uses two's complement representation for integers, write the 32-bit integer number stored at address 100 (you may write the number in hex). e) if the machine is little endian and the number is an iEEE single-precision floating-point value, is the number positive or negative? f)…arrow_forwardThe memory location at address of 0X003FB01 contains 1-byte memory variable J (0010_0001), and the memory location at the address of 0X003FB02 contains 1-byte memory variable K (0001 0010), see figure below. There is a 2-byte variable M which hold binary information M (1110 0101 0000 1i11). What is the address in hexadecimal format for 2-byte memory variable M, following little Endian computer? 7 Address in Data in Hex. Format Hex. Format 0X003FBF04 1110 0101 M OX003FBF03 0000 1111 0X003FBF02 0001 0010 0X003FBF01 0010 0001 J Its address in hexadecimal is 0X003FBF02. а. Its address in hexadecimal is 0×003FBF03. O b. Its address in hexadecimal is 0X003FBF04. Its address in hexadecimal is 0×003FBF01. d.arrow_forwardGiven rax = 0x0000000200000100, rbx = 0x0000000000000100, and rcx = 0x0000000000000001,and the following values in memoryaddress -> byte at that address0x0000000000000100 -> 0x010x0000000000000101 -> 0x000x0000000000000102 -> 0x000x0000000000000103 -> 0x000x0000000000000104 -> 0x020x0000000000000105 -> 0x000x0000000000000106 -> 0x000x0000000000000107 -> 0x00what is the new value in %rax after the following operation?subq -0x04(%rbx, %rcx, 4), %raxarrow_forward
- Suppose the memory cells at address A4 to B3 in the machine described in language description table contains the bit pattern given in the following table. Assume that the machine is starting with its program counter containing A4. Explanation of the output is compulsory. Address A4 A5 A6 A7 A8 A9 AA Contents 20 00 21 03 22 01 B1 во 50 02 во AA co 00 50 05 AB AD AE AF во B1 B2 B3 a) Display the machine cycle in the table form with Program Counter (P.C), increment of P.C., Instruction Register (I.R.) and General-Purpose Register (G.P.R) and description of each instruction executed. Explanation of the output is compulsory. b) What is in register 0 the first time the instruction at address AA is executed? c) What is in register 0 the second time the instruction at address AA is executed? d) How many times is the instruction at address AA executed before the machine halts e) What is the bit pattern found in program counter when the machine halts?arrow_forward3. Implement a 32-bit subtraction of two numbers X and Y that are stored in memory as: X = (DS: 503H) MS byte of MS word (DS: 0502H) (DS: 0501H) (DS: 0500H) LS byte of MS byte of LS byte of MS word LS word LS word Y = (DS:0507H) (DS: 0506H) (DS: 0505H) (DS: 0504H) The result of X - Y is to be saved in the place where X is stored in memory.arrow_forwardAssume you now have 1kB of memory, i.e. the memory address space runs from 0 to 1023. The starting address of the first word is 0, the second word is 4, the third word is 8, and so on. The last word comprising 4 bytes resides in addresses 1020, 1021, 1022, 1023. Thus, the last word starts at 1020, which is a multiple of 4. Now assume the same 1kB of memory but now, word size is 64 bits. The starting address of the first word is 0, the second, third, and last word starts at? my answer: (correct) the second is equal to = 8 the third is equal to = 16 help me find the last wordarrow_forward
- Consider the string of data #. The ASCII value of data # is 23 H which has to be moved from source memory to destination memory. Calculate the 20 bit PA of source memory and destination memory. Assume CS=2000 H, DS=5000 H, SS=6000 H, ES=8000 H. BX=1234 H, BP=2434 H, SP=3500 H, SI=4000 H, DI=5276 H, IP=D1245 H.arrow_forwardWrite a MIPS assembly code program that asks the user to enter an unsigned number and read it. Then swap the bits at odd positions with those at even positions and display the resulting number. For example, if the user enters the number 9, which has binary representation of 1001, then bit 0 is swapped with bit 1, and bit 2 is swapped with bit 3, resulting in the binary number 0110. Thus, the program should display 6. Example of the MIPS assembly code I went the answer on MIPS Code only!!!!arrow_forwardAssume you now have 1kB of memory, i.e. the memory address space runs from 0 to 1023. The starting address of the first word is 0, the second word is 4, the third word is 8, and so on. The last word comprising 4 bytes resides in addresses 1020, 1021, 1022, 1023. Thus, the last word starts at 1020, which is a multiple of 4. Now assume the same 1kB of memory but now, word size is 64 bits. The starting address of the first word is 0, the second, third, and last word starts at?arrow_forward
- Case Study Assume a computer system has a main memory of 256 Bytes. The following is a memory byte-access trace history of a program run on this system. For example, as it is shown, the program first accesses memory address 0000 0000, and then it accesses memory address 0000 0001 and so on. Note the memory addresses are represented in binary: 00000000, 00000001, 00000010, 00000011, 00001000, 00010000, 00010001, 00000100, 00000101, 00000110, 00000111, 00001001, 00001010, 00001011, 00001100, 00001000, 00001001, 00001010, 00011100, 00011101. Q3. Assume the system has a 16-Byte direct mapped unified L1 cache with a block size of 2 Bytes. The following table shows how the cache looks like after the first access to the memory is finished. Please show; in the provided table, how it looks like after the 20th access is finished. You could ignore the "Data" Column. (Add or remove Rows/Columns in the provided table for your answer, as you see fit). Cache contents after the 1st access: Cache Index…arrow_forwardA set of eight data bytes is stored in memory locations starting from XX70H. Write a program to add two bytes at a time and store the sum in the same memory locations, low order sum replacing the first byte and a carry replacing the second byte. If any pair does not generate a carry, the memory location of the second byte should be cleared. Data(H) F9, 38, A7, 56,98,52, 8F, F2arrow_forwardVariable x has 4-byte representation 0x01234567 Address given by &x is 0x100 If the machine uses Big endian byte ordering which of the following table presents variable in machine memory Select one: a. 0x100 : 100x001: 320x102: 540x103: 76 b. 0x100 : 670x001: 450x102: 230x103: 01 c. 0x100 : 760x001: 540x102: 320x103: 10 d. 0x100 : 010x001: 230x102: 450x103: 67arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education