14 lines
457 B
Plaintext
14 lines
457 B
Plaintext
program Powers of 2
|
|
// Input: None
|
|
// Output: Prints out the positive powers of 2
|
|
// -----------------------------------------------------------------------------
|
|
|
|
00: 0001 1
|
|
|
|
10: 8A00 RA <- mem[00] 1
|
|
while (a != 0) {
|
|
11: 9AFF write RA System.out.println(a)
|
|
12: 1AAA RA <- RA + RA a = a + a
|
|
13: DA11 if (RA > 0) goto 11 }
|
|
14: 0000 halt
|