Type latin alphabet from "A" to "Z" on display screen.
The initial symbol "A" has code 65=41h. So we put it into R0 and call ROM subroutine, that outputs character. The next letter can be get after increment of R0. If the result exceeds 5Ah ("Z"), the cycle ends.
Address | Code | Operation | Comments |
---|---|---|---|
0000 | 0E6D |
30 ==> SP | set SP for correct |
0004 | 01D0 |
41 ==> R0 | first symbol code |
0008 | 9C0D |
call subroutine | output to screen |
000C | 2210 |
R0 + 1 ==> R0 | next symbol |
000E | 04D0 |
compare R0 with 5A | code <= "Z"? |
0012 | 6DF4 |
if <=0, then pc=pc+F4 | repeat cycle (to 0008) |
0014 | 0F00 |
halt | stop |
Try and examine, how it works in "E97".