Skip to main content
\(\newcommand{\doubler}[1]{2#1} \newcommand{\binary}{\mathtt} \newcommand{\hex}{\mathtt} \newcommand{\octal}{\mathtt} \newcommand{\prog}{\mathtt} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section12.2Programming Exercises

1

Assume that you do not know how many numerals there are, only that the first one is ‘\(0\)’ and the last one is ‘\(9\)’. Write a program in assembly language that displays all the numerals, \(0,\ldots,9\) on the screen, one character at a time. Do not allocate a separate character for each numeral.

Hint Solution
2

Assume that you do not know how many alphabetic characters there are, only that the first one is ‘A’ and the last one is ‘Z’. Write a program in assembly language that displays all the letters, A,…, Z on the screen, one character at a time. Do not allocate a separate character for each numeral.

Hint Solution