ReadInt PROC Reads a 32-bit signed decimal integer from standard input, stopping when the Enter key is pressed. Show Call args: None Return args: If OF=0, EAX = valid binary value, and SF=sign. If OF=1, EAX = 0 (invalid input) Example: .data intNum DWORD ? promptBad BYTE "Invalid input, please enter again",0 .code read: call ReadInt jno goodInput mov edx,OFFSET promptBad call WriteString jmp read ;go input again goodInput: mov intNum,eax ;store good valueNotes: To read an unsigned integer, use the ReadDec procedure. To read in hexadecimal, use the ReadHex procedure. Recommended textbook solutions
Information Technology Project Management: Providing Measurable Organizational Value5th EditionJack T. Marchewka 346 solutions
Introduction to Algorithms3rd EditionCharles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen 726 solutions
Information Technology Project Management: Providing Measurable Organizational Value5th EditionJack T. Marchewka 346 solutions Service Management: Operations, Strategy, and Information Technology7th EditionJames Fitzsimmons, Mona Fitzsimmons 103 solutions
Terms in this set (30)Students also viewedSets found in the same folderOther sets by this creator
Verified questions
computer science Verified answer computer science Verified answer
computer science Verified answer computer science A page-replacement algorithm should minimize the number of page faults. We can achieve this minimization by distributing heavily used pages evenly over all of memory, rather than having them compete for a small number of page frames. We can associate with each page frame a counter of the number of pages associated with that frame. Then, to replace a page, we can search for the page frame with the smallest counter. a. Define a page-replacement algorithm using this basic idea. Specifically address these problems: i. What is the initial value of the counters? ii. When are counters increased? iii. When are counters decreased? iv. How is the page to be replaced selected? b. How many page faults occur for your algorithm for the following reference string with four page frames? 1, 2,3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. c. What is the minimum number of page faults for an optimal page replacement strategy for the reference string in part b with four page frames? Verified answer Recommended textbook solutions
Other Quizlet setsWhich library procedure locates the cursor at a specific row and column on the screen?Gotoxy. Locates the cursor at a given row and column in the screen's console buffer.
What instruction would I use to save the current value of the flags register?What instruction would I use to save the current value of the flags register? Mechanically speaking, the CALL instruction pushes its return address on the stack and copies the called procedure's address into the instruction pointer.
|