Debian Codegraph @

help/figures/prob0829.pep

raw
1 ;File: prob0829.pep
2 ;Computer Systems, Fourth edition
3 ;Problem 8.29
4 ;
5 BR main
6 num1: .BLOCK 2 ;num1
7 num1ad: .ADDRSS num1 ;Address of num1
8 num1adad:.ADDRSS num1ad ;Address of address of num1
9 num2: .BLOCK 2 ;num2
10 num2ad: .ADDRSS num2 ;Address of num2
11 num2adad:.ADDRSS num2ad ;Address of address of num2
12 main: LDA 27,i ;Load accumulator
13 STADI ;Store num1 double indirect
14 .ADDRSS num1adad
15 LDA 34,i ;Load accumulator
16 STADI ;Store num2 double indirect
17 .ADDRSS num2adad
18 DECO num1,d ;Output num1
19 CHARO ' ',i
20 DECO num2,d ;Output num2
21 CHARO '\n',i
22 STOP
23 .END