Anda di halaman 1dari 3

UNIVERSIDAD DEL VALLE DE GUATEMALA

Organización de Computadoras
Sección 10

Proyecto Logica Digital (LC3)

Josué Rendón Estrada


08168

1

Código
0011 0000 0000 0000; direccion inicial del programa en memoria
1110 001 0 0010 1111; LEA, carga lo de 3030 a R1 (tiempo, 3030)
1110 000 0 0011 0011; LEA, carga lo de 3035 a R0 (1500, 3035)
1110 010 0 0011 1101; LEA, carga lo de 3040 a R2 (vel, 3040)
0110 110 000 000000; CARGAR LO DE LA MEMORIA EN R0 a R6 (1500)

;--INICIALIZAR CONTADORES--
0101 111 111 1 00000; registro 7 iniciar a cero
0001 111 111 1 00101; registro 7 iniciar sumar 5 (iniciar contador en 5)

;--NEGAR EL UNO--
0101 000 000 1 00000; registro 0 iniciar a cero
0001 000 000 1 00001; registro 0 iniciar sumar 1
1001 000 000 111111; negar registro 0, es decir -1
0001 000 000 1 00001; registro 0 sumar 1

;----INICIA CICLO----
0000 010 000001011 ;aumentar R1 ; inicia condicion
0110 100 001 000000; CARGAR LO DE LA MEMORIA EN R1 en R4 (tiempo)

1001 100 100 111111; negar registro 4, es decir -1


0001 100 100 1 00001; registro 4 sumar 1
0101 101 101 1 00000; registro 5 iniciar a cero
0001 101 110 0 00 101; sumarle al registro 5 el registro 6

;----INICIA DIVISION----
0000 010 000000011;
0101 011 011 1 00000; registro 3 iniciar a cero
0001 011 011 1 00001 ;aumentar R3
0001 101 100 0 00 101; restar 1500 (R5) - R4 negado, respuesta en R5;
0000 001 111111101; TERMINA DIVISION

0111 011 010 000000; guardar en memoria (3040) la suma que esta en R5
0001 001 001 1 00001 ;aumentar R1
0001 010 010 1 00001; aumentar R2
0001 111 000 0 00 111; disminiuir el contador R7

0000 101 11111 0101 ; terminar condicion


1111 0000 0010 0101; trap x25

2

Diagrama de Flujo

3


Anda mungkin juga menyukai