A ver si de todo esto sale algo interesante
Wood: no tengo idea si ya tiene algo para numeros aleatorios... quizas Carlos lo sepa, que lleva mas tiempo.
Lo que sí necesitaria es un codigo para leer la/las tecla presionada, no termino de aclararme...
Tienes que poner en $dc00 linea de teclas del teclado que quieres averiguar después mira el valor en $dc01.
tienes que hacer esto 8 veces para averiguar todas las teclas. Por eso es que no se usa mucho el teclado en C64, come demasiado tiempo y ademas hay un problema en que no se puede leer ciertas teclas cuando precionadas al mismo tiempo.
Port B - $DC01
+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 7|Bit 6|Bit 5|Bit 4|Bit 3|Bit 2|Bit 1|Bit 0|
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 7| R/S | Q | C= |SPACE| 2 | CTRL|A_LFT| 1 |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 6| / | A_UP| = | S_R | HOME| ; | * |POUND|
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 5| , | @ | : | . | - | L | P | + |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 4| N | O | K | M | 0 | J | I | 9 |
Port A +-----+-----+-----+-----+-----+-----+-----+-----+-----+
$DC00 |Bit 3| V | U | H | B | 8 | G | Y | 7 |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 2| X | T | F | C | 6 | D | R | 5 |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 1| S_L | E | S | Z | 4 | A | W | 3 |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|Bit 0|C_U/D| F5 | F3 | F1 | F7 |C_L/R| CR | DEL |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+
C_L/R = Cursor left/right ; C_U/D = Cursor up/down
S_L = Shift, left ; S_R = Shift, right ; R/S = RUN/STOP
A_UP = Arrow up ; A_LFT = Arrow left