diff --git a/README.md b/README.md new file mode 100644 index 0000000..7000e9a --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# A.L.GO - Pruebas preliminares y finales + +Dentro de este repositorio encontraran scripts que por el momento les van a servir para ver que su TP va funcionando. + +Los scripts deben estar correctamente redactados, cualquier consulta o inconveniente con los mismos por favor crear un issue en el [foro](https://faq.utnso.com.ar/foro) + +[Documento de Pruebas Preliminares](https://faq.utnso.com.ar/tp-c-comenta-pruebas) + +> Los resultados seran los mismos que en la implementacion de C + +Los `scripts_kernel` tienen valores default en algunas vairables de entorno: + +- KERNEL_HOST => localhost +- KERNEL_PORT => 8080 + +Para cambiar el valor puede definir una variable en la terminal y volver a correr el script. Pueden hacerlo con algo [como](https://medium.com/@aviator2012/how-to-set-env-variables-on-our-local-terminal-63bb3165606b), `export KERNEL_HOST=192.168.1.10`. diff --git a/preliminares/script_io_basico_1 b/preliminares/script_io_basico_1 new file mode 100644 index 0000000..46ec000 --- /dev/null +++ b/preliminares/script_io_basico_1 @@ -0,0 +1,10 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +IO_GEN_SLEEP Interfaz1 10 +SET EAX 1 +SET EBX 1 +SET ECX 1 +SET EDX 1 +EXIT \ No newline at end of file diff --git a/preliminares/script_io_basico_2 b/preliminares/script_io_basico_2 new file mode 100644 index 0000000..ec9f966 --- /dev/null +++ b/preliminares/script_io_basico_2 @@ -0,0 +1,17 @@ +SET AX 1 +IO_GEN_SLEEP Interfaz1 1 +SET BX 1 +IO_GEN_SLEEP Interfaz1 1 +SET CX 1 +IO_GEN_SLEEP Interfaz1 1 +SET DX 1 +IO_GEN_SLEEP Interfaz1 1 +SUM AX BX +IO_GEN_SLEEP Interfaz1 1 +SUM BX CX +IO_GEN_SLEEP Interfaz1 1 +SUM CX DX +IO_GEN_SLEEP Interfaz1 1 +SUM DX AX +IO_GEN_SLEEP Interfaz1 1 +EXIT \ No newline at end of file diff --git a/preliminares/script_io_basico_3 b/preliminares/script_io_basico_3 new file mode 100644 index 0000000..393b3cb --- /dev/null +++ b/preliminares/script_io_basico_3 @@ -0,0 +1,15 @@ +SET AX 1 +SET BX 1 +SUM AX BX +IO_GEN_SLEEP Interfaz1 10 +SET EAX 14554560 +SET EBX 11598720 +SET ECX 417574 +SET EDX 450746 +SUM EDX EAX +SUM EDX EBX +SUM EDX ECX +IO_GEN_SLEEP Interfaz2 5 +SUM AX BX +SUB AX BX +EXIT \ No newline at end of file diff --git a/preliminares/script_solo_cpu_1 b/preliminares/script_solo_cpu_1 new file mode 100644 index 0000000..ab807be --- /dev/null +++ b/preliminares/script_solo_cpu_1 @@ -0,0 +1,4 @@ +SET AX 1 +SET BX 1 +SUM AX BX +EXIT \ No newline at end of file diff --git a/preliminares/script_solo_cpu_2 b/preliminares/script_solo_cpu_2 new file mode 100644 index 0000000..109e188 --- /dev/null +++ b/preliminares/script_solo_cpu_2 @@ -0,0 +1,11 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +SET EAX 1000 +SET EBX 1000 +SET ECX 1000 +SET EDX 1000 +SET SI 0 +SET DI 64 +EXIT \ No newline at end of file diff --git a/preliminares/script_solo_cpu_3 b/preliminares/script_solo_cpu_3 new file mode 100644 index 0000000..292b368 --- /dev/null +++ b/preliminares/script_solo_cpu_3 @@ -0,0 +1,6 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +SET PC 0 +EXIT \ No newline at end of file diff --git a/preliminares/script_solo_cpu_4 b/preliminares/script_solo_cpu_4 new file mode 100644 index 0000000..abac85e --- /dev/null +++ b/preliminares/script_solo_cpu_4 @@ -0,0 +1,7 @@ +SET EAX 0 +SET EBX 1 +SET ECX 14554560 +SUM EAX EBX +SUB ECX EBX +JNZ EAX 0 +EXIT diff --git a/scripts_kernel/PRUEBA_DEADLOCK.sh b/scripts_kernel/PRUEBA_DEADLOCK.sh new file mode 100755 index 0000000..8119e20 --- /dev/null +++ b/scripts_kernel/PRUEBA_DEADLOCK.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +if [ -z "$KERNEL_PORT" ]; then + echo "The KERNEL_PORT is not set" + echo "Using default port 8080" + KERNEL_PORT=8080 +fi + +if [ -z "$KERNEL_HOST" ]; then + echo "The KERNEL_HOST is not set" + echo "Using default host localhost" + KERNEL_HOST=localhost +fi + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 1, + "path": "/scripts_memoria/LOCK_A" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 2, + "path": "/scripts_memoria/LOCK_B" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 3, + "path": "/scripts_memoria/LOCK_C" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 4, + "path": "/scripts_memoria/LOCK_D" +}' \ No newline at end of file diff --git a/scripts_kernel/PRUEBA_IO.sh b/scripts_kernel/PRUEBA_IO.sh new file mode 100755 index 0000000..7d31c36 --- /dev/null +++ b/scripts_kernel/PRUEBA_IO.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +if [ -z "$KERNEL_PORT" ]; then + echo "The KERNEL_PORT is not set" + echo "Using default port 8080" + KERNEL_PORT=8080 +fi + +if [ -z "$KERNEL_HOST" ]; then + echo "The KERNEL_HOST is not set" + echo "Using default host localhost" + KERNEL_HOST=localhost +fi + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 1, + "path": "/scripts_memoria/IO_A" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 2, + "path": "/scripts_memoria/IO_B" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 3, + "path": "/scripts_memoria/IO_C" +}' \ No newline at end of file diff --git a/scripts_kernel/PRUEBA_PLANI.sh b/scripts_kernel/PRUEBA_PLANI.sh new file mode 100755 index 0000000..65cdcc6 --- /dev/null +++ b/scripts_kernel/PRUEBA_PLANI.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +if [ -z "$KERNEL_PORT" ]; then + echo "The KERNEL_PORT is not set" + echo "Using default port 8080" + KERNEL_PORT=8080 +fi + +if [ -z "$KERNEL_HOST" ]; then + echo "The KERNEL_HOST is not set" + echo "Using default host localhost" + KERNEL_HOST=localhost +fi + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 1, + "path": "/scripts_memoria/PLANI_1" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 2, + "path": "/scripts_memoria/PLANI_2" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 3, + "path": "/scripts_memoria/PLANI_3" +}' + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 4, + "path": "/scripts_memoria/PLANI_4" +}' \ No newline at end of file diff --git a/scripts_kernel/PRUEBA_SALVATIONS_EDGE.sh b/scripts_kernel/PRUEBA_SALVATIONS_EDGE.sh new file mode 100755 index 0000000..3d9fa5f --- /dev/null +++ b/scripts_kernel/PRUEBA_SALVATIONS_EDGE.sh @@ -0,0 +1,194 @@ +#!/bin/bash + +if [ -z "$KERNEL_PORT" ]; then + echo "The KERNEL_PORT is not set" + echo "Using default port 8080" + KERNEL_PORT=8080 +fi + +if [ -z "$KERNEL_HOST" ]; then + echo "The KERNEL_HOST is not set" + echo "Using default host localhost" + KERNEL_HOST=localhost +fi + +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 1, + "path": "/scripts_memoria/TRIANGLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 2, + "path": "/scripts_memoria/SQUARE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 3, + "path": "/scripts_memoria/CIRCLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 4, + "path": "/scripts_memoria/PIRAMID" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 5, + "path": "/scripts_memoria/CUBE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 6, + "path": "/scripts_memoria/SPHERE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 7, + "path": "/scripts_memoria/TRIANGLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 8, + "path": "/scripts_memoria/SQUARE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 9, + "path": "/scripts_memoria/CIRCLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 10, + "path": "/scripts_memoria/PIRAMID" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 11, + "path": "/scripts_memoria/CUBE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 12, + "path": "/scripts_memoria/SPHERE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 13, + "path": "/scripts_memoria/TRIANGLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 14, + "path": "/scripts_memoria/SQUARE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 15, + "path": "/scripts_memoria/CIRCLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 16, + "path": "/scripts_memoria/PIRAMID" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 17, + "path": "/scripts_memoria/CUBE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 18, + "path": "/scripts_memoria/SPHERE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 19, + "path": "/scripts_memoria/TRIANGLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 20, + "path": "/scripts_memoria/SQUARE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 21, + "path": "/scripts_memoria/CIRCLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 22, + "path": "/scripts_memoria/PIRAMID" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 23, + "path": "/scripts_memoria/CUBE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 24, + "path": "/scripts_memoria/SPHERE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 25, + "path": "/scripts_memoria/TRIANGLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 26, + "path": "/scripts_memoria/SQUARE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 27, + "path": "/scripts_memoria/CIRCLE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 28, + "path": "/scripts_memoria/PIRAMID" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 29, + "path": "/scripts_memoria/CUBE" +}' +curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ +--header 'Content-Type: application/json' \ +--data '{ + "pid": 30, + "path": "/scripts_memoria/SPHERE" +}' \ No newline at end of file diff --git a/scripts_memoria/CIRCLE b/scripts_memoria/CIRCLE new file mode 100644 index 0000000..c97bffa --- /dev/null +++ b/scripts_memoria/CIRCLE @@ -0,0 +1,17 @@ +SET AX 1 +SET EAX 0 +RESIZE 64 +MOV_OUT EAX AX +MOV_IN BX EAX +SUM EAX AX +MOV_OUT EAX BX +MOV_IN CX EAX +SUM EAX AX +MOV_OUT EAX CX +MOV_IN DX EAX +SUM EAX AX +MOV_OUT EAX DX +MOV_IN AX EAX +RESIZE 0 +SET PC 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/CUBE b/scripts_memoria/CUBE new file mode 100644 index 0000000..f78421a --- /dev/null +++ b/scripts_memoria/CUBE @@ -0,0 +1,71 @@ +RESIZE 22 +SET BX 0 +SET EBX 0 +SET CX 1 +SET DX 21 +SET AX 65 +MOV_OUT BX AX +SET AX 98 +SUM BX CX +MOV_OUT BX AX +SET AX 111 +SUM BX CX +MOV_OUT BX AX +SET AX 114 +SUM BX CX +MOV_OUT BX AX +SET AX 116 +SUM BX CX +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 100 +SUM BX CX +MOV_OUT BX AX +SET AX 32 +SUM BX CX +MOV_OUT BX AX +SET AX 40 +SUM BX CX +MOV_OUT BX AX +SET AX 99 +SUM BX CX +MOV_OUT BX AX +SET AX 111 +SUM BX CX +MOV_OUT BX AX +SET AX 114 +SUM BX CX +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 32 +SUM BX CX +MOV_OUT BX AX +SET AX 100 +SUM BX CX +MOV_OUT BX AX +SET AX 117 +SUM BX CX +MOV_OUT BX AX +SET AX 109 +SUM BX CX +MOV_OUT BX AX +SET AX 112 +SUM BX CX +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 100 +SUM BX CX +MOV_OUT BX AX +SET AX 41 +SUM BX CX +MOV_OUT BX AX +IO_STDOUT_WRITE MONITOR EBX DX +RESIZE 0 +SET PC 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/FS_1 b/scripts_memoria/FS_1 new file mode 100644 index 0000000..e9d1f64 --- /dev/null +++ b/scripts_memoria/FS_1 @@ -0,0 +1,32 @@ +SET AX 10 +SET BX 80 +IO_FS_CREATE FS salida.txt +IO_FS_CREATE FS cronologico.txt +IO_FS_TRUNCATE FS salida.txt BX +IO_FS_TRUNCATE FS cronologico.txt BX +RESIZE 160 +SET CX 0 +SET DX 9 +SET EAX 69 +IO_STDIN_READ TECLADO CX EAX +MOV_OUT DX AX +SET DX 19 +MOV_OUT DX AX +SET DX 29 +MOV_OUT DX AX +SET DX 48 +MOV_OUT DX AX +SET DX 58 +MOV_OUT DX AX +IO_FS_WRITE FS salida.txt CX EAX CX +SET SI 59 +SET DI 80 +COPY_STRING 10 +SET BX 90 +MOV_OUT BX AX +SET SI 0 +SET DI 91 +COPY_STRING 59 +SET ECX 80 +IO_FS_WRITE FS cronologico.txt ECX EAX CX +EXIT \ No newline at end of file diff --git a/scripts_memoria/FS_2 b/scripts_memoria/FS_2 new file mode 100644 index 0000000..9a7be79 --- /dev/null +++ b/scripts_memoria/FS_2 @@ -0,0 +1,6 @@ +SET AX 10 +IO_FS_CREATE FS archivo1.txt +IO_FS_CREATE FS archivo2.txt +IO_FS_TRUNCATE FS archivo1.txt AX +IO_FS_TRUNCATE FS archivo2.txt AX +EXIT \ No newline at end of file diff --git a/scripts_memoria/FS_3 b/scripts_memoria/FS_3 new file mode 100644 index 0000000..905f455 --- /dev/null +++ b/scripts_memoria/FS_3 @@ -0,0 +1,9 @@ +SET AX 0 +SET BX 69 +SET CX 80 +RESIZE 160 +IO_FS_READ FS salida.txt AX BX AX +IO_STDOUT_WRITE MONITOR AX BX +IO_FS_READ FS cronologico.txt CX BX AX +IO_STDOUT_WRITE MONITOR CX BX +EXIT \ No newline at end of file diff --git a/scripts_memoria/FS_4 b/scripts_memoria/FS_4 new file mode 100644 index 0000000..244607f --- /dev/null +++ b/scripts_memoria/FS_4 @@ -0,0 +1,9 @@ +SET AX 0 +SET BX 250 +SET CX 70 +IO_FS_CREATE FS pesado.txt +IO_FS_TRUNCATE FS pesado.txt BX +IO_FS_DELETE FS archivo1.txt +IO_FS_TRUNCATE FS archivo2.txt CX +SET DX 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/IO_A b/scripts_memoria/IO_A new file mode 100644 index 0000000..a1813a6 --- /dev/null +++ b/scripts_memoria/IO_A @@ -0,0 +1,25 @@ +SET EAX 16 +SET EBX 20 +RESIZE 128 +IO_STDIN_READ TECLADO EAX EBX +SET AX 87 +SET BX 65 +SET CX 82 +SET DX 44 +SET ECX 11 +SET EDX 1 +MOV_OUT ECX AX +SUM ECX EDX +MOV_OUT ECX BX +SUM ECX EDX +MOV_OUT ECX CX +SUM ECX EDX +MOV_OUT ECX DX +SUM ECX EDX +SET AX 32 +IO_GEN_SLEEP GENERICA 2 +MOV_OUT ECX AX +SET EBX 25 +SET EAX 11 +IO_STDOUT_WRITE MONITOR EAX EBX +EXIT \ No newline at end of file diff --git a/scripts_memoria/IO_B b/scripts_memoria/IO_B new file mode 100644 index 0000000..aa2094a --- /dev/null +++ b/scripts_memoria/IO_B @@ -0,0 +1,125 @@ +RESIZE 40 +SET BX 0 +SET CX 1 +SET AX 73 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 100 +MOV_OUT BX AX +SUM BX CX +SET AX 111 +MOV_OUT BX AX +SUM BX CX +SET AX 110 +MOV_OUT BX AX +SUM BX CX +SET AX 39 +MOV_OUT BX AX +SUM BX CX +SET AX 116 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 119 +MOV_OUT BX AX +SUM BX CX +SET AX 97 +MOV_OUT BX AX +SUM BX CX +SET AX 110 +MOV_OUT BX AX +SUM BX CX +SET AX 116 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 116 +MOV_OUT BX AX +SUM BX CX +SET AX 111 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 115 +MOV_OUT BX AX +SUM BX CX +SET AX 101 +MOV_OUT BX AX +SUM BX CX +SET AX 116 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 116 +MOV_OUT BX AX +SUM BX CX +SET AX 104 +MOV_OUT BX AX +SUM BX CX +SET AX 101 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 119 +MOV_OUT BX AX +SUM BX CX +SET AX 111 +MOV_OUT BX AX +SUM BX CX +SET AX 114 +MOV_OUT BX AX +SUM BX CX +SET AX 108 +MOV_OUT BX AX +SUM BX CX +SET AX 100 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 111 +MOV_OUT BX AX +SUM BX CX +SET AX 110 +MOV_OUT BX AX +SUM BX CX +SET AX 32 +MOV_OUT BX AX +IO_GEN_SLEEP GENERICA 1 +SUM BX CX +SET AX 102 +MOV_OUT BX AX +SUM BX CX +SET AX 105 +MOV_OUT BX AX +SUM BX CX +SET AX 114 +MOV_OUT BX AX +SUM BX CX +SET AX 101 +MOV_OUT BX AX +SET BX 0 +SET DX 37 +IO_STDOUT_WRITE MONITOR BX DX +EXIT \ No newline at end of file diff --git a/scripts_memoria/IO_C b/scripts_memoria/IO_C new file mode 100644 index 0000000..b8e8352 --- /dev/null +++ b/scripts_memoria/IO_C @@ -0,0 +1,18 @@ +SET AX 0 +SET BX 32 +SET CX 26 +RESIZE 64 +IO_STDIN_READ TECLADO AX CX +SET SI 0 +SET DI 32 +IO_GEN_SLEEP GENERICA 2 +COPY_STRING 26 +SET DX 52 +SET AX 49 +MOV_OUT DX AX +SET AX 52 +SET DX 57 +MOV_OUT DX AX +IO_GEN_SLEEP GENERICA 2 +IO_STDOUT_WRITE MONITOR BX CX +EXIT \ No newline at end of file diff --git a/scripts_memoria/LOCK_A b/scripts_memoria/LOCK_A new file mode 100644 index 0000000..25caf8c --- /dev/null +++ b/scripts_memoria/LOCK_A @@ -0,0 +1,10 @@ +SET AX 1 +WAIT RA +IO_GEN_SLEEP ESPERA 1 +WAIT RB +SET BX 1 +SUM AX BX +IO_GEN_SLEEP ESPERA 1 +SIGNAL RA +SIGNAL RB +EXIT \ No newline at end of file diff --git a/scripts_memoria/LOCK_B b/scripts_memoria/LOCK_B new file mode 100644 index 0000000..fd7bcf6 --- /dev/null +++ b/scripts_memoria/LOCK_B @@ -0,0 +1,10 @@ +SET AX 1 +WAIT RB +IO_GEN_SLEEP ESPERA 1 +WAIT RC +SET BX 1 +SUM AX BX +IO_GEN_SLEEP ESPERA 1 +SIGNAL RB +SIGNAL RC +EXIT \ No newline at end of file diff --git a/scripts_memoria/LOCK_C b/scripts_memoria/LOCK_C new file mode 100644 index 0000000..7f8874b --- /dev/null +++ b/scripts_memoria/LOCK_C @@ -0,0 +1,10 @@ +SET AX 1 +WAIT RC +IO_GEN_SLEEP ESPERA 1 +WAIT RD +SET BX 1 +SUM AX BX +IO_GEN_SLEEP ESPERA 1 +SIGNAL RC +SIGNAL RD +EXIT \ No newline at end of file diff --git a/scripts_memoria/LOCK_D b/scripts_memoria/LOCK_D new file mode 100644 index 0000000..510f718 --- /dev/null +++ b/scripts_memoria/LOCK_D @@ -0,0 +1,10 @@ +SET AX 1 +WAIT RD +IO_GEN_SLEEP ESPERA 1 +WAIT RA +SET BX 1 +SUM AX BX +IO_GEN_SLEEP ESPERA 1 +SIGNAL RD +SIGNAL RA +EXIT \ No newline at end of file diff --git a/scripts_memoria/MEMORIA_1 b/scripts_memoria/MEMORIA_1 new file mode 100644 index 0000000..0a73b9f --- /dev/null +++ b/scripts_memoria/MEMORIA_1 @@ -0,0 +1,30 @@ +SET AX 0 +SET BX 1 +SET CX 2 +SET DX 3 +SET EAX 0 +SET EBX 32 +SET ECX 64 +SET EDX 96 +RESIZE 128 +MOV_OUT EAX AX +MOV_OUT EBX AX +MOV_OUT ECX AX +MOV_OUT EDX AX +SET DX 64 +MOV_IN BX EBX +MOV_IN CX ECX +RESIZE 256 +SET EAX 128 +SET EBX 160 +MOV_OUT EAX DX +MOV_OUT EBX DX +SET EAX 40 +SET EBX 80 +SET ECX 192 +SET EDX 224 +MOV_OUT EAX DX +MOV_OUT EBX DX +MOV_OUT ECX DX +MOV_OUT EDX DX +EXIT \ No newline at end of file diff --git a/scripts_memoria/MEMORIA_2 b/scripts_memoria/MEMORIA_2 new file mode 100644 index 0000000..4a18c54 --- /dev/null +++ b/scripts_memoria/MEMORIA_2 @@ -0,0 +1,11 @@ +SET EAX 0 +SET EBX 10 +SET EDX 0 +SET ECX 1 +SET DX 30 +RESIZE 60 +MOV_OUT DX EBX +MOV_IN EAX DX +SUB EBX ECX +SET EAX 0 +EXIT diff --git a/scripts_memoria/MEMORIA_3 b/scripts_memoria/MEMORIA_3 new file mode 100644 index 0000000..4459837 --- /dev/null +++ b/scripts_memoria/MEMORIA_3 @@ -0,0 +1,10 @@ +SET AX 0 +RESIZE 960 +SET EAX 0 +RESIZE 256 +MOV_OUT AX EAX +RESIZE 1056 +SET BX 0 +SET CX 0 +SET DX 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/PIRAMID b/scripts_memoria/PIRAMID new file mode 100644 index 0000000..04de864 --- /dev/null +++ b/scripts_memoria/PIRAMID @@ -0,0 +1,104 @@ +RESIZE 40 +SET BX 0 +SET EBX 0 +SET CX 1 +SET DX 32 +SET AX 83 +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 103 +SUM BX CX +MOV_OUT BX AX +SET AX 109 +SUM BX CX +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 110 +SUM BX CX +MOV_OUT BX AX +SET AX 116 +SUM BX CX +MOV_OUT BX AX +SET AX 97 +SUM BX CX +MOV_OUT BX AX +SET AX 116 +SUM BX CX +MOV_OUT BX AX +SET AX 105 +SUM BX CX +MOV_OUT BX AX +SET AX 111 +SUM BX CX +MOV_OUT BX AX +SET AX 110 +SUM BX CX +MOV_OUT BX AX +SET AX 32 +SUM BX CX +MOV_OUT BX AX +SET AX 102 +SUM BX CX +MOV_OUT BX AX +SET AX 97 +SUM BX CX +MOV_OUT BX AX +SET AX 117 +SUM BX CX +MOV_OUT BX AX +SET AX 108 +SUM BX CX +MOV_OUT BX AX +SET AX 116 +SUM BX CX +MOV_OUT BX AX +SET AX 32 +SUM BX CX +MOV_OUT BX AX +SET AX 40 +SUM BX CX +MOV_OUT BX AX +SET AX 99 +SUM BX CX +MOV_OUT BX AX +SET AX 111 +SUM BX CX +MOV_OUT BX AX +SET AX 114 +SUM BX CX +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 32 +SUM BX CX +MOV_OUT BX AX +SET AX 100 +SUM BX CX +MOV_OUT BX AX +SET AX 117 +SUM BX CX +MOV_OUT BX AX +SET AX 109 +SUM BX CX +MOV_OUT BX AX +SET AX 112 +SUM BX CX +MOV_OUT BX AX +SET AX 101 +SUM BX CX +MOV_OUT BX AX +SET AX 100 +SUM BX CX +MOV_OUT BX AX +SET AX 41 +SUM BX CX +MOV_OUT BX AX +IO_STDOUT_WRITE MONITOR EBX DX +RESIZE 0 +SET PC 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/PLANI_1 b/scripts_memoria/PLANI_1 new file mode 100644 index 0000000..b6a337d --- /dev/null +++ b/scripts_memoria/PLANI_1 @@ -0,0 +1,5 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +EXIT \ No newline at end of file diff --git a/scripts_memoria/PLANI_2 b/scripts_memoria/PLANI_2 new file mode 100644 index 0000000..662147f --- /dev/null +++ b/scripts_memoria/PLANI_2 @@ -0,0 +1,16 @@ +SET AX 1 +IO_GEN_SLEEP SLP1 1 +SET BX 1 +IO_GEN_SLEEP SLP1 1 +SET CX 1 +IO_GEN_SLEEP SLP1 1 +SET DX 1 +IO_GEN_SLEEP SLP1 1 +SET EAX 1 +IO_GEN_SLEEP SLP1 1 +SET EBX 1 +IO_GEN_SLEEP SLP1 1 +SET ECX 1 +IO_GEN_SLEEP SLP1 1 +SET EDX 1 +EXIT \ No newline at end of file diff --git a/scripts_memoria/PLANI_3 b/scripts_memoria/PLANI_3 new file mode 100644 index 0000000..3eedb5b --- /dev/null +++ b/scripts_memoria/PLANI_3 @@ -0,0 +1,10 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +IO_GEN_SLEEP SLP1 4 +SET EAX 1 +SET EBX 1 +SET ECX 1 +SET EDX 1 +EXIT \ No newline at end of file diff --git a/scripts_memoria/PLANI_4 b/scripts_memoria/PLANI_4 new file mode 100644 index 0000000..292b368 --- /dev/null +++ b/scripts_memoria/PLANI_4 @@ -0,0 +1,6 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +SET PC 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/SPHERE b/scripts_memoria/SPHERE new file mode 100644 index 0000000..db8b3e6 --- /dev/null +++ b/scripts_memoria/SPHERE @@ -0,0 +1,8 @@ +SET AX 0 +SET BX 1 +RESIZE 8 +IO_STDIN_READ TECLADO AX BX +IO_STDOUT_WRITE MONITOR AX BX +RESIZE 0 +SET PC 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/SQUARE b/scripts_memoria/SQUARE new file mode 100644 index 0000000..dccf391 --- /dev/null +++ b/scripts_memoria/SQUARE @@ -0,0 +1,16 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 1 +SET EAX 0 +RESIZE 64 +MOV_OUT DX AX +SET EAX 1 +MOV_OUT DX BX +SET EAX 2 +MOV_OUT DX CX +SET EAX 3 +MOV_OUT DX DX +RESIZE 0 +SET PC 0 +EXIT \ No newline at end of file diff --git a/scripts_memoria/TRIANGLE b/scripts_memoria/TRIANGLE new file mode 100644 index 0000000..d946be3 --- /dev/null +++ b/scripts_memoria/TRIANGLE @@ -0,0 +1,13 @@ +SET AX 1 +SET BX 1 +SET CX 1 +SET DX 0 +RESIZE 64 +MOV_OUT DX AX +SET DX 1 +MOV_OUT DX BX +SET DX 2 +MOV_OUT DX CX +RESIZE 0 +SET PC 0 +EXIT \ No newline at end of file