help/figures/fig0610.pep
raw| 1 | ;File: fig0610.pep |
| 2 | ;Computer Systems, Fourth edition |
| 3 | ;Figure 6.10 |
| 4 | ; |
| 5 | BR main |
| 6 | letter: .BLOCK 1 ;global variable #1c |
| 7 | ; |
| 8 | main: CHARI letter,d ;cin >> letter |
| 9 | LDA 0x0000,i |
| 10 | while: LDBYTEA letter,d ;while (letter != '*') |
| 11 | CPA '*',i |
| 12 | BREQ endWh |
| 13 | CHARO letter,d ; cout << letter |
| 14 | CHARI letter,d ; cin >> letter |
| 15 | BR while |
| 16 | endWh: STOP |
| 17 | .END |