Sei sulla pagina 1di 1

11100011

11100001
11100010
10111011
11011100
01011010
11011011
10111100
11011010
10011101
00100000
11100011
11110111
10111111
11011010
10111110
11011011
11100011
11110010
11110011
11110100
11110101
11110110
00000000
11111101
11111001
00000001
00000000
00000000
10010000
00000000
00000001

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F

JMP
JMP
JMP
LOOP: LDA
STO
ADD
STO
LDA
STO
XOR
SKZ
JMP
JMP
AGAIN: LDA
STO
LDA
STO
JMP
JMP
JMP
JMP
JMP
JMP
END: HLT
JMP
JMP
FN1:
FN2:
TEMP:
LIMIT:
ZERO:
ONE:

LOOP
.
.
FN2
TEMP
FN1
FN2
TEMP
FN1
LIMIT

//
//
//
//
//
//
//
//
//
//
//
LOOP //
END //
ONE
FN1
ZERO
FN2
LOOP //
.
//
.
//
.
//
.
//
.
//
//
AGAIN //
.
//
//
//
//
//
//
//

jump to the LOOP address


UNUSED LOCATION
UNUSED LOCATION
load value in FN2 into accum
store accumulator in TEMP
add value in FN1 to accumulator
store result in FN2
load TEMP into the accumulator
store accumulator in FN1
compare accumulator to LIMIT
if accum = 0, skip
jump to the LOOP address
end of program

jump to address of LOOP


UNUSED LOCATION
UNUSED LOCATION
UNUSED LOCATION
UNUSED LOCATION
UNUSED LOCATION
program is done
reset variables
UNUSED LOCATION
variable - stores 1st Fib. No.
variable - stores 2nd Fib. No.
temporary variable
constant 144 - max value
constant 0
constant 1

Potrebbero piacerti anche