This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Asi se hacen los comentarios. | |
SECTION .data ;Definimos la seccion de datos estaticos, equivalentes de constantes. | |
msg: db "Hola clase :)",10,13 ;etiqueta: db (DefineByte) "cadena",bytes sin formato, 10 = fin de linea, 13 = salto de linea | |
lon: equ $-$$ ;etiqueta: equ (EQUAL) cantidad. Es el equivalente de #define en lenguaje C | |
;$ es para la posicion actual del puntero en la ejecuccion desde que se inicio la seccion. | |
;$$ es para ver la posicion inicial desde la seccion. (donde estoy - donde estaba) | |
SECTION .text | |
;seccion text, aqui es donde va el codigo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Asi se hacen los comentarios. | |
SECTION .data ;Definimos la seccion de datos estaticos, equivalentes de constantes. | |
msg: db "Hola clase (:",10,13 ;etiqueta: db (DefineByte) "cadena",bytes sin formato, 10 = fin de linea, 13 = salto de linea | |
lon: equ $-$$ ;etiqueta: equ (EQUAL) cantidad. Es el equivalente de #define en lenguaje C | |
;$ es para la posicion actual del puntero en la ejecuccion desde que se inicio la seccion. | |
;$$ es para ver la posicion inicial desde la seccion. (donde estoy - donde estaba) | |
SECTION .text | |
;seccion text, aqui es donde va el codigo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section .data | |
line db "hola esto es una linea de prueba",10 | |
len equ $ - $$ | |
section .bss ;Block Started by Symbol | |
buffer: resb len | |
file: resb 4 | |
num: resb 4 | |
section .text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
public class Secuenciador{ | |
semaforoThread[] semaforos; | |
Luces[] semaGrap; | |
int tiempoX,tiempoY; | |
int carrosX,carrosY; | |
JLabel[] Carros; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class semaforoThread extends Thread { | |
private Boolean[] colores; | |
private Boolean nonStop; | |
private char identificador; | |
/*Verde,Amarillo,Rojo*/ | |
public semaforoThread(char identificador){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import javax.swing.*; | |
import java.awt.event.*; | |
import javax.imageio.*; | |
public class Interfaz extends JFrame{ | |
private JPanel panelPrincipal; | |
private Luces[] semaGrap; | |
private Secuenciador sec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.Math; | |
public class Randoms { | |
public static int NumerosAleatorios(int Min, int Max){ | |
return (Min + (int)(Math.random() * ((Max-Min) + 1))); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main{ | |
public static void main(String[] args){ | |
Interfaz i = new Interfaz(); | |
i.Desplegar(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import javax.swing.*; | |
import java.awt.event.*; | |
public class Luz extends JPanel{ | |
Color on; | |
int radius = 20; | |
int border = 3; | |
boolean active; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import javax.swing.*; | |
import javax.swing.border.*; | |
public class Luces extends JPanel{ | |
Luz verde,roja,amarilla; | |
public Luces(){ | |
verde = new Luz(Color.GREEN); |
OlderNewer