mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-25 11:32:07 +00:00
Added keyboard library and tester
This commit is contained in:
parent
2015c17d25
commit
f613cbbe36
@ -0,0 +1,3 @@
|
||||
lda #{c2}
|
||||
ldy #{c1}
|
||||
sta ({z1}),y
|
@ -0,0 +1,3 @@
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
@ -21,6 +21,14 @@ const byte* SPRITES_COLS = $d027;
|
||||
|
||||
const byte* COLS = $d800;
|
||||
|
||||
// CIA#1 Port A: keyboard matrix columns and joystick #2
|
||||
const byte* CIA1_PORT_A = $dc00;
|
||||
// CIA#1 Port B: keyboard matrix rows and joystick #1.
|
||||
const byte* CIA1_PORT_B = $dc01;
|
||||
// CIA #1 Port A data direction register.
|
||||
const byte* CIA1_PORT_A_DDR = $dc02;
|
||||
// CIA #1 Port B data direction register.
|
||||
const byte* CIA1_PORT_B_DDR = $dc03;
|
||||
|
||||
const byte BLACK = $0;
|
||||
const byte WHITE = $1;
|
||||
|
138
src/test/java/dk/camelot64/kickc/test/kc/keyboard.kc
Normal file
138
src/test/java/dk/camelot64/kickc/test/kc/keyboard.kc
Normal file
@ -0,0 +1,138 @@
|
||||
// Simple Keyboard Input Library
|
||||
// C64 Keyboard Matrix Reference - from http://codebase64.org/doku.php?id=base:reading_the_keyboard
|
||||
// Keyboard Codes are %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7)
|
||||
// +----+----------------------+-------------------------------------------------------------------------------------------------------+
|
||||
// | | Write | Read $dc01 (C64 screen code in parenthesis): |
|
||||
// |row:| $dc00: row bits +------------+------------+------------+------------+------------+------------+------------+------------+
|
||||
// | | | BIT 7 | BIT 6 | BIT 5 | BIT 4 | BIT 3 | BIT 2 | BIT 1 | BIT 0 |
|
||||
// +----+----------------------+------------+------------+------------+------------+------------+------------+------------+------------+
|
||||
// |0. | #%11111110 (254/$fe) | DOWN ($ )| F5 ($ )| F3 ($ )| F1 ($ )| F7 ($ )| RIGHT ($ )| RETURN($ )|DELETE ($ )|
|
||||
// |1. | #%11111101 (253/$fd) |LEFT-SH($ )| e ($05)| s ($13)| z ($1a)| 4 ($34)| a ($01)| w ($17)| 3 ($33)|
|
||||
// |2. | #%11111011 (251/$fb) | x ($18)| t ($14)| f ($06)| c ($03)| 6 ($36)| d ($04)| r ($12)| 5 ($35)|
|
||||
// |3. | #%11110111 (247/$f7) | v ($16)| u ($15)| h ($08)| b ($02)| 8 ($38)| g ($07)| y ($19)| 7 ($37)|
|
||||
// |4. | #%11101111 (239/$ef) | n ($0e)| o ($0f)| k ($0b)| m ($0d)| 0 ($30)| j ($0a)| i ($09)| 9 ($39)|
|
||||
// |5. | #%11011111 (223/$df) | , ($2c)| @ ($00)| : ($3a)| . ($2e)| - ($2d)| l ($0c)| p ($10)| + ($2b)|
|
||||
// |6. | #%10111111 (191/$bf) | / ($2f)| ^ ($1e)| = ($3d)|RGHT-SH($ )| HOME ($ )| ; ($3b)| * ($2a)| £ ($1c)|
|
||||
// |7. | #%01111111 (127/$7f) | STOP ($ )| q ($11)|COMMODR($ )| SPACE ($20)| 2 ($32)|CONTROL($ )| <- ($1f)| 1 ($31)|
|
||||
// +----+----------------------+------------+------------+------------+------------+------------+------------+------------+------------+
|
||||
|
||||
import "c64.kc"
|
||||
|
||||
// Keyboard Codes for all 63 keys.
|
||||
// Keyboard Codes are %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7).
|
||||
// See C64 Keyboard Matrix Reference http://codebase64.org/doku.php?id=base:reading_the_keyboard
|
||||
const byte KEY_DEL = $00;
|
||||
const byte KEY_RETURN = $01;
|
||||
const byte KEY_CRSR_RIGHT = $02;
|
||||
const byte KEY_F7 = $03;
|
||||
const byte KEY_F5 = $04;
|
||||
const byte KEY_F3 = $05;
|
||||
const byte KEY_F1 = $06;
|
||||
const byte KEY_CRSR_DOWN = $07;
|
||||
const byte KEY_3 = $08;
|
||||
const byte KEY_W = $09;
|
||||
const byte KEY_A = $0a;
|
||||
const byte KEY_4 = $0b;
|
||||
const byte KEY_Z = $0c;
|
||||
const byte KEY_S = $0d;
|
||||
const byte KEY_E = $0e;
|
||||
const byte KEY_LSHIFT = $0f;
|
||||
const byte KEY_5 = $10;
|
||||
const byte KEY_R = $11;
|
||||
const byte KEY_D = $12;
|
||||
const byte KEY_6 = $13;
|
||||
const byte KEY_C = $14;
|
||||
const byte KEY_F = $15;
|
||||
const byte KEY_T = $16;
|
||||
const byte KEY_X = $17;
|
||||
const byte KEY_7 = $18;
|
||||
const byte KEY_Y = $19;
|
||||
const byte KEY_G = $1a;
|
||||
const byte KEY_8 = $1b;
|
||||
const byte KEY_B = $1c;
|
||||
const byte KEY_H = $1d;
|
||||
const byte KEY_U = $1e;
|
||||
const byte KEY_V = $1f;
|
||||
const byte KEY_9 = $20;
|
||||
const byte KEY_I = $21;
|
||||
const byte KEY_J = $22;
|
||||
const byte KEY_0 = $23;
|
||||
const byte KEY_M = $24;
|
||||
const byte KEY_K = $25;
|
||||
const byte KEY_O = $26;
|
||||
const byte KEY_N = $27;
|
||||
const byte KEY_PLUS = $28;
|
||||
const byte KEY_P = $29;
|
||||
const byte KEY_L = $2a;
|
||||
const byte KEY_MINUS = $2b;
|
||||
const byte KEY_DOT = $2c;
|
||||
const byte KEY_COLON = $2d;
|
||||
const byte KEY_AT = $2e;
|
||||
const byte KEY_COMMA = $2f;
|
||||
const byte KEY_POUND = $30;
|
||||
const byte KEY_ASTERISK = $31;
|
||||
const byte KEY_SEMICOLON = $32;
|
||||
const byte KEY_HOME = $33;
|
||||
const byte KEY_RSHIFT = $34;
|
||||
const byte KEY_EQUALS = $35;
|
||||
const byte KEY_ARROW_UP = $36;
|
||||
const byte KEY_SLASH = $37;
|
||||
const byte KEY_1 = $38;
|
||||
const byte KEY_ARROW_LEFT = $39;
|
||||
const byte KEY_CTRL = $3a;
|
||||
const byte KEY_2 = $3b;
|
||||
const byte KEY_SPACE = $3c;
|
||||
const byte KEY_COMMODORE = $3d;
|
||||
const byte KEY_Q = $3e;
|
||||
const byte KEY_RUNSTOP = $3f;
|
||||
|
||||
// Keycodes for each screen code character from $00-$3f.
|
||||
// Chars that do not have an unmodified keycode return $3f (representing RUN/STOP).
|
||||
const byte[] keyboard_char_keycodes = {
|
||||
/*@*/KEY_AT, /*a*/KEY_A, /*b*/KEY_B, /*c*/KEY_C, /*d*/KEY_D, /*e*/KEY_E, /*f*/KEY_F, /*g*/KEY_G,
|
||||
/*h*/KEY_H, /*i*/KEY_I, /*j*/KEY_J, /*k*/KEY_K, /*l*/KEY_L, /*m*/KEY_M, /*n*/KEY_N, /*o*/KEY_O,
|
||||
/*p*/KEY_O, /*q*/KEY_Q, /*r*/KEY_R, /*s*/KEY_S, /*t*/KEY_T, /*u*/KEY_U, /*v*/KEY_V, /*w*/KEY_W,
|
||||
/*x*/KEY_X, /*y*/KEY_Y, /*z*/KEY_Z, /*[*/$3f, /*£*/KEY_POUND, /*]*/$3f, /*^*/KEY_ARROW_UP, /*<-*/KEY_ARROW_LEFT,
|
||||
/* */KEY_SPACE, /*!*/$3f, /*"*/$3f, /*#*/$3f, /*$*/$3f, /*%*/$3f, /*&*/$3f, /*´*/$3f,
|
||||
/*(*/$3f, /*)*/$3f, /***/KEY_ASTERISK, /*+*/KEY_PLUS, /*,*/KEY_COMMA, /*-*/KEY_MINUS, /*.*/KEY_DOT, /*/*/KEY_SLASH,
|
||||
/*0*/KEY_0, /*1*/KEY_1, /*2*/KEY_2, /*3*/KEY_3, /*4*/KEY_4, /*5*/KEY_5, /*6*/KEY_6, /*7*/KEY_7,
|
||||
/*8*/KEY_8, /*9*/KEY_9, /*:*/KEY_COLON, /*;*/KEY_SEMICOLON, /*<*/$3f, /*=*/KEY_EQUALS, /*>*/$3f, /*?*/$3f
|
||||
};
|
||||
|
||||
// Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
|
||||
byte[8] keyboard_matrix_row_bitmask = { %11111110, %11111101, %11111011, %11110111, %11101111, %11011111, %10111111, %01111111 };
|
||||
|
||||
// Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
|
||||
byte[] keyboard_matrix_col_bitmask = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 };
|
||||
|
||||
// Initialize keyboard reading by setting CIA#$ Data Direction Registers
|
||||
void keyboard_init() {
|
||||
// Keyboard Matrix Columns Write Mode
|
||||
*CIA1_PORT_A_DDR = $ff;
|
||||
// Keyboard Matrix Columns Read Mode
|
||||
*CIA1_PORT_B_DDR = $00;
|
||||
}
|
||||
// Read a single row of the keyboard matrix
|
||||
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
|
||||
// Returns the keys pressed on the row as bits according to the C64 key matrix.
|
||||
byte keyboard_matrix_read(byte rowid) {
|
||||
*CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid];
|
||||
byte row_pressed_bits = ~*CIA1_PORT_B;
|
||||
return row_pressed_bits;
|
||||
}
|
||||
|
||||
// Determines whether a specific key is currently pressed
|
||||
// The key is a keyboard code defined from the keyboard matrix by %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7)
|
||||
// All keys exist as as KEY_XXX constants.
|
||||
// Returns zero if the key is not pressed and a non-zero value if the key is currently pressed
|
||||
byte keyboard_key_pressed(byte key) {
|
||||
return keyboard_matrix_read(key>>3)&keyboard_matrix_col_bitmask[key&7];
|
||||
}
|
||||
|
||||
// Get the keycode corresponding to a specific screen code character
|
||||
// ch is the character to get the key code for ($00-$3f)
|
||||
// Returns the key code corresponding to the passed character. Only characters with a non-shifted key are handled.
|
||||
// If there is no non-shifted key representing the char $3f is returned (representing RUN/STOP) .
|
||||
byte keyboard_get_keycode(byte ch) {
|
||||
return keyboard_char_keycodes[ch];
|
||||
}
|
@ -1,13 +1,6 @@
|
||||
import "c64.kc"
|
||||
// Test keyboard input - in the keyboard matrix and mapping screen codes to key codes
|
||||
|
||||
// CIA#1 Port A: keyboard matrix columns and joystick #2
|
||||
const byte* CIA1_PORT_A = $dc00;
|
||||
// CIA#1 Port B: keyboard matrix rows and joystick #1.
|
||||
const byte* CIA1_PORT_B = $dc01;
|
||||
// CIA #1 Port A data direction register.
|
||||
const byte* CIA1_PORT_A_DDR = $dc02;
|
||||
// CIA #1 Port B data direction register.
|
||||
const byte* CIA1_PORT_B_DDR = $dc03;
|
||||
import "keyboard.kc"
|
||||
|
||||
void main() {
|
||||
// Clear screen
|
||||
@ -16,6 +9,7 @@ void main() {
|
||||
}
|
||||
// Init keyboard
|
||||
keyboard_init();
|
||||
// Loop
|
||||
while(true) {
|
||||
do {} while (*RASTER!=$ff);
|
||||
byte* screen = $400;
|
||||
@ -33,87 +27,19 @@ void main() {
|
||||
screen = screen + 40;
|
||||
}
|
||||
screen = screen + 40;
|
||||
// Checks specific chars
|
||||
byte[] chars = { '@', 'a', 'b', 'c', 'd', 'e' };
|
||||
for( byte i : 0..5 ) {
|
||||
byte ch = chars[i];
|
||||
if(keyboard_char_pressed(ch)!=0) {
|
||||
screen[i] = ch;
|
||||
} else {
|
||||
screen[i] = ' ';
|
||||
// Checks all specific chars $00-$3f
|
||||
byte i = 0;
|
||||
for( byte ch : 0..$3f ) {
|
||||
byte key = keyboard_get_keycode(ch);
|
||||
if(key!=$3f) {
|
||||
if(keyboard_key_pressed(key)!=0) {
|
||||
screen[i++] = ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add some spaces
|
||||
do {
|
||||
screen[i++] = ' ';
|
||||
} while (i<5);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize keyboard reading by setting CIA#$ Data Direction Registers
|
||||
void keyboard_init() {
|
||||
// Keyboard Matrix Columns Write Mode
|
||||
*CIA1_PORT_A_DDR = $ff;
|
||||
// Keyboard Matrix Columns Read Mode
|
||||
*CIA1_PORT_B_DDR = $00;
|
||||
}
|
||||
|
||||
// Determines whether a specific key representing a PETSCII char is currently pressed
|
||||
// Returns zero if the key is not pressed and a non-zero value if the key is currently pressed
|
||||
byte keyboard_char_pressed(byte ch) {
|
||||
return keyboard_matrix_read(keyboard_matrix_row(ch)) & keyboard_matrix_col(ch);
|
||||
}
|
||||
|
||||
// Keyboard row bits as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7)
|
||||
byte[8] keyboard_row_bits = { %11111110, %11111101, %11111011, %11110111, %11101111, %11011111, %10111111, %01111111 };
|
||||
|
||||
// Read a single row of the keyboard matrix
|
||||
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
|
||||
// Returns the keys pressed on the row as bits according to the C64 key matrix.
|
||||
byte keyboard_matrix_read(byte rowid) {
|
||||
*CIA1_PORT_A = keyboard_row_bits[rowid];
|
||||
byte row_pressed_bits = ~*CIA1_PORT_B;
|
||||
return row_pressed_bits;
|
||||
}
|
||||
|
||||
// Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7)
|
||||
byte[] keyboard_matrix_col_bitmask = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 };
|
||||
|
||||
// The keyboard matrix position of each PETSCII char between $00 and $3f (lower case)
|
||||
// Matrix positions are encoded as column ID (0-7) in the high nibble and row ID (0-7) in the low nibble %ccccrrrr
|
||||
byte[] keyboard_matrix_chars = {
|
||||
// CR Char
|
||||
$65, // ($00) @
|
||||
$21, // ($01) a
|
||||
$43, // ($02) b
|
||||
$42, // ($03) c
|
||||
$22, // ($04) d
|
||||
$61 // ($05) e
|
||||
};
|
||||
|
||||
// Get the row ID of the keyboard matrix row containing a specific PETSCII char
|
||||
// Returns the row ID (0-7) of the keyboard matrix row containing the passed char
|
||||
// The row ID is suitable for passing to keyboard_matrix_read(rowid)
|
||||
byte keyboard_matrix_row(byte ch) {
|
||||
return keyboard_matrix_chars[ch] & $f;
|
||||
}
|
||||
|
||||
// Get the column bit mask of the keyboard matrix column containing a specific PETSCII char.
|
||||
// Returns the keyboard matrix column bit mask of the passed char.
|
||||
// The returned bit is suitable for ANDing with the result of keyboard_matrix_read(rowid) to determine if the corresponding key is pressed.
|
||||
byte keyboard_matrix_col(byte ch) {
|
||||
byte col_id = keyboard_matrix_chars[ch] >>4;
|
||||
return keyboard_matrix_col_bitmask[col_id];
|
||||
}
|
||||
|
||||
// C64 Keyboard Matrix Reference - from http://codebase64.org/doku.php?id=base:reading_the_keyboard
|
||||
// +----+----------------------+-------------------------------------------------------------------------------------------------------+
|
||||
// | | Write | Read $dc01 (PETSCII code in parenthesis): |
|
||||
// |row:| $dc00: row bits +------------+------------+------------+------------+------------+------------+------------+------------+
|
||||
// | | | BIT 7 | BIT 6 | BIT 5 | BIT 4 | BIT 3 | BIT 2 | BIT 1 | BIT 0 |
|
||||
// +----+----------------------+------------+------------+------------+------------+------------+------------+------------+------------+
|
||||
// |0. | #%11111110 (254/$fe) | DOWN ($ )| F5 ($ )| F3 ($ )| F1 ($ )| F7 ($ )| RIGHT ($ )| RETURN($ )|DELETE ($ )|
|
||||
// |1. | #%11111101 (253/$fd) |LEFT-SH($ )| e ($05)| s ($13)| z ($1a)| 4 ($34)| a ($01)| w ($17)| 3 ($33)|
|
||||
// |2. | #%11111011 (251/$fb) | x ($18)| t ($14)| f ($06)| c ($03)| 6 ($36)| d ($04)| r ($12)| 5 ($35)|
|
||||
// |3. | #%11110111 (247/$f7) | v ($16)| u ($15)| h ($08)| b ($02)| 8 ($38)| g ($07)| y ($19)| 7 ($37)|
|
||||
// |4. | #%11101111 (239/$ef) | n ($0e)| o ($0f)| k ($0b)| m ($0d)| 0 ($30)| j ($0a)| i ($09)| 9 ($39)|
|
||||
// |5. | #%11011111 (223/$df) | , ($2c)| @ ($00)| : ($3a)| . ($2e)| - ($2d)| l ($0c)| p ($10)| + ($2b)|
|
||||
// |6. | #%10111111 (191/$bf) | / ($2f)| ^ ($1e)| = ($3d)|RGHT-SH($ )| HOME ($ )| ; ($3b)| * ($2a)| £ ($1c)|
|
||||
// |7. | #%01111111 (127/$7f) | STOP ($ )| q ($11)|COMMODR($ )| SPACE ($20)| 2 ($32)|CONTROL($ )| <- ($1f)| 1 ($31)|
|
||||
// +----+----------------------+------------+------------+------------+------------+------------+------------+------------+------------+
|
@ -73,6 +73,14 @@ const byte* SPRITES_COLS = $d027;
|
||||
|
||||
const byte* COLS = $d800;
|
||||
|
||||
// CIA#1 Port A: keyboard matrix columns and joystick #2
|
||||
const byte* CIA1_PORT_A = $dc00;
|
||||
// CIA#1 Port B: keyboard matrix rows and joystick #1.
|
||||
const byte* CIA1_PORT_B = $dc01;
|
||||
// CIA #1 Port A data direction register.
|
||||
const byte* CIA1_PORT_A_DDR = $dc02;
|
||||
// CIA #1 Port B data direction register.
|
||||
const byte* CIA1_PORT_B_DDR = $dc03;
|
||||
|
||||
const byte BLACK = $0;
|
||||
const byte WHITE = $1;
|
||||
@ -112,6 +120,10 @@ STATEMENTS
|
||||
(byte*) SPRITES_MC2 ← (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -187,6 +199,10 @@ SYMBOLS
|
||||
(byte*) BORDERCOL
|
||||
(byte) BROWN
|
||||
(byte*) CHARGEN
|
||||
(byte*) CIA1_PORT_A
|
||||
(byte*) CIA1_PORT_A_DDR
|
||||
(byte*) CIA1_PORT_B
|
||||
(byte*) CIA1_PORT_B_DDR
|
||||
(byte*) COLS
|
||||
(byte) CYAN
|
||||
(byte) DARK_GREY
|
||||
@ -262,6 +278,10 @@ Promoting word/dword/signed dword to byte* in SPRITES_MC1 ← ((byte*)) 53285
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_MC2 ← ((byte*)) 53286
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_COLS ← ((byte*)) 53287
|
||||
Promoting word/dword/signed dword to byte* in COLS ← ((byte*)) 55296
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A ← ((byte*)) 56320
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B ← ((byte*)) 56321
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A_DDR ← ((byte*)) 56322
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B_DDR ← ((byte*)) 56323
|
||||
Promoting word/dword/signed dword to byte* in DTV_CONTROL ← ((byte*)) 53308
|
||||
Promoting word/dword/signed dword to byte* in DTV_FEATURE ← ((byte*)) 53311
|
||||
Promoting word/dword/signed dword to byte* in DTV_PALETTE ← ((byte*)) 53760
|
||||
@ -284,6 +304,10 @@ INITIAL CONTROL FLOW GRAPH
|
||||
(byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -392,27 +416,31 @@ Eliminating unused variable (byte*) SPRITES_MC1 and assignment [13] (byte*) SPRI
|
||||
Eliminating unused variable (byte*) SPRITES_MC2 and assignment [14] (byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
Eliminating unused variable (byte*) SPRITES_COLS and assignment [15] (byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287
|
||||
Eliminating unused variable (byte*) COLS and assignment [16] (byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
Eliminating unused variable (byte) BLACK and assignment [17] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) WHITE and assignment [18] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) RED and assignment [19] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [20] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [21] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [22] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [23] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [24] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [25] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [26] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [27] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [28] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [29] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [30] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [31] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [32] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable (byte) DTV_CONTROL_LINEAR_ADDRESSING_ON and assignment [34] (byte) DTV_CONTROL_LINEAR_ADDRESSING_ON ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) DTV_CONTROL_OVERSCAN_ON and assignment [37] (byte) DTV_CONTROL_OVERSCAN_ON ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) DTV_CONTROL_COLORRAM_OFF and assignment [38] (byte) DTV_CONTROL_COLORRAM_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 16
|
||||
Eliminating unused variable (byte) DTV_CONTROL_CHUNKY_ON and assignment [40] (byte) DTV_CONTROL_CHUNKY_ON ← (byte/signed byte/word/signed word/dword/signed dword) 64
|
||||
Eliminating unused variable (byte) DTV_FEATURE_DISABLE_TIL_RESET and assignment [43] (byte) DTV_FEATURE_DISABLE_TIL_RESET ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A and assignment [17] (byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B and assignment [18] (byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A_DDR and assignment [19] (byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B_DDR and assignment [20] (byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
Eliminating unused variable (byte) BLACK and assignment [21] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) WHITE and assignment [22] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) RED and assignment [23] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [24] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [25] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [26] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [27] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [28] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [29] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [30] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [31] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [32] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [33] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [34] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [35] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [36] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable (byte) DTV_CONTROL_LINEAR_ADDRESSING_ON and assignment [38] (byte) DTV_CONTROL_LINEAR_ADDRESSING_ON ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) DTV_CONTROL_OVERSCAN_ON and assignment [41] (byte) DTV_CONTROL_OVERSCAN_ON ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) DTV_CONTROL_COLORRAM_OFF and assignment [42] (byte) DTV_CONTROL_COLORRAM_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 16
|
||||
Eliminating unused variable (byte) DTV_CONTROL_CHUNKY_ON and assignment [44] (byte) DTV_CONTROL_CHUNKY_ON ← (byte/signed byte/word/signed word/dword/signed dword) 64
|
||||
Eliminating unused variable (byte) DTV_FEATURE_DISABLE_TIL_RESET and assignment [47] (byte) DTV_FEATURE_DISABLE_TIL_RESET ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Removing empty block main::@9
|
||||
Removing empty block main::@3
|
||||
Removing empty block main::@10
|
||||
|
@ -95,6 +95,14 @@ const byte* SPRITES_COLS = $d027;
|
||||
|
||||
const byte* COLS = $d800;
|
||||
|
||||
// CIA#1 Port A: keyboard matrix columns and joystick #2
|
||||
const byte* CIA1_PORT_A = $dc00;
|
||||
// CIA#1 Port B: keyboard matrix rows and joystick #1.
|
||||
const byte* CIA1_PORT_B = $dc01;
|
||||
// CIA #1 Port A data direction register.
|
||||
const byte* CIA1_PORT_A_DDR = $dc02;
|
||||
// CIA #1 Port B data direction register.
|
||||
const byte* CIA1_PORT_B_DDR = $dc03;
|
||||
|
||||
const byte BLACK = $0;
|
||||
const byte WHITE = $1;
|
||||
@ -133,6 +141,10 @@ STATEMENTS
|
||||
(byte*) SPRITES_MC2 ← (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -188,6 +200,10 @@ SYMBOLS
|
||||
(byte*) BORDERCOL
|
||||
(byte) BROWN
|
||||
(byte*) CHARGEN
|
||||
(byte*) CIA1_PORT_A
|
||||
(byte*) CIA1_PORT_A_DDR
|
||||
(byte*) CIA1_PORT_B
|
||||
(byte*) CIA1_PORT_B_DDR
|
||||
(byte*) COLS
|
||||
(byte) CYAN
|
||||
(byte) DARK_GREY
|
||||
@ -248,6 +264,10 @@ Promoting word/dword/signed dword to byte* in SPRITES_MC1 ← ((byte*)) 53285
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_MC2 ← ((byte*)) 53286
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_COLS ← ((byte*)) 53287
|
||||
Promoting word/dword/signed dword to byte* in COLS ← ((byte*)) 55296
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A ← ((byte*)) 56320
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B ← ((byte*)) 56321
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A_DDR ← ((byte*)) 56322
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B_DDR ← ((byte*)) 56323
|
||||
INITIAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
@ -267,6 +287,10 @@ INITIAL CONTROL FLOW GRAPH
|
||||
(byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -349,22 +373,26 @@ Eliminating unused variable (byte*) SPRITES_MC1 and assignment [13] (byte*) SPRI
|
||||
Eliminating unused variable (byte*) SPRITES_MC2 and assignment [14] (byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
Eliminating unused variable (byte*) SPRITES_COLS and assignment [15] (byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287
|
||||
Eliminating unused variable (byte*) COLS and assignment [16] (byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
Eliminating unused variable (byte) BLACK and assignment [17] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) WHITE and assignment [18] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) RED and assignment [19] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [20] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [21] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [22] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [23] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [24] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [25] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [26] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [27] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [28] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [29] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [30] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [31] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [32] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A and assignment [17] (byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B and assignment [18] (byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A_DDR and assignment [19] (byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B_DDR and assignment [20] (byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
Eliminating unused variable (byte) BLACK and assignment [21] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) WHITE and assignment [22] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) RED and assignment [23] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [24] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [25] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [26] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [27] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [28] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [29] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [30] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [31] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [32] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [33] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [34] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [35] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [36] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable - keeping the call (void~) main::$2
|
||||
Removing empty block main::@4
|
||||
Removing empty block main::@6
|
||||
|
@ -97,6 +97,14 @@ const byte* SPRITES_COLS = $d027;
|
||||
|
||||
const byte* COLS = $d800;
|
||||
|
||||
// CIA#1 Port A: keyboard matrix columns and joystick #2
|
||||
const byte* CIA1_PORT_A = $dc00;
|
||||
// CIA#1 Port B: keyboard matrix rows and joystick #1.
|
||||
const byte* CIA1_PORT_B = $dc01;
|
||||
// CIA #1 Port A data direction register.
|
||||
const byte* CIA1_PORT_A_DDR = $dc02;
|
||||
// CIA #1 Port B data direction register.
|
||||
const byte* CIA1_PORT_B_DDR = $dc03;
|
||||
|
||||
const byte BLACK = $0;
|
||||
const byte WHITE = $1;
|
||||
@ -135,6 +143,10 @@ STATEMENTS
|
||||
(byte*) SPRITES_MC2 ← (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -249,6 +261,10 @@ SYMBOLS
|
||||
(byte*) BORDERCOL
|
||||
(byte) BROWN
|
||||
(byte*) CHARGEN
|
||||
(byte*) CIA1_PORT_A
|
||||
(byte*) CIA1_PORT_A_DDR
|
||||
(byte*) CIA1_PORT_B
|
||||
(byte*) CIA1_PORT_B_DDR
|
||||
(byte*) COLS
|
||||
(byte) CYAN
|
||||
(byte) DARK_GREY
|
||||
@ -344,6 +360,10 @@ Promoting word/dword/signed dword to byte* in SPRITES_MC1 ← ((byte*)) 53285
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_MC2 ← ((byte*)) 53286
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_COLS ← ((byte*)) 53287
|
||||
Promoting word/dword/signed dword to byte* in COLS ← ((byte*)) 55296
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A ← ((byte*)) 56320
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B ← ((byte*)) 56321
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A_DDR ← ((byte*)) 56322
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B_DDR ← ((byte*)) 56323
|
||||
Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
|
||||
Promoting word/signed word/dword/signed dword to byte* in SPRITE ← ((byte*)) 8192
|
||||
INITIAL CONTROL FLOW GRAPH
|
||||
@ -365,6 +385,10 @@ INITIAL CONTROL FLOW GRAPH
|
||||
(byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -508,21 +532,25 @@ Eliminating unused variable (byte*) BGCOL and assignment [12] (byte*) BGCOL ←
|
||||
Eliminating unused variable (byte*) SPRITES_MC1 and assignment [13] (byte*) SPRITES_MC1 ← ((byte*)) (word/dword/signed dword) 53285
|
||||
Eliminating unused variable (byte*) SPRITES_MC2 and assignment [14] (byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
Eliminating unused variable (byte*) COLS and assignment [16] (byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
Eliminating unused variable (byte) BLACK and assignment [17] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) RED and assignment [19] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [20] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [21] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [22] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [23] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [24] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [25] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [26] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [27] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [28] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [29] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [30] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [31] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [32] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A and assignment [17] (byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B and assignment [18] (byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A_DDR and assignment [19] (byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B_DDR and assignment [20] (byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
Eliminating unused variable (byte) BLACK and assignment [21] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) RED and assignment [23] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [24] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [25] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [26] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [27] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [28] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [29] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [30] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [31] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [32] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [33] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [34] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [35] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [36] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable - keeping the call (void~) main::$0
|
||||
Eliminating unused variable - keeping the call (void~) main::$2
|
||||
Removing empty block main::@4
|
||||
|
@ -238,6 +238,14 @@ const byte* SPRITES_COLS = $d027;
|
||||
|
||||
const byte* COLS = $d800;
|
||||
|
||||
// CIA#1 Port A: keyboard matrix columns and joystick #2
|
||||
const byte* CIA1_PORT_A = $dc00;
|
||||
// CIA#1 Port B: keyboard matrix rows and joystick #1.
|
||||
const byte* CIA1_PORT_B = $dc01;
|
||||
// CIA #1 Port A data direction register.
|
||||
const byte* CIA1_PORT_A_DDR = $dc02;
|
||||
// CIA #1 Port B data direction register.
|
||||
const byte* CIA1_PORT_B_DDR = $dc03;
|
||||
|
||||
const byte BLACK = $0;
|
||||
const byte WHITE = $1;
|
||||
@ -657,6 +665,10 @@ STATEMENTS
|
||||
(byte*) SPRITES_MC2 ← (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -1216,6 +1228,10 @@ SYMBOLS
|
||||
(byte*) BORDERCOL
|
||||
(byte) BROWN
|
||||
(byte*) CHARGEN
|
||||
(byte*) CIA1_PORT_A
|
||||
(byte*) CIA1_PORT_A_DDR
|
||||
(byte*) CIA1_PORT_B
|
||||
(byte*) CIA1_PORT_B_DDR
|
||||
(byte*) COLS
|
||||
(byte) CYAN
|
||||
(byte) DARK_GREY
|
||||
@ -1592,6 +1608,10 @@ Promoting word/dword/signed dword to byte* in SPRITES_MC1 ← ((byte*)) 53285
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_MC2 ← ((byte*)) 53286
|
||||
Promoting word/dword/signed dword to byte* in SPRITES_COLS ← ((byte*)) 53287
|
||||
Promoting word/dword/signed dword to byte* in COLS ← ((byte*)) 55296
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A ← ((byte*)) 56320
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B ← ((byte*)) 56321
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_A_DDR ← ((byte*)) 56322
|
||||
Promoting word/dword/signed dword to byte* in CIA1_PORT_B_DDR ← ((byte*)) 56323
|
||||
Promoting byte/word/signed word/dword/signed dword to byte* in memLo ← ((byte*)) 254
|
||||
Promoting byte/word/signed word/dword/signed dword to byte* in memHi ← ((byte*)) 255
|
||||
Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
|
||||
@ -1616,6 +1636,10 @@ INITIAL CONTROL FLOW GRAPH
|
||||
(byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
(byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287
|
||||
(byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296
|
||||
(byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
(byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
(byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
(byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
(byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
@ -2420,28 +2444,32 @@ Eliminating unused variable (byte*) SPRITES_MC and assignment [9] (byte*) SPRITE
|
||||
Eliminating unused variable (byte*) BGCOL and assignment [12] (byte*) BGCOL ← ((byte*)) (word/dword/signed dword) 53281
|
||||
Eliminating unused variable (byte*) SPRITES_MC1 and assignment [13] (byte*) SPRITES_MC1 ← ((byte*)) (word/dword/signed dword) 53285
|
||||
Eliminating unused variable (byte*) SPRITES_MC2 and assignment [14] (byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286
|
||||
Eliminating unused variable (byte) BLACK and assignment [17] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) WHITE and assignment [18] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) RED and assignment [19] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [20] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [21] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [22] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [23] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [24] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [25] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [26] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [27] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [28] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [29] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [30] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [31] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [32] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A and assignment [17] (byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B and assignment [18] (byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321
|
||||
Eliminating unused variable (byte*) CIA1_PORT_A_DDR and assignment [19] (byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322
|
||||
Eliminating unused variable (byte*) CIA1_PORT_B_DDR and assignment [20] (byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323
|
||||
Eliminating unused variable (byte) BLACK and assignment [21] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
Eliminating unused variable (byte) WHITE and assignment [22] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
Eliminating unused variable (byte) RED and assignment [23] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
Eliminating unused variable (byte) CYAN and assignment [24] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
Eliminating unused variable (byte) PURPLE and assignment [25] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
Eliminating unused variable (byte) GREEN and assignment [26] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
Eliminating unused variable (byte) BLUE and assignment [27] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6
|
||||
Eliminating unused variable (byte) YELLOW and assignment [28] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
Eliminating unused variable (byte) ORANGE and assignment [29] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
Eliminating unused variable (byte) BROWN and assignment [30] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
Eliminating unused variable (byte) PINK and assignment [31] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
Eliminating unused variable (byte) DARK_GREY and assignment [32] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
Eliminating unused variable (byte) GREY and assignment [33] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
Eliminating unused variable (byte) LIGHT_GREEN and assignment [34] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
Eliminating unused variable (byte) LIGHT_BLUE and assignment [35] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
Eliminating unused variable (byte) LIGHT_GREY and assignment [36] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15
|
||||
Eliminating unused variable - keeping the call (void~) setFAC::$1
|
||||
Eliminating unused variable - keeping the call (void~) setMEMtoFAC::$0
|
||||
Eliminating unused variable - keeping the call (void~) addMEMtoFAC::$0
|
||||
Eliminating unused variable - keeping the call (void~) divMEMbyFAC::$0
|
||||
Eliminating unused variable - keeping the call (void~) mulFACbyMEM::$0
|
||||
Eliminating unused variable (byte*) char_cursor and assignment [69] (byte*) char_cursor ← (byte*) line_cursor
|
||||
Eliminating unused variable (byte*) char_cursor and assignment [73] (byte*) char_cursor ← (byte*) line_cursor
|
||||
Eliminating unused variable - keeping the call (void~) main::$0
|
||||
Eliminating unused variable - keeping the call (void~) main::$2
|
||||
Eliminating unused variable - keeping the call (void~) init::$0
|
||||
|
@ -6,12 +6,61 @@
|
||||
.label CIA1_PORT_B = $dc01
|
||||
.label CIA1_PORT_A_DDR = $dc02
|
||||
.label CIA1_PORT_B_DDR = $dc03
|
||||
.const KEY_3 = 8
|
||||
.const KEY_W = 9
|
||||
.const KEY_A = $a
|
||||
.const KEY_4 = $b
|
||||
.const KEY_Z = $c
|
||||
.const KEY_S = $d
|
||||
.const KEY_E = $e
|
||||
.const KEY_5 = $10
|
||||
.const KEY_R = $11
|
||||
.const KEY_D = $12
|
||||
.const KEY_6 = $13
|
||||
.const KEY_C = $14
|
||||
.const KEY_F = $15
|
||||
.const KEY_T = $16
|
||||
.const KEY_X = $17
|
||||
.const KEY_7 = $18
|
||||
.const KEY_Y = $19
|
||||
.const KEY_G = $1a
|
||||
.const KEY_8 = $1b
|
||||
.const KEY_B = $1c
|
||||
.const KEY_H = $1d
|
||||
.const KEY_U = $1e
|
||||
.const KEY_V = $1f
|
||||
.const KEY_9 = $20
|
||||
.const KEY_I = $21
|
||||
.const KEY_J = $22
|
||||
.const KEY_0 = $23
|
||||
.const KEY_M = $24
|
||||
.const KEY_K = $25
|
||||
.const KEY_O = $26
|
||||
.const KEY_N = $27
|
||||
.const KEY_PLUS = $28
|
||||
.const KEY_L = $2a
|
||||
.const KEY_MINUS = $2b
|
||||
.const KEY_DOT = $2c
|
||||
.const KEY_COLON = $2d
|
||||
.const KEY_AT = $2e
|
||||
.const KEY_COMMA = $2f
|
||||
.const KEY_POUND = $30
|
||||
.const KEY_ASTERISK = $31
|
||||
.const KEY_SEMICOLON = $32
|
||||
.const KEY_EQUALS = $35
|
||||
.const KEY_ARROW_UP = $36
|
||||
.const KEY_SLASH = $37
|
||||
.const KEY_1 = $38
|
||||
.const KEY_ARROW_LEFT = $39
|
||||
.const KEY_2 = $3b
|
||||
.const KEY_SPACE = $3c
|
||||
.const KEY_Q = $3e
|
||||
jsr main
|
||||
main: {
|
||||
.label sc = 2
|
||||
.label row_pressed_bits = 4
|
||||
.label screen = 2
|
||||
.label ch = 4
|
||||
.label i = 4
|
||||
lda #<$400
|
||||
sta sc
|
||||
lda #>$400
|
||||
@ -76,67 +125,65 @@ main: {
|
||||
bcc !+
|
||||
inc screen+1
|
||||
!:
|
||||
ldx #0
|
||||
lda #0
|
||||
sta i
|
||||
tax
|
||||
b10:
|
||||
lda chars,x
|
||||
sta ch
|
||||
jsr keyboard_char_pressed
|
||||
jsr keyboard_get_keycode
|
||||
cmp #$3f
|
||||
beq b11
|
||||
sta keyboard_key_pressed.key
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b11
|
||||
ldy i
|
||||
txa
|
||||
tay
|
||||
lda ch
|
||||
sta (screen),y
|
||||
b12:
|
||||
inx
|
||||
cpx #6
|
||||
bne b10
|
||||
jmp b5
|
||||
inc i
|
||||
b11:
|
||||
txa
|
||||
tay
|
||||
inx
|
||||
cpx #$40
|
||||
bne b10
|
||||
b13:
|
||||
lda #' '
|
||||
ldy i
|
||||
sta (screen),y
|
||||
jmp b12
|
||||
inc i
|
||||
lda i
|
||||
cmp #5
|
||||
bcc b13
|
||||
jmp b5
|
||||
b8:
|
||||
lda #'0'
|
||||
sta (screen),y
|
||||
jmp b9
|
||||
chars: .byte '@', 'a', 'b', 'c', 'd', 'e'
|
||||
}
|
||||
keyboard_char_pressed: {
|
||||
.label _1 = 5
|
||||
.label ch = 4
|
||||
ldy ch
|
||||
jsr keyboard_matrix_row
|
||||
keyboard_key_pressed: {
|
||||
.label _1 = 6
|
||||
.label key = 5
|
||||
lda key
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
jsr keyboard_matrix_read
|
||||
sta _1
|
||||
ldy ch
|
||||
jsr keyboard_matrix_col
|
||||
and _1
|
||||
rts
|
||||
}
|
||||
keyboard_matrix_col: {
|
||||
lda keyboard_matrix_chars,y
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lda #7
|
||||
and key
|
||||
tay
|
||||
lda keyboard_matrix_col_bitmask,y
|
||||
and _1
|
||||
rts
|
||||
}
|
||||
keyboard_matrix_read: {
|
||||
tay
|
||||
lda keyboard_row_bits,y
|
||||
lda keyboard_matrix_row_bitmask,y
|
||||
sta CIA1_PORT_A
|
||||
lda CIA1_PORT_B
|
||||
eor #$ff
|
||||
rts
|
||||
}
|
||||
keyboard_matrix_row: {
|
||||
lda keyboard_matrix_chars,y
|
||||
and #$f
|
||||
keyboard_get_keycode: {
|
||||
lda keyboard_char_keycodes,x
|
||||
rts
|
||||
}
|
||||
keyboard_init: {
|
||||
@ -146,6 +193,6 @@ keyboard_init: {
|
||||
sta CIA1_PORT_B_DDR
|
||||
rts
|
||||
}
|
||||
keyboard_row_bits: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
|
||||
keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f
|
||||
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
|
||||
keyboard_matrix_chars: .byte $65, $21, $43, $42, $22, $61
|
||||
keyboard_char_keycodes: .byte KEY_AT, KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, KEY_O, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, $3f, KEY_POUND, $3f, KEY_ARROW_UP, KEY_ARROW_LEFT, KEY_SPACE, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, $3f, KEY_ASTERISK, KEY_PLUS, KEY_COMMA, KEY_MINUS, KEY_DOT, KEY_SLASH, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_COLON, KEY_SEMICOLON, $3f, KEY_EQUALS, $3f, $3f
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@6
|
||||
@6: scope:[] from @begin
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @6
|
||||
@end: scope:[] from @5
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @6
|
||||
main: scope:[main] from @5
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
@ -15,12 +15,12 @@ main::@1: scope:[main] from main main::@1
|
||||
[6] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] )
|
||||
[7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 [ main::sc#1 ] ( main:2 [ main::sc#1 ] )
|
||||
[8] if((byte*) main::sc#1<(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) goto main::@1 [ main::sc#1 ] ( main:2 [ main::sc#1 ] )
|
||||
to:main::@13
|
||||
main::@13: scope:[main] from main::@1
|
||||
to:main::@14
|
||||
main::@14: scope:[main] from main::@1
|
||||
[9] phi() [ ] ( main:2 [ ] )
|
||||
[10] call keyboard_init param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@12 main::@13
|
||||
main::@2: scope:[main] from main::@13 main::@14
|
||||
[11] if(true) goto main::@5 [ ] ( main:2 [ ] )
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
@ -29,107 +29,104 @@ main::@return: scope:[main] from main::@2
|
||||
main::@5: scope:[main] from main::@2 main::@5
|
||||
[13] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 [ ] ( main:2 [ ] )
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@19 main::@5
|
||||
[14] (byte*) main::screen#12 ← phi( main::@5/((byte*))(word/signed word/dword/signed dword) 1024 main::@19/(byte*) main::screen#1 ) [ main::row#2 main::screen#12 ] ( main:2 [ main::row#2 main::screen#12 ] )
|
||||
[14] (byte) main::row#2 ← phi( main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@19/(byte) main::row#1 ) [ main::row#2 main::screen#12 ] ( main:2 [ main::row#2 main::screen#12 ] )
|
||||
[15] (byte) keyboard_matrix_read::rowid#0 ← (byte) main::row#2 [ main::row#2 main::screen#12 keyboard_matrix_read::rowid#0 ] ( main:2 [ main::row#2 main::screen#12 keyboard_matrix_read::rowid#0 ] )
|
||||
[16] call keyboard_matrix_read param-assignment [ main::row#2 main::screen#12 keyboard_matrix_read::return#2 ] ( main:2 [ main::row#2 main::screen#12 keyboard_matrix_read::return#2 ] )
|
||||
[17] (byte) keyboard_matrix_read::return#0 ← (byte) keyboard_matrix_read::return#2 [ main::row#2 main::screen#12 keyboard_matrix_read::return#0 ] ( main:2 [ main::row#2 main::screen#12 keyboard_matrix_read::return#0 ] )
|
||||
to:main::@26
|
||||
main::@26: scope:[main] from main::@6
|
||||
[18] (byte) main::row_pressed_bits#0 ← (byte) keyboard_matrix_read::return#0 [ main::row#2 main::screen#12 main::row_pressed_bits#0 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#0 ] )
|
||||
main::@6: scope:[main] from main::@20 main::@5
|
||||
[14] (byte*) main::screen#13 ← phi( main::@5/((byte*))(word/signed word/dword/signed dword) 1024 main::@20/(byte*) main::screen#1 ) [ main::row#2 main::screen#13 ] ( main:2 [ main::row#2 main::screen#13 ] )
|
||||
[14] (byte) main::row#2 ← phi( main::@5/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@20/(byte) main::row#1 ) [ main::row#2 main::screen#13 ] ( main:2 [ main::row#2 main::screen#13 ] )
|
||||
[15] (byte) keyboard_matrix_read::rowid#1 ← (byte) main::row#2 [ main::row#2 main::screen#13 keyboard_matrix_read::rowid#1 ] ( main:2 [ main::row#2 main::screen#13 keyboard_matrix_read::rowid#1 ] )
|
||||
[16] call keyboard_matrix_read param-assignment [ main::row#2 main::screen#13 keyboard_matrix_read::return#0 ] ( main:2 [ main::row#2 main::screen#13 keyboard_matrix_read::return#0 ] )
|
||||
[17] (byte) keyboard_matrix_read::return#3 ← (byte) keyboard_matrix_read::return#0 [ main::row#2 main::screen#13 keyboard_matrix_read::return#3 ] ( main:2 [ main::row#2 main::screen#13 keyboard_matrix_read::return#3 ] )
|
||||
to:main::@28
|
||||
main::@28: scope:[main] from main::@6
|
||||
[18] (byte) main::row_pressed_bits#0 ← (byte) keyboard_matrix_read::return#3 [ main::row#2 main::screen#13 main::row_pressed_bits#0 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#0 ] )
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@26 main::@9
|
||||
[19] (byte) main::col#2 ← phi( main::@26/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@9/(byte) main::col#1 ) [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] )
|
||||
[19] (byte) main::row_pressed_bits#2 ← phi( main::@26/(byte) main::row_pressed_bits#0 main::@9/(byte) main::row_pressed_bits#1 ) [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] )
|
||||
[20] (byte~) main::$5 ← (byte) main::row_pressed_bits#2 & (byte/word/signed word/dword/signed dword) 128 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 main::$5 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 main::$5 ] )
|
||||
[21] if((byte~) main::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] )
|
||||
to:main::@17
|
||||
main::@17: scope:[main] from main::@7
|
||||
[22] *((byte*) main::screen#12 + (byte) main::col#2) ← (byte) '1' [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] )
|
||||
main::@7: scope:[main] from main::@28 main::@9
|
||||
[19] (byte) main::col#2 ← phi( main::@28/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@9/(byte) main::col#1 ) [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] )
|
||||
[19] (byte) main::row_pressed_bits#2 ← phi( main::@28/(byte) main::row_pressed_bits#0 main::@9/(byte) main::row_pressed_bits#1 ) [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] )
|
||||
[20] (byte~) main::$5 ← (byte) main::row_pressed_bits#2 & (byte/word/signed word/dword/signed dword) 128 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 main::$5 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 main::$5 ] )
|
||||
[21] if((byte~) main::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] )
|
||||
to:main::@18
|
||||
main::@18: scope:[main] from main::@7
|
||||
[22] *((byte*) main::screen#13 + (byte) main::col#2) ← (byte) '1' [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] )
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@17 main::@8
|
||||
[23] (byte) main::row_pressed_bits#1 ← (byte) main::row_pressed_bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::row#2 main::screen#12 main::col#2 main::row_pressed_bits#1 ] ( main:2 [ main::row#2 main::screen#12 main::col#2 main::row_pressed_bits#1 ] )
|
||||
[24] (byte) main::col#1 ← ++ (byte) main::col#2 [ main::row#2 main::screen#12 main::row_pressed_bits#1 main::col#1 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#1 main::col#1 ] )
|
||||
[25] if((byte) main::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@7 [ main::row#2 main::screen#12 main::row_pressed_bits#1 main::col#1 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#1 main::col#1 ] )
|
||||
to:main::@19
|
||||
main::@19: scope:[main] from main::@9
|
||||
[26] (byte*) main::screen#1 ← (byte*) main::screen#12 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ main::row#2 main::screen#1 ] ( main:2 [ main::row#2 main::screen#1 ] )
|
||||
main::@9: scope:[main] from main::@18 main::@8
|
||||
[23] (byte) main::row_pressed_bits#1 ← (byte) main::row_pressed_bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ main::row#2 main::screen#13 main::col#2 main::row_pressed_bits#1 ] ( main:2 [ main::row#2 main::screen#13 main::col#2 main::row_pressed_bits#1 ] )
|
||||
[24] (byte) main::col#1 ← ++ (byte) main::col#2 [ main::row#2 main::screen#13 main::row_pressed_bits#1 main::col#1 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#1 main::col#1 ] )
|
||||
[25] if((byte) main::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@7 [ main::row#2 main::screen#13 main::row_pressed_bits#1 main::col#1 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#1 main::col#1 ] )
|
||||
to:main::@20
|
||||
main::@20: scope:[main] from main::@9
|
||||
[26] (byte*) main::screen#1 ← (byte*) main::screen#13 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ main::row#2 main::screen#1 ] ( main:2 [ main::row#2 main::screen#1 ] )
|
||||
[27] (byte) main::row#1 ← ++ (byte) main::row#2 [ main::row#1 main::screen#1 ] ( main:2 [ main::row#1 main::screen#1 ] )
|
||||
[28] if((byte) main::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@6 [ main::row#1 main::screen#1 ] ( main:2 [ main::row#1 main::screen#1 ] )
|
||||
to:main::@20
|
||||
main::@20: scope:[main] from main::@19
|
||||
to:main::@21
|
||||
main::@21: scope:[main] from main::@20
|
||||
[29] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ main::screen#2 ] ( main:2 [ main::screen#2 ] )
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@12 main::@20
|
||||
[30] (byte) main::i#2 ← phi( main::@12/(byte) main::i#1 main::@20/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] )
|
||||
[31] (byte) main::ch#0 ← *((const byte[]) main::chars#0 + (byte) main::i#2) [ main::screen#2 main::i#2 main::ch#0 ] ( main:2 [ main::screen#2 main::i#2 main::ch#0 ] )
|
||||
[32] (byte) keyboard_char_pressed::ch#0 ← (byte) main::ch#0 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 ] ( main:2 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 ] )
|
||||
[33] call keyboard_char_pressed param-assignment [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::return#1 ] ( main:2 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::return#1 ] )
|
||||
[34] (byte) keyboard_char_pressed::return#0 ← (byte) keyboard_char_pressed::return#1 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::return#0 ] ( main:2 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::return#0 ] )
|
||||
to:main::@27
|
||||
main::@27: scope:[main] from main::@10
|
||||
[35] (byte~) main::$13 ← (byte) keyboard_char_pressed::return#0 [ main::screen#2 main::i#2 main::ch#0 main::$13 ] ( main:2 [ main::screen#2 main::i#2 main::ch#0 main::$13 ] )
|
||||
[36] if((byte~) main::$13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 [ main::screen#2 main::i#2 main::ch#0 ] ( main:2 [ main::screen#2 main::i#2 main::ch#0 ] )
|
||||
to:main::@21
|
||||
main::@21: scope:[main] from main::@27
|
||||
[37] *((byte*) main::screen#2 + (byte) main::i#2) ← (byte) main::ch#0 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] )
|
||||
to:main::@12
|
||||
main::@12: scope:[main] from main::@11 main::@21
|
||||
[38] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::screen#2 main::i#1 ] ( main:2 [ main::screen#2 main::i#1 ] )
|
||||
[39] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@10 [ main::screen#2 main::i#1 ] ( main:2 [ main::screen#2 main::i#1 ] )
|
||||
main::@10: scope:[main] from main::@11 main::@21
|
||||
[30] (byte) main::i#10 ← phi( main::@11/(byte) main::i#6 main::@21/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] )
|
||||
[30] (byte) main::ch#2 ← phi( main::@11/(byte) main::ch#1 main::@21/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] )
|
||||
[31] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] )
|
||||
[32] call keyboard_get_keycode param-assignment [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] )
|
||||
[33] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#2 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#2 ] )
|
||||
to:main::@29
|
||||
main::@29: scope:[main] from main::@10
|
||||
[34] (byte) main::key#0 ← (byte) keyboard_get_keycode::return#2 [ main::screen#2 main::ch#2 main::i#10 main::key#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 main::key#0 ] )
|
||||
[35] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 [ main::screen#2 main::ch#2 main::i#10 main::key#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 main::key#0 ] )
|
||||
to:main::@22
|
||||
main::@22: scope:[main] from main::@29
|
||||
[36] (byte) keyboard_key_pressed::key#0 ← (byte) main::key#0 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 ] )
|
||||
[37] call keyboard_key_pressed param-assignment [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::return#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::return#0 ] )
|
||||
[38] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::return#2 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::return#2 ] )
|
||||
to:main::@30
|
||||
main::@30: scope:[main] from main::@22
|
||||
[39] (byte~) main::$16 ← (byte) keyboard_key_pressed::return#2 [ main::screen#2 main::ch#2 main::i#10 main::$16 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 main::$16 ] )
|
||||
[40] if((byte~) main::$16==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] )
|
||||
to:main::@23
|
||||
main::@23: scope:[main] from main::@30
|
||||
[41] *((byte*) main::screen#2 + (byte) main::i#10) ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] )
|
||||
[42] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::screen#2 main::ch#2 main::i#1 ] ( main:2 [ main::screen#2 main::ch#2 main::i#1 ] )
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@23 main::@29 main::@30
|
||||
[43] (byte) main::i#6 ← phi( main::@30/(byte) main::i#10 main::@23/(byte) main::i#1 main::@29/(byte) main::i#10 ) [ main::screen#2 main::ch#2 main::i#6 ] ( main:2 [ main::screen#2 main::ch#2 main::i#6 ] )
|
||||
[44] (byte) main::ch#1 ← ++ (byte) main::ch#2 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] )
|
||||
[45] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] )
|
||||
to:main::@13
|
||||
main::@13: scope:[main] from main::@11 main::@13
|
||||
[46] (byte) main::i#4 ← phi( main::@11/(byte) main::i#6 main::@13/(byte) main::i#2 ) [ main::screen#2 main::i#4 ] ( main:2 [ main::screen#2 main::i#4 ] )
|
||||
[47] *((byte*) main::screen#2 + (byte) main::i#4) ← (byte) ' ' [ main::screen#2 main::i#4 ] ( main:2 [ main::screen#2 main::i#4 ] )
|
||||
[48] (byte) main::i#2 ← ++ (byte) main::i#4 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] )
|
||||
[49] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] )
|
||||
to:main::@2
|
||||
main::@11: scope:[main] from main::@27
|
||||
[40] *((byte*) main::screen#2 + (byte) main::i#2) ← (byte) ' ' [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] )
|
||||
to:main::@12
|
||||
main::@8: scope:[main] from main::@7
|
||||
[41] *((byte*) main::screen#12 + (byte) main::col#2) ← (byte) '0' [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#12 main::row_pressed_bits#2 main::col#2 ] )
|
||||
[50] *((byte*) main::screen#13 + (byte) main::col#2) ← (byte) '0' [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] ( main:2 [ main::row#2 main::screen#13 main::row_pressed_bits#2 main::col#2 ] )
|
||||
to:main::@9
|
||||
keyboard_char_pressed: scope:[keyboard_char_pressed] from main::@10
|
||||
[42] (byte) keyboard_matrix_row::ch#0 ← (byte) keyboard_char_pressed::ch#0 [ keyboard_char_pressed::ch#0 keyboard_matrix_row::ch#0 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_row::ch#0 ] )
|
||||
[43] call keyboard_matrix_row param-assignment [ keyboard_char_pressed::ch#0 keyboard_matrix_row::return#1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_row::return#1 ] )
|
||||
[44] (byte) keyboard_matrix_row::return#0 ← (byte) keyboard_matrix_row::return#1 [ keyboard_char_pressed::ch#0 keyboard_matrix_row::return#0 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_row::return#0 ] )
|
||||
to:keyboard_char_pressed::@2
|
||||
keyboard_char_pressed::@2: scope:[keyboard_char_pressed] from keyboard_char_pressed
|
||||
[45] (byte) keyboard_matrix_read::rowid#1 ← (byte) keyboard_matrix_row::return#0 [ keyboard_char_pressed::ch#0 keyboard_matrix_read::rowid#1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_read::rowid#1 ] )
|
||||
[46] call keyboard_matrix_read param-assignment [ keyboard_matrix_read::return#2 keyboard_char_pressed::ch#0 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_matrix_read::return#2 keyboard_char_pressed::ch#0 ] )
|
||||
[47] (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#2 [ keyboard_char_pressed::ch#0 keyboard_matrix_read::return#1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_read::return#1 ] )
|
||||
to:keyboard_char_pressed::@3
|
||||
keyboard_char_pressed::@3: scope:[keyboard_char_pressed] from keyboard_char_pressed::@2
|
||||
[48] (byte~) keyboard_char_pressed::$1 ← (byte) keyboard_matrix_read::return#1 [ keyboard_char_pressed::ch#0 keyboard_char_pressed::$1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_char_pressed::$1 ] )
|
||||
[49] (byte) keyboard_matrix_col::ch#0 ← (byte) keyboard_char_pressed::ch#0 [ keyboard_char_pressed::$1 keyboard_matrix_col::ch#0 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_matrix_col::ch#0 ] )
|
||||
[50] call keyboard_matrix_col param-assignment [ keyboard_char_pressed::$1 keyboard_matrix_col::return#1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_matrix_col::return#1 ] )
|
||||
[51] (byte) keyboard_matrix_col::return#0 ← (byte) keyboard_matrix_col::return#1 [ keyboard_char_pressed::$1 keyboard_matrix_col::return#0 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_matrix_col::return#0 ] )
|
||||
to:keyboard_char_pressed::@4
|
||||
keyboard_char_pressed::@4: scope:[keyboard_char_pressed] from keyboard_char_pressed::@3
|
||||
[52] (byte~) keyboard_char_pressed::$2 ← (byte) keyboard_matrix_col::return#0 [ keyboard_char_pressed::$1 keyboard_char_pressed::$2 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_char_pressed::$2 ] )
|
||||
[53] (byte) keyboard_char_pressed::return#1 ← (byte~) keyboard_char_pressed::$1 & (byte~) keyboard_char_pressed::$2 [ keyboard_char_pressed::return#1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::return#1 ] )
|
||||
to:keyboard_char_pressed::@return
|
||||
keyboard_char_pressed::@return: scope:[keyboard_char_pressed] from keyboard_char_pressed::@4
|
||||
[54] return [ keyboard_char_pressed::return#1 ] ( main:2::keyboard_char_pressed:33 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::return#1 ] )
|
||||
keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@22
|
||||
[51] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::key#0 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::key#0 keyboard_matrix_read::rowid#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_matrix_read::rowid#0 ] )
|
||||
[52] call keyboard_matrix_read param-assignment [ keyboard_matrix_read::return#0 keyboard_key_pressed::key#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_matrix_read::return#0 keyboard_key_pressed::key#0 ] )
|
||||
[53] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 [ keyboard_key_pressed::key#0 keyboard_matrix_read::return#2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_matrix_read::return#2 ] )
|
||||
to:keyboard_key_pressed::@2
|
||||
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
|
||||
[54] (byte~) keyboard_key_pressed::$1 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::key#0 keyboard_key_pressed::$1 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_key_pressed::$1 ] )
|
||||
[55] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_key_pressed::key#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::$1 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::$1 keyboard_key_pressed::$2 ] )
|
||||
[56] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$1 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_key_pressed::$2) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::return#0 ] )
|
||||
to:keyboard_key_pressed::@return
|
||||
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
|
||||
[57] return [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::return#0 ] )
|
||||
to:@return
|
||||
keyboard_matrix_col: scope:[keyboard_matrix_col] from keyboard_char_pressed::@3
|
||||
[55] (byte) keyboard_matrix_col::col_id#0 ← *((const byte[]) keyboard_matrix_chars#0 + (byte) keyboard_matrix_col::ch#0) >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ keyboard_matrix_col::col_id#0 ] ( main:2::keyboard_char_pressed:33::keyboard_matrix_col:50 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_matrix_col::col_id#0 ] )
|
||||
[56] (byte) keyboard_matrix_col::return#1 ← *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_matrix_col::col_id#0) [ keyboard_matrix_col::return#1 ] ( main:2::keyboard_char_pressed:33::keyboard_matrix_col:50 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_matrix_col::return#1 ] )
|
||||
to:keyboard_matrix_col::@return
|
||||
keyboard_matrix_col::@return: scope:[keyboard_matrix_col] from keyboard_matrix_col
|
||||
[57] return [ keyboard_matrix_col::return#1 ] ( main:2::keyboard_char_pressed:33::keyboard_matrix_col:50 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::$1 keyboard_matrix_col::return#1 ] )
|
||||
to:@return
|
||||
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_char_pressed::@2 main::@6
|
||||
[58] (byte) keyboard_matrix_read::rowid#2 ← phi( keyboard_char_pressed::@2/(byte) keyboard_matrix_read::rowid#1 main::@6/(byte) keyboard_matrix_read::rowid#0 ) [ keyboard_matrix_read::rowid#2 ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#12 keyboard_matrix_read::rowid#2 ] main:2::keyboard_char_pressed:33::keyboard_matrix_read:46 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_read::rowid#2 ] )
|
||||
[59] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_row_bits#0 + (byte) keyboard_matrix_read::rowid#2) [ ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#12 ] main:2::keyboard_char_pressed:33::keyboard_matrix_read:46 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 ] )
|
||||
[60] (byte) keyboard_matrix_read::return#2 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#2 ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#12 keyboard_matrix_read::return#2 ] main:2::keyboard_char_pressed:33::keyboard_matrix_read:46 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_read::return#2 ] )
|
||||
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed main::@6
|
||||
[58] (byte) keyboard_matrix_read::rowid#2 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 main::@6/(byte) keyboard_matrix_read::rowid#1 ) [ keyboard_matrix_read::rowid#2 ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#13 keyboard_matrix_read::rowid#2 ] main:2::keyboard_key_pressed:37::keyboard_matrix_read:52 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_matrix_read::rowid#2 ] )
|
||||
[59] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#2) [ ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#13 ] main:2::keyboard_key_pressed:37::keyboard_matrix_read:52 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 ] )
|
||||
[60] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#13 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:37::keyboard_matrix_read:52 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_matrix_read::return#0 ] )
|
||||
to:keyboard_matrix_read::@return
|
||||
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
|
||||
[61] return [ keyboard_matrix_read::return#2 ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#12 keyboard_matrix_read::return#2 ] main:2::keyboard_char_pressed:33::keyboard_matrix_read:46 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_read::return#2 ] )
|
||||
[61] return [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_matrix_read:16 [ main::row#2 main::screen#13 keyboard_matrix_read::return#0 ] main:2::keyboard_key_pressed:37::keyboard_matrix_read:52 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_matrix_read::return#0 ] )
|
||||
to:@return
|
||||
keyboard_matrix_row: scope:[keyboard_matrix_row] from keyboard_char_pressed
|
||||
[62] (byte) keyboard_matrix_row::return#1 ← *((const byte[]) keyboard_matrix_chars#0 + (byte) keyboard_matrix_row::ch#0) & (byte/signed byte/word/signed word/dword/signed dword) 15 [ keyboard_matrix_row::return#1 ] ( main:2::keyboard_char_pressed:33::keyboard_matrix_row:43 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_row::return#1 ] )
|
||||
to:keyboard_matrix_row::@return
|
||||
keyboard_matrix_row::@return: scope:[keyboard_matrix_row] from keyboard_matrix_row
|
||||
[63] return [ keyboard_matrix_row::return#1 ] ( main:2::keyboard_char_pressed:33::keyboard_matrix_row:43 [ main::screen#2 main::i#2 main::ch#0 keyboard_char_pressed::ch#0 keyboard_matrix_row::return#1 ] )
|
||||
keyboard_get_keycode: scope:[keyboard_get_keycode] from main::@10
|
||||
[62] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] )
|
||||
to:keyboard_get_keycode::@return
|
||||
keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_keycode
|
||||
[63] return [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] )
|
||||
to:@return
|
||||
keyboard_init: scope:[keyboard_init] from main::@13
|
||||
keyboard_init: scope:[keyboard_init] from main::@14
|
||||
[64] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte/word/signed word/dword/signed dword) 255 [ ] ( main:2::keyboard_init:10 [ ] )
|
||||
[65] *((const byte*) CIA1_PORT_B_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::keyboard_init:10 [ ] )
|
||||
to:keyboard_init::@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
(label) @6
|
||||
(label) @5
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) CIA1_PORT_A
|
||||
@ -9,70 +9,159 @@
|
||||
(const byte*) CIA1_PORT_B#0 CIA1_PORT_B = ((byte*))(word/dword/signed dword) 56321
|
||||
(byte*) CIA1_PORT_B_DDR
|
||||
(const byte*) CIA1_PORT_B_DDR#0 CIA1_PORT_B_DDR = ((byte*))(word/dword/signed dword) 56323
|
||||
(byte) KEY_0
|
||||
(const byte) KEY_0#0 KEY_0 = (byte/signed byte/word/signed word/dword/signed dword) 35
|
||||
(byte) KEY_1
|
||||
(const byte) KEY_1#0 KEY_1 = (byte/signed byte/word/signed word/dword/signed dword) 56
|
||||
(byte) KEY_2
|
||||
(const byte) KEY_2#0 KEY_2 = (byte/signed byte/word/signed word/dword/signed dword) 59
|
||||
(byte) KEY_3
|
||||
(const byte) KEY_3#0 KEY_3 = (byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
(byte) KEY_4
|
||||
(const byte) KEY_4#0 KEY_4 = (byte/signed byte/word/signed word/dword/signed dword) 11
|
||||
(byte) KEY_5
|
||||
(const byte) KEY_5#0 KEY_5 = (byte/signed byte/word/signed word/dword/signed dword) 16
|
||||
(byte) KEY_6
|
||||
(const byte) KEY_6#0 KEY_6 = (byte/signed byte/word/signed word/dword/signed dword) 19
|
||||
(byte) KEY_7
|
||||
(const byte) KEY_7#0 KEY_7 = (byte/signed byte/word/signed word/dword/signed dword) 24
|
||||
(byte) KEY_8
|
||||
(const byte) KEY_8#0 KEY_8 = (byte/signed byte/word/signed word/dword/signed dword) 27
|
||||
(byte) KEY_9
|
||||
(const byte) KEY_9#0 KEY_9 = (byte/signed byte/word/signed word/dword/signed dword) 32
|
||||
(byte) KEY_A
|
||||
(const byte) KEY_A#0 KEY_A = (byte/signed byte/word/signed word/dword/signed dword) 10
|
||||
(byte) KEY_ARROW_LEFT
|
||||
(const byte) KEY_ARROW_LEFT#0 KEY_ARROW_LEFT = (byte/signed byte/word/signed word/dword/signed dword) 57
|
||||
(byte) KEY_ARROW_UP
|
||||
(const byte) KEY_ARROW_UP#0 KEY_ARROW_UP = (byte/signed byte/word/signed word/dword/signed dword) 54
|
||||
(byte) KEY_ASTERISK
|
||||
(const byte) KEY_ASTERISK#0 KEY_ASTERISK = (byte/signed byte/word/signed word/dword/signed dword) 49
|
||||
(byte) KEY_AT
|
||||
(const byte) KEY_AT#0 KEY_AT = (byte/signed byte/word/signed word/dword/signed dword) 46
|
||||
(byte) KEY_B
|
||||
(const byte) KEY_B#0 KEY_B = (byte/signed byte/word/signed word/dword/signed dword) 28
|
||||
(byte) KEY_C
|
||||
(const byte) KEY_C#0 KEY_C = (byte/signed byte/word/signed word/dword/signed dword) 20
|
||||
(byte) KEY_COLON
|
||||
(const byte) KEY_COLON#0 KEY_COLON = (byte/signed byte/word/signed word/dword/signed dword) 45
|
||||
(byte) KEY_COMMA
|
||||
(const byte) KEY_COMMA#0 KEY_COMMA = (byte/signed byte/word/signed word/dword/signed dword) 47
|
||||
(byte) KEY_D
|
||||
(const byte) KEY_D#0 KEY_D = (byte/signed byte/word/signed word/dword/signed dword) 18
|
||||
(byte) KEY_DOT
|
||||
(const byte) KEY_DOT#0 KEY_DOT = (byte/signed byte/word/signed word/dword/signed dword) 44
|
||||
(byte) KEY_E
|
||||
(const byte) KEY_E#0 KEY_E = (byte/signed byte/word/signed word/dword/signed dword) 14
|
||||
(byte) KEY_EQUALS
|
||||
(const byte) KEY_EQUALS#0 KEY_EQUALS = (byte/signed byte/word/signed word/dword/signed dword) 53
|
||||
(byte) KEY_F
|
||||
(const byte) KEY_F#0 KEY_F = (byte/signed byte/word/signed word/dword/signed dword) 21
|
||||
(byte) KEY_G
|
||||
(const byte) KEY_G#0 KEY_G = (byte/signed byte/word/signed word/dword/signed dword) 26
|
||||
(byte) KEY_H
|
||||
(const byte) KEY_H#0 KEY_H = (byte/signed byte/word/signed word/dword/signed dword) 29
|
||||
(byte) KEY_I
|
||||
(const byte) KEY_I#0 KEY_I = (byte/signed byte/word/signed word/dword/signed dword) 33
|
||||
(byte) KEY_J
|
||||
(const byte) KEY_J#0 KEY_J = (byte/signed byte/word/signed word/dword/signed dword) 34
|
||||
(byte) KEY_K
|
||||
(const byte) KEY_K#0 KEY_K = (byte/signed byte/word/signed word/dword/signed dword) 37
|
||||
(byte) KEY_L
|
||||
(const byte) KEY_L#0 KEY_L = (byte/signed byte/word/signed word/dword/signed dword) 42
|
||||
(byte) KEY_M
|
||||
(const byte) KEY_M#0 KEY_M = (byte/signed byte/word/signed word/dword/signed dword) 36
|
||||
(byte) KEY_MINUS
|
||||
(const byte) KEY_MINUS#0 KEY_MINUS = (byte/signed byte/word/signed word/dword/signed dword) 43
|
||||
(byte) KEY_N
|
||||
(const byte) KEY_N#0 KEY_N = (byte/signed byte/word/signed word/dword/signed dword) 39
|
||||
(byte) KEY_O
|
||||
(const byte) KEY_O#0 KEY_O = (byte/signed byte/word/signed word/dword/signed dword) 38
|
||||
(byte) KEY_PLUS
|
||||
(const byte) KEY_PLUS#0 KEY_PLUS = (byte/signed byte/word/signed word/dword/signed dword) 40
|
||||
(byte) KEY_POUND
|
||||
(const byte) KEY_POUND#0 KEY_POUND = (byte/signed byte/word/signed word/dword/signed dword) 48
|
||||
(byte) KEY_Q
|
||||
(const byte) KEY_Q#0 KEY_Q = (byte/signed byte/word/signed word/dword/signed dword) 62
|
||||
(byte) KEY_R
|
||||
(const byte) KEY_R#0 KEY_R = (byte/signed byte/word/signed word/dword/signed dword) 17
|
||||
(byte) KEY_S
|
||||
(const byte) KEY_S#0 KEY_S = (byte/signed byte/word/signed word/dword/signed dword) 13
|
||||
(byte) KEY_SEMICOLON
|
||||
(const byte) KEY_SEMICOLON#0 KEY_SEMICOLON = (byte/signed byte/word/signed word/dword/signed dword) 50
|
||||
(byte) KEY_SLASH
|
||||
(const byte) KEY_SLASH#0 KEY_SLASH = (byte/signed byte/word/signed word/dword/signed dword) 55
|
||||
(byte) KEY_SPACE
|
||||
(const byte) KEY_SPACE#0 KEY_SPACE = (byte/signed byte/word/signed word/dword/signed dword) 60
|
||||
(byte) KEY_T
|
||||
(const byte) KEY_T#0 KEY_T = (byte/signed byte/word/signed word/dword/signed dword) 22
|
||||
(byte) KEY_U
|
||||
(const byte) KEY_U#0 KEY_U = (byte/signed byte/word/signed word/dword/signed dword) 30
|
||||
(byte) KEY_V
|
||||
(const byte) KEY_V#0 KEY_V = (byte/signed byte/word/signed word/dword/signed dword) 31
|
||||
(byte) KEY_W
|
||||
(const byte) KEY_W#0 KEY_W = (byte/signed byte/word/signed word/dword/signed dword) 9
|
||||
(byte) KEY_X
|
||||
(const byte) KEY_X#0 KEY_X = (byte/signed byte/word/signed word/dword/signed dword) 23
|
||||
(byte) KEY_Y
|
||||
(const byte) KEY_Y#0 KEY_Y = (byte/signed byte/word/signed word/dword/signed dword) 25
|
||||
(byte) KEY_Z
|
||||
(const byte) KEY_Z#0 KEY_Z = (byte/signed byte/word/signed word/dword/signed dword) 12
|
||||
(byte*) RASTER
|
||||
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
|
||||
(byte()) keyboard_char_pressed((byte) keyboard_char_pressed::ch)
|
||||
(byte~) keyboard_char_pressed::$1 $1 zp ZP_BYTE:5 0.8
|
||||
(byte~) keyboard_char_pressed::$2 reg byte a 4.0
|
||||
(label) keyboard_char_pressed::@2
|
||||
(label) keyboard_char_pressed::@3
|
||||
(label) keyboard_char_pressed::@4
|
||||
(label) keyboard_char_pressed::@return
|
||||
(byte) keyboard_char_pressed::ch
|
||||
(byte) keyboard_char_pressed::ch#0 ch zp ZP_BYTE:4 13.125
|
||||
(byte) keyboard_char_pressed::return
|
||||
(byte) keyboard_char_pressed::return#0 reg byte a 202.0
|
||||
(byte) keyboard_char_pressed::return#1 reg byte a 34.33333333333333
|
||||
(byte[]) keyboard_char_keycodes
|
||||
(const byte[]) keyboard_char_keycodes#0 keyboard_char_keycodes = { (const byte) KEY_AT#0, (const byte) KEY_A#0, (const byte) KEY_B#0, (const byte) KEY_C#0, (const byte) KEY_D#0, (const byte) KEY_E#0, (const byte) KEY_F#0, (const byte) KEY_G#0, (const byte) KEY_H#0, (const byte) KEY_I#0, (const byte) KEY_J#0, (const byte) KEY_K#0, (const byte) KEY_L#0, (const byte) KEY_M#0, (const byte) KEY_N#0, (const byte) KEY_O#0, (const byte) KEY_O#0, (const byte) KEY_Q#0, (const byte) KEY_R#0, (const byte) KEY_S#0, (const byte) KEY_T#0, (const byte) KEY_U#0, (const byte) KEY_V#0, (const byte) KEY_W#0, (const byte) KEY_X#0, (const byte) KEY_Y#0, (const byte) KEY_Z#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_POUND#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_ARROW_UP#0, (const byte) KEY_ARROW_LEFT#0, (const byte) KEY_SPACE#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_ASTERISK#0, (const byte) KEY_PLUS#0, (const byte) KEY_COMMA#0, (const byte) KEY_MINUS#0, (const byte) KEY_DOT#0, (const byte) KEY_SLASH#0, (const byte) KEY_0#0, (const byte) KEY_1#0, (const byte) KEY_2#0, (const byte) KEY_3#0, (const byte) KEY_4#0, (const byte) KEY_5#0, (const byte) KEY_6#0, (const byte) KEY_7#0, (const byte) KEY_8#0, (const byte) KEY_9#0, (const byte) KEY_COLON#0, (const byte) KEY_SEMICOLON#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (const byte) KEY_EQUALS#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
|
||||
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
|
||||
(label) keyboard_get_keycode::@return
|
||||
(byte) keyboard_get_keycode::ch
|
||||
(byte) keyboard_get_keycode::ch#0 reg byte x 103.0
|
||||
(byte) keyboard_get_keycode::return
|
||||
(byte) keyboard_get_keycode::return#0 reg byte a 34.33333333333333
|
||||
(byte) keyboard_get_keycode::return#2 reg byte a 202.0
|
||||
(void()) keyboard_init()
|
||||
(label) keyboard_init::@return
|
||||
(byte[]) keyboard_matrix_chars
|
||||
(const byte[]) keyboard_matrix_chars#0 keyboard_matrix_chars = { (byte/signed byte/word/signed word/dword/signed dword) 101, (byte/signed byte/word/signed word/dword/signed dword) 33, (byte/signed byte/word/signed word/dword/signed dword) 67, (byte/signed byte/word/signed word/dword/signed dword) 66, (byte/signed byte/word/signed word/dword/signed dword) 34, (byte/signed byte/word/signed word/dword/signed dword) 97 }
|
||||
(byte()) keyboard_matrix_col((byte) keyboard_matrix_col::ch)
|
||||
(label) keyboard_matrix_col::@return
|
||||
(byte) keyboard_matrix_col::ch
|
||||
(byte) keyboard_matrix_col::ch#0 reg byte y 4.0
|
||||
(byte) keyboard_matrix_col::col_id
|
||||
(byte) keyboard_matrix_col::col_id#0 reg byte a 4.0
|
||||
(byte) keyboard_matrix_col::return
|
||||
(byte) keyboard_matrix_col::return#0 reg byte a 4.0
|
||||
(byte) keyboard_matrix_col::return#1 reg byte a 1.3333333333333333
|
||||
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
|
||||
(byte~) keyboard_key_pressed::$1 $1 zp ZP_BYTE:6 2.0
|
||||
(byte~) keyboard_key_pressed::$2 reg byte a 4.0
|
||||
(label) keyboard_key_pressed::@2
|
||||
(label) keyboard_key_pressed::@return
|
||||
(byte) keyboard_key_pressed::key
|
||||
(byte) keyboard_key_pressed::key#0 key zp ZP_BYTE:5 20.999999999999996
|
||||
(byte) keyboard_key_pressed::return
|
||||
(byte) keyboard_key_pressed::return#0 reg byte a 34.33333333333333
|
||||
(byte) keyboard_key_pressed::return#2 reg byte a 202.0
|
||||
(byte[]) keyboard_matrix_col_bitmask
|
||||
(const byte[]) keyboard_matrix_col_bitmask#0 keyboard_matrix_col_bitmask = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 }
|
||||
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
|
||||
(label) keyboard_matrix_read::@return
|
||||
(byte) keyboard_matrix_read::return
|
||||
(byte) keyboard_matrix_read::return#0 reg byte a 202.0
|
||||
(byte) keyboard_matrix_read::return#1 reg byte a 4.0
|
||||
(byte) keyboard_matrix_read::return#2 reg byte a 26.25
|
||||
(byte) keyboard_matrix_read::return#0 reg byte a 26.25
|
||||
(byte) keyboard_matrix_read::return#2 reg byte a 4.0
|
||||
(byte) keyboard_matrix_read::return#3 reg byte a 202.0
|
||||
(byte) keyboard_matrix_read::row_pressed_bits
|
||||
(byte) keyboard_matrix_read::rowid
|
||||
(byte) keyboard_matrix_read::rowid#0 reg byte a 202.0
|
||||
(byte) keyboard_matrix_read::rowid#1 reg byte a 4.0
|
||||
(byte) keyboard_matrix_read::rowid#0 reg byte a 4.0
|
||||
(byte) keyboard_matrix_read::rowid#1 reg byte a 202.0
|
||||
(byte) keyboard_matrix_read::rowid#2 reg byte a 105.0
|
||||
(byte()) keyboard_matrix_row((byte) keyboard_matrix_row::ch)
|
||||
(label) keyboard_matrix_row::@return
|
||||
(byte) keyboard_matrix_row::ch
|
||||
(byte) keyboard_matrix_row::ch#0 reg byte y 4.0
|
||||
(byte) keyboard_matrix_row::return
|
||||
(byte) keyboard_matrix_row::return#0 reg byte a 4.0
|
||||
(byte) keyboard_matrix_row::return#1 reg byte a 1.3333333333333333
|
||||
(byte[8]) keyboard_row_bits
|
||||
(const byte[8]) keyboard_row_bits#0 keyboard_row_bits = { (byte/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 }
|
||||
(byte[8]) keyboard_matrix_row_bitmask
|
||||
(const byte[8]) keyboard_matrix_row_bitmask#0 keyboard_matrix_row_bitmask = { (byte/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 }
|
||||
(void()) main()
|
||||
(byte~) main::$13 reg byte a 202.0
|
||||
(byte~) main::$16 reg byte a 202.0
|
||||
(byte~) main::$5 reg byte a 2002.0
|
||||
(label) main::@1
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
(label) main::@12
|
||||
(label) main::@13
|
||||
(label) main::@17
|
||||
(label) main::@19
|
||||
(label) main::@14
|
||||
(label) main::@18
|
||||
(label) main::@2
|
||||
(label) main::@20
|
||||
(label) main::@21
|
||||
(label) main::@26
|
||||
(label) main::@27
|
||||
(label) main::@22
|
||||
(label) main::@23
|
||||
(label) main::@28
|
||||
(label) main::@29
|
||||
(label) main::@30
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@7
|
||||
@ -80,15 +169,19 @@
|
||||
(label) main::@9
|
||||
(label) main::@return
|
||||
(byte) main::ch
|
||||
(byte) main::ch#0 ch zp ZP_BYTE:4 50.5
|
||||
(byte[]) main::chars
|
||||
(const byte[]) main::chars#0 chars = { (byte) '@', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e' }
|
||||
(byte) main::ch#1 reg byte x 151.5
|
||||
(byte) main::ch#2 reg byte x 28.857142857142858
|
||||
(byte) main::col
|
||||
(byte) main::col#1 reg byte y 1501.5
|
||||
(byte) main::col#2 reg byte y 667.3333333333334
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 151.5
|
||||
(byte) main::i#2 reg byte x 56.11111111111111
|
||||
(byte) main::i#1 i zp ZP_BYTE:4 202.0
|
||||
(byte) main::i#10 i zp ZP_BYTE:4 42.08333333333333
|
||||
(byte) main::i#2 i zp ZP_BYTE:4 151.5
|
||||
(byte) main::i#4 i zp ZP_BYTE:4 202.0
|
||||
(byte) main::i#6 i zp ZP_BYTE:4 168.33333333333331
|
||||
(byte) main::key
|
||||
(byte) main::key#0 reg byte a 151.5
|
||||
(byte) main::row
|
||||
(byte) main::row#1 reg byte x 151.5
|
||||
(byte) main::row#2 reg byte x 21.642857142857142
|
||||
@ -101,28 +194,26 @@
|
||||
(byte*) main::sc#2 sc zp ZP_WORD:2 16.5
|
||||
(byte*) main::screen
|
||||
(byte*) main::screen#1 screen zp ZP_WORD:2 71.0
|
||||
(byte*) main::screen#12 screen zp ZP_WORD:2 169.53846153846155
|
||||
(byte*) main::screen#2 screen zp ZP_WORD:2 17.75
|
||||
(byte*) main::screen#13 screen zp ZP_WORD:2 169.53846153846155
|
||||
(byte*) main::screen#2 screen zp ZP_WORD:2 10.142857142857142
|
||||
|
||||
zp ZP_WORD:2 [ main::sc#2 main::sc#1 main::screen#12 main::screen#1 main::screen#2 ]
|
||||
zp ZP_WORD:2 [ main::sc#2 main::sc#1 main::screen#13 main::screen#1 main::screen#2 ]
|
||||
reg byte x [ main::row#2 main::row#1 ]
|
||||
zp ZP_BYTE:4 [ main::row_pressed_bits#2 main::row_pressed_bits#0 main::row_pressed_bits#1 main::ch#0 keyboard_char_pressed::ch#0 ]
|
||||
zp ZP_BYTE:4 [ main::row_pressed_bits#2 main::row_pressed_bits#0 main::row_pressed_bits#1 main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ]
|
||||
reg byte y [ main::col#2 main::col#1 ]
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte a [ keyboard_matrix_read::rowid#2 keyboard_matrix_read::rowid#1 keyboard_matrix_read::rowid#0 ]
|
||||
reg byte a [ keyboard_matrix_read::return#0 ]
|
||||
reg byte x [ main::ch#2 main::ch#1 ]
|
||||
reg byte a [ keyboard_matrix_read::rowid#2 keyboard_matrix_read::rowid#0 keyboard_matrix_read::rowid#1 ]
|
||||
reg byte a [ keyboard_matrix_read::return#3 ]
|
||||
reg byte a [ main::$5 ]
|
||||
reg byte a [ keyboard_char_pressed::return#0 ]
|
||||
reg byte a [ main::$13 ]
|
||||
reg byte y [ keyboard_matrix_row::ch#0 ]
|
||||
reg byte a [ keyboard_matrix_row::return#0 ]
|
||||
reg byte a [ keyboard_matrix_read::return#1 ]
|
||||
zp ZP_BYTE:5 [ keyboard_char_pressed::$1 ]
|
||||
reg byte y [ keyboard_matrix_col::ch#0 ]
|
||||
reg byte a [ keyboard_matrix_col::return#0 ]
|
||||
reg byte a [ keyboard_char_pressed::$2 ]
|
||||
reg byte a [ keyboard_char_pressed::return#1 ]
|
||||
reg byte a [ keyboard_matrix_col::col_id#0 ]
|
||||
reg byte a [ keyboard_matrix_col::return#1 ]
|
||||
reg byte x [ keyboard_get_keycode::ch#0 ]
|
||||
reg byte a [ keyboard_get_keycode::return#2 ]
|
||||
reg byte a [ main::key#0 ]
|
||||
zp ZP_BYTE:5 [ keyboard_key_pressed::key#0 ]
|
||||
reg byte a [ keyboard_key_pressed::return#2 ]
|
||||
reg byte a [ main::$16 ]
|
||||
reg byte a [ keyboard_matrix_read::return#2 ]
|
||||
reg byte a [ keyboard_matrix_row::return#1 ]
|
||||
zp ZP_BYTE:6 [ keyboard_key_pressed::$1 ]
|
||||
reg byte a [ keyboard_key_pressed::$2 ]
|
||||
reg byte a [ keyboard_key_pressed::return#0 ]
|
||||
reg byte a [ keyboard_matrix_read::return#0 ]
|
||||
reg byte a [ keyboard_get_keycode::return#0 ]
|
||||
|
Loading…
Reference in New Issue
Block a user