-
Notifications
You must be signed in to change notification settings - Fork 0
/
PROGRAMA.TXT
executable file
·42 lines (42 loc) · 2.89 KB
/
PROGRAMA.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
0000000000000 000000000100000001 move 00000001 para R1
0000000000001 000000001000000010 move 00000010 para R2
0000000000010 000000101000010101 move 21d para R10
0000000000011 100011001000010000 soma R2 e R1 colocando o resultado em R3
0000000000100 010011000000000000 armazena R3 no endereco 0H da RAM
0000000000101 100001000000100000 mov R1, R2
0000000000110 100010000000110000 mov R2, R3
0000000000111 000000010011111111 move 11111111 para R4
0000000001000 010100000000001010 armazena R4 no endereco AH da RAM (imprime regs)
0000000001001 100100001110100010 subtrai R3 de R10 colocando resultado em R4
0000000001010 110010000000001100 sai do loop de fibonacci se R3 eh 21d
0000000001011 110000000000000011 volta para o loop de fibonacci
0000000001100 010011000000000001 armazena R3 no endereco 1H da RAM
0000000001101 000100000000000000 carrega em R4 o que esta no endereco 0 da RAM
0000000001110 010100000000000101 armazena R4 no endereco 5 da RAM
0000000001111 000000010011111111 move 11111111 para R4
0000000010000 010100000000001010 armazena R4 no endereco AH da RAM (imprime regs)
0000000010001 000000010000001111 move 00001111 para R4
0000000010010 010100000000010001 armazena R4 no endereco 11H da porta de IO
0000000010011 010001000000010000 armazena R1 (13d) no endereco 10H da porta de IO
0000000010100 000110000000010000 le do endereco 10H e armazena em R6
0000000010101 010110000000000111 armazena em 7H o que esta em R6
0000000010110 000000010011111111 move 11111111 para R4
0000000010111 010100000000001010 armazena R4 no endereco AH da RAM (imprime regs)
0000000011000 111100000010000000 chamada de rotina (call)
0000000011001 110001111111111111 salta para ultimo endereco (FIM SIMULACAO)
0000010000000 000000110011001100 armazena em R12 o dado 11001100
0000010000001 011100000000010100 armazena R12 no endereco 14H da RAM
0000010000010 010100000000001010 armazena R4 no endereco AH da RAM (imprime regs)
0000010000011 111100000110000100 chamada de rotina (call)
0000010000100 111110000000000000 retorna para o programa principal (return)
0000110000100 001000000000001010 le o endereco AH da RAM e salva no registrado R8
0000110000101 011000000000001011 armazena R8 no endereco BH da RAM (imprime regs)
0000110000110 000000000100000111 move 00000111 para R1
0000110000111 010001000000010010 armazena R1 no endereco 12H da porta de IO
0000110001000 000000011100000001 move 00000001 para R7
0000110001001 010111000000010011 armazena R7 no endereco 13H da porta de IO
0000110001010 000110000000010000 le do endereco 10H e armazena em R6
0000110001011 010110000000100111 armazena em 27H o que esta em R6
0000110001100 000000010011111111 move 11111111 para R4
0000110001101 010100000000001010 armazena R4 no endereco AH da RAM (imprime regs)
0000110001110 111110000000000000 retorna para o programa principal (return)