Debian Codegraph @

help/figures/fig0515.pep

raw
1 ;File: fig0515.pep
2 ;Computer Systems, Fourth edition
3 ;Figure 5.15
4 ;
5 BR main ;Branch around data
6 num: .BLOCK 2 ;Storage for one integer #2d
7 msg: .ASCII " + 1 = \x00"
8 ;
9 main: DECI num,d ;Get the number
10 DECO num,d ;and output it
11 STRO msg,d ;Output ' + 1 = '
12 LDA num,d ;A <- the number
13 ADDA 1,i ;Add one to it
14 STA num,d ;Store the sum
15 DECO num,d ;Output the sum
16 STOP
17 .END