Dale - Computer Science Illuminated 249

Dale - Computer Science Illuminated 249 - and Execute 28...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
222 Chapter 7 Low-Level Programming Languages 21. If the input character is A, what is the result of executing the following two instructions? 1110 00100110 11111111 11111001 111C 00011110 11111111 11110101 22. Write the algorithm for writing your name, given that the implementa- tion language is Pep/7 machine code. 23. Write the machine-language program to implement the algorithm in Exercise 22. 24. Write the algorithm for writing out your name, given that the imple- mentation language is Pep/7 assembly language. 25. Write the assembly-language program to implement the algorithm in Exercise 23. 26. Rewrite the enhanced “ 6788. ” program so that a blank is printed before the initial. 27. Distinguish between the Pep/7 menu options Load , Load/Execute
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: , and Execute . 28. The following program seems to run, but does strange things with certain input values. Can you find the bug? ’" Main sum: *W "D d#1 num0: *’L RK d#0 num : *’L RK d#0 num : *’L RK d#0 Main: L –D– sum,d D)RI num0,d –DD– num0,d D)RI num ,d –DD– num ,d D)RI num ,d –DD– num ,d ST ")– sum,d D)R sum,d ST P *)ND 29. Correct the code in Exercise 28 and run the test plan outlined in the chapter. 30. Finish executing the test plan for the algorithm in the text that reads and sums three values. 31. Write an algorithm that reads in three values and writes out the result of subtracting the second value from the sum of the first and the third values....
View Full Document

Ask a homework question - tutors are online