Dale - Computer Science Illuminated 226

Dale - Computer Science Illuminated 226 - in memory and...

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

View Full Document Right Arrow Icon
7.4 A Program Example 199 Are these concrete steps? Not in machine language. We have to convert the letters to their ASCII representation. Now each of these steps is a concrete step. A Program We are now ready to write a machine-language program to implement the algorithm to write 26788.2 on the screen. There are six instructions in this program: five to write out a character and one to indicate the end of the process. The instruction to write a character on the screen is 11100, the ‘Character output from operand’ operation. Should we store the characters
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: in memory and write them using direct addressing or just store them in the operand specifier and use immediate addressing? Lets write it both ways and see the difference. We use immediate addressing first. This means that the addressing-mode specifier is 01 and the ASCII code goes into the third byte of the instruction. Write o Write 6F (hex) Write l Write 6C (hex) Write l Write 6C (hex) Write e Write 65 (hex) Write H Write 48 (hex)...
View Full Document

Ask a homework question - tutors are online