-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
279 lines (235 loc) · 12.5 KB
/
index.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CH Maquina</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body style="padding-top: 4rem">
<header>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
<div class="container">
<a class="navbar-brand fw-bold" href="#">CH MÁQUINA</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa-solid fa-bars fa-lg"></i>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<!--Boton de configuracion del sistema, ajutar Velocidad, memoria y kernel-->
<button id="configuracionSistemaBtn" type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#configuracionSistemaModal"
data-bs-toggle="tooltip" data-bs-placement="bottom" title="Configuración del sistema">
<i class="fa-solid fa-gear fa-lg"></i>
</button>
<!--Boton de subir archivo-->
<button onclick="subirArchivo()" id="subirArchivoBtn" type="button" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Subir programa">
<i class="fa-solid fa-file-arrow-up fa-lg"></i>
</button>
<input type="file" id="archivoInput" accept=".ch" style="display: none;">
<!--Boton de ejecutar archivo-->
<button id="ejecutarBtn" type="button" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Ejecutar programa" style="margin-left: 20px">
<i class="fa-solid fa-circle-play fa-lg"></i>
</button>
<!--Boton de pausar archivo-->
<button id="pausarBtn" type="button" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Pausar programa">
<i class="fa-solid fa-circle-pause fa-lg"></i>
</button>
<!--Boton paso a paso-->
<button id="pasoapasoBtn" type="button" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Paso a Paso" style="margin-left: 20px">
<i class="fa-solid fa-shoe-prints fa-lg"></i>
</button>
<!--Boton reiniciar-->
<button id="reiniciarBtn" type="button" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Salir">
<i class="fa-solid fa-rotate-left fa-lg"></i>
</button>
<button id="siguienteBtn" type="button" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Siguiente paso">
Siguiente
</button>
</div>
</div>
</nav>
</header>
<div class="container-fluid mt-auto">
<div class="row" style="margin-bottom: 50px">
<div class="col-lg-4 col-md-10">
<div class="card mx-auto" style="margin-top: 15px; max-height: 600px; overflow: auto">
<!--Instrucciones del maquina-->
<div class="card-header text-center">Instrucciones del programa</div>
<div class="card-body table-responsive">
<table id="tablaInstruccionesPrograma" class="table text-sm">
<thead class="table-light text-center">
<tr>
<th>Linea</th>
<th>Instrucción</th>
</tr>
</thead>
<tbody id="instruccionesProgramaBody"></tbody>
</table>
</div>
</div>
<!--Programas cargados-->
<div class="card" style="margin-top: 15px; max-height: 200px; overflow: auto">
<div class="card-header text-center">Programas cargados</div>
<div class="card-body table-responsive">
<table id="tablaProgramasCargados" class="table text-sm">
<thead class="table-light text-center">
<tr>
<th>ID</th>
<th>Programa</th>
<th>Instrucciones</th>
<th>RB</th>
<th>RLC</th>
<th>RLP</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
<!--Variables-->
<div class="col-lg-2 col-md-6">
<div class="card" style="margin-top: 15px; max-height: 400px; overflow: auto">
<div class="card-header text-center">Variables</div>
<div class="card-body table-responsive">
<table id="tablaVariables" class="table text-sm">
<thead class="table-light text-center">
<tr>
<th>Posición</th>
<th>Variable</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!--Etiquetas-->
<div class="card" style="margin-top: 15px; max-height: 400px; overflow: auto">
<div class="card-header text-center">Etiquetas</div>
<div class="card-body table-responsive">
<table id="tablaEtiquetas" class="table text-sm">
<thead class="table-light text-center">
<tr>
<th>Posición</th>
<th>Etiqueta</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
<!--Acumulador-->
<div class="col-lg-4">
<div class="card" style="margin-top: 15px; max-height: 110px; height: 110px; overflow: auto">
<div class="card-header text-center">Acumulador</div>
<div class="card-body table-responsive text-center fs-1" style="padding: unset">
<span id="acumuladorValor">0</span>
</div>
</div>
<!--Memoria principal-->
<div class="card" style="margin-top: 15px; max-height: 690px; overflow: auto">
<div class="card-header text-center">Memoria principal</div>
<div class="card-body table-responsive">
<table id="tablaMemoria" class="table text-sm">
<thead class="table-light text-center">
<tr>
<th>Direc</th>
<th>Contenido</th>
</tr>
</thead>
<tbody id="memoriaBody"></tbody>
</table>
</div>
</div>
</div>
<!--Pantalla-->
<div class="col-lg-2">
<div class="card" style="margin-top: 15px; max-height: 400px; overflow: auto; position: relative;">
<div class="card-header text-center" style="position: relative;">
Pantalla
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#botonImprimir" style="position: absolute; top: 50%; right: 8px; transform: translateY(-50%)">
<i class="fa-regular fa-window-restore fa-lg"></i>
</button>
</div>
<div class="card-body">
<div style="display: flex; justify-content: center; align-items: center; width: 100%; height: 100%;">
<img src="src/assets/monitor.png" alt="Monitor" style="max-width: 100%; max-height: 100%;" />
</div>
<div style="text-align: center; font-size: 4em; position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%); z-index: 1;">
</div>
</div>
</div>
<!--Impresora-->
<div class="card" style="margin-top: 15px; max-height: 400px; overflow: auto; position: relative;">
<div class="card-header text-center" style="position: relative;">
Impresora
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#botonImprimir" style="position: absolute; top: 50%; right: 8px; transform: translateY(-50%)">
<i class="fa-solid fa-print fa-lg"></i>
</button>
</div>
<div class="card-body table-responsive ">
<div style="display: flex; justify-content: center; align-items: center; width: 100%; height: 100%" >
<img src="src/assets/impresora.png" alt="Monitor" style="max-width: 100%; max-height: 100%;" />
</div>
<div style="text-align: center; font-size: 3em; position: absolute; top: 68%; left: 50%; transform: translate(-50%, -50%); z-index: 1;">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer fixed-bottom bg-primary d-flex justify-content-between p-2">
<!-- Contenedor para los iconos y el texto -->
<div class="left-content d-flex">
<!-- Enlaces a redes sociales -->
<a href="https://github.com/astrxnomo" target="_blank" class="text-white mr-2"><i class="fab fa-github fa-lg" style="margin-right: 10px"></i></a>
</div>
<!-- Hora en la esquina derecha -->
<span id="currentDateTime" class="text-white">18:30</span>
</footer>
<!--Modal | Configuracion del sistema-->
<div class="modal fade" id="configuracionSistemaModal">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Configuración del sistema
</h5>
</div>
<div class="modal-body">
<div class="card">
<div class="card-body">
<label for="kernelSlider">Kernel:</label>
<span id="kernelValue" ondblclick="startEditing(this)" onblur="finishEditing(this)">16</span>
<input oninput="updateKernelValue(this.value)" value="16" type="range" class="form-range" min="10" max="100" id="kernelSlider">
</div>
<div class="card-body">
<label for="memoriaSlider">Memoria:</label>
<span id="memoriaValue" ondblclick="startEditing(this)" onblur="finishEditing(this)">150</span>
<input oninput="updateMemoriaValue(this.value)" value="150" type="range" class="form-range" min="10" max="10100" id="memoriaSlider">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="mostrarTablaMemoria()">
Guardar cambios
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<script src="src/scripts/botones/btnConfiguracionSistema.js"></script>
<script src="src/scripts/botones/btnSubirArchivo.js"></script>
<script src="src/scripts/tablas/tablaInstruccionesPrograma.js"></script>
<script src="src/scripts/tablas/tablaVariables.js"></script>
<script src="src/scripts/tablas/tablaEtiquetas.js"></script>
<script src="src/scripts/info/horayfecha.js"></script>
<script src="src/scripts/maquina/verificarSintaxis.js"></script>
<script type="module" src="src/scripts/maquina/programaPrincipal.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>