1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-24 20:32:39 +00:00

Added a keyboard event queue with scanner. Using it in C64DTV Gfx Explorer.

This commit is contained in:
jespergravgaard 2018-04-04 12:07:14 +02:00
parent 93fb8e1bff
commit 6bfc6de252
23 changed files with 9989 additions and 4994 deletions

View File

@ -92,11 +92,6 @@ byte[] form_fields_max = { $d, 1, 1, 1, 1, 1, 2, 1, 1, 1, $f, $f, $f, $
// Form fields values
byte[] form_fields_val = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
// Press-status for the DOWN key from last frame - used for debounce
byte key_down_debounce = 0;
// Press-status for the right key from last frame - used for debounce
byte key_right_debounce = 0;
// The number of frames to use for a full blink cycle
const signed byte FORM_CURSOR_BLINK = 40;
// Counts down to blink for form cursor (it is inversed in the lower half)
@ -146,50 +141,46 @@ void form_control() {
*field = *field & $7f;
}
// Scan the keyboard
keyboard_event_scan();
byte key_event = keyboard_event_get();
// Navigation using cursor up/down
byte key_down = keyboard_key_pressed(KEY_CRSR_DOWN);
if(key_down!=key_down_debounce) {
key_down_debounce = key_down;
if(key_down!=0) {
// Unblink the cursor
*field = *field & $7f;
if(keyboard_key_pressed(KEY_RSHIFT)==0) {
// Move to next field
if(++form_field_idx==form_fields_cnt) {
form_field_idx = 0;
}
} else {
// Move to previous field
if(--form_field_idx==$ff) {
form_field_idx = form_fields_cnt-1;
}
}
// Always blink cursor in new field
form_cursor_count = FORM_CURSOR_BLINK/2;
// Return to refresh
return;
}
if(key_event==KEY_CRSR_DOWN) {
// Unblink the cursor
*field = *field & $7f;
if((keyboard_modifiers&KEY_MODIFIER_SHIFT)==0) {
// Move to next field
if(++form_field_idx==form_fields_cnt) {
form_field_idx = 0;
}
} else {
// Move to previous field
if(--form_field_idx==$ff) {
form_field_idx = form_fields_cnt-1;
}
}
// Always blink cursor in new field
form_cursor_count = FORM_CURSOR_BLINK/2;
// Return to refresh
return;
}
// Change value with cursor left/right
byte key_right = keyboard_key_pressed(KEY_CRSR_RIGHT);
if(key_right!=key_right_debounce) {
key_right_debounce = key_right;
if(key_right!=0) {
if(keyboard_key_pressed(KEY_RSHIFT)==0) {
// Increase value
if(++form_fields_val[form_field_idx]>form_fields_max[form_field_idx]) {
form_fields_val[form_field_idx] = 0;
}
} else {
// Decrease value
if(--form_fields_val[form_field_idx]==$ff) {
form_fields_val[form_field_idx] = form_fields_max[form_field_idx];
}
if(key_event==KEY_CRSR_RIGHT) {
if((keyboard_modifiers&KEY_MODIFIER_SHIFT)==0) {
// Increase value
if(++form_fields_val[form_field_idx]>form_fields_max[form_field_idx]) {
form_fields_val[form_field_idx] = 0;
}
} else {
// Decrease value
if(--form_fields_val[form_field_idx]==$ff) {
form_fields_val[form_field_idx] = form_fields_max[form_field_idx];
}
// Render field value
*field = print_hextab[form_fields_val[form_field_idx]];
}
// Render field value
*field = print_hextab[form_fields_val[form_field_idx]];
}
}

View File

@ -103,7 +103,7 @@ const byte[] keyboard_char_keycodes = {
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 };
byte[8] keyboard_matrix_col_bitmask = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 };
// Initialize keyboard reading by setting CIA#$ Data Direction Registers
void keyboard_init() {
@ -123,7 +123,7 @@ byte keyboard_matrix_read(byte rowid) {
return row_pressed_bits;
}
// Determines whether a specific key is currently pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// 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
@ -139,4 +139,94 @@ byte keyboard_key_pressed(byte key) {
// 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];
}
}
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
byte[8] keyboard_events;
// Keyboard event buffer size. The number of events currently in the event buffer
byte keyboard_events_size = 0;
// Current keyboard modifiers (left shift, right shift, ctrl, commodore)
byte keyboard_modifiers = 0;
// Left shift is pressed
const byte KEY_MODIFIER_LSHIFT = 1;
// Right shift is pressed
const byte KEY_MODIFIER_RSHIFT = 2;
// CTRL is pressed
const byte KEY_MODIFIER_CTRL = 4;
// Commodore is pressed
const byte KEY_MODIFIER_COMMODORE = 8;
// Any shift is pressed
const byte KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT;
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
byte[8] keyboard_scan_values;
// Scans the entire matrix to determine which keys have been pressed/depressed.
// Generates keyboard events into the event buffer. Events can be read using keyboard_event_get().
// Handles debounce and only generates events when the status of a key changes.
// Also stores current status of modifiers in keyboard_modifiers.
void keyboard_event_scan() {
byte keycode = 0;
for(byte row : 0..7) {
byte row_scan = keyboard_matrix_read(row);
if(row_scan!=keyboard_scan_values[row]) {
// Something has changed on the keyboard row - check each column
for(byte col : 0..7){
// XOR of row scan with the last seen row scan AND'ed with the col bitmask will be non-0 if the key status is changed
if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) {
// Key(row, col) status has changed. We have an event.
// Only process event if there is still room in the buffer
if(keyboard_events_size!=8) {
// AND of row scan and bit mask determines if key is pressed or released
byte event_type = row_scan&keyboard_matrix_col_bitmask[col];
if(event_type==0) {
// Key released
keyboard_events[keyboard_events_size++] = keycode|$40;
} else {
// Key pressed
keyboard_events[keyboard_events_size++] = keycode;
}
}
}
keycode++;
}
// Store the current keyboard status for the row to debounce
keyboard_scan_values[row] = row_scan;
} else {
// Update current keycode
keycode = keycode + 8;
}
}
// Update the keyboard modifiers
keyboard_modifiers = 0;
if(keyboard_event_pressed(KEY_LSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_LSHIFT;
}
if(keyboard_event_pressed(KEY_RSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_RSHIFT;
}
if(keyboard_event_pressed(KEY_CTRL)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_CTRL;
}
if(keyboard_event_pressed(KEY_COMMODORE)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_COMMODORE;
}
}
// Determine if a specific key is currently pressed based on the last keyboard_event_scan()
// Returns 0 is not pressed and non-0 if pressed
byte keyboard_event_pressed(byte keycode) {
byte row_bits = keyboard_scan_values[keycode>>3];
return row_bits & keyboard_matrix_col_bitmask[keycode&7];
}
// Get the next event from the keyboard event buffer.
// Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process.
// The buffer is filled by keyboard_scan()
byte keyboard_event_get() {
if(keyboard_events_size==0) {
return $ff;
} else {
return keyboard_events[--keyboard_events_size];
}
}

View File

@ -25,24 +25,32 @@
.label DTV_GRAPHICS_VIC_BANK = $d03d
.const KEY_CRSR_RIGHT = 2
.const KEY_CRSR_DOWN = 7
.const KEY_LSHIFT = $f
.const KEY_RSHIFT = $34
.const KEY_CTRL = $3a
.const KEY_COMMODORE = $3d
.const KEY_MODIFIER_LSHIFT = 1
.const KEY_MODIFIER_RSHIFT = 2
.const KEY_MODIFIER_CTRL = 4
.const KEY_MODIFIER_COMMODORE = 8
.const form_fields_cnt = $23
.const FORM_CURSOR_BLINK = $28
.label print_char_cursor = 8
.label print_line_cursor = $a
.const KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT
.label print_char_cursor = 9
.label print_line_cursor = $b
.label keyboard_events_size = 6
.label keyboard_modifiers = 3
.label form_cursor_count = 2
.label key_down_debounce = 3
.label form_field_idx = 4
.label key_right_debounce = 5
jsr main
main: {
sei
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
lda #0
sta key_right_debounce
sta form_field_idx
sta key_down_debounce
sta keyboard_modifiers
sta keyboard_events_size
lda #FORM_CURSOR_BLINK/2
sta form_cursor_count
b2:
@ -111,7 +119,7 @@ menu: {
jmp b5
}
form_control: {
.label field = 6
.label field = 7
ldx form_field_idx
jsr form_field_ptr
dec form_cursor_count
@ -135,62 +143,54 @@ form_control: {
ora (field),y
sta (field),y
b3:
ldx #KEY_CRSR_DOWN
jsr keyboard_key_pressed
cmp key_down_debounce
beq b4
sta key_down_debounce
cmp #0
beq b4
jsr keyboard_event_scan
jsr keyboard_event_get
cmp #KEY_CRSR_DOWN
bne b4
lda #$7f
ldy #0
and (field),y
sta (field),y
ldx #KEY_RSHIFT
jsr keyboard_key_pressed
lda #KEY_MODIFIER_SHIFT
and keyboard_modifiers
cmp #0
bne b6
bne b5
inc form_field_idx
lda form_field_idx
cmp #form_fields_cnt
bne b8
lda #0
bne b7
tya
sta form_field_idx
b8:
b7:
lda #FORM_CURSOR_BLINK/2
sta form_cursor_count
breturn:
rts
b6:
b5:
dec form_field_idx
lda form_field_idx
cmp #$ff
bne b8
bne b7
lda #form_fields_cnt-1
sta form_field_idx
jmp b8
jmp b7
b4:
ldx #KEY_CRSR_RIGHT
jsr keyboard_key_pressed
cmp key_right_debounce
beq breturn
sta key_right_debounce
cmp #KEY_CRSR_RIGHT
bne breturn
lda #KEY_MODIFIER_SHIFT
and keyboard_modifiers
cmp #0
beq breturn
ldx #KEY_RSHIFT
jsr keyboard_key_pressed
cmp #0
bne b12
bne b10
ldx form_field_idx
inc form_fields_val,x
ldy form_field_idx
lda form_fields_val,y
cmp form_fields_max,y
bcc b14
beq b14
bcc b12
beq b12
lda #0
sta form_fields_val,y
b14:
b12:
ldy form_field_idx
lda form_fields_val,y
tay
@ -198,7 +198,7 @@ form_control: {
ldy #0
sta (field),y
jmp breturn
b12:
b10:
ldx form_field_idx
lda form_fields_val,x
sec
@ -207,10 +207,10 @@ form_control: {
ldy form_field_idx
lda form_fields_val,y
cmp #$ff
bne b14
bne b12
lda form_fields_max,y
sta form_fields_val,y
jmp b14
jmp b12
b2:
lda #$7f
ldy #0
@ -218,17 +218,134 @@ form_control: {
sta (field),y
jmp b3
}
keyboard_key_pressed: {
txa
and #7
tay
txa
keyboard_event_get: {
lda keyboard_events_size
bne b1
lda #$ff
breturn:
rts
b1:
dec keyboard_events_size
ldy keyboard_events_size
lda keyboard_events,y
jmp breturn
}
keyboard_event_scan: {
.label row_scan = $d
.label keycode = 5
.label row = 3
lda #0
sta keycode
sta row
b1:
ldx row
jsr keyboard_matrix_read
sta row_scan
ldy row
lda keyboard_scan_values,y
cmp row_scan
bne !b2+
jmp b2
!b2:
ldx #0
b3:
lda row_scan
ldy row
eor keyboard_scan_values,y
and keyboard_matrix_col_bitmask,x
cmp #0
beq b4
lda keyboard_events_size
cmp #8
beq b4
lda keyboard_matrix_col_bitmask,x
and row_scan
cmp #0
bne b6
lda #$40
ora keycode
ldy keyboard_events_size
sta keyboard_events,y
inc keyboard_events_size
b4:
inc keycode
inx
cpx #8
bne b3
lda row_scan
ldy row
sta keyboard_scan_values,y
b8:
inc row
lda row
cmp #8
bne b1
lda #KEY_LSHIFT
sta keyboard_event_pressed.keycode
jsr keyboard_event_pressed
cmp #0
beq b5
lda #0|KEY_MODIFIER_LSHIFT
sta keyboard_modifiers
jmp b9
b5:
lda #0
sta keyboard_modifiers
b9:
lda #KEY_RSHIFT
sta keyboard_event_pressed.keycode
jsr keyboard_event_pressed
cmp #0
beq b10
lda #KEY_MODIFIER_RSHIFT
ora keyboard_modifiers
sta keyboard_modifiers
b10:
lda #KEY_CTRL
sta keyboard_event_pressed.keycode
jsr keyboard_event_pressed
cmp #0
beq b11
lda #KEY_MODIFIER_CTRL
ora keyboard_modifiers
sta keyboard_modifiers
b11:
lda #KEY_COMMODORE
sta keyboard_event_pressed.keycode
jsr keyboard_event_pressed
cmp #0
beq breturn
lda #KEY_MODIFIER_COMMODORE
ora keyboard_modifiers
sta keyboard_modifiers
breturn:
rts
b6:
lda keycode
ldy keyboard_events_size
sta keyboard_events,y
inc keyboard_events_size
jmp b4
b2:
lda #8
clc
adc keycode
sta keycode
jmp b8
}
keyboard_event_pressed: {
.label keycode = 5
lda keycode
lsr
lsr
lsr
tax
jsr keyboard_matrix_read
and keyboard_matrix_col_bitmask,y
ldy keyboard_scan_values,x
lda #7
and keycode
tax
tya
and keyboard_matrix_col_bitmask,x
rts
}
keyboard_matrix_read: {
@ -239,8 +356,8 @@ keyboard_matrix_read: {
rts
}
form_field_ptr: {
.label return = 6
.label _2 = 6
.label return = 7
.label _2 = 7
ldy form_fields_y,x
lda form_line_hi,y
sta _2+1
@ -256,7 +373,7 @@ form_field_ptr: {
rts
}
form_render_values: {
.label field = 6
.label field = 7
ldx #0
b1:
jsr form_field_ptr
@ -271,7 +388,7 @@ form_render_values: {
rts
}
form_set_screen: {
.label line = 6
.label line = 7
ldx #0
lda #<menu.SCREEN
sta line
@ -295,7 +412,7 @@ form_set_screen: {
rts
}
print_str_lines: {
.label str = 6
.label str = 7
lda print_set_screen.screen
sta print_char_cursor
lda print_set_screen.screen+1
@ -351,8 +468,8 @@ print_ln: {
rts
}
print_cls: {
.label _0 = 8
.label sc = 6
.label _0 = 9
.label sc = 7
lda print_set_screen.screen
sta sc
lda print_set_screen.screen+1
@ -381,13 +498,15 @@ print_cls: {
rts
}
print_set_screen: {
.label screen = $a
.label screen = $b
rts
}
DTV_PALETTE_DEFAULT: .byte 0, $f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, 5, 7, $df, $9a, $a
print_hextab: .text "0123456789abcdef"
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_events: .fill 8, 0
keyboard_scan_values: .fill 8, 0
form_line_lo: .fill $19, 0
form_line_hi: .fill $19, 0
form_fields_x: .byte $16, 7, 7, 7, 7, 7, 7, 7, $11, $11, $11, $10, $11, $10, $11, $10, $11, $1b, $1a, $1b, $1a, $1b, $1a, $1b, $26, $26, $26, $25, $26, $25, $26, $25, $26, $25, $26

View File

@ -1,335 +1,430 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@25
@25: scope:[] from @begin
to:@28
@28: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @25
@end: scope:[] from @28
[3] phi() [ ] ( )
main: scope:[main] from @25
main: scope:[main] from @28
asm { sei }
[5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@2
[6] (byte) key_right_debounce#1 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) key_right_debounce#11 ) [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[6] (byte) form_field_idx#1 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) form_field_idx#14 ) [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[6] (byte) key_down_debounce#1 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) key_down_debounce#11 ) [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[6] (signed byte) form_cursor_count#1 ← phi( main/(const signed byte) FORM_CURSOR_BLINK#0/(byte/signed byte/word/signed word/dword/signed dword) 2 main::@2/(signed byte) form_cursor_count#13 ) [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[7] if(true) goto main::@2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[6] (byte) form_field_idx#1 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) form_field_idx#14 ) [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[6] (byte) keyboard_modifiers#20 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) keyboard_modifiers#10 ) [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[6] (byte) keyboard_events_size#22 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) keyboard_events_size#24 ) [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[6] (signed byte) form_cursor_count#1 ← phi( main/(const signed byte) FORM_CURSOR_BLINK#0/(byte/signed byte/word/signed word/dword/signed dword) 2 main::@2/(signed byte) form_cursor_count#13 ) [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[7] if(true) goto main::@2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:main::@return
main::@return: scope:[main] from main::@1
[8] return [ ] ( main:2 [ ] )
to:@return
main::@2: scope:[main] from main::@1
[9] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[10] call menu param-assignment [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[9] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[10] call menu param-assignment [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
to:main::@1
menu: scope:[menu] from main::@2
[11] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← ((byte))((dword))(const byte*) menu::CHARSET#0/(dword/signed dword) 65536 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[12] *((const byte*) DTV_COLOR_BANK_LO#0) ← <((word))(const dword) DTV_COLOR_BANK_DEFAULT#0/(word/signed word/dword/signed dword) 1024 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[13] *((const byte*) DTV_COLOR_BANK_HI#0) ← >((word))(const dword) DTV_COLOR_BANK_DEFAULT#0/(word/signed word/dword/signed dword) 1024 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[14] *((const byte*) DTV_CONTROL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[15] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[16] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) menu::CHARSET#0/(word/signed word/dword/signed dword) 16384 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[17] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[18] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_CSEL#0 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[19] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) menu::SCREEN#0&(word/signed word/dword/signed dword) 16383/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) menu::CHARSET#0&(word/signed word/dword/signed dword) 16383/(word/signed word/dword/signed dword) 1024 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[11] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← ((byte))((dword))(const byte*) menu::CHARSET#0/(dword/signed dword) 65536 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[12] *((const byte*) DTV_COLOR_BANK_LO#0) ← <((word))(const dword) DTV_COLOR_BANK_DEFAULT#0/(word/signed word/dword/signed dword) 1024 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[13] *((const byte*) DTV_COLOR_BANK_HI#0) ← >((word))(const dword) DTV_COLOR_BANK_DEFAULT#0/(word/signed word/dword/signed dword) 1024 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[14] *((const byte*) DTV_CONTROL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[15] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[16] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) menu::CHARSET#0/(word/signed word/dword/signed dword) 16384 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[17] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[18] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_CSEL#0 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[19] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) menu::SCREEN#0&(word/signed word/dword/signed dword) 16383/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) menu::CHARSET#0&(word/signed word/dword/signed dword) 16383/(word/signed word/dword/signed dword) 1024 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:menu::@1
menu::@1: scope:[menu] from menu menu::@1
[20] (byte) menu::i#2 ← phi( menu/(byte/signed byte/word/signed word/dword/signed dword) 0 menu::@1/(byte) menu::i#1 ) [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#2 ] )
[21] *((const byte*) DTV_PALETTE#0 + (byte) menu::i#2) ← *((const byte[16]) DTV_PALETTE_DEFAULT#0 + (byte) menu::i#2) [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#2 ] )
[22] (byte) menu::i#1 ← ++ (byte) menu::i#2 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#1 ] )
[23] if((byte) menu::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto menu::@1 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 menu::i#1 ] )
[20] (byte) menu::i#2 ← phi( menu/(byte/signed byte/word/signed word/dword/signed dword) 0 menu::@1/(byte) menu::i#1 ) [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#2 ] )
[21] *((const byte*) DTV_PALETTE#0 + (byte) menu::i#2) ← *((const byte[16]) DTV_PALETTE_DEFAULT#0 + (byte) menu::i#2) [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#2 ] )
[22] (byte) menu::i#1 ← ++ (byte) menu::i#2 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#1 ] )
[23] if((byte) menu::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto menu::@1 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 menu::i#1 ] )
to:menu::@8
menu::@8: scope:[menu] from menu::@1
[24] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[25] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[26] call print_set_screen param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[24] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[25] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[26] call print_set_screen param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:menu::@15
menu::@15: scope:[menu] from menu::@8
[27] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[28] call print_cls param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[27] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
[28] call print_cls param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:menu::@16
menu::@16: scope:[menu] from menu::@15
[29] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[30] call print_str_lines param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[29] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
[30] call print_str_lines param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:menu::@17
menu::@17: scope:[menu] from menu::@16
[31] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[32] call print_set_screen param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[31] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[32] call print_set_screen param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:menu::@18
menu::@18: scope:[menu] from menu::@17
[33] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[34] call print_cls param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[33] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
[34] call print_cls param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:menu::@19
menu::@19: scope:[menu] from menu::@18
[35] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[36] call print_str_lines param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[35] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
[36] call print_str_lines param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:menu::@20
menu::@20: scope:[menu] from menu::@19
[37] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[38] call form_set_screen param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[37] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[38] call form_set_screen param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:menu::@21
menu::@21: scope:[menu] from menu::@20
[39] phi() [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[40] call form_render_values param-assignment [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] ( main:2::menu:10 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[39] phi() [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
[40] call form_render_values param-assignment [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] ( main:2::menu:10 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:menu::@2
menu::@2: scope:[menu] from menu::@21 menu::@7
[41] (byte) key_right_debounce#11 ← phi( menu::@21/(byte) key_right_debounce#1 menu::@7/(byte) key_right_debounce#13 ) [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[41] (byte) form_field_idx#14 ← phi( menu::@21/(byte) form_field_idx#1 menu::@7/(byte) form_field_idx#18 ) [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[41] (byte) key_down_debounce#11 ← phi( menu::@21/(byte) key_down_debounce#1 menu::@7/(byte) key_down_debounce#13 ) [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[41] (signed byte) form_cursor_count#13 ← phi( menu::@21/(signed byte) form_cursor_count#1 menu::@7/(signed byte) form_cursor_count#16 ) [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[42] if(true) goto menu::@5 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[41] (byte) form_field_idx#14 ← phi( menu::@21/(byte) form_field_idx#1 menu::@7/(byte) form_field_idx#18 ) [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
[41] (byte) keyboard_modifiers#10 ← phi( menu::@21/(byte) keyboard_modifiers#20 menu::@7/(byte) keyboard_modifiers#18 ) [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
[41] (byte) keyboard_events_size#24 ← phi( menu::@21/(byte) keyboard_events_size#22 menu::@7/(byte) keyboard_events_size#20 ) [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
[41] (signed byte) form_cursor_count#13 ← phi( menu::@21/(signed byte) form_cursor_count#1 menu::@7/(signed byte) form_cursor_count#16 ) [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
[42] if(true) goto menu::@5 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
to:menu::@return
menu::@return: scope:[menu] from menu::@2
[43] return [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[43] return [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 keyboard_modifiers#10 form_field_idx#14 ] )
to:@return
menu::@5: scope:[menu] from menu::@2 menu::@5
[44] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto menu::@5 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[44] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto menu::@5 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 ] )
to:menu::@7
menu::@7: scope:[menu] from menu::@5
[45] phi() [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] ( main:2::menu:10 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 ] )
[46] call form_control param-assignment [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] ( main:2::menu:10 [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] )
[45] phi() [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 ] ( main:2::menu:10 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 ] )
[46] call form_control param-assignment [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] ( main:2::menu:10 [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] )
to:menu::@2
form_control: scope:[form_control] from menu::@7
[47] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#14 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::field_idx#1 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::field_idx#1 ] )
[48] call form_field_ptr param-assignment [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::return#0 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::return#0 ] )
[49] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::return#3 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::return#3 ] )
to:form_control::@32
form_control::@32: scope:[form_control] from form_control
[50] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 ] )
[51] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#13 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#5 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#5 ] )
[52] if((signed byte) form_cursor_count#5>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@37 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#5 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#5 ] )
to:form_control::@1
form_control::@1: scope:[form_control] from form_control::@32 form_control::@37
[53] (signed byte) form_cursor_count#15 ← phi( form_control::@32/(const signed byte) FORM_CURSOR_BLINK#0 form_control::@37/(signed byte) form_cursor_count#5 ) [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] )
[54] if((signed byte) form_cursor_count#15>=(const signed byte) FORM_CURSOR_BLINK#0/(byte/signed byte/word/signed word/dword/signed dword) 2) goto form_control::@2 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@17
form_control::@17: scope:[form_control] from form_control::@1
[55] (byte/word/dword~) form_control::$6 ← *((byte*) form_control::field#0) | (byte/word/signed word/dword/signed dword) 128 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::$6 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::$6 ] )
[56] *((byte*) form_control::field#0) ← (byte/word/dword~) form_control::$6 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@3
form_control::@3: scope:[form_control] from form_control::@17 form_control::@2
[57] phi() [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] )
[58] call keyboard_key_pressed param-assignment [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 ] )
[59] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#2 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#2 ] )
to:form_control::@33
form_control::@33: scope:[form_control] from form_control::@3
[60] (byte) form_control::key_down#0 ← (byte) keyboard_key_pressed::return#2 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::key_down#0 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::key_down#0 ] )
[61] if((byte) form_control::key_down#0==(byte) key_down_debounce#11) goto form_control::@4 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::key_down#0 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::key_down#0 ] )
to:form_control::@19
form_control::@19: scope:[form_control] from form_control::@33
[62] (byte) key_down_debounce#23 ← (byte) form_control::key_down#0 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::key_down#0 key_down_debounce#23 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::key_down#0 key_down_debounce#23 ] )
[63] if((byte) form_control::key_down#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@4 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#23 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#23 ] )
to:form_control::@20
form_control::@20: scope:[form_control] from form_control::@19
[64] (byte~) form_control::$13 ← *((byte*) form_control::field#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 key_down_debounce#23 form_control::$13 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 key_down_debounce#23 form_control::$13 ] )
[65] *((byte*) form_control::field#0) ← (byte~) form_control::$13 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 ] )
[66] call keyboard_key_pressed param-assignment [ form_field_idx#14 key_right_debounce#11 keyboard_key_pressed::return#0 key_down_debounce#23 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 keyboard_key_pressed::return#0 key_down_debounce#23 ] )
[67] (byte) keyboard_key_pressed::return#4 ← (byte) keyboard_key_pressed::return#0 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::return#4 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::return#4 ] )
to:form_control::@35
form_control::@35: scope:[form_control] from form_control::@20
[68] (byte~) form_control::$14 ← (byte) keyboard_key_pressed::return#4 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 form_control::$14 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 form_control::$14 ] )
[69] if((byte~) form_control::$14!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@6 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 ] )
to:form_control::@21
form_control::@21: scope:[form_control] from form_control::@35
[70] (byte) form_field_idx#41 ← ++ (byte) form_field_idx#14 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#41 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#41 ] )
[71] if((byte) form_field_idx#41!=(const byte) form_fields_cnt#0) goto form_control::@38 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#41 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#41 ] )
to:form_control::@8
form_control::@8: scope:[form_control] from form_control::@21 form_control::@38 form_control::@39 form_control::@6
[72] (byte) form_field_idx#32 ← phi( form_control::@21/(byte/signed byte/word/signed word/dword/signed dword) 0 form_control::@6/(const byte) form_fields_cnt#0-(byte/signed byte/word/signed word/dword/signed dword) 1 form_control::@38/(byte) form_field_idx#41 form_control::@39/(byte) form_field_idx#42 ) [ key_right_debounce#11 key_down_debounce#23 form_field_idx#32 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#32 ] )
to:form_control::@return
form_control::@return: scope:[form_control] from form_control::@14 form_control::@26 form_control::@34 form_control::@8
[73] (byte) key_right_debounce#13 ← phi( form_control::@34/(byte) key_right_debounce#11 form_control::@26/(byte) key_right_debounce#21 form_control::@14/(byte) key_right_debounce#21 form_control::@8/(byte) key_right_debounce#11 ) [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] )
[73] (byte) form_field_idx#18 ← phi( form_control::@34/(byte) form_field_idx#14 form_control::@26/(byte) form_field_idx#14 form_control::@14/(byte) form_field_idx#14 form_control::@8/(byte) form_field_idx#32 ) [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] )
[73] (byte) key_down_debounce#13 ← phi( form_control::@34/(byte) key_down_debounce#20 form_control::@26/(byte) key_down_debounce#20 form_control::@14/(byte) key_down_debounce#20 form_control::@8/(byte) key_down_debounce#23 ) [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] )
[73] (signed byte) form_cursor_count#16 ← phi( form_control::@34/(signed byte) form_cursor_count#15 form_control::@26/(signed byte) form_cursor_count#15 form_control::@14/(signed byte) form_cursor_count#15 form_control::@8/(const signed byte) FORM_CURSOR_BLINK#0/(byte/signed byte/word/signed word/dword/signed dword) 2 ) [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] )
[74] return [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 key_down_debounce#13 form_field_idx#18 key_right_debounce#13 ] )
to:@return
form_control::@38: scope:[form_control] from form_control::@21
[75] phi() [ key_right_debounce#11 key_down_debounce#23 form_field_idx#41 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#41 ] )
to:form_control::@8
form_control::@6: scope:[form_control] from form_control::@35
[76] (byte) form_field_idx#42 ← -- (byte) form_field_idx#14 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#42 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#42 ] )
[77] if((byte) form_field_idx#42!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@39 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#42 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#42 ] )
to:form_control::@8
form_control::@39: scope:[form_control] from form_control::@6
[78] phi() [ key_right_debounce#11 key_down_debounce#23 form_field_idx#42 ] ( main:2::menu:10::form_control:46 [ key_right_debounce#11 key_down_debounce#23 form_field_idx#42 ] )
to:form_control::@8
form_control::@4: scope:[form_control] from form_control::@19 form_control::@33
[79] (byte) key_down_debounce#20 ← phi( form_control::@33/(byte) key_down_debounce#11 form_control::@19/(byte) key_down_debounce#23 ) [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 ] )
[80] call keyboard_key_pressed param-assignment [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 key_down_debounce#20 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 key_down_debounce#20 ] )
[81] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::return#3 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::return#3 ] )
to:form_control::@34
form_control::@34: scope:[form_control] from form_control::@4
[82] (byte) form_control::key_right#0 ← (byte) keyboard_key_pressed::return#3 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 form_control::key_right#0 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 form_control::key_right#0 ] )
[83] if((byte) form_control::key_right#0==(byte) key_right_debounce#11) goto form_control::@return [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 form_control::key_right#0 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 form_control::key_right#0 ] )
to:form_control::@26
form_control::@26: scope:[form_control] from form_control::@34
[84] (byte) key_right_debounce#21 ← (byte) form_control::key_right#0 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 form_control::key_right#0 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 form_control::key_right#0 ] )
[85] if((byte) form_control::key_right#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@return [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
to:form_control::@27
form_control::@27: scope:[form_control] from form_control::@26
[86] phi() [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
[87] call keyboard_key_pressed param-assignment [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 key_down_debounce#20 key_right_debounce#21 ] )
[88] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::return#10 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::return#10 ] )
to:form_control::@36
form_control::@36: scope:[form_control] from form_control::@27
[89] (byte~) form_control::$28 ← (byte) keyboard_key_pressed::return#10 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 form_control::$28 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 form_control::$28 ] )
[90] if((byte~) form_control::$28!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@12 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
[47] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#14 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::field_idx#1 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::field_idx#1 ] )
[48] call form_field_ptr param-assignment [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::return#0 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::return#0 ] )
[49] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::return#3 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::return#3 ] )
to:form_control::@28
form_control::@28: scope:[form_control] from form_control::@36
[91] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← ++ *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
[92] if(*((const byte[]) form_fields_val#0 + (byte) form_field_idx#14)<=*((const byte[]) form_fields_max#0 + (byte) form_field_idx#14)) goto form_control::@14 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
to:form_control::@29
form_control::@29: scope:[form_control] from form_control::@28
[93] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
to:form_control::@14
form_control::@14: scope:[form_control] from form_control::@12 form_control::@28 form_control::@29 form_control::@31
[94] *((byte*) form_control::field#0) ← *((const string) print_hextab#0 + *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14)) [ form_field_idx#14 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
to:form_control::@return
form_control::@12: scope:[form_control] from form_control::@36
[95] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← -- *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
[96] if(*((const byte[]) form_fields_val#0 + (byte) form_field_idx#14)!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@14 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
to:form_control::@31
form_control::@31: scope:[form_control] from form_control::@12
[97] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← *((const byte[]) form_fields_max#0 + (byte) form_field_idx#14) [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 ] )
to:form_control::@14
form_control::@2: scope:[form_control] from form_control::@1
[98] (byte~) form_control::$7 ← *((byte*) form_control::field#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::$7 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 form_control::$7 ] )
[99] *((byte*) form_control::field#0) ← (byte~) form_control::$7 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@3
form_control::@37: scope:[form_control] from form_control::@32
[100] phi() [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#5 ] ( main:2::menu:10::form_control:46 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#5 ] )
form_control::@28: scope:[form_control] from form_control
[50] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_control::field#0 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_control::field#0 ] )
[51] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#13 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#5 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#5 ] )
[52] if((signed byte) form_cursor_count#5>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@31 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#5 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#5 ] )
to:form_control::@1
keyboard_key_pressed: scope:[keyboard_key_pressed] from form_control::@20 form_control::@27 form_control::@3 form_control::@4
[101] (byte) keyboard_key_pressed::key#4 ← phi( form_control::@20/(const byte) KEY_RSHIFT#0 form_control::@27/(const byte) KEY_RSHIFT#0 form_control::@3/(const byte) KEY_CRSR_DOWN#0 form_control::@4/(const byte) KEY_CRSR_RIGHT#0 ) [ keyboard_key_pressed::key#4 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::key#4 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::key#4 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::key#4 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::key#4 ] )
[102] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#4 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] )
[103] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#4 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] )
[104] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_key_pressed::rowidx#0 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] )
[105] call keyboard_matrix_read param-assignment [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[106] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] )
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[107] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[108] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[109] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::return#0 ] )
form_control::@1: scope:[form_control] from form_control::@28 form_control::@31
[53] (signed byte) form_cursor_count#15 ← phi( form_control::@28/(const signed byte) FORM_CURSOR_BLINK#0 form_control::@31/(signed byte) form_cursor_count#5 ) [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] )
[54] if((signed byte) form_cursor_count#15>=(const signed byte) FORM_CURSOR_BLINK#0/(byte/signed byte/word/signed word/dword/signed dword) 2) goto form_control::@2 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@15
form_control::@15: scope:[form_control] from form_control::@1
[55] (byte/word/dword~) form_control::$6 ← *((byte*) form_control::field#0) | (byte/word/signed word/dword/signed dword) 128 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 form_control::$6 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 form_control::$6 ] )
[56] *((byte*) form_control::field#0) ← (byte/word/dword~) form_control::$6 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@3
form_control::@3: scope:[form_control] from form_control::@15 form_control::@2
[57] phi() [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] )
[58] call keyboard_event_scan param-assignment [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] )
to:form_control::@29
form_control::@29: scope:[form_control] from form_control::@3
[59] phi() [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] )
[60] call keyboard_event_get param-assignment [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_event_get::return#2 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_event_get::return#2 ] )
[61] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_event_get::return#3 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_event_get::return#3 ] )
to:form_control::@30
form_control::@30: scope:[form_control] from form_control::@29
[62] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#3 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 form_control::key_event#0 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 form_control::key_event#0 ] )
[63] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN#0) goto form_control::@4 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 form_control::key_event#0 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 form_control::key_event#0 ] )
to:form_control::@17
form_control::@17: scope:[form_control] from form_control::@30
[64] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_control::$12 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_control::$12 ] )
[65] *((byte*) form_control::field#0) ← (byte~) form_control::$12 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 ] )
[66] (byte~) form_control::$13 ← (byte) keyboard_modifiers#18 & (const byte) KEY_MODIFIER_SHIFT#0 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::$13 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::$13 ] )
[67] if((byte~) form_control::$13!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@5 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 ] )
to:form_control::@18
form_control::@18: scope:[form_control] from form_control::@17
[68] (byte) form_field_idx#40 ← ++ (byte) form_field_idx#14 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#40 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#40 ] )
[69] if((byte) form_field_idx#40!=(const byte) form_fields_cnt#0) goto form_control::@32 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#40 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#40 ] )
to:form_control::@7
form_control::@7: scope:[form_control] from form_control::@18 form_control::@32 form_control::@33 form_control::@5
[70] (byte) form_field_idx#30 ← phi( form_control::@18/(byte/signed byte/word/signed word/dword/signed dword) 0 form_control::@5/(const byte) form_fields_cnt#0-(byte/signed byte/word/signed word/dword/signed dword) 1 form_control::@32/(byte) form_field_idx#40 form_control::@33/(byte) form_field_idx#41 ) [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#30 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#30 ] )
to:form_control::@return
form_control::@return: scope:[form_control] from form_control::@12 form_control::@4 form_control::@7
[71] (byte) form_field_idx#18 ← phi( form_control::@12/(byte) form_field_idx#14 form_control::@7/(byte) form_field_idx#30 form_control::@4/(byte) form_field_idx#14 ) [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] )
[71] (signed byte) form_cursor_count#16 ← phi( form_control::@12/(signed byte) form_cursor_count#15 form_control::@7/(const signed byte) FORM_CURSOR_BLINK#0/(byte/signed byte/word/signed word/dword/signed dword) 2 form_control::@4/(signed byte) form_cursor_count#15 ) [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] )
[72] return [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] ( main:2::menu:10::form_control:46 [ form_cursor_count#16 keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#18 ] )
to:@return
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
[110] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58::keyboard_matrix_read:105 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66::keyboard_matrix_read:105 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80::keyboard_matrix_read:105 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87::keyboard_matrix_read:105 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 ] )
[111] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58::keyboard_matrix_read:105 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66::keyboard_matrix_read:105 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80::keyboard_matrix_read:105 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87::keyboard_matrix_read:105 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
form_control::@32: scope:[form_control] from form_control::@18
[73] phi() [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#40 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#40 ] )
to:form_control::@7
form_control::@5: scope:[form_control] from form_control::@17
[74] (byte) form_field_idx#41 ← -- (byte) form_field_idx#14 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#41 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#41 ] )
[75] if((byte) form_field_idx#41!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@33 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#41 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#41 ] )
to:form_control::@7
form_control::@33: scope:[form_control] from form_control::@5
[76] phi() [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#41 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#20 keyboard_modifiers#18 form_field_idx#41 ] )
to:form_control::@7
form_control::@4: scope:[form_control] from form_control::@30
[77] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT#0) goto form_control::@return [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@23
form_control::@23: scope:[form_control] from form_control::@4
[78] (byte~) form_control::$24 ← (byte) keyboard_modifiers#18 & (const byte) KEY_MODIFIER_SHIFT#0 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 form_control::$24 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 form_control::$24 ] )
[79] if((byte~) form_control::$24!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@10 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@24
form_control::@24: scope:[form_control] from form_control::@23
[80] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← ++ *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
[81] if(*((const byte[]) form_fields_val#0 + (byte) form_field_idx#14)<=*((const byte[]) form_fields_max#0 + (byte) form_field_idx#14)) goto form_control::@12 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@25
form_control::@25: scope:[form_control] from form_control::@24
[82] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@12
form_control::@12: scope:[form_control] from form_control::@10 form_control::@24 form_control::@25 form_control::@27
[83] *((byte*) form_control::field#0) ← *((const string) print_hextab#0 + *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14)) [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_cursor_count#15 ] )
to:form_control::@return
form_control::@10: scope:[form_control] from form_control::@23
[84] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← -- *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
[85] if(*((const byte[]) form_fields_val#0 + (byte) form_field_idx#14)!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@12 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@27
form_control::@27: scope:[form_control] from form_control::@10
[86] *((const byte[]) form_fields_val#0 + (byte) form_field_idx#14) ← *((const byte[]) form_fields_max#0 + (byte) form_field_idx#14) [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ form_field_idx#14 keyboard_events_size#20 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@12
form_control::@2: scope:[form_control] from form_control::@1
[87] (byte~) form_control::$7 ← *((byte*) form_control::field#0) & (byte/signed byte/word/signed word/dword/signed dword) 127 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 form_control::$7 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 form_control::$7 ] )
[88] *((byte*) form_control::field#0) ← (byte~) form_control::$7 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#15 ] )
to:form_control::@3
form_control::@31: scope:[form_control] from form_control::@28
[89] phi() [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#5 ] ( main:2::menu:10::form_control:46 [ keyboard_events_size#24 form_field_idx#14 form_control::field#0 form_cursor_count#5 ] )
to:form_control::@1
keyboard_event_get: scope:[keyboard_event_get] from form_control::@29
[90] if((byte) keyboard_events_size#17!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@1 [ keyboard_events_size#17 ] ( main:2::menu:10::form_control:46::keyboard_event_get:60 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] )
to:keyboard_event_get::@return
keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@1
[91] (byte) keyboard_events_size#20 ← phi( keyboard_event_get::@1/(byte) keyboard_events_size#4 keyboard_event_get/(byte) keyboard_events_size#17 ) [ keyboard_events_size#20 keyboard_event_get::return#2 ] ( main:2::menu:10::form_control:46::keyboard_event_get:60 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#20 keyboard_event_get::return#2 ] )
[91] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get::@1/(byte) keyboard_event_get::return#0 keyboard_event_get/(byte/word/signed word/dword/signed dword) 255 ) [ keyboard_events_size#20 keyboard_event_get::return#2 ] ( main:2::menu:10::form_control:46::keyboard_event_get:60 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#20 keyboard_event_get::return#2 ] )
[92] return [ keyboard_events_size#20 keyboard_event_get::return#2 ] ( main:2::menu:10::form_control:46::keyboard_event_get:60 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#20 keyboard_event_get::return#2 ] )
to:@return
keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get
[93] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#17 [ keyboard_events_size#4 ] ( main:2::menu:10::form_control:46::keyboard_event_get:60 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_events_size#4 ] )
[94] (byte) keyboard_event_get::return#0 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) [ keyboard_event_get::return#0 keyboard_events_size#4 ] ( main:2::menu:10::form_control:46::keyboard_event_get:60 [ form_field_idx#14 keyboard_modifiers#18 form_control::field#0 form_cursor_count#15 keyboard_event_get::return#0 keyboard_events_size#4 ] )
to:keyboard_event_get::@return
keyboard_event_scan: scope:[keyboard_event_scan] from form_control::@3
[95] phi() [ keyboard_events_size#24 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#24 ] )
to:keyboard_event_scan::@1
keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8
[96] (byte) keyboard_events_size#43 ← phi( keyboard_event_scan/(byte) keyboard_events_size#24 keyboard_event_scan::@8/(byte) keyboard_events_size#17 ) [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] )
[96] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#14 ) [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] )
[96] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] )
[97] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::rowid#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::rowid#0 ] )
[98] call keyboard_matrix_read param-assignment [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::return#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::return#0 ] )
[99] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::return#2 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::return#2 ] )
to:keyboard_event_scan::@25
keyboard_event_scan::@25: scope:[keyboard_event_scan] from keyboard_event_scan::@1
[100] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_event_scan::row_scan#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_event_scan::row_scan#0 ] )
[101] if((byte) keyboard_event_scan::row_scan#0==*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@2 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_event_scan::row_scan#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_event_scan::row_scan#0 ] )
to:keyboard_event_scan::@3
keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@25 keyboard_event_scan::@4
[102] (byte) keyboard_events_size#14 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#43 keyboard_event_scan::@4/(byte) keyboard_events_size#44 ) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
[102] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#11 keyboard_event_scan::@4/(byte) keyboard_event_scan::keycode#15 ) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
[102] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@4/(byte) keyboard_event_scan::col#1 ) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
[103] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::$3 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::$3 ] )
[104] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::$4 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::$4 ] )
[105] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@4 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
to:keyboard_event_scan::@14
keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@3
[106] if((byte) keyboard_events_size#14==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@4 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
to:keyboard_event_scan::@15
keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@14
[107] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::event_type#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::event_type#0 ] )
[108] if((byte) keyboard_event_scan::event_type#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@6 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
to:keyboard_event_scan::@16
keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15
[109] (byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::$12 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 keyboard_event_scan::$12 ] )
[110] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#14) ← (byte/word/dword~) keyboard_event_scan::$12 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
[111] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#14 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#2 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#2 ] )
to:keyboard_event_scan::@4
keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@14 keyboard_event_scan::@16 keyboard_event_scan::@3 keyboard_event_scan::@6
[112] (byte) keyboard_events_size#44 ← phi( keyboard_event_scan::@16/(byte) keyboard_events_size#2 keyboard_event_scan::@3/(byte) keyboard_events_size#14 keyboard_event_scan::@14/(byte) keyboard_events_size#14 keyboard_event_scan::@6/(byte) keyboard_events_size#1 ) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#44 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#44 ] )
[113] (byte) keyboard_event_scan::keycode#15 ← ++ (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] )
[114] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#1 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#1 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] )
[115] if((byte) keyboard_event_scan::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@3 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#1 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#1 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] )
to:keyboard_event_scan::@18
keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@4
[116] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#15 keyboard_events_size#44 ] )
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@2
[117] (byte) keyboard_events_size#17 ← phi( keyboard_event_scan::@18/(byte) keyboard_events_size#44 keyboard_event_scan::@2/(byte) keyboard_events_size#43 ) [ keyboard_events_size#17 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 ] )
[117] (byte) keyboard_event_scan::keycode#14 ← phi( keyboard_event_scan::@18/(byte) keyboard_event_scan::keycode#15 keyboard_event_scan::@2/(byte) keyboard_event_scan::keycode#1 ) [ keyboard_events_size#17 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 ] )
[118] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 [ keyboard_events_size#17 keyboard_event_scan::row#1 keyboard_event_scan::keycode#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_scan::row#1 keyboard_event_scan::keycode#14 ] )
[119] if((byte) keyboard_event_scan::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@1 [ keyboard_events_size#17 keyboard_event_scan::row#1 keyboard_event_scan::keycode#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_scan::row#1 keyboard_event_scan::keycode#14 ] )
to:keyboard_event_scan::@20
keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@8
[120] phi() [ keyboard_events_size#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] )
[121] call keyboard_event_pressed param-assignment [ keyboard_events_size#17 keyboard_event_pressed::return#10 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#10 ] )
[122] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#10 [ keyboard_events_size#17 keyboard_event_pressed::return#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#0 ] )
to:keyboard_event_scan::@26
keyboard_event_scan::@26: scope:[keyboard_event_scan] from keyboard_event_scan::@20
[123] (byte~) keyboard_event_scan::$16 ← (byte) keyboard_event_pressed::return#0 [ keyboard_events_size#17 keyboard_event_scan::$16 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_scan::$16 ] )
[124] if((byte~) keyboard_event_scan::$16==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 [ keyboard_events_size#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] )
to:keyboard_event_scan::@21
keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@26
[125] phi() [ keyboard_events_size#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 ] )
to:keyboard_event_scan::@9
keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@26
[126] (byte) keyboard_modifiers#15 ← phi( keyboard_event_scan::@21/(byte/signed byte/word/signed word/dword/signed dword) 0|(const byte) KEY_MODIFIER_LSHIFT#0 keyboard_event_scan::@26/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ keyboard_events_size#17 keyboard_modifiers#15 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 ] )
[127] call keyboard_event_pressed param-assignment [ keyboard_events_size#17 keyboard_event_pressed::return#10 keyboard_modifiers#15 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#10 keyboard_modifiers#15 ] )
[128] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#10 [ keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::return#1 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::return#1 ] )
to:keyboard_event_scan::@27
keyboard_event_scan::@27: scope:[keyboard_event_scan] from keyboard_event_scan::@9
[129] (byte~) keyboard_event_scan::$20 ← (byte) keyboard_event_pressed::return#1 [ keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_scan::$20 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_scan::$20 ] )
[130] if((byte~) keyboard_event_scan::$20==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 [ keyboard_events_size#17 keyboard_modifiers#15 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 ] )
to:keyboard_event_scan::@22
keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@27
[131] (byte) keyboard_modifiers#3 ← (byte) keyboard_modifiers#15 | (const byte) KEY_MODIFIER_RSHIFT#0 [ keyboard_events_size#17 keyboard_modifiers#3 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#3 ] )
to:keyboard_event_scan::@10
keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@27
[132] (byte) keyboard_modifiers#16 ← phi( keyboard_event_scan::@22/(byte) keyboard_modifiers#3 keyboard_event_scan::@27/(byte) keyboard_modifiers#15 ) [ keyboard_events_size#17 keyboard_modifiers#16 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 ] )
[133] call keyboard_event_pressed param-assignment [ keyboard_events_size#17 keyboard_event_pressed::return#10 keyboard_modifiers#16 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#10 keyboard_modifiers#16 ] )
[134] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#10 [ keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::return#2 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::return#2 ] )
to:keyboard_event_scan::@28
keyboard_event_scan::@28: scope:[keyboard_event_scan] from keyboard_event_scan::@10
[135] (byte~) keyboard_event_scan::$24 ← (byte) keyboard_event_pressed::return#2 [ keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_scan::$24 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_scan::$24 ] )
[136] if((byte~) keyboard_event_scan::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 [ keyboard_events_size#17 keyboard_modifiers#16 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 ] )
to:keyboard_event_scan::@23
keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@28
[137] (byte) keyboard_modifiers#4 ← (byte) keyboard_modifiers#16 | (const byte) KEY_MODIFIER_CTRL#0 [ keyboard_events_size#17 keyboard_modifiers#4 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#4 ] )
to:keyboard_event_scan::@11
keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@28
[138] (byte) keyboard_modifiers#17 ← phi( keyboard_event_scan::@23/(byte) keyboard_modifiers#4 keyboard_event_scan::@28/(byte) keyboard_modifiers#16 ) [ keyboard_events_size#17 keyboard_modifiers#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 ] )
[139] call keyboard_event_pressed param-assignment [ keyboard_events_size#17 keyboard_event_pressed::return#10 keyboard_modifiers#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#10 keyboard_modifiers#17 ] )
[140] (byte) keyboard_event_pressed::return#3 ← (byte) keyboard_event_pressed::return#10 [ keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::return#3 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::return#3 ] )
to:keyboard_event_scan::@29
keyboard_event_scan::@29: scope:[keyboard_event_scan] from keyboard_event_scan::@11
[141] (byte~) keyboard_event_scan::$28 ← (byte) keyboard_event_pressed::return#3 [ keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_scan::$28 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_scan::$28 ] )
[142] if((byte~) keyboard_event_scan::$28==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@return [ keyboard_events_size#17 keyboard_modifiers#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 ] )
to:keyboard_event_scan::@24
keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@29
[143] (byte) keyboard_modifiers#5 ← (byte) keyboard_modifiers#17 | (const byte) KEY_MODIFIER_COMMODORE#0 [ keyboard_events_size#17 keyboard_modifiers#5 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#5 ] )
to:keyboard_event_scan::@return
keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@24 keyboard_event_scan::@29
[144] (byte) keyboard_modifiers#18 ← phi( keyboard_event_scan::@29/(byte) keyboard_modifiers#17 keyboard_event_scan::@24/(byte) keyboard_modifiers#5 ) [ keyboard_modifiers#18 keyboard_events_size#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_modifiers#18 keyboard_events_size#17 ] )
[145] return [ keyboard_modifiers#18 keyboard_events_size#17 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_modifiers#18 keyboard_events_size#17 ] )
to:@return
keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@15
[146] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#14) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#14 ] )
[147] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#14 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#1 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#1 ] )
to:keyboard_event_scan::@4
keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@25
[148] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 [ keyboard_event_scan::row#2 keyboard_events_size#43 keyboard_event_scan::keycode#1 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_events_size#43 keyboard_event_scan::keycode#1 ] )
to:keyboard_event_scan::@8
keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@10 keyboard_event_scan::@11 keyboard_event_scan::@20 keyboard_event_scan::@9
[149] (byte) keyboard_event_pressed::keycode#4 ← phi( keyboard_event_scan::@10/(const byte) KEY_CTRL#0 keyboard_event_scan::@11/(const byte) KEY_COMMODORE#0 keyboard_event_scan::@20/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@9/(const byte) KEY_RSHIFT#0 ) [ keyboard_event_pressed::keycode#4 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:121 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::keycode#4 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:127 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::keycode#4 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:133 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::keycode#4 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:139 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::keycode#4 ] )
[150] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:121 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:127 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:133 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:139 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] )
[151] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::row_bits#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:121 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::keycode#4 keyboard_event_pressed::row_bits#0 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:127 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::keycode#4 keyboard_event_pressed::row_bits#0 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:133 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::keycode#4 keyboard_event_pressed::row_bits#0 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:139 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::keycode#4 keyboard_event_pressed::row_bits#0 ] )
[152] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#4 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:121 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:127 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:133 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:139 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] )
[153] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#10 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:121 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#10 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:127 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::return#10 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:133 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::return#10 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:139 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::return#10 ] )
to:keyboard_event_pressed::@return
keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed
[154] return [ keyboard_event_pressed::return#10 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:121 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_event_pressed::return#10 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:127 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#15 keyboard_event_pressed::return#10 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:133 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#16 keyboard_event_pressed::return#10 ] main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_event_pressed:139 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_events_size#17 keyboard_modifiers#17 keyboard_event_pressed::return#10 ] )
to:@return
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@1
[155] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_matrix_read:98 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 ] )
[156] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_matrix_read:98 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::return#0 ] )
to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[112] return [ keyboard_matrix_read::return#0 ] ( main:2::menu:10::form_control:46::keyboard_key_pressed:58::keyboard_matrix_read:105 [ key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:66::keyboard_matrix_read:105 [ form_field_idx#14 key_right_debounce#11 key_down_debounce#23 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:80::keyboard_matrix_read:105 [ form_field_idx#14 key_right_debounce#11 form_control::field#0 form_cursor_count#15 key_down_debounce#20 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:10::form_control:46::keyboard_key_pressed:87::keyboard_matrix_read:105 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 key_down_debounce#20 key_right_debounce#21 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[157] return [ keyboard_matrix_read::return#0 ] ( main:2::menu:10::form_control:46::keyboard_event_scan:58::keyboard_matrix_read:98 [ form_field_idx#14 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#43 keyboard_matrix_read::return#0 ] )
to:@return
form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@1
[113] (byte) form_field_ptr::field_idx#2 ← phi( form_control/(byte) form_field_ptr::field_idx#1 form_render_values::@1/(byte) form_field_ptr::field_idx#0 ) [ form_field_ptr::field_idx#2 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::field_idx#2 ] main:2::menu:10::form_render_values:40::form_field_ptr:122 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::field_idx#2 ] )
[114] (byte) form_field_ptr::y#0 ← *((const byte[]) form_fields_y#0 + (byte) form_field_ptr::field_idx#2) [ form_field_ptr::field_idx#2 form_field_ptr::y#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::field_idx#2 form_field_ptr::y#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:122 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::field_idx#2 form_field_ptr::y#0 ] )
[115] (word~) form_field_ptr::$2 ← *((const byte[25]) form_line_hi#0 + (byte) form_field_ptr::y#0) w= *((const byte[25]) form_line_lo#0 + (byte) form_field_ptr::y#0) [ form_field_ptr::field_idx#2 form_field_ptr::$2 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::field_idx#2 form_field_ptr::$2 ] main:2::menu:10::form_render_values:40::form_field_ptr:122 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::field_idx#2 form_field_ptr::$2 ] )
[116] (byte) form_field_ptr::x#0 ← *((const byte[]) form_fields_x#0 + (byte) form_field_ptr::field_idx#2) [ form_field_ptr::$2 form_field_ptr::x#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::$2 form_field_ptr::x#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:122 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::$2 form_field_ptr::x#0 ] )
[117] (byte*) form_field_ptr::return#0 ← (byte*)(word~) form_field_ptr::$2 + (byte) form_field_ptr::x#0 [ form_field_ptr::return#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::return#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:122 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::return#0 ] )
[158] (byte) form_field_ptr::field_idx#2 ← phi( form_control/(byte) form_field_ptr::field_idx#1 form_render_values::@1/(byte) form_field_ptr::field_idx#0 ) [ form_field_ptr::field_idx#2 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::field_idx#2 ] main:2::menu:10::form_render_values:40::form_field_ptr:167 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::field_idx#2 ] )
[159] (byte) form_field_ptr::y#0 ← *((const byte[]) form_fields_y#0 + (byte) form_field_ptr::field_idx#2) [ form_field_ptr::field_idx#2 form_field_ptr::y#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::field_idx#2 form_field_ptr::y#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:167 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::field_idx#2 form_field_ptr::y#0 ] )
[160] (word~) form_field_ptr::$2 ← *((const byte[25]) form_line_hi#0 + (byte) form_field_ptr::y#0) w= *((const byte[25]) form_line_lo#0 + (byte) form_field_ptr::y#0) [ form_field_ptr::field_idx#2 form_field_ptr::$2 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::field_idx#2 form_field_ptr::$2 ] main:2::menu:10::form_render_values:40::form_field_ptr:167 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::field_idx#2 form_field_ptr::$2 ] )
[161] (byte) form_field_ptr::x#0 ← *((const byte[]) form_fields_x#0 + (byte) form_field_ptr::field_idx#2) [ form_field_ptr::$2 form_field_ptr::x#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::$2 form_field_ptr::x#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:167 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::$2 form_field_ptr::x#0 ] )
[162] (byte*) form_field_ptr::return#0 ← (byte*)(word~) form_field_ptr::$2 + (byte) form_field_ptr::x#0 [ form_field_ptr::return#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::return#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:167 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::return#0 ] )
to:form_field_ptr::@return
form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr
[118] return [ form_field_ptr::return#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 key_down_debounce#11 form_field_idx#14 key_right_debounce#11 form_field_ptr::return#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:122 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::return#0 ] )
[163] return [ form_field_ptr::return#0 ] ( main:2::menu:10::form_control:46::form_field_ptr:48 [ form_cursor_count#13 keyboard_events_size#24 form_field_idx#14 form_field_ptr::return#0 ] main:2::menu:10::form_render_values:40::form_field_ptr:167 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::return#0 ] )
to:@return
form_render_values: scope:[form_render_values] from menu::@21
[119] phi() [ ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[164] phi() [ ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:form_render_values::@1
form_render_values::@1: scope:[form_render_values] from form_render_values form_render_values::@3
[120] (byte) form_render_values::idx#2 ← phi( form_render_values/(byte/signed byte/word/signed word/dword/signed dword) 0 form_render_values::@3/(byte) form_render_values::idx#1 ) [ form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 ] )
[121] (byte) form_field_ptr::field_idx#0 ← (byte) form_render_values::idx#2 [ form_field_ptr::field_idx#0 form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_field_ptr::field_idx#0 form_render_values::idx#2 ] )
[122] call form_field_ptr param-assignment [ form_field_ptr::return#0 form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_field_ptr::return#0 form_render_values::idx#2 ] )
[123] (byte*) form_field_ptr::return#2 ← (byte*) form_field_ptr::return#0 [ form_render_values::idx#2 form_field_ptr::return#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_field_ptr::return#2 ] )
[165] (byte) form_render_values::idx#2 ← phi( form_render_values/(byte/signed byte/word/signed word/dword/signed dword) 0 form_render_values::@3/(byte) form_render_values::idx#1 ) [ form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 ] )
[166] (byte) form_field_ptr::field_idx#0 ← (byte) form_render_values::idx#2 [ form_field_ptr::field_idx#0 form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_field_ptr::field_idx#0 form_render_values::idx#2 ] )
[167] call form_field_ptr param-assignment [ form_field_ptr::return#0 form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_field_ptr::return#0 form_render_values::idx#2 ] )
[168] (byte*) form_field_ptr::return#2 ← (byte*) form_field_ptr::return#0 [ form_render_values::idx#2 form_field_ptr::return#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_field_ptr::return#2 ] )
to:form_render_values::@3
form_render_values::@3: scope:[form_render_values] from form_render_values::@1
[124] (byte*) form_render_values::field#0 ← (byte*) form_field_ptr::return#2 [ form_render_values::idx#2 form_render_values::field#0 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 form_render_values::field#0 ] )
[125] *((byte*) form_render_values::field#0) ← *((const string) print_hextab#0 + *((const byte[]) form_fields_val#0 + (byte) form_render_values::idx#2)) [ form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#2 ] )
[126] (byte) form_render_values::idx#1 ← ++ (byte) form_render_values::idx#2 [ form_render_values::idx#1 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#1 ] )
[127] if((byte) form_render_values::idx#1<(const byte) form_fields_cnt#0) goto form_render_values::@1 [ form_render_values::idx#1 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_render_values::idx#1 ] )
[169] (byte*) form_render_values::field#0 ← (byte*) form_field_ptr::return#2 [ form_render_values::idx#2 form_render_values::field#0 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 form_render_values::field#0 ] )
[170] *((byte*) form_render_values::field#0) ← *((const string) print_hextab#0 + *((const byte[]) form_fields_val#0 + (byte) form_render_values::idx#2)) [ form_render_values::idx#2 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#2 ] )
[171] (byte) form_render_values::idx#1 ← ++ (byte) form_render_values::idx#2 [ form_render_values::idx#1 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#1 ] )
[172] if((byte) form_render_values::idx#1<(const byte) form_fields_cnt#0) goto form_render_values::@1 [ form_render_values::idx#1 ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_render_values::idx#1 ] )
to:form_render_values::@return
form_render_values::@return: scope:[form_render_values] from form_render_values::@3
[128] return [ ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[173] return [ ] ( main:2::menu:10::form_render_values:40 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:@return
form_set_screen: scope:[form_set_screen] from menu::@20
[129] phi() [ ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[174] phi() [ ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:form_set_screen::@1
form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_screen::@1
[130] (byte) form_set_screen::y#2 ← phi( form_set_screen/(byte/signed byte/word/signed word/dword/signed dword) 0 form_set_screen::@1/(byte) form_set_screen::y#1 ) [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[130] (byte*) form_set_screen::line#2 ← phi( form_set_screen/(const byte*) menu::SCREEN#0 form_set_screen::@1/(byte*) form_set_screen::line#1 ) [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[131] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 [ form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$0 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$0 ] )
[132] *((const byte[25]) form_line_lo#0 + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[133] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 [ form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$1 ] )
[134] *((const byte[25]) form_line_hi#0 + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[135] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::y#2 form_set_screen::line#1 ] )
[136] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 [ form_set_screen::line#1 form_set_screen::y#1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#1 form_set_screen::y#1 ] )
[137] if((byte) form_set_screen::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto form_set_screen::@1 [ form_set_screen::line#1 form_set_screen::y#1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 form_set_screen::line#1 form_set_screen::y#1 ] )
[175] (byte) form_set_screen::y#2 ← phi( form_set_screen/(byte/signed byte/word/signed word/dword/signed dword) 0 form_set_screen::@1/(byte) form_set_screen::y#1 ) [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[175] (byte*) form_set_screen::line#2 ← phi( form_set_screen/(const byte*) menu::SCREEN#0 form_set_screen::@1/(byte*) form_set_screen::line#1 ) [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[176] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 [ form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$0 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$0 ] )
[177] *((const byte[25]) form_line_lo#0 + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[178] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 [ form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#2 form_set_screen::y#2 form_set_screen::$1 ] )
[179] *((const byte[25]) form_line_hi#0 + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 [ form_set_screen::line#2 form_set_screen::y#2 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#2 form_set_screen::y#2 ] )
[180] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::y#2 form_set_screen::line#1 ] )
[181] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 [ form_set_screen::line#1 form_set_screen::y#1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#1 form_set_screen::y#1 ] )
[182] if((byte) form_set_screen::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto form_set_screen::@1 [ form_set_screen::line#1 form_set_screen::y#1 ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 form_set_screen::line#1 form_set_screen::y#1 ] )
to:form_set_screen::@return
form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1
[138] return [ ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[183] return [ ] ( main:2::menu:10::form_set_screen:38 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:@return
print_str_lines: scope:[print_str_lines] from menu::@16 menu::@19
[139] (byte*) print_str_lines::str#5 ← phi( menu::@16/(const string) MENU_COLS#0 menu::@19/(const string) MENU_TEXT#0 ) [ print_str_lines::str#5 print_set_screen::screen#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#5 print_set_screen::screen#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#5 print_set_screen::screen#2 ] )
[140] (byte*~) print_char_cursor#63 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#63 print_set_screen::screen#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#5 print_char_cursor#63 print_set_screen::screen#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#5 print_char_cursor#63 print_set_screen::screen#2 ] )
[184] (byte*) print_str_lines::str#5 ← phi( menu::@16/(const string) MENU_COLS#0 menu::@19/(const string) MENU_TEXT#0 ) [ print_str_lines::str#5 print_set_screen::screen#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#5 print_set_screen::screen#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#5 print_set_screen::screen#2 ] )
[185] (byte*~) print_char_cursor#64 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#64 print_set_screen::screen#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#5 print_char_cursor#64 print_set_screen::screen#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#5 print_char_cursor#64 print_set_screen::screen#2 ] )
to:print_str_lines::@1
print_str_lines::@1: scope:[print_str_lines] from print_str_lines print_str_lines::@9
[141] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@9/(byte*) print_line_cursor#22 ) [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[141] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*~) print_char_cursor#63 print_str_lines::@9/(byte*~) print_char_cursor#64 ) [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[141] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@9/(byte*) print_str_lines::str#0 ) [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[142] if(*((byte*) print_str_lines::str#3)!=(byte) '@') goto print_str_lines::@4 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[186] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@9/(byte*) print_line_cursor#22 ) [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[186] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*~) print_char_cursor#64 print_str_lines::@9/(byte*~) print_char_cursor#65 ) [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[186] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@9/(byte*) print_str_lines::str#0 ) [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
[187] if(*((byte*) print_str_lines::str#3)!=(byte) '@') goto print_str_lines::@4 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] )
to:print_str_lines::@return
print_str_lines::@return: scope:[print_str_lines] from print_str_lines::@1
[143] return [ ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 ] )
[188] return [ ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 ] )
to:@return
print_str_lines::@4: scope:[print_str_lines] from print_str_lines::@1 print_str_lines::@5
[144] (byte*) print_char_cursor#20 ← phi( print_str_lines::@1/(byte*) print_char_cursor#22 print_str_lines::@5/(byte*) print_char_cursor#38 ) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] )
[144] (byte*) print_str_lines::str#4 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#3 print_str_lines::@5/(byte*) print_str_lines::str#0 ) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] )
[145] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] )
[146] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] )
[147] if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] )
[189] (byte*) print_char_cursor#20 ← phi( print_str_lines::@1/(byte*) print_char_cursor#22 print_str_lines::@5/(byte*) print_char_cursor#38 ) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] )
[189] (byte*) print_str_lines::str#4 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#3 print_str_lines::@5/(byte*) print_str_lines::str#0 ) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 ] )
[190] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] )
[191] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] )
[192] if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] )
to:print_str_lines::@8
print_str_lines::@8: scope:[print_str_lines] from print_str_lines::@4
[148] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] )
[149] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 [ print_line_cursor#2 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] )
[193] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] )
[194] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 [ print_line_cursor#2 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] )
to:print_str_lines::@5
print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@4 print_str_lines::@8
[150] (byte*) print_char_cursor#38 ← phi( print_str_lines::@4/(byte*) print_char_cursor#20 print_str_lines::@8/(byte*) print_char_cursor#1 ) [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 print_str_lines::ch#0 ] )
[151] if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] )
[195] (byte*) print_char_cursor#38 ← phi( print_str_lines::@4/(byte*) print_char_cursor#20 print_str_lines::@8/(byte*) print_char_cursor#1 ) [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 print_str_lines::ch#0 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 print_str_lines::ch#0 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 print_str_lines::ch#0 ] )
[196] if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] )
to:print_str_lines::@9
print_str_lines::@9: scope:[print_str_lines] from print_str_lines::@5
[152] phi() [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] )
[153] call print_ln param-assignment [ print_str_lines::str#0 print_line_cursor#22 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 ] )
[154] (byte*~) print_char_cursor#64 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#64 print_line_cursor#22 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_char_cursor#64 print_line_cursor#22 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_char_cursor#64 print_line_cursor#22 ] )
[197] phi() [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#38 ] )
[198] call print_ln param-assignment [ print_str_lines::str#0 print_line_cursor#22 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 ] )
[199] (byte*~) print_char_cursor#65 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#65 print_line_cursor#22 ] ( main:2::menu:10::print_str_lines:30 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_char_cursor#65 print_line_cursor#22 ] main:2::menu:10::print_str_lines:36 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_char_cursor#65 print_line_cursor#22 ] )
to:print_str_lines::@1
print_ln: scope:[print_ln] from print_str_lines::@9
[155] phi() [ print_line_cursor#2 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#2 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#2 print_char_cursor#38 ] )
[200] phi() [ print_line_cursor#2 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#2 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#2 print_char_cursor#38 ] )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[156] (byte*) print_line_cursor#21 ← phi( print_ln/(byte*) print_line_cursor#2 print_ln::@1/(byte*) print_line_cursor#22 ) [ print_char_cursor#38 print_line_cursor#21 ] ( main:2::menu:10::print_str_lines:30::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_char_cursor#38 print_line_cursor#21 ] main:2::menu:10::print_str_lines:36::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_char_cursor#38 print_line_cursor#21 ] )
[157] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] )
[158] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] )
[201] (byte*) print_line_cursor#21 ← phi( print_ln/(byte*) print_line_cursor#2 print_ln::@1/(byte*) print_line_cursor#22 ) [ print_char_cursor#38 print_line_cursor#21 ] ( main:2::menu:10::print_str_lines:30::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_char_cursor#38 print_line_cursor#21 ] main:2::menu:10::print_str_lines:36::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_char_cursor#38 print_line_cursor#21 ] )
[202] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] )
[203] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::menu:10::print_str_lines:30::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::menu:10::print_str_lines:36::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] )
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[159] return [ print_line_cursor#22 ] ( main:2::menu:10::print_str_lines:30::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 ] main:2::menu:10::print_str_lines:36::print_ln:153 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_str_lines::str#0 print_line_cursor#22 ] )
[204] return [ print_line_cursor#22 ] ( main:2::menu:10::print_str_lines:30::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 ] main:2::menu:10::print_str_lines:36::print_ln:198 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 ] )
to:@return
print_cls: scope:[print_cls] from menu::@15 menu::@18
[160] (byte*) print_cls::sc#0 ← (byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 print_cls::sc#0 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#0 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#0 ] )
[205] (byte*) print_cls::sc#0 ← (byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 print_cls::sc#0 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#0 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#0 ] )
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
[161] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) print_cls::sc#0 print_cls::@1/(byte*) print_cls::sc#1 ) [ print_set_screen::screen#2 print_cls::sc#2 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#2 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#2 ] )
[162] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_set_screen::screen#2 print_cls::sc#2 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#2 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#2 ] )
[163] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 [ print_set_screen::screen#2 print_cls::sc#1 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#1 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#1 ] )
[164] (byte*~) print_cls::$0 ← (byte*) print_set_screen::screen#2 + (word/signed word/dword/signed dword) 1000 [ print_set_screen::screen#2 print_cls::sc#1 print_cls::$0 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#1 print_cls::$0 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#1 print_cls::$0 ] )
[165] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 [ print_set_screen::screen#2 print_cls::sc#1 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#1 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 print_cls::sc#1 ] )
[206] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) print_cls::sc#0 print_cls::@1/(byte*) print_cls::sc#1 ) [ print_set_screen::screen#2 print_cls::sc#2 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#2 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#2 ] )
[207] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_set_screen::screen#2 print_cls::sc#2 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#2 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#2 ] )
[208] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 [ print_set_screen::screen#2 print_cls::sc#1 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#1 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#1 ] )
[209] (byte*~) print_cls::$0 ← (byte*) print_set_screen::screen#2 + (word/signed word/dword/signed dword) 1000 [ print_set_screen::screen#2 print_cls::sc#1 print_cls::$0 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#1 print_cls::$0 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#1 print_cls::$0 ] )
[210] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 [ print_set_screen::screen#2 print_cls::sc#1 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#1 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 print_cls::sc#1 ] )
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls::@1
[166] return [ print_set_screen::screen#2 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[211] return [ print_set_screen::screen#2 ] ( main:2::menu:10::print_cls:28 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] main:2::menu:10::print_cls:34 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:@return
print_set_screen: scope:[print_set_screen] from menu::@17 menu::@8
[167] (byte*) print_set_screen::screen#2 ← phi( menu::@17/(const byte*) menu::SCREEN#0 menu::@8/(const byte*) COLS#0 ) [ print_set_screen::screen#2 ] ( main:2::menu:10::print_set_screen:26 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] main:2::menu:10::print_set_screen:32 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[212] (byte*) print_set_screen::screen#2 ← phi( menu::@17/(const byte*) menu::SCREEN#0 menu::@8/(const byte*) COLS#0 ) [ print_set_screen::screen#2 ] ( main:2::menu:10::print_set_screen:26 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] main:2::menu:10::print_set_screen:32 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:print_set_screen::@return
print_set_screen::@return: scope:[print_set_screen] from print_set_screen
[168] return [ print_set_screen::screen#2 ] ( main:2::menu:10::print_set_screen:26 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] main:2::menu:10::print_set_screen:32 [ form_cursor_count#1 key_down_debounce#1 form_field_idx#1 key_right_debounce#1 print_set_screen::screen#2 ] )
[213] return [ print_set_screen::screen#2 ] ( main:2::menu:10::print_set_screen:26 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] main:2::menu:10::print_set_screen:32 [ form_cursor_count#1 keyboard_events_size#22 keyboard_modifiers#20 form_field_idx#1 print_set_screen::screen#2 ] )
to:@return

View File

@ -1,4 +1,4 @@
(label) @25
(label) @28
(label) @begin
(label) @end
(byte*) BGCOL
@ -35,10 +35,26 @@
(const byte[16]) DTV_PALETTE_DEFAULT#0 DTV_PALETTE_DEFAULT = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 54, (byte/word/signed word/dword/signed dword) 190, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 219, (byte/word/signed word/dword/signed dword) 134, (byte/word/signed word/dword/signed dword) 255, (byte/signed byte/word/signed word/dword/signed dword) 41, (byte/signed byte/word/signed word/dword/signed dword) 38, (byte/signed byte/word/signed word/dword/signed dword) 59, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 154, (byte/signed byte/word/signed word/dword/signed dword) 10 }
(signed byte) FORM_CURSOR_BLINK
(const signed byte) FORM_CURSOR_BLINK#0 FORM_CURSOR_BLINK = (byte/signed byte/word/signed word/dword/signed dword) 40
(byte) KEY_COMMODORE
(const byte) KEY_COMMODORE#0 KEY_COMMODORE = (byte/signed byte/word/signed word/dword/signed dword) 61
(byte) KEY_CRSR_DOWN
(const byte) KEY_CRSR_DOWN#0 KEY_CRSR_DOWN = (byte/signed byte/word/signed word/dword/signed dword) 7
(byte) KEY_CRSR_RIGHT
(const byte) KEY_CRSR_RIGHT#0 KEY_CRSR_RIGHT = (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_CTRL
(const byte) KEY_CTRL#0 KEY_CTRL = (byte/signed byte/word/signed word/dword/signed dword) 58
(byte) KEY_LSHIFT
(const byte) KEY_LSHIFT#0 KEY_LSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 15
(byte) KEY_MODIFIER_COMMODORE
(const byte) KEY_MODIFIER_COMMODORE#0 KEY_MODIFIER_COMMODORE = (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) KEY_MODIFIER_CTRL
(const byte) KEY_MODIFIER_CTRL#0 KEY_MODIFIER_CTRL = (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_LSHIFT
(const byte) KEY_MODIFIER_LSHIFT#0 KEY_MODIFIER_LSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT
(const byte) KEY_MODIFIER_RSHIFT#0 KEY_MODIFIER_RSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_SHIFT
(const byte) KEY_MODIFIER_SHIFT#0 KEY_MODIFIER_SHIFT = (const byte) KEY_MODIFIER_LSHIFT#0|(const byte) KEY_MODIFIER_RSHIFT#0
(byte) KEY_RSHIFT
(const byte) KEY_RSHIFT#0 KEY_RSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 52
(byte[]) MENU_COLS
@ -60,58 +76,52 @@
(byte) VIC_RSEL
(const byte) VIC_RSEL#0 VIC_RSEL = (byte/signed byte/word/signed word/dword/signed dword) 8
(void()) form_control()
(byte~) form_control::$12 reg byte a 4.0
(byte~) form_control::$13 reg byte a 4.0
(byte~) form_control::$14 reg byte a 4.0
(byte~) form_control::$28 reg byte a 4.0
(byte~) form_control::$24 reg byte a 4.0
(byte/word/dword~) form_control::$6 reg byte a 4.0
(byte~) form_control::$7 reg byte a 4.0
(label) form_control::@1
(label) form_control::@10
(label) form_control::@12
(label) form_control::@14
(label) form_control::@15
(label) form_control::@17
(label) form_control::@19
(label) form_control::@18
(label) form_control::@2
(label) form_control::@20
(label) form_control::@21
(label) form_control::@26
(label) form_control::@23
(label) form_control::@24
(label) form_control::@25
(label) form_control::@27
(label) form_control::@28
(label) form_control::@29
(label) form_control::@3
(label) form_control::@30
(label) form_control::@31
(label) form_control::@32
(label) form_control::@33
(label) form_control::@34
(label) form_control::@35
(label) form_control::@36
(label) form_control::@37
(label) form_control::@38
(label) form_control::@39
(label) form_control::@4
(label) form_control::@6
(label) form_control::@8
(label) form_control::@5
(label) form_control::@7
(label) form_control::@return
(byte*) form_control::field
(byte*) form_control::field#0 field zp ZP_WORD:6 0.44444444444444453
(byte) form_control::key_down
(byte) form_control::key_down#0 reg byte a 2.6666666666666665
(byte) form_control::key_right
(byte) form_control::key_right#0 reg byte a 2.6666666666666665
(byte*) form_control::field#0 field zp ZP_WORD:7 0.5925925925925926
(byte) form_control::key_event
(byte) form_control::key_event#0 reg byte a 3.0
(signed byte) form_cursor_count
(signed byte) form_cursor_count#1 form_cursor_count zp ZP_BYTE:2 0.3939393939393939
(signed byte) form_cursor_count#13 form_cursor_count zp ZP_BYTE:2 11.6
(signed byte) form_cursor_count#15 form_cursor_count zp ZP_BYTE:2 0.3125
(signed byte) form_cursor_count#16 form_cursor_count zp ZP_BYTE:2 35.66666666666666
(signed byte) form_cursor_count#15 form_cursor_count zp ZP_BYTE:2 0.34782608695652173
(signed byte) form_cursor_count#16 form_cursor_count zp ZP_BYTE:2 34.99999999999999
(signed byte) form_cursor_count#5 form_cursor_count zp ZP_BYTE:2 2.0
(byte) form_field_idx
(byte) form_field_idx#1 form_field_idx zp ZP_BYTE:4 0.3939393939393939
(byte) form_field_idx#14 form_field_idx zp ZP_BYTE:4 2.901960784313723
(byte) form_field_idx#18 form_field_idx zp ZP_BYTE:4 36.33333333333332
(byte) form_field_idx#32 form_field_idx zp ZP_BYTE:4 6.0
(byte) form_field_idx#14 form_field_idx zp ZP_BYTE:4 3.6499999999999972
(byte) form_field_idx#18 form_field_idx zp ZP_BYTE:4 35.66666666666666
(byte) form_field_idx#30 form_field_idx zp ZP_BYTE:4 6.0
(byte) form_field_idx#40 form_field_idx zp ZP_BYTE:4 2.0
(byte) form_field_idx#41 form_field_idx zp ZP_BYTE:4 2.0
(byte) form_field_idx#42 form_field_idx zp ZP_BYTE:4 2.0
(byte*()) form_field_ptr((byte) form_field_ptr::field_idx)
(word~) form_field_ptr::$2 $2 zp ZP_WORD:6 1.0
(word~) form_field_ptr::$2 $2 zp ZP_WORD:7 1.0
(label) form_field_ptr::@return
(byte*) form_field_ptr::field
(byte) form_field_ptr::field_idx
@ -120,9 +130,9 @@
(byte) form_field_ptr::field_idx#2 reg byte x 35.66666666666666
(byte*) form_field_ptr::line
(byte*) form_field_ptr::return
(byte*) form_field_ptr::return#0 return zp ZP_WORD:6 26.25
(byte*) form_field_ptr::return#2 return zp ZP_WORD:6 202.0
(byte*) form_field_ptr::return#3 return zp ZP_WORD:6 4.0
(byte*) form_field_ptr::return#0 return zp ZP_WORD:7 26.25
(byte*) form_field_ptr::return#2 return zp ZP_WORD:7 202.0
(byte*) form_field_ptr::return#3 return zp ZP_WORD:7 4.0
(byte) form_field_ptr::x
(byte) form_field_ptr::x#0 reg byte a 4.0
(byte) form_field_ptr::y
@ -146,7 +156,7 @@
(label) form_render_values::@3
(label) form_render_values::@return
(byte*) form_render_values::field
(byte*) form_render_values::field#0 field zp ZP_WORD:6 202.0
(byte*) form_render_values::field#0 field zp ZP_WORD:7 202.0
(byte) form_render_values::idx
(byte) form_render_values::idx#1 reg byte x 151.5
(byte) form_render_values::idx#2 reg byte x 67.33333333333333
@ -156,51 +166,118 @@
(label) form_set_screen::@1
(label) form_set_screen::@return
(byte*) form_set_screen::line
(byte*) form_set_screen::line#1 line zp ZP_WORD:6 67.33333333333333
(byte*) form_set_screen::line#2 line zp ZP_WORD:6 80.8
(byte*) form_set_screen::line#1 line zp ZP_WORD:7 67.33333333333333
(byte*) form_set_screen::line#2 line zp ZP_WORD:7 80.8
(byte*) form_set_screen::screen
(byte) form_set_screen::y
(byte) form_set_screen::y#1 reg byte x 151.5
(byte) form_set_screen::y#2 reg byte x 67.33333333333333
(byte) key_down_debounce
(byte) key_down_debounce#1 key_down_debounce zp ZP_BYTE:3 0.3939393939393939
(byte) key_down_debounce#11 key_down_debounce zp ZP_BYTE:3 4.916666666666666
(byte) key_down_debounce#13 key_down_debounce zp ZP_BYTE:3 36.33333333333332
(byte) key_down_debounce#20 key_down_debounce zp ZP_BYTE:3 0.5263157894736842
(byte) key_down_debounce#23 key_down_debounce zp ZP_BYTE:3 0.4
(byte) key_right_debounce
(byte) key_right_debounce#1 key_right_debounce zp ZP_BYTE:5 0.3939393939393939
(byte) key_right_debounce#11 key_right_debounce zp ZP_BYTE:5 2.727272727272727
(byte) key_right_debounce#13 key_right_debounce zp ZP_BYTE:5 36.33333333333332
(byte) key_right_debounce#21 key_right_debounce zp ZP_BYTE:5 0.42857142857142855
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(byte~) keyboard_key_pressed::$2 reg byte a 4.0
(label) keyboard_key_pressed::@2
(label) keyboard_key_pressed::@return
(byte) keyboard_key_pressed::colidx
(byte) keyboard_key_pressed::colidx#0 reg byte y 0.6666666666666666
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::key#4 reg byte x 2.0
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::return#0 reg byte a 1.6666666666666665
(byte) keyboard_key_pressed::return#10 reg byte a 4.0
(byte) keyboard_key_pressed::return#2 reg byte a 4.0
(byte) keyboard_key_pressed::return#3 reg byte a 4.0
(byte) keyboard_key_pressed::return#4 reg byte a 4.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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_event_get()
(label) keyboard_event_get::@1
(label) keyboard_event_get::@return
(byte) keyboard_event_get::return
(byte) keyboard_event_get::return#0 reg byte a 4.0
(byte) keyboard_event_get::return#2 reg byte a 1.3333333333333333
(byte) keyboard_event_get::return#3 reg byte a 4.0
(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0 reg byte a 4.0
(byte~) keyboard_event_pressed::$1 reg byte a 4.0
(label) keyboard_event_pressed::@return
(byte) keyboard_event_pressed::keycode
(byte) keyboard_event_pressed::keycode#4 keycode zp ZP_BYTE:5 1.3333333333333333
(byte) keyboard_event_pressed::return
(byte) keyboard_event_pressed::return#0 reg byte a 4.0
(byte) keyboard_event_pressed::return#1 reg byte a 4.0
(byte) keyboard_event_pressed::return#10 reg byte a 1.6666666666666665
(byte) keyboard_event_pressed::return#2 reg byte a 4.0
(byte) keyboard_event_pressed::return#3 reg byte a 4.0
(byte) keyboard_event_pressed::row_bits
(byte) keyboard_event_pressed::row_bits#0 reg byte y 2.0
(void()) keyboard_event_scan()
(byte/word/dword~) keyboard_event_scan::$12 reg byte a 20002.0
(byte~) keyboard_event_scan::$16 reg byte a 4.0
(byte~) keyboard_event_scan::$20 reg byte a 4.0
(byte~) keyboard_event_scan::$24 reg byte a 4.0
(byte~) keyboard_event_scan::$28 reg byte a 4.0
(byte~) keyboard_event_scan::$3 reg byte a 20002.0
(byte~) keyboard_event_scan::$4 reg byte a 20002.0
(label) keyboard_event_scan::@1
(label) keyboard_event_scan::@10
(label) keyboard_event_scan::@11
(label) keyboard_event_scan::@14
(label) keyboard_event_scan::@15
(label) keyboard_event_scan::@16
(label) keyboard_event_scan::@18
(label) keyboard_event_scan::@2
(label) keyboard_event_scan::@20
(label) keyboard_event_scan::@21
(label) keyboard_event_scan::@22
(label) keyboard_event_scan::@23
(label) keyboard_event_scan::@24
(label) keyboard_event_scan::@25
(label) keyboard_event_scan::@26
(label) keyboard_event_scan::@27
(label) keyboard_event_scan::@28
(label) keyboard_event_scan::@29
(label) keyboard_event_scan::@3
(label) keyboard_event_scan::@4
(label) keyboard_event_scan::@6
(label) keyboard_event_scan::@8
(label) keyboard_event_scan::@9
(label) keyboard_event_scan::@return
(byte) keyboard_event_scan::col
(byte) keyboard_event_scan::col#1 reg byte x 15001.5
(byte) keyboard_event_scan::col#2 reg byte x 2857.4285714285716
(byte) keyboard_event_scan::event_type
(byte) keyboard_event_scan::event_type#0 reg byte a 20002.0
(byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::keycode#1 keycode zp ZP_BYTE:5 2002.0
(byte) keyboard_event_scan::keycode#10 keycode zp ZP_BYTE:5 3154.230769230769
(byte) keyboard_event_scan::keycode#11 keycode zp ZP_BYTE:5 500.5
(byte) keyboard_event_scan::keycode#14 keycode zp ZP_BYTE:5 1001.0
(byte) keyboard_event_scan::keycode#15 keycode zp ZP_BYTE:5 5250.75
(byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row#1 row zp ZP_BYTE:3 1501.5
(byte) keyboard_event_scan::row#2 row zp ZP_BYTE:3 600.24
(byte) keyboard_event_scan::row_scan
(byte) keyboard_event_scan::row_scan#0 row_scan zp ZP_BYTE:13 1278.0555555555554
(byte[8]) keyboard_events
(const byte[8]) keyboard_events#0 keyboard_events = { fill( 8, 0) }
(byte) keyboard_events_size
(byte) keyboard_events_size#1 keyboard_events_size zp ZP_BYTE:6 20002.0
(byte) keyboard_events_size#14 keyboard_events_size zp ZP_BYTE:6 8100.9000000000015
(byte) keyboard_events_size#17 keyboard_events_size zp ZP_BYTE:6 94.03125
(byte) keyboard_events_size#2 keyboard_events_size zp ZP_BYTE:6 20002.0
(byte) keyboard_events_size#20 keyboard_events_size zp ZP_BYTE:6 3.5000000000000004
(byte) keyboard_events_size#22 keyboard_events_size zp ZP_BYTE:6 0.3939393939393939
(byte) keyboard_events_size#24 keyboard_events_size zp ZP_BYTE:6 5.523809523809524
(byte) keyboard_events_size#4 keyboard_events_size zp ZP_BYTE:6 3.0
(byte) keyboard_events_size#43 keyboard_events_size zp ZP_BYTE:6 429.2857142857143
(byte) keyboard_events_size#44 keyboard_events_size zp ZP_BYTE:6 10201.2
(byte[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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 1.3333333333333333
(byte) keyboard_matrix_read::return#2 reg byte a 4.0
(byte) keyboard_matrix_read::return#0 reg byte a 334.33333333333337
(byte) keyboard_matrix_read::return#2 reg byte a 2002.0
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0 reg byte x 4.0
(byte) keyboard_matrix_read::rowid#0 reg byte x 1003.0
(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 }
(byte) keyboard_modifiers
(byte) keyboard_modifiers#10 keyboard_modifiers zp ZP_BYTE:3 28.5
(byte) keyboard_modifiers#15 keyboard_modifiers zp ZP_BYTE:3 0.8
(byte) keyboard_modifiers#16 keyboard_modifiers zp ZP_BYTE:3 1.6
(byte) keyboard_modifiers#17 keyboard_modifiers zp ZP_BYTE:3 1.6
(byte) keyboard_modifiers#18 keyboard_modifiers zp ZP_BYTE:3 3.40625
(byte) keyboard_modifiers#20 keyboard_modifiers zp ZP_BYTE:3 0.3939393939393939
(byte) keyboard_modifiers#3 keyboard_modifiers zp ZP_BYTE:3 4.0
(byte) keyboard_modifiers#4 keyboard_modifiers zp ZP_BYTE:3 4.0
(byte) keyboard_modifiers#5 keyboard_modifiers zp ZP_BYTE:3 4.0
(byte[8]) keyboard_scan_values
(const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) }
(void()) main()
(label) main::@1
(label) main::@2
@ -227,26 +304,26 @@
(byte) menu::i#1 reg byte x 151.5
(byte) menu::i#2 reg byte x 202.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:8 2002.0
(byte*) print_char_cursor#20 print_char_cursor zp ZP_WORD:8 821.0
(byte*) print_char_cursor#22 print_char_cursor zp ZP_WORD:8 102.0
(byte*) print_char_cursor#38 print_char_cursor zp ZP_WORD:8 572.0
(byte*~) print_char_cursor#63 print_char_cursor zp ZP_WORD:8 4.0
(byte*~) print_char_cursor#64 print_char_cursor zp ZP_WORD:8 202.0
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:9 2002.0
(byte*) print_char_cursor#20 print_char_cursor zp ZP_WORD:9 821.0
(byte*) print_char_cursor#22 print_char_cursor zp ZP_WORD:9 102.0
(byte*) print_char_cursor#38 print_char_cursor zp ZP_WORD:9 572.0
(byte*~) print_char_cursor#64 print_char_cursor zp ZP_WORD:9 4.0
(byte*~) print_char_cursor#65 print_char_cursor zp ZP_WORD:9 202.0
(void()) print_cls()
(byte*~) print_cls::$0 $0 zp ZP_WORD:8 202.0
(byte*~) print_cls::$0 $0 zp ZP_WORD:9 202.0
(label) print_cls::@1
(label) print_cls::@return
(byte*) print_cls::sc
(byte*) print_cls::sc#0 sc zp ZP_WORD:6 4.0
(byte*) print_cls::sc#1 sc zp ZP_WORD:6 101.0
(byte*) print_cls::sc#2 sc zp ZP_WORD:6 152.5
(byte*) print_cls::sc#0 sc zp ZP_WORD:7 4.0
(byte*) print_cls::sc#1 sc zp ZP_WORD:7 101.0
(byte*) print_cls::sc#2 sc zp ZP_WORD:7 152.5
(byte[]) print_hextab
(const string) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(byte*) print_line_cursor
(byte*) print_line_cursor#2 print_line_cursor zp ZP_WORD:10 8.749999999999998
(byte*) print_line_cursor#21 print_line_cursor zp ZP_WORD:10 2004.0
(byte*) print_line_cursor#22 print_line_cursor zp ZP_WORD:10 641.0
(byte*) print_line_cursor#2 print_line_cursor zp ZP_WORD:11 8.749999999999998
(byte*) print_line_cursor#21 print_line_cursor zp ZP_WORD:11 2004.0
(byte*) print_line_cursor#22 print_line_cursor zp ZP_WORD:11 641.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
@ -254,7 +331,7 @@
(void()) print_set_screen((byte*) print_set_screen::screen)
(label) print_set_screen::@return
(byte*) print_set_screen::screen
(byte*) print_set_screen::screen#2 screen zp ZP_WORD:10 5.631578947368421
(byte*) print_set_screen::screen#2 screen zp ZP_WORD:11 5.631578947368421
(void()) print_str_lines((byte*) print_str_lines::str)
(label) print_str_lines::@1
(label) print_str_lines::@4
@ -265,40 +342,51 @@
(byte) print_str_lines::ch
(byte) print_str_lines::ch#0 reg byte a 667.3333333333334
(byte*) print_str_lines::str
(byte*) print_str_lines::str#0 str zp ZP_WORD:6 233.66666666666669
(byte*) print_str_lines::str#3 str zp ZP_WORD:6 152.5
(byte*) print_str_lines::str#4 str zp ZP_WORD:6 1552.0
(byte*) print_str_lines::str#5 str zp ZP_WORD:6 1.0
(byte*) print_str_lines::str#0 str zp ZP_WORD:7 233.66666666666669
(byte*) print_str_lines::str#3 str zp ZP_WORD:7 152.5
(byte*) print_str_lines::str#4 str zp ZP_WORD:7 1552.0
(byte*) print_str_lines::str#5 str zp ZP_WORD:7 1.0
zp ZP_BYTE:2 [ form_cursor_count#1 form_cursor_count#13 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ]
zp ZP_BYTE:3 [ key_down_debounce#1 key_down_debounce#11 key_down_debounce#13 key_down_debounce#20 key_down_debounce#23 ]
zp ZP_BYTE:4 [ form_field_idx#1 form_field_idx#14 form_field_idx#18 form_field_idx#32 form_field_idx#41 form_field_idx#42 ]
zp ZP_BYTE:5 [ key_right_debounce#1 key_right_debounce#11 key_right_debounce#13 key_right_debounce#21 ]
zp ZP_BYTE:3 [ keyboard_modifiers#20 keyboard_modifiers#10 keyboard_modifiers#18 keyboard_modifiers#17 keyboard_modifiers#4 keyboard_modifiers#16 keyboard_modifiers#3 keyboard_modifiers#15 keyboard_modifiers#5 keyboard_event_scan::row#2 keyboard_event_scan::row#1 ]
zp ZP_BYTE:4 [ form_field_idx#1 form_field_idx#14 form_field_idx#18 form_field_idx#30 form_field_idx#40 form_field_idx#41 ]
reg byte x [ menu::i#2 menu::i#1 ]
reg byte x [ keyboard_key_pressed::key#4 ]
reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#0 ]
reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ]
zp ZP_BYTE:5 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#15 keyboard_event_scan::keycode#1 keyboard_event_pressed::keycode#4 ]
zp ZP_BYTE:6 [ keyboard_events_size#14 keyboard_events_size#43 keyboard_events_size#22 keyboard_events_size#24 keyboard_events_size#20 keyboard_events_size#4 keyboard_events_size#17 keyboard_events_size#44 keyboard_events_size#2 keyboard_events_size#1 ]
reg byte x [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ]
reg byte x [ form_render_values::idx#2 form_render_values::idx#1 ]
zp ZP_WORD:6 [ form_set_screen::line#2 form_set_screen::line#1 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 print_cls::sc#2 print_cls::sc#0 print_cls::sc#1 form_field_ptr::return#3 form_control::field#0 form_field_ptr::return#0 form_field_ptr::$2 form_field_ptr::return#2 form_render_values::field#0 ]
zp ZP_WORD:7 [ form_set_screen::line#2 form_set_screen::line#1 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 print_cls::sc#2 print_cls::sc#0 print_cls::sc#1 form_field_ptr::return#3 form_control::field#0 form_field_ptr::return#0 form_field_ptr::$2 form_field_ptr::return#2 form_render_values::field#0 ]
reg byte x [ form_set_screen::y#2 form_set_screen::y#1 ]
zp ZP_WORD:8 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#63 print_char_cursor#64 print_char_cursor#38 print_char_cursor#1 print_cls::$0 ]
zp ZP_WORD:10 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ]
zp ZP_WORD:9 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#64 print_char_cursor#65 print_char_cursor#38 print_char_cursor#1 print_cls::$0 ]
zp ZP_WORD:11 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ]
reg byte a [ form_control::$6 ]
reg byte a [ keyboard_key_pressed::return#2 ]
reg byte a [ form_control::key_down#0 ]
reg byte a [ keyboard_event_get::return#3 ]
reg byte a [ form_control::key_event#0 ]
reg byte a [ form_control::$12 ]
reg byte a [ form_control::$13 ]
reg byte a [ keyboard_key_pressed::return#4 ]
reg byte a [ form_control::$14 ]
reg byte a [ keyboard_key_pressed::return#3 ]
reg byte a [ form_control::key_right#0 ]
reg byte a [ keyboard_key_pressed::return#10 ]
reg byte a [ form_control::$28 ]
reg byte a [ form_control::$24 ]
reg byte a [ form_control::$7 ]
reg byte y [ keyboard_key_pressed::colidx#0 ]
reg byte a [ keyboard_key_pressed::rowidx#0 ]
reg byte x [ keyboard_matrix_read::rowid#0 ]
reg byte a [ keyboard_matrix_read::return#2 ]
reg byte a [ keyboard_key_pressed::$2 ]
reg byte a [ keyboard_key_pressed::return#0 ]
zp ZP_BYTE:13 [ keyboard_event_scan::row_scan#0 ]
reg byte a [ keyboard_event_scan::$3 ]
reg byte a [ keyboard_event_scan::$4 ]
reg byte a [ keyboard_event_scan::event_type#0 ]
reg byte a [ keyboard_event_scan::$12 ]
reg byte a [ keyboard_event_pressed::return#0 ]
reg byte a [ keyboard_event_scan::$16 ]
reg byte a [ keyboard_event_pressed::return#1 ]
reg byte a [ keyboard_event_scan::$20 ]
reg byte a [ keyboard_event_pressed::return#2 ]
reg byte a [ keyboard_event_scan::$24 ]
reg byte a [ keyboard_event_pressed::return#3 ]
reg byte a [ keyboard_event_scan::$28 ]
reg byte a [ keyboard_event_pressed::$0 ]
reg byte y [ keyboard_event_pressed::row_bits#0 ]
reg byte a [ keyboard_event_pressed::$1 ]
reg byte a [ keyboard_event_pressed::return#10 ]
reg byte a [ keyboard_matrix_read::return#0 ]
reg byte y [ form_field_ptr::y#0 ]
reg byte a [ form_field_ptr::x#0 ]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
(label) @42
(label) @45
(label) @begin
(label) @end
(byte*) BGCOL
@ -459,8 +459,8 @@
(byte) keyboard_key_pressed::return#30 reg byte a 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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

View File

@ -1,13 +1,13 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@12
@12: scope:[] from @begin
to:@15
@15: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @12
@end: scope:[] from @15
[3] phi() [ ] ( )
main: scope:[main] from @12
main: scope:[main] from @15
[4] phi() [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@1
@ -235,7 +235,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@21 main::@3 main
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[121] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[122] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::return#0 ] )
[122] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[123] return [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:23 [ main::cur_pos#24 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:28 [ main::cur_pos#22 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:33 [ main::cur_pos#20 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:38 [ main::cur_pos#18 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:43 [ main::cur_pos#12 keyboard_key_pressed::return#0 ] main:2::keyboard_key_pressed:56 [ main::cur_pos#12 main::shift#10 main::ch#2 keyboard_key_pressed::return#0 ] )

View File

@ -1,4 +1,4 @@
(label) @12
(label) @15
(label) @begin
(label) @end
(byte*) CHARGEN
@ -149,8 +149,8 @@
(byte) keyboard_key_pressed::return#2 reg byte a 22.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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

View File

@ -1,13 +1,13 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@7
@7: scope:[] from @begin
to:@10
@10: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @7
@end: scope:[] from @10
[3] phi() [ ] ( )
main: scope:[main] from @7
main: scope:[main] from @10
[4] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@2
@ -81,7 +81,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@2 menu::@4 menu:
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[40] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )
[41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[42] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )

View File

@ -157,7 +157,7 @@ const byte[] keyboard_char_keycodes = {
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 };
byte[8] keyboard_matrix_col_bitmask = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 };
// Initialize keyboard reading by setting CIA#$ Data Direction Registers
void keyboard_init() {
@ -177,7 +177,7 @@ byte keyboard_matrix_read(byte rowid) {
return row_pressed_bits;
}
// Determines whether a specific key is currently pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// 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
@ -194,6 +194,97 @@ byte keyboard_key_pressed(byte key) {
byte keyboard_get_keycode(byte ch) {
return keyboard_char_keycodes[ch];
}
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
byte[8] keyboard_events;
// Keyboard event buffer size. The number of events currently in the event buffer
byte keyboard_events_size = 0;
// Current keyboard modifiers (left shift, right shift, ctrl, commodore)
byte keyboard_modifiers = 0;
// Left shift is pressed
const byte KEY_MODIFIER_LSHIFT = 1;
// Right shift is pressed
const byte KEY_MODIFIER_RSHIFT = 2;
// CTRL is pressed
const byte KEY_MODIFIER_CTRL = 4;
// Commodore is pressed
const byte KEY_MODIFIER_COMMODORE = 8;
// Any shift is pressed
const byte KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT;
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
byte[8] keyboard_scan_values;
// Scans the entire matrix to determine which keys have been pressed/depressed.
// Generates keyboard events into the event buffer. Events can be read using keyboard_event_get().
// Handles debounce and only generates events when the status of a key changes.
// Also stores current status of modifiers in keyboard_modifiers.
void keyboard_event_scan() {
byte keycode = 0;
for(byte row : 0..7) {
byte row_scan = keyboard_matrix_read(row);
if(row_scan!=keyboard_scan_values[row]) {
// Something has changed on the keyboard row - check each column
for(byte col : 0..7){
// XOR of row scan with the last seen row scan AND'ed with the col bitmask will be non-0 if the key status is changed
if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) {
// Key(row, col) status has changed. We have an event.
// Only process event if there is still room in the buffer
if(keyboard_events_size!=8) {
// AND of row scan and bit mask determines if key is pressed or released
byte event_type = row_scan&keyboard_matrix_col_bitmask[col];
if(event_type==0) {
// Key released
keyboard_events[keyboard_events_size++] = keycode|$40;
} else {
// Key pressed
keyboard_events[keyboard_events_size++] = keycode;
}
}
}
keycode++;
}
// Store the current keyboard status for the row to debounce
keyboard_scan_values[row] = row_scan;
} else {
// Update current keycode
keycode = keycode + 8;
}
}
// Update the keyboard modifiers
keyboard_modifiers = 0;
if(keyboard_event_pressed(KEY_LSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_LSHIFT;
}
if(keyboard_event_pressed(KEY_RSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_RSHIFT;
}
if(keyboard_event_pressed(KEY_CTRL)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_CTRL;
}
if(keyboard_event_pressed(KEY_COMMODORE)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_COMMODORE;
}
}
// Determine if a specific key is currently pressed based on the last keyboard_event_scan()
// Returns 0 is not pressed and non-0 if pressed
byte keyboard_event_pressed(byte keycode) {
byte row_bits = keyboard_scan_values[keycode>>3];
return row_bits & keyboard_matrix_col_bitmask[keycode&7];
}
// Get the next event from the keyboard event buffer.
// Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process.
// The buffer is filled by keyboard_scan()
byte keyboard_event_get() {
if(keyboard_events_size==0) {
return $ff;
} else {
return keyboard_events[--keyboard_events_size];
}
}
Importing c64.kc
PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc
// Commodore 64 Registers and Constants
@ -290,6 +381,10 @@ const byte LIGHT_GREEN = $d;
const byte LIGHT_BLUE = $e;
const byte LIGHT_GREY = $f;
Adding pre/post-modifier (byte) keyboard_events_size ← ++ (byte) keyboard_events_size
Adding pre/post-modifier (byte) keyboard_events_size ← ++ (byte) keyboard_events_size
Adding pre/post-modifier (byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
Adding pre/post-modifier (byte) keyboard_events_size ← -- (byte) keyboard_events_size
Importing c64.kc
Adding pre/post-modifier *((byte*) SCREEN) ← ++ *((byte*) SCREEN)
Adding pre/post-modifier *((byte*) BGCOL) ← ++ *((byte*) BGCOL)
@ -426,7 +521,7 @@ STATEMENTS
(byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
(byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) 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 }
(byte[]) 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[8]) 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 }
proc (void()) keyboard_init()
*((byte*) CIA1_PORT_A_DDR) ← (byte/word/signed word/dword/signed dword) 255
*((byte*) CIA1_PORT_B_DDR) ← (byte/signed byte/word/signed word/dword/signed dword) 0
@ -449,7 +544,7 @@ proc (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_key_pressed::rowidx ← (byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2 ← call keyboard_matrix_read (byte) keyboard_key_pressed::rowidx
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte) keyboard_key_pressed::return ← (byte~) keyboard_key_pressed::$3
goto keyboard_key_pressed::@return
keyboard_key_pressed::@return:
@ -463,6 +558,122 @@ keyboard_get_keycode::@return:
(byte) keyboard_get_keycode::return ← (byte) keyboard_get_keycode::return
return (byte) keyboard_get_keycode::return
endproc // keyboard_get_keycode()
(byte[8]) keyboard_events ← { fill( 8, 0) }
(byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
(byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT ← (byte~) $0
(byte[8]) keyboard_scan_values ← { fill( 8, 0) }
proc (void()) keyboard_event_scan()
(byte) keyboard_event_scan::keycode ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_event_scan::row ← (byte/signed byte/word/signed word/dword/signed dword) 0
keyboard_event_scan::@1:
(byte~) keyboard_event_scan::$0 ← call keyboard_matrix_read (byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan ← (byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan != *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(boolean~) keyboard_event_scan::$2 ← ! (boolean~) keyboard_event_scan::$1
if((boolean~) keyboard_event_scan::$2) goto keyboard_event_scan::@2
(byte) keyboard_event_scan::col ← (byte/signed byte/word/signed word/dword/signed dword) 0
keyboard_event_scan::@3:
(byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan ^ *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(boolean~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$6 ← ! (boolean~) keyboard_event_scan::$5
if((boolean~) keyboard_event_scan::$6) goto keyboard_event_scan::@4
(boolean~) keyboard_event_scan::$7 ← (byte) keyboard_events_size != (byte/signed byte/word/signed word/dword/signed dword) 8
(boolean~) keyboard_event_scan::$8 ← ! (boolean~) keyboard_event_scan::$7
if((boolean~) keyboard_event_scan::$8) goto keyboard_event_scan::@5
(byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(byte) keyboard_event_scan::event_type ← (byte~) keyboard_event_scan::$9
(boolean~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$11 ← ! (boolean~) keyboard_event_scan::$10
if((boolean~) keyboard_event_scan::$11) goto keyboard_event_scan::@6
(byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode | (byte/signed byte/word/signed word/dword/signed dword) 64
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte/word/dword~) keyboard_event_scan::$12
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
goto keyboard_event_scan::@7
keyboard_event_scan::@6:
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte) keyboard_event_scan::keycode
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
keyboard_event_scan::@7:
keyboard_event_scan::@5:
keyboard_event_scan::@4:
(byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::col ← ++ (byte) keyboard_event_scan::col
(boolean~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::col != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$13) goto keyboard_event_scan::@3
*((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row) ← (byte) keyboard_event_scan::row_scan
goto keyboard_event_scan::@8
keyboard_event_scan::@2:
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) keyboard_event_scan::keycode ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
keyboard_event_scan::@8:
(byte) keyboard_event_scan::row ← ++ (byte) keyboard_event_scan::row
(boolean~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$15) goto keyboard_event_scan::@1
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) keyboard_event_scan::$16 ← call keyboard_event_pressed (byte) KEY_LSHIFT
(boolean~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$18 ← ! (boolean~) keyboard_event_scan::$17
if((boolean~) keyboard_event_scan::$18) goto keyboard_event_scan::@9
(byte~) keyboard_event_scan::$19 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_LSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$19
keyboard_event_scan::@9:
(byte~) keyboard_event_scan::$20 ← call keyboard_event_pressed (byte) KEY_RSHIFT
(boolean~) keyboard_event_scan::$21 ← (byte~) keyboard_event_scan::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$22 ← ! (boolean~) keyboard_event_scan::$21
if((boolean~) keyboard_event_scan::$22) goto keyboard_event_scan::@10
(byte~) keyboard_event_scan::$23 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_RSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$23
keyboard_event_scan::@10:
(byte~) keyboard_event_scan::$24 ← call keyboard_event_pressed (byte) KEY_CTRL
(boolean~) keyboard_event_scan::$25 ← (byte~) keyboard_event_scan::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$26 ← ! (boolean~) keyboard_event_scan::$25
if((boolean~) keyboard_event_scan::$26) goto keyboard_event_scan::@11
(byte~) keyboard_event_scan::$27 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_CTRL
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$27
keyboard_event_scan::@11:
(byte~) keyboard_event_scan::$28 ← call keyboard_event_pressed (byte) KEY_COMMODORE
(boolean~) keyboard_event_scan::$29 ← (byte~) keyboard_event_scan::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$30 ← ! (boolean~) keyboard_event_scan::$29
if((boolean~) keyboard_event_scan::$30) goto keyboard_event_scan::@12
(byte~) keyboard_event_scan::$31 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_COMMODORE
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$31
keyboard_event_scan::@12:
keyboard_event_scan::@return:
return
endproc // keyboard_event_scan()
proc (byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_event_pressed::row_bits ← *((byte[8]) keyboard_scan_values + (byte~) keyboard_event_pressed::$0)
(byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode & (byte/signed byte/word/signed word/dword/signed dword) 7
(byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits & *((byte[8]) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1)
(byte) keyboard_event_pressed::return ← (byte~) keyboard_event_pressed::$2
goto keyboard_event_pressed::@return
keyboard_event_pressed::@return:
(byte) keyboard_event_pressed::return ← (byte) keyboard_event_pressed::return
return (byte) keyboard_event_pressed::return
endproc // keyboard_event_pressed()
proc (byte()) keyboard_event_get()
(boolean~) keyboard_event_get::$0 ← (byte) keyboard_events_size == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_get::$1 ← ! (boolean~) keyboard_event_get::$0
if((boolean~) keyboard_event_get::$1) goto keyboard_event_get::@1
(byte) keyboard_event_get::return ← (byte/word/signed word/dword/signed dword) 255
goto keyboard_event_get::@return
goto keyboard_event_get::@2
keyboard_event_get::@1:
(byte) keyboard_events_size ← -- (byte) keyboard_events_size
(byte) keyboard_event_get::return ← *((byte[8]) keyboard_events + (byte) keyboard_events_size)
goto keyboard_event_get::@return
keyboard_event_get::@2:
keyboard_event_get::@return:
(byte) keyboard_event_get::return ← (byte) keyboard_event_get::return
return (byte) keyboard_event_get::return
endproc // keyboard_event_get()
proc (void()) main()
*((byte*) BORDERCOL) ← (byte) GREEN
main::@1:
@ -530,6 +741,7 @@ endproc // pressed()
call main
SYMBOLS
(byte~) $0
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
@ -599,6 +811,11 @@ SYMBOLS
(byte) KEY_LSHIFT
(byte) KEY_M
(byte) KEY_MINUS
(byte) KEY_MODIFIER_COMMODORE
(byte) KEY_MODIFIER_CTRL
(byte) KEY_MODIFIER_LSHIFT
(byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT
(byte) KEY_N
(byte) KEY_O
(byte) KEY_P
@ -661,6 +878,74 @@ SYMBOLS
(byte) WHITE
(byte) YELLOW
(byte[]) keyboard_char_keycodes
(byte()) keyboard_event_get()
(boolean~) keyboard_event_get::$0
(boolean~) keyboard_event_get::$1
(label) keyboard_event_get::@1
(label) keyboard_event_get::@2
(label) keyboard_event_get::@return
(byte) keyboard_event_get::return
(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0
(byte~) keyboard_event_pressed::$1
(byte~) keyboard_event_pressed::$2
(label) keyboard_event_pressed::@return
(byte) keyboard_event_pressed::keycode
(byte) keyboard_event_pressed::return
(byte) keyboard_event_pressed::row_bits
(void()) keyboard_event_scan()
(byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1
(boolean~) keyboard_event_scan::$10
(boolean~) keyboard_event_scan::$11
(byte/word/dword~) keyboard_event_scan::$12
(boolean~) keyboard_event_scan::$13
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
(boolean~) keyboard_event_scan::$15
(byte~) keyboard_event_scan::$16
(boolean~) keyboard_event_scan::$17
(boolean~) keyboard_event_scan::$18
(byte~) keyboard_event_scan::$19
(boolean~) keyboard_event_scan::$2
(byte~) keyboard_event_scan::$20
(boolean~) keyboard_event_scan::$21
(boolean~) keyboard_event_scan::$22
(byte~) keyboard_event_scan::$23
(byte~) keyboard_event_scan::$24
(boolean~) keyboard_event_scan::$25
(boolean~) keyboard_event_scan::$26
(byte~) keyboard_event_scan::$27
(byte~) keyboard_event_scan::$28
(boolean~) keyboard_event_scan::$29
(byte~) keyboard_event_scan::$3
(boolean~) keyboard_event_scan::$30
(byte~) keyboard_event_scan::$31
(byte~) keyboard_event_scan::$4
(boolean~) keyboard_event_scan::$5
(boolean~) keyboard_event_scan::$6
(boolean~) keyboard_event_scan::$7
(boolean~) keyboard_event_scan::$8
(byte~) keyboard_event_scan::$9
(label) keyboard_event_scan::@1
(label) keyboard_event_scan::@10
(label) keyboard_event_scan::@11
(label) keyboard_event_scan::@12
(label) keyboard_event_scan::@2
(label) keyboard_event_scan::@3
(label) keyboard_event_scan::@4
(label) keyboard_event_scan::@5
(label) keyboard_event_scan::@6
(label) keyboard_event_scan::@7
(label) keyboard_event_scan::@8
(label) keyboard_event_scan::@9
(label) keyboard_event_scan::@return
(byte) keyboard_event_scan::col
(byte) keyboard_event_scan::event_type
(byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan
(byte[8]) keyboard_events
(byte) keyboard_events_size
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(label) keyboard_get_keycode::@return
(byte) keyboard_get_keycode::ch
@ -677,7 +962,7 @@ SYMBOLS
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::rowidx
(byte[]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -685,6 +970,8 @@ SYMBOLS
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte[8]) keyboard_matrix_row_bitmask
(byte) keyboard_modifiers
(byte[8]) keyboard_scan_values
(void()) main()
(void~) main::$0
(label) main::@1
@ -889,7 +1176,7 @@ INITIAL CONTROL FLOW GRAPH
(byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
(byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) 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 }
(byte[]) 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[8]) 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 }
to:@1
keyboard_init: scope:[keyboard_init] from
*((byte*) CIA1_PORT_A_DDR) ← (byte/word/signed word/dword/signed dword) 255
@ -920,7 +1207,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from
(byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_key_pressed::rowidx ← (byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2 ← call keyboard_matrix_read (byte) keyboard_key_pressed::rowidx
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte) keyboard_key_pressed::return ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed keyboard_key_pressed::@1
@ -941,7 +1228,174 @@ keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_k
keyboard_get_keycode::@1: scope:[keyboard_get_keycode] from
to:keyboard_get_keycode::@return
@4: scope:[] from @3
(byte[8]) keyboard_events ← { fill( 8, 0) }
(byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
(byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT ← (byte~) $0
(byte[8]) keyboard_scan_values ← { fill( 8, 0) }
to:@5
keyboard_event_scan: scope:[keyboard_event_scan] from
(byte) keyboard_event_scan::keycode ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_event_scan::row ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:keyboard_event_scan::@1
keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8
(byte~) keyboard_event_scan::$0 ← call keyboard_matrix_read (byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan ← (byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan != *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(boolean~) keyboard_event_scan::$2 ← ! (boolean~) keyboard_event_scan::$1
if((boolean~) keyboard_event_scan::$2) goto keyboard_event_scan::@2
to:keyboard_event_scan::@13
keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@1 keyboard_event_scan::@19
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) keyboard_event_scan::keycode ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
to:keyboard_event_scan::@8
keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@1
(byte) keyboard_event_scan::col ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:keyboard_event_scan::@3
keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@13 keyboard_event_scan::@4
(byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan ^ *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(boolean~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$6 ← ! (boolean~) keyboard_event_scan::$5
if((boolean~) keyboard_event_scan::$6) goto keyboard_event_scan::@4
to:keyboard_event_scan::@14
keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@3 keyboard_event_scan::@5
(byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::col ← ++ (byte) keyboard_event_scan::col
(boolean~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::col != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$13) goto keyboard_event_scan::@3
to:keyboard_event_scan::@18
keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@3
(boolean~) keyboard_event_scan::$7 ← (byte) keyboard_events_size != (byte/signed byte/word/signed word/dword/signed dword) 8
(boolean~) keyboard_event_scan::$8 ← ! (boolean~) keyboard_event_scan::$7
if((boolean~) keyboard_event_scan::$8) goto keyboard_event_scan::@5
to:keyboard_event_scan::@15
keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@14 keyboard_event_scan::@7
to:keyboard_event_scan::@4
keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@14
(byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(byte) keyboard_event_scan::event_type ← (byte~) keyboard_event_scan::$9
(boolean~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$11 ← ! (boolean~) keyboard_event_scan::$10
if((boolean~) keyboard_event_scan::$11) goto keyboard_event_scan::@6
to:keyboard_event_scan::@16
keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@17
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte) keyboard_event_scan::keycode
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
to:keyboard_event_scan::@7
keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15
(byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode | (byte/signed byte/word/signed word/dword/signed dword) 64
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte/word/dword~) keyboard_event_scan::$12
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
to:keyboard_event_scan::@7
keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@16 keyboard_event_scan::@6
to:keyboard_event_scan::@5
keyboard_event_scan::@17: scope:[keyboard_event_scan] from
to:keyboard_event_scan::@6
keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@4
*((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row) ← (byte) keyboard_event_scan::row_scan
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@2
(byte) keyboard_event_scan::row ← ++ (byte) keyboard_event_scan::row
(boolean~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$15) goto keyboard_event_scan::@1
to:keyboard_event_scan::@20
keyboard_event_scan::@19: scope:[keyboard_event_scan] from
to:keyboard_event_scan::@2
keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@8
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) keyboard_event_scan::$16 ← call keyboard_event_pressed (byte) KEY_LSHIFT
(boolean~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$18 ← ! (boolean~) keyboard_event_scan::$17
if((boolean~) keyboard_event_scan::$18) goto keyboard_event_scan::@9
to:keyboard_event_scan::@21
keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@20 keyboard_event_scan::@21
(byte~) keyboard_event_scan::$20 ← call keyboard_event_pressed (byte) KEY_RSHIFT
(boolean~) keyboard_event_scan::$21 ← (byte~) keyboard_event_scan::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$22 ← ! (boolean~) keyboard_event_scan::$21
if((boolean~) keyboard_event_scan::$22) goto keyboard_event_scan::@10
to:keyboard_event_scan::@22
keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@20
(byte~) keyboard_event_scan::$19 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_LSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$19
to:keyboard_event_scan::@9
keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@9
(byte~) keyboard_event_scan::$24 ← call keyboard_event_pressed (byte) KEY_CTRL
(boolean~) keyboard_event_scan::$25 ← (byte~) keyboard_event_scan::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$26 ← ! (boolean~) keyboard_event_scan::$25
if((boolean~) keyboard_event_scan::$26) goto keyboard_event_scan::@11
to:keyboard_event_scan::@23
keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@9
(byte~) keyboard_event_scan::$23 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_RSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$23
to:keyboard_event_scan::@10
keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@23
(byte~) keyboard_event_scan::$28 ← call keyboard_event_pressed (byte) KEY_COMMODORE
(boolean~) keyboard_event_scan::$29 ← (byte~) keyboard_event_scan::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$30 ← ! (boolean~) keyboard_event_scan::$29
if((boolean~) keyboard_event_scan::$30) goto keyboard_event_scan::@12
to:keyboard_event_scan::@24
keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@10
(byte~) keyboard_event_scan::$27 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_CTRL
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$27
to:keyboard_event_scan::@11
keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@24
to:keyboard_event_scan::@return
keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@11
(byte~) keyboard_event_scan::$31 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_COMMODORE
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$31
to:keyboard_event_scan::@12
keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@12
return
to:@return
@5: scope:[] from @4
to:@6
keyboard_event_pressed: scope:[keyboard_event_pressed] from
(byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_event_pressed::row_bits ← *((byte[8]) keyboard_scan_values + (byte~) keyboard_event_pressed::$0)
(byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode & (byte/signed byte/word/signed word/dword/signed dword) 7
(byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits & *((byte[8]) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1)
(byte) keyboard_event_pressed::return ← (byte~) keyboard_event_pressed::$2
to:keyboard_event_pressed::@return
keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed keyboard_event_pressed::@1
(byte) keyboard_event_pressed::return ← (byte) keyboard_event_pressed::return
return (byte) keyboard_event_pressed::return
to:@return
keyboard_event_pressed::@1: scope:[keyboard_event_pressed] from
to:keyboard_event_pressed::@return
@6: scope:[] from @5
to:@7
keyboard_event_get: scope:[keyboard_event_get] from
(boolean~) keyboard_event_get::$0 ← (byte) keyboard_events_size == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_get::$1 ← ! (boolean~) keyboard_event_get::$0
if((boolean~) keyboard_event_get::$1) goto keyboard_event_get::@1
to:keyboard_event_get::@3
keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@5
(byte) keyboard_events_size ← -- (byte) keyboard_events_size
(byte) keyboard_event_get::return ← *((byte[8]) keyboard_events + (byte) keyboard_events_size)
to:keyboard_event_get::@return
keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get
(byte) keyboard_event_get::return ← (byte/word/signed word/dword/signed dword) 255
to:keyboard_event_get::@return
keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get::@1 keyboard_event_get::@2 keyboard_event_get::@3
(byte) keyboard_event_get::return ← (byte) keyboard_event_get::return
return (byte) keyboard_event_get::return
to:@return
keyboard_event_get::@4: scope:[keyboard_event_get] from
to:keyboard_event_get::@2
keyboard_event_get::@2: scope:[keyboard_event_get] from keyboard_event_get::@4 keyboard_event_get::@6
to:keyboard_event_get::@return
keyboard_event_get::@5: scope:[keyboard_event_get] from
to:keyboard_event_get::@1
keyboard_event_get::@6: scope:[keyboard_event_get] from
to:keyboard_event_get::@2
@7: scope:[] from @6
to:@8
main: scope:[main] from
*((byte*) BORDERCOL) ← (byte) GREEN
to:main::@1
@ -962,9 +1416,9 @@ main::@6: scope:[main] from
main::@return: scope:[main] from main::@3
return
to:@return
@5: scope:[] from @4
@8: scope:[] from @7
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:@6
to:@9
menu: scope:[menu] from
to:menu::@1
menu::@1: scope:[menu] from menu menu::@6
@ -1019,8 +1473,8 @@ menu::@14: scope:[menu] from
to:menu::@6
menu::@15: scope:[menu] from
to:menu::@3
@6: scope:[] from @5
to:@7
@9: scope:[] from @8
to:@10
pressed: scope:[pressed] from
*((byte*) BGCOL) ← ++ *((byte*) BGCOL)
to:pressed::@1
@ -1050,13 +1504,16 @@ pressed::@8: scope:[pressed] from
to:pressed::@4
pressed::@9: scope:[pressed] from
to:pressed::@3
@7: scope:[] from @6
@10: scope:[] from @9
call main
to:@end
@end: scope:[] from @7
@end: scope:[] from @10
Removing unused procedure keyboard_init
Removing unused procedure keyboard_get_keycode
Removing unused procedure keyboard_event_scan
Removing unused procedure keyboard_event_get
Removing unused procedure keyboard_event_pressed
Eliminating unused variable (byte*) PROCPORT_DDR and assignment [0] (byte*) PROCPORT_DDR ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) PROCPORT_DDR_MEMORY_MASK and assignment [1] (byte) PROCPORT_DDR_MEMORY_MASK ← (byte/signed byte/word/signed word/dword/signed dword) 7
Eliminating unused variable (byte*) PROCPORT and assignment [2] (byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
@ -1131,6 +1588,13 @@ Eliminating unused variable (byte) KEY_CTRL and assignment [123] (byte) KEY_CTRL
Eliminating unused variable (byte) KEY_COMMODORE and assignment [126] (byte) KEY_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 61
Eliminating unused variable (byte) KEY_RUNSTOP and assignment [128] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
Eliminating unused variable (byte[]) keyboard_char_keycodes and assignment [129] (byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
Eliminating unused variable (byte[8]) keyboard_events and assignment [147] (byte[8]) keyboard_events ← { fill( 8, 0) }
Eliminating unused variable (byte) keyboard_events_size and assignment [148] (byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) keyboard_modifiers and assignment [149] (byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) KEY_MODIFIER_CTRL and assignment [152] (byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
Eliminating unused variable (byte) KEY_MODIFIER_COMMODORE and assignment [153] (byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
Eliminating unused variable (byte) KEY_MODIFIER_SHIFT and assignment [155] (byte) KEY_MODIFIER_SHIFT ← (byte~) $0
Eliminating unused variable (byte[8]) keyboard_scan_values and assignment [156] (byte[8]) keyboard_scan_values ← { fill( 8, 0) }
Eliminating unused variable - keeping the call (void~) main::$0
Eliminating unused variable - keeping the call (void~) menu::$3
Eliminating unused variable (byte) KEY_3 and assignment [6] (byte) KEY_3 ← (byte/signed byte/word/signed word/dword/signed dword) 8
@ -1179,12 +1643,18 @@ Eliminating unused variable (byte) KEY_1 and assignment [51] (byte) KEY_1 ← (b
Eliminating unused variable (byte) KEY_ARROW_LEFT and assignment [52] (byte) KEY_ARROW_LEFT ← (byte/signed byte/word/signed word/dword/signed dword) 57
Eliminating unused variable (byte) KEY_2 and assignment [53] (byte) KEY_2 ← (byte/signed byte/word/signed word/dword/signed dword) 59
Eliminating unused variable (byte) KEY_Q and assignment [55] (byte) KEY_Q ← (byte/signed byte/word/signed word/dword/signed dword) 62
Eliminating unused variable (byte~) $0 and assignment [75] (byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
Eliminating unused variable (byte) KEY_MODIFIER_LSHIFT and assignment [27] (byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
Eliminating unused variable (byte) KEY_MODIFIER_RSHIFT and assignment [28] (byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
Removing empty block @1
Removing empty block keyboard_matrix_read::@1
Removing empty block @2
Removing empty block keyboard_key_pressed::@1
Removing empty block @3
Removing empty block @4
Removing empty block @5
Removing empty block @6
Removing empty block @7
Removing empty block main::@4
Removing empty block main::@3
Removing empty block main::@5
@ -1196,7 +1666,7 @@ Removing empty block menu::@10
Removing empty block menu::@12
Removing empty block menu::@14
Removing empty block menu::@15
Removing empty block @6
Removing empty block @9
Removing empty block pressed::@5
Removing empty block pressed::@3
Removing empty block pressed::@6
@ -1232,8 +1702,8 @@ CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
(byte) KEY_I#0 ← (byte/signed byte/word/signed word/dword/signed dword) 33
(byte) KEY_SPACE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 60
(byte[8]) keyboard_matrix_row_bitmask#0 ← { (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[]) keyboard_matrix_col_bitmask#0 ← { (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 }
to:@5
(byte[8]) keyboard_matrix_col_bitmask#0 ← { (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 }
to:@8
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
(byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::rowid#0 )
*((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1)
@ -1260,7 +1730,7 @@ keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_presse
(byte) keyboard_key_pressed::colidx#1 ← phi( keyboard_key_pressed/(byte) keyboard_key_pressed::colidx#0 )
(byte) keyboard_matrix_read::return#4 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::return#2 )
(byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#4
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#1)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#1)
(byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
@ -1268,8 +1738,8 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p
(byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#6
return
to:@return
main: scope:[main] from @7
(byte*) SCREEN#12 ← phi( @7/(byte*) SCREEN#14 )
main: scope:[main] from @10
(byte*) SCREEN#12 ← phi( @10/(byte*) SCREEN#14 )
*((byte*) BORDERCOL#0) ← (byte) GREEN#0
to:main::@1
main::@1: scope:[main] from main main::@7
@ -1286,9 +1756,9 @@ main::@7: scope:[main] from main::@2
main::@return: scope:[main] from main::@1
return
to:@return
@5: scope:[] from @begin
@8: scope:[] from @begin
(byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:@7
to:@10
menu: scope:[menu] from main::@2
(byte*) SCREEN#9 ← phi( main::@2/(byte*) SCREEN#10 )
to:menu::@1
@ -1381,17 +1851,17 @@ pressed::@4: scope:[pressed] from pressed::@10
pressed::@return: scope:[pressed] from pressed::@1 pressed::@10
return
to:@return
@7: scope:[] from @5
(byte*) SCREEN#14 ← phi( @5/(byte*) SCREEN#0 )
@10: scope:[] from @8
(byte*) SCREEN#14 ← phi( @8/(byte*) SCREEN#0 )
call main param-assignment
to:@8
@8: scope:[] from @7
to:@11
@11: scope:[] from @10
to:@end
@end: scope:[] from @8
@end: scope:[] from @11
SYMBOL TABLE SSA
(label) @5
(label) @7
(label) @10
(label) @11
(label) @8
(label) @begin
(label) @end
@ -1461,8 +1931,8 @@ SYMBOL TABLE SSA
(byte) keyboard_key_pressed::return#9
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0
(byte[]) keyboard_matrix_col_bitmask
(byte[]) keyboard_matrix_col_bitmask#0
(byte[8]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask#0
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -1520,7 +1990,7 @@ SYMBOL TABLE SSA
OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) menu::@18
Culled Empty Block (label) pressed::@4
Culled Empty Block (label) @8
Culled Empty Block (label) @11
Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) menu::$2 ← (byte~) menu::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) menu::$1 ← (byte~) menu::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not (boolean~) menu::$6 ← (byte~) menu::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) menu::$5 ← (byte~) menu::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
@ -1603,7 +2073,7 @@ Constant (const byte) KEY_C#0 = 20
Constant (const byte) KEY_I#0 = 33
Constant (const byte) KEY_SPACE#0 = 60
Constant (const byte[8]) keyboard_matrix_row_bitmask#0 = { 254, 253, 251, 247, 239, 223, 191, 127 }
Constant (const byte[]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Constant (const byte[8]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Constant (const byte*) SCREEN#0 = ((byte*))1024
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) keyboard_key_pressed::key#0 = KEY_C#0
@ -1612,7 +2082,7 @@ Constant (const byte) keyboard_key_pressed::key#2 = KEY_E#0
Constant (const byte) keyboard_key_pressed::key#3 = KEY_SPACE#0
Succesful SSA optimization Pass2ConstantIdentification
Culled Empty Block (label) main::@7
Culled Empty Block (label) @5
Culled Empty Block (label) @8
Succesful SSA optimization Pass2CullEmptyBlocks
Not aliassing across scopes: keyboard_matrix_read::rowid#0 keyboard_key_pressed::rowidx#0
Not aliassing across scopes: keyboard_matrix_read::return#2 keyboard_matrix_read::return#0
@ -1646,10 +2116,10 @@ Constant inlined keyboard_key_pressed::key#1 = (const byte) KEY_I#0
Constant inlined keyboard_key_pressed::key#2 = (const byte) KEY_E#0
Constant inlined keyboard_key_pressed::key#3 = (const byte) KEY_SPACE#0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @7 @end main main::@1 main::@return main::@2 menu menu::@1 menu::@return menu::@2 menu::@16 menu::@9 menu::@4 menu::@17 menu::@11 menu::@5 menu::@19 menu::@13 menu::@6 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return pressed pressed::@1 pressed::@return pressed::@2 pressed::@10
Block Sequence Planned @begin @7 @end main main::@1 main::@return main::@2 menu menu::@1 menu::@return menu::@2 menu::@16 menu::@9 menu::@4 menu::@17 menu::@11 menu::@5 menu::@19 menu::@13 menu::@6 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return pressed pressed::@1 pressed::@return pressed::@2 pressed::@10
Block Sequence Planned @begin @10 @end main main::@1 main::@return main::@2 menu menu::@1 menu::@return menu::@2 menu::@16 menu::@9 menu::@4 menu::@17 menu::@11 menu::@5 menu::@19 menu::@13 menu::@6 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return pressed pressed::@1 pressed::@return pressed::@2 pressed::@10
Block Sequence Planned @begin @10 @end main main::@1 main::@return main::@2 menu menu::@1 menu::@return menu::@2 menu::@16 menu::@9 menu::@4 menu::@17 menu::@11 menu::@5 menu::@19 menu::@13 menu::@6 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return pressed pressed::@1 pressed::@return pressed::@2 pressed::@10
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @7
Adding NOP phi() at start of @10
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of menu
@ -1674,9 +2144,9 @@ Propagating live ranges...
Propagating live ranges...
Created 1 initial phi equivalence classes
Coalesced down to 1 phi equivalence classes
Block Sequence Planned @begin @7 @end main main::@1 main::@return main::@2 menu menu::@1 menu::@return menu::@2 menu::@16 menu::@9 menu::@4 menu::@17 menu::@11 menu::@5 menu::@19 menu::@13 menu::@6 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return pressed pressed::@1 pressed::@return pressed::@2 pressed::@10
Block Sequence Planned @begin @10 @end main main::@1 main::@return main::@2 menu menu::@1 menu::@return menu::@2 menu::@16 menu::@9 menu::@4 menu::@17 menu::@11 menu::@5 menu::@19 menu::@13 menu::@6 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return pressed pressed::@1 pressed::@return pressed::@2 pressed::@10
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @7
Adding NOP phi() at start of @10
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of menu
@ -1696,14 +2166,14 @@ Propagating live ranges...
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi() [ ] ( )
to:@7
@7: scope:[] from @begin
to:@10
@10: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @7
@end: scope:[] from @10
[3] phi() [ ] ( )
main: scope:[main] from @7
main: scope:[main] from @10
[4] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@2
@ -1777,7 +2247,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@2 menu::@4 menu:
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[40] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )
[41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[42] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )
@ -1810,35 +2280,35 @@ pressed::@10: scope:[pressed] from pressed::@2
DOMINATORS
@begin dominated by @begin
@7 dominated by @begin @7
@end dominated by @end @begin @7
main dominated by main @begin @7
main::@1 dominated by main main::@1 @begin @7
main::@return dominated by main::@return main main::@1 @begin @7
main::@2 dominated by main main::@1 main::@2 @begin @7
menu dominated by main main::@1 main::@2 @begin menu @7
menu::@1 dominated by main main::@1 main::@2 @begin menu::@1 menu @7
menu::@return dominated by main main::@1 main::@2 @begin menu::@1 menu::@return menu @7
menu::@2 dominated by main main::@1 main::@2 @begin menu::@1 menu::@2 menu @7
menu::@16 dominated by main main::@1 main::@2 @begin menu::@1 menu::@2 menu @7 menu::@16
menu::@9 dominated by main main::@1 main::@2 @begin menu::@1 menu::@2 menu menu::@9 @7 menu::@16
menu::@4 dominated by main main::@1 main::@2 @begin menu::@4 menu::@1 menu::@2 menu @7 menu::@16
menu::@17 dominated by main main::@1 main::@2 @begin menu::@4 menu::@1 menu::@2 menu @7 menu::@17 menu::@16
menu::@11 dominated by main main::@1 main::@2 @begin menu::@4 menu::@1 menu::@2 menu @7 menu::@11 menu::@17 menu::@16
menu::@5 dominated by main main::@1 main::@2 menu::@5 @begin menu::@4 menu::@1 menu::@2 menu @7 menu::@17 menu::@16
menu::@19 dominated by main main::@1 main::@2 menu::@5 @begin menu::@4 menu::@1 menu::@2 menu menu::@19 @7 menu::@17 menu::@16
menu::@13 dominated by main main::@1 main::@2 menu::@5 @begin menu::@4 menu::@1 menu::@2 menu menu::@19 @7 menu::@13 menu::@17 menu::@16
menu::@6 dominated by main main::@1 main::@2 menu::@5 @begin menu::@6 menu::@4 menu::@1 menu::@2 menu menu::@19 @7 menu::@17 menu::@16
keyboard_key_pressed dominated by main main::@1 main::@2 @begin menu::@1 menu::@2 menu keyboard_key_pressed @7
keyboard_key_pressed::@2 dominated by main main::@1 main::@2 keyboard_key_pressed::@2 @begin menu::@1 menu::@2 menu keyboard_key_pressed @7
keyboard_key_pressed::@return dominated by main keyboard_key_pressed::@return main::@1 main::@2 keyboard_key_pressed::@2 @begin menu::@1 menu::@2 menu keyboard_key_pressed @7
keyboard_matrix_read dominated by keyboard_matrix_read main main::@1 main::@2 @begin menu::@1 menu::@2 menu keyboard_key_pressed @7
keyboard_matrix_read::@return dominated by keyboard_matrix_read main main::@1 main::@2 @begin menu::@1 menu::@2 menu keyboard_matrix_read::@return keyboard_key_pressed @7
pressed dominated by main main::@1 main::@2 @begin pressed menu::@1 menu::@2 menu menu::@9 @7 menu::@16
pressed::@1 dominated by main main::@1 main::@2 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 @7 menu::@16
pressed::@return dominated by main main::@1 main::@2 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 pressed::@return @7 menu::@16
pressed::@2 dominated by main main::@1 pressed::@2 main::@2 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 @7 menu::@16
pressed::@10 dominated by pressed::@10 main main::@1 pressed::@2 main::@2 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 @7 menu::@16
@10 dominated by @10 @begin
@end dominated by @end @10 @begin
main dominated by main @10 @begin
main::@1 dominated by main main::@1 @10 @begin
main::@return dominated by main::@return main main::@1 @10 @begin
main::@2 dominated by main main::@1 main::@2 @10 @begin
menu dominated by main main::@1 main::@2 @10 @begin menu
menu::@1 dominated by main main::@1 main::@2 @10 @begin menu::@1 menu
menu::@return dominated by main main::@1 main::@2 @10 @begin menu::@1 menu::@return menu
menu::@2 dominated by main main::@1 main::@2 @10 @begin menu::@1 menu::@2 menu
menu::@16 dominated by main main::@1 main::@2 @10 @begin menu::@1 menu::@2 menu menu::@16
menu::@9 dominated by main main::@1 main::@2 @10 @begin menu::@1 menu::@2 menu menu::@9 menu::@16
menu::@4 dominated by main main::@1 main::@2 @10 @begin menu::@4 menu::@1 menu::@2 menu menu::@16
menu::@17 dominated by main main::@1 main::@2 @10 @begin menu::@4 menu::@1 menu::@2 menu menu::@17 menu::@16
menu::@11 dominated by main main::@1 main::@2 @10 @begin menu::@4 menu::@1 menu::@2 menu menu::@11 menu::@17 menu::@16
menu::@5 dominated by main main::@1 main::@2 @10 menu::@5 @begin menu::@4 menu::@1 menu::@2 menu menu::@17 menu::@16
menu::@19 dominated by main main::@1 main::@2 @10 menu::@5 @begin menu::@4 menu::@1 menu::@2 menu menu::@19 menu::@17 menu::@16
menu::@13 dominated by main main::@1 main::@2 @10 menu::@5 @begin menu::@4 menu::@1 menu::@2 menu menu::@19 menu::@13 menu::@17 menu::@16
menu::@6 dominated by main main::@1 main::@2 @10 menu::@5 @begin menu::@6 menu::@4 menu::@1 menu::@2 menu menu::@19 menu::@17 menu::@16
keyboard_key_pressed dominated by main main::@1 main::@2 @10 @begin menu::@1 menu::@2 menu keyboard_key_pressed
keyboard_key_pressed::@2 dominated by main main::@1 main::@2 keyboard_key_pressed::@2 @10 @begin menu::@1 menu::@2 menu keyboard_key_pressed
keyboard_key_pressed::@return dominated by main keyboard_key_pressed::@return main::@1 main::@2 keyboard_key_pressed::@2 @10 @begin menu::@1 menu::@2 menu keyboard_key_pressed
keyboard_matrix_read dominated by keyboard_matrix_read main main::@1 main::@2 @10 @begin menu::@1 menu::@2 menu keyboard_key_pressed
keyboard_matrix_read::@return dominated by keyboard_matrix_read main main::@1 main::@2 @10 @begin menu::@1 menu::@2 menu keyboard_matrix_read::@return keyboard_key_pressed
pressed dominated by main main::@1 main::@2 @10 @begin pressed menu::@1 menu::@2 menu menu::@9 menu::@16
pressed::@1 dominated by main main::@1 main::@2 @10 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 menu::@16
pressed::@return dominated by main main::@1 main::@2 @10 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 pressed::@return menu::@16
pressed::@2 dominated by main main::@1 pressed::@2 main::@2 @10 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 menu::@16
pressed::@10 dominated by pressed::@10 main main::@1 pressed::@2 main::@2 @10 pressed::@1 @begin pressed menu::@1 menu::@2 menu menu::@9 menu::@16
NATURAL LOOPS
Found back edge: Loop head: main::@1 tails: main::@2 blocks: null
@ -1893,7 +2363,7 @@ VARIABLE REGISTER WEIGHTS
(byte) keyboard_key_pressed::return#4 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 4.0
(byte[]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte) keyboard_matrix_read::return
(byte) keyboard_matrix_read::return#0 1.3333333333333333
@ -1980,15 +2450,15 @@ INITIAL ASM
.label SCREEN = $400
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @7 [phi:@begin->@7]
b7_from_bbegin:
jmp b7
//SEG4 @7
b7:
//SEG3 [1] phi from @begin to @10 [phi:@begin->@10]
b10_from_bbegin:
jmp b10
//SEG4 @10
b10:
//SEG5 [2] call main param-assignment [ ] ( )
jsr main
//SEG6 [3] phi from @7 to @end [phi:@7->@end]
bend_from_b7:
//SEG6 [3] phi from @10 to @end [phi:@10->@end]
bend_from_b10:
jmp bend
//SEG7 @end
bend:
@ -2172,7 +2642,7 @@ keyboard_key_pressed: {
//SEG68 [40] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ) -- vbuz1=vbuz2
lda keyboard_matrix_read.return_2
sta _2
//SEG69 [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3
//SEG69 [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3
lda _2
ldy colidx
and keyboard_matrix_col_bitmask,y
@ -2254,7 +2724,7 @@ Statement [35] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pre
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ keyboard_key_pressed::key#4 ]
Statement [36] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#4 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ keyboard_key_pressed::colidx#0 ]
Statement [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) always clobbers reg byte a
Statement [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) always clobbers reg byte a
Statement [43] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:8::keyboard_key_pressed:13::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::keyboard_key_pressed:20::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::keyboard_key_pressed:27::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a
Statement [44] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::keyboard_key_pressed:20::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::keyboard_key_pressed:27::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a
Statement [4] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -2262,7 +2732,7 @@ Statement [24] *((const byte*) BORDERCOL#0) ← (const byte) RED#0 [ ] ( main:2:
Statement [31] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 [ ] ( main:2::menu:8 [ ] ) always clobbers reg byte a
Statement [35] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#4 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::key#4 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a
Statement [36] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#4 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a
Statement [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) always clobbers reg byte a
Statement [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) always clobbers reg byte a
Statement [43] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:8::keyboard_key_pressed:13::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::keyboard_key_pressed:20::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::keyboard_key_pressed:27::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a
Statement [44] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::keyboard_key_pressed:20::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::keyboard_key_pressed:27::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50::keyboard_matrix_read:38 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ keyboard_key_pressed::key#4 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
@ -2327,15 +2797,15 @@ ASSEMBLER BEFORE OPTIMIZATION
.label SCREEN = $400
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @7 [phi:@begin->@7]
b7_from_bbegin:
jmp b7
//SEG4 @7
b7:
//SEG3 [1] phi from @begin to @10 [phi:@begin->@10]
b10_from_bbegin:
jmp b10
//SEG4 @10
b10:
//SEG5 [2] call main param-assignment [ ] ( )
jsr main
//SEG6 [3] phi from @7 to @end [phi:@7->@end]
bend_from_b7:
//SEG6 [3] phi from @10 to @end [phi:@10->@end]
bend_from_b10:
jmp bend
//SEG7 @end
bend:
@ -2494,7 +2964,7 @@ keyboard_key_pressed: {
b2:
//SEG68 [40] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
// (byte~) keyboard_key_pressed::$2 = (byte) keyboard_matrix_read::return#2 // register copy reg byte a
//SEG69 [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy
//SEG69 [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy
and keyboard_matrix_col_bitmask,y
jmp breturn
//SEG70 keyboard_key_pressed::@return
@ -2557,7 +3027,7 @@ pressed: {
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b7
Removing instruction jmp b10
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
@ -2587,8 +3057,8 @@ Replacing label b4_from_b16 with b4
Replacing label b5_from_b17 with b5
Replacing label b2_from_b1 with b2
Removing instruction bbegin:
Removing instruction b7_from_bbegin:
Removing instruction bend_from_b7:
Removing instruction b10_from_bbegin:
Removing instruction bend_from_b10:
Removing instruction b2_from_b1:
Removing instruction menu_from_b2:
Removing instruction b2_from_b1:
@ -2601,7 +3071,7 @@ Removing instruction keyboard_key_pressed_from_b5:
Removing instruction b2_from_b1:
Removing instruction keyboard_key_pressed_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b7:
Removing instruction b10:
Removing instruction bend:
Removing instruction breturn:
Removing instruction b16:
@ -2630,7 +3100,7 @@ Removing instruction b1:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @7
(label) @10
(label) @begin
(label) @end
(byte*) BGCOL
@ -2671,8 +3141,8 @@ FINAL SYMBOL TABLE
(byte) keyboard_key_pressed::return#4 reg byte a 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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
@ -2748,11 +3218,11 @@ Score: 3754
.const KEY_SPACE = $3c
.label SCREEN = $400
//SEG2 @begin
//SEG3 [1] phi from @begin to @7 [phi:@begin->@7]
//SEG4 @7
//SEG3 [1] phi from @begin to @10 [phi:@begin->@10]
//SEG4 @10
//SEG5 [2] call main param-assignment [ ] ( )
jsr main
//SEG6 [3] phi from @7 to @end [phi:@7->@end]
//SEG6 [3] phi from @10 to @end [phi:@10->@end]
//SEG7 @end
//SEG8 main
main: {
@ -2873,7 +3343,7 @@ keyboard_key_pressed: {
//SEG67 keyboard_key_pressed::@2
//SEG68 [40] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
// (byte~) keyboard_key_pressed::$2 = (byte) keyboard_matrix_read::return#2 // register copy reg byte a
//SEG69 [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy
//SEG69 [41] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy
and keyboard_matrix_col_bitmask,y
//SEG70 keyboard_key_pressed::@return
//SEG71 [42] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::return#0 ] )

View File

@ -1,4 +1,4 @@
(label) @7
(label) @10
(label) @begin
(label) @end
(byte*) BGCOL
@ -39,8 +39,8 @@
(byte) keyboard_key_pressed::return#4 reg byte a 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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

View File

@ -1,13 +1,13 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@5
@5: scope:[] from @begin
to:@8
@8: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @5
@end: scope:[] from @8
[3] phi() [ ] ( )
main: scope:[main] from @5
main: scope:[main] from @8
[4] phi() [ ] ( main:2 [ ] )
[5] call keyboard_init param-assignment [ ] ( main:2 [ ] )
to:main::@1
@ -42,7 +42,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@9
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[19] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::$2 ] )
[20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )
[20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[21] return [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )

View File

@ -121,7 +121,7 @@ const byte[] keyboard_char_keycodes = {
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 };
byte[8] keyboard_matrix_col_bitmask = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 };
// Initialize keyboard reading by setting CIA#$ Data Direction Registers
void keyboard_init() {
@ -141,7 +141,7 @@ byte keyboard_matrix_read(byte rowid) {
return row_pressed_bits;
}
// Determines whether a specific key is currently pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// 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
@ -158,6 +158,97 @@ byte keyboard_key_pressed(byte key) {
byte keyboard_get_keycode(byte ch) {
return keyboard_char_keycodes[ch];
}
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
byte[8] keyboard_events;
// Keyboard event buffer size. The number of events currently in the event buffer
byte keyboard_events_size = 0;
// Current keyboard modifiers (left shift, right shift, ctrl, commodore)
byte keyboard_modifiers = 0;
// Left shift is pressed
const byte KEY_MODIFIER_LSHIFT = 1;
// Right shift is pressed
const byte KEY_MODIFIER_RSHIFT = 2;
// CTRL is pressed
const byte KEY_MODIFIER_CTRL = 4;
// Commodore is pressed
const byte KEY_MODIFIER_COMMODORE = 8;
// Any shift is pressed
const byte KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT;
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
byte[8] keyboard_scan_values;
// Scans the entire matrix to determine which keys have been pressed/depressed.
// Generates keyboard events into the event buffer. Events can be read using keyboard_event_get().
// Handles debounce and only generates events when the status of a key changes.
// Also stores current status of modifiers in keyboard_modifiers.
void keyboard_event_scan() {
byte keycode = 0;
for(byte row : 0..7) {
byte row_scan = keyboard_matrix_read(row);
if(row_scan!=keyboard_scan_values[row]) {
// Something has changed on the keyboard row - check each column
for(byte col : 0..7){
// XOR of row scan with the last seen row scan AND'ed with the col bitmask will be non-0 if the key status is changed
if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) {
// Key(row, col) status has changed. We have an event.
// Only process event if there is still room in the buffer
if(keyboard_events_size!=8) {
// AND of row scan and bit mask determines if key is pressed or released
byte event_type = row_scan&keyboard_matrix_col_bitmask[col];
if(event_type==0) {
// Key released
keyboard_events[keyboard_events_size++] = keycode|$40;
} else {
// Key pressed
keyboard_events[keyboard_events_size++] = keycode;
}
}
}
keycode++;
}
// Store the current keyboard status for the row to debounce
keyboard_scan_values[row] = row_scan;
} else {
// Update current keycode
keycode = keycode + 8;
}
}
// Update the keyboard modifiers
keyboard_modifiers = 0;
if(keyboard_event_pressed(KEY_LSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_LSHIFT;
}
if(keyboard_event_pressed(KEY_RSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_RSHIFT;
}
if(keyboard_event_pressed(KEY_CTRL)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_CTRL;
}
if(keyboard_event_pressed(KEY_COMMODORE)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_COMMODORE;
}
}
// Determine if a specific key is currently pressed based on the last keyboard_event_scan()
// Returns 0 is not pressed and non-0 if pressed
byte keyboard_event_pressed(byte keycode) {
byte row_bits = keyboard_scan_values[keycode>>3];
return row_bits & keyboard_matrix_col_bitmask[keycode&7];
}
// Get the next event from the keyboard event buffer.
// Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process.
// The buffer is filled by keyboard_scan()
byte keyboard_event_get() {
if(keyboard_events_size==0) {
return $ff;
} else {
return keyboard_events[--keyboard_events_size];
}
}
Importing c64.kc
PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc
// Commodore 64 Registers and Constants
@ -254,6 +345,10 @@ const byte LIGHT_GREEN = $d;
const byte LIGHT_BLUE = $e;
const byte LIGHT_GREY = $f;
Adding pre/post-modifier (byte) keyboard_events_size ← ++ (byte) keyboard_events_size
Adding pre/post-modifier (byte) keyboard_events_size ← ++ (byte) keyboard_events_size
Adding pre/post-modifier (byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
Adding pre/post-modifier (byte) keyboard_events_size ← -- (byte) keyboard_events_size
STATEMENTS
(byte*) PROCPORT_DDR ← (byte/signed byte/word/signed word/dword/signed dword) 0
@ -387,7 +482,7 @@ STATEMENTS
(byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
(byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) 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 }
(byte[]) 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[8]) 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 }
proc (void()) keyboard_init()
*((byte*) CIA1_PORT_A_DDR) ← (byte/word/signed word/dword/signed dword) 255
*((byte*) CIA1_PORT_B_DDR) ← (byte/signed byte/word/signed word/dword/signed dword) 0
@ -410,7 +505,7 @@ proc (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_key_pressed::rowidx ← (byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2 ← call keyboard_matrix_read (byte) keyboard_key_pressed::rowidx
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte) keyboard_key_pressed::return ← (byte~) keyboard_key_pressed::$3
goto keyboard_key_pressed::@return
keyboard_key_pressed::@return:
@ -424,6 +519,122 @@ keyboard_get_keycode::@return:
(byte) keyboard_get_keycode::return ← (byte) keyboard_get_keycode::return
return (byte) keyboard_get_keycode::return
endproc // keyboard_get_keycode()
(byte[8]) keyboard_events ← { fill( 8, 0) }
(byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
(byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT ← (byte~) $0
(byte[8]) keyboard_scan_values ← { fill( 8, 0) }
proc (void()) keyboard_event_scan()
(byte) keyboard_event_scan::keycode ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_event_scan::row ← (byte/signed byte/word/signed word/dword/signed dword) 0
keyboard_event_scan::@1:
(byte~) keyboard_event_scan::$0 ← call keyboard_matrix_read (byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan ← (byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan != *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(boolean~) keyboard_event_scan::$2 ← ! (boolean~) keyboard_event_scan::$1
if((boolean~) keyboard_event_scan::$2) goto keyboard_event_scan::@2
(byte) keyboard_event_scan::col ← (byte/signed byte/word/signed word/dword/signed dword) 0
keyboard_event_scan::@3:
(byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan ^ *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(boolean~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$6 ← ! (boolean~) keyboard_event_scan::$5
if((boolean~) keyboard_event_scan::$6) goto keyboard_event_scan::@4
(boolean~) keyboard_event_scan::$7 ← (byte) keyboard_events_size != (byte/signed byte/word/signed word/dword/signed dword) 8
(boolean~) keyboard_event_scan::$8 ← ! (boolean~) keyboard_event_scan::$7
if((boolean~) keyboard_event_scan::$8) goto keyboard_event_scan::@5
(byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(byte) keyboard_event_scan::event_type ← (byte~) keyboard_event_scan::$9
(boolean~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$11 ← ! (boolean~) keyboard_event_scan::$10
if((boolean~) keyboard_event_scan::$11) goto keyboard_event_scan::@6
(byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode | (byte/signed byte/word/signed word/dword/signed dword) 64
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte/word/dword~) keyboard_event_scan::$12
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
goto keyboard_event_scan::@7
keyboard_event_scan::@6:
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte) keyboard_event_scan::keycode
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
keyboard_event_scan::@7:
keyboard_event_scan::@5:
keyboard_event_scan::@4:
(byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::col ← ++ (byte) keyboard_event_scan::col
(boolean~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::col != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$13) goto keyboard_event_scan::@3
*((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row) ← (byte) keyboard_event_scan::row_scan
goto keyboard_event_scan::@8
keyboard_event_scan::@2:
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) keyboard_event_scan::keycode ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
keyboard_event_scan::@8:
(byte) keyboard_event_scan::row ← ++ (byte) keyboard_event_scan::row
(boolean~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$15) goto keyboard_event_scan::@1
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) keyboard_event_scan::$16 ← call keyboard_event_pressed (byte) KEY_LSHIFT
(boolean~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$18 ← ! (boolean~) keyboard_event_scan::$17
if((boolean~) keyboard_event_scan::$18) goto keyboard_event_scan::@9
(byte~) keyboard_event_scan::$19 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_LSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$19
keyboard_event_scan::@9:
(byte~) keyboard_event_scan::$20 ← call keyboard_event_pressed (byte) KEY_RSHIFT
(boolean~) keyboard_event_scan::$21 ← (byte~) keyboard_event_scan::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$22 ← ! (boolean~) keyboard_event_scan::$21
if((boolean~) keyboard_event_scan::$22) goto keyboard_event_scan::@10
(byte~) keyboard_event_scan::$23 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_RSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$23
keyboard_event_scan::@10:
(byte~) keyboard_event_scan::$24 ← call keyboard_event_pressed (byte) KEY_CTRL
(boolean~) keyboard_event_scan::$25 ← (byte~) keyboard_event_scan::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$26 ← ! (boolean~) keyboard_event_scan::$25
if((boolean~) keyboard_event_scan::$26) goto keyboard_event_scan::@11
(byte~) keyboard_event_scan::$27 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_CTRL
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$27
keyboard_event_scan::@11:
(byte~) keyboard_event_scan::$28 ← call keyboard_event_pressed (byte) KEY_COMMODORE
(boolean~) keyboard_event_scan::$29 ← (byte~) keyboard_event_scan::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$30 ← ! (boolean~) keyboard_event_scan::$29
if((boolean~) keyboard_event_scan::$30) goto keyboard_event_scan::@12
(byte~) keyboard_event_scan::$31 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_COMMODORE
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$31
keyboard_event_scan::@12:
keyboard_event_scan::@return:
return
endproc // keyboard_event_scan()
proc (byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_event_pressed::row_bits ← *((byte[8]) keyboard_scan_values + (byte~) keyboard_event_pressed::$0)
(byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode & (byte/signed byte/word/signed word/dword/signed dword) 7
(byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits & *((byte[8]) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1)
(byte) keyboard_event_pressed::return ← (byte~) keyboard_event_pressed::$2
goto keyboard_event_pressed::@return
keyboard_event_pressed::@return:
(byte) keyboard_event_pressed::return ← (byte) keyboard_event_pressed::return
return (byte) keyboard_event_pressed::return
endproc // keyboard_event_pressed()
proc (byte()) keyboard_event_get()
(boolean~) keyboard_event_get::$0 ← (byte) keyboard_events_size == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_get::$1 ← ! (boolean~) keyboard_event_get::$0
if((boolean~) keyboard_event_get::$1) goto keyboard_event_get::@1
(byte) keyboard_event_get::return ← (byte/word/signed word/dword/signed dword) 255
goto keyboard_event_get::@return
goto keyboard_event_get::@2
keyboard_event_get::@1:
(byte) keyboard_events_size ← -- (byte) keyboard_events_size
(byte) keyboard_event_get::return ← *((byte[8]) keyboard_events + (byte) keyboard_events_size)
goto keyboard_event_get::@return
keyboard_event_get::@2:
keyboard_event_get::@return:
(byte) keyboard_event_get::return ← (byte) keyboard_event_get::return
return (byte) keyboard_event_get::return
endproc // keyboard_event_get()
proc (void()) main()
(void~) main::$0 ← call keyboard_init
main::@1:
@ -450,6 +661,7 @@ endproc // main()
call main
SYMBOLS
(byte~) $0
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
@ -519,6 +731,11 @@ SYMBOLS
(byte) KEY_LSHIFT
(byte) KEY_M
(byte) KEY_MINUS
(byte) KEY_MODIFIER_COMMODORE
(byte) KEY_MODIFIER_CTRL
(byte) KEY_MODIFIER_LSHIFT
(byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT
(byte) KEY_N
(byte) KEY_O
(byte) KEY_P
@ -580,6 +797,74 @@ SYMBOLS
(byte) WHITE
(byte) YELLOW
(byte[]) keyboard_char_keycodes
(byte()) keyboard_event_get()
(boolean~) keyboard_event_get::$0
(boolean~) keyboard_event_get::$1
(label) keyboard_event_get::@1
(label) keyboard_event_get::@2
(label) keyboard_event_get::@return
(byte) keyboard_event_get::return
(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0
(byte~) keyboard_event_pressed::$1
(byte~) keyboard_event_pressed::$2
(label) keyboard_event_pressed::@return
(byte) keyboard_event_pressed::keycode
(byte) keyboard_event_pressed::return
(byte) keyboard_event_pressed::row_bits
(void()) keyboard_event_scan()
(byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1
(boolean~) keyboard_event_scan::$10
(boolean~) keyboard_event_scan::$11
(byte/word/dword~) keyboard_event_scan::$12
(boolean~) keyboard_event_scan::$13
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
(boolean~) keyboard_event_scan::$15
(byte~) keyboard_event_scan::$16
(boolean~) keyboard_event_scan::$17
(boolean~) keyboard_event_scan::$18
(byte~) keyboard_event_scan::$19
(boolean~) keyboard_event_scan::$2
(byte~) keyboard_event_scan::$20
(boolean~) keyboard_event_scan::$21
(boolean~) keyboard_event_scan::$22
(byte~) keyboard_event_scan::$23
(byte~) keyboard_event_scan::$24
(boolean~) keyboard_event_scan::$25
(boolean~) keyboard_event_scan::$26
(byte~) keyboard_event_scan::$27
(byte~) keyboard_event_scan::$28
(boolean~) keyboard_event_scan::$29
(byte~) keyboard_event_scan::$3
(boolean~) keyboard_event_scan::$30
(byte~) keyboard_event_scan::$31
(byte~) keyboard_event_scan::$4
(boolean~) keyboard_event_scan::$5
(boolean~) keyboard_event_scan::$6
(boolean~) keyboard_event_scan::$7
(boolean~) keyboard_event_scan::$8
(byte~) keyboard_event_scan::$9
(label) keyboard_event_scan::@1
(label) keyboard_event_scan::@10
(label) keyboard_event_scan::@11
(label) keyboard_event_scan::@12
(label) keyboard_event_scan::@2
(label) keyboard_event_scan::@3
(label) keyboard_event_scan::@4
(label) keyboard_event_scan::@5
(label) keyboard_event_scan::@6
(label) keyboard_event_scan::@7
(label) keyboard_event_scan::@8
(label) keyboard_event_scan::@9
(label) keyboard_event_scan::@return
(byte) keyboard_event_scan::col
(byte) keyboard_event_scan::event_type
(byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan
(byte[8]) keyboard_events
(byte) keyboard_events_size
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(label) keyboard_get_keycode::@return
(byte) keyboard_get_keycode::ch
@ -596,7 +881,7 @@ SYMBOLS
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::rowidx
(byte[]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -604,6 +889,8 @@ SYMBOLS
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte[8]) keyboard_matrix_row_bitmask
(byte) keyboard_modifiers
(byte[8]) keyboard_scan_values
(void()) main()
(void~) main::$0
(boolean~) main::$1
@ -787,7 +1074,7 @@ INITIAL CONTROL FLOW GRAPH
(byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
(byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) 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 }
(byte[]) 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[8]) 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 }
to:@1
keyboard_init: scope:[keyboard_init] from
*((byte*) CIA1_PORT_A_DDR) ← (byte/word/signed word/dword/signed dword) 255
@ -818,7 +1105,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from
(byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_key_pressed::rowidx ← (byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2 ← call keyboard_matrix_read (byte) keyboard_key_pressed::rowidx
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte) keyboard_key_pressed::return ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed keyboard_key_pressed::@1
@ -839,7 +1126,174 @@ keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_k
keyboard_get_keycode::@1: scope:[keyboard_get_keycode] from
to:keyboard_get_keycode::@return
@4: scope:[] from @3
(byte[8]) keyboard_events ← { fill( 8, 0) }
(byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
(byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT ← (byte~) $0
(byte[8]) keyboard_scan_values ← { fill( 8, 0) }
to:@5
keyboard_event_scan: scope:[keyboard_event_scan] from
(byte) keyboard_event_scan::keycode ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_event_scan::row ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:keyboard_event_scan::@1
keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8
(byte~) keyboard_event_scan::$0 ← call keyboard_matrix_read (byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan ← (byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan != *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(boolean~) keyboard_event_scan::$2 ← ! (boolean~) keyboard_event_scan::$1
if((boolean~) keyboard_event_scan::$2) goto keyboard_event_scan::@2
to:keyboard_event_scan::@13
keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@1 keyboard_event_scan::@19
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) keyboard_event_scan::keycode ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
to:keyboard_event_scan::@8
keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@1
(byte) keyboard_event_scan::col ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:keyboard_event_scan::@3
keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@13 keyboard_event_scan::@4
(byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan ^ *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(boolean~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$6 ← ! (boolean~) keyboard_event_scan::$5
if((boolean~) keyboard_event_scan::$6) goto keyboard_event_scan::@4
to:keyboard_event_scan::@14
keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@3 keyboard_event_scan::@5
(byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::col ← ++ (byte) keyboard_event_scan::col
(boolean~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::col != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$13) goto keyboard_event_scan::@3
to:keyboard_event_scan::@18
keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@3
(boolean~) keyboard_event_scan::$7 ← (byte) keyboard_events_size != (byte/signed byte/word/signed word/dword/signed dword) 8
(boolean~) keyboard_event_scan::$8 ← ! (boolean~) keyboard_event_scan::$7
if((boolean~) keyboard_event_scan::$8) goto keyboard_event_scan::@5
to:keyboard_event_scan::@15
keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@14 keyboard_event_scan::@7
to:keyboard_event_scan::@4
keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@14
(byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(byte) keyboard_event_scan::event_type ← (byte~) keyboard_event_scan::$9
(boolean~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$11 ← ! (boolean~) keyboard_event_scan::$10
if((boolean~) keyboard_event_scan::$11) goto keyboard_event_scan::@6
to:keyboard_event_scan::@16
keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@17
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte) keyboard_event_scan::keycode
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
to:keyboard_event_scan::@7
keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15
(byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode | (byte/signed byte/word/signed word/dword/signed dword) 64
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte/word/dword~) keyboard_event_scan::$12
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
to:keyboard_event_scan::@7
keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@16 keyboard_event_scan::@6
to:keyboard_event_scan::@5
keyboard_event_scan::@17: scope:[keyboard_event_scan] from
to:keyboard_event_scan::@6
keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@4
*((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row) ← (byte) keyboard_event_scan::row_scan
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@2
(byte) keyboard_event_scan::row ← ++ (byte) keyboard_event_scan::row
(boolean~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$15) goto keyboard_event_scan::@1
to:keyboard_event_scan::@20
keyboard_event_scan::@19: scope:[keyboard_event_scan] from
to:keyboard_event_scan::@2
keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@8
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) keyboard_event_scan::$16 ← call keyboard_event_pressed (byte) KEY_LSHIFT
(boolean~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$18 ← ! (boolean~) keyboard_event_scan::$17
if((boolean~) keyboard_event_scan::$18) goto keyboard_event_scan::@9
to:keyboard_event_scan::@21
keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@20 keyboard_event_scan::@21
(byte~) keyboard_event_scan::$20 ← call keyboard_event_pressed (byte) KEY_RSHIFT
(boolean~) keyboard_event_scan::$21 ← (byte~) keyboard_event_scan::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$22 ← ! (boolean~) keyboard_event_scan::$21
if((boolean~) keyboard_event_scan::$22) goto keyboard_event_scan::@10
to:keyboard_event_scan::@22
keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@20
(byte~) keyboard_event_scan::$19 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_LSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$19
to:keyboard_event_scan::@9
keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@9
(byte~) keyboard_event_scan::$24 ← call keyboard_event_pressed (byte) KEY_CTRL
(boolean~) keyboard_event_scan::$25 ← (byte~) keyboard_event_scan::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$26 ← ! (boolean~) keyboard_event_scan::$25
if((boolean~) keyboard_event_scan::$26) goto keyboard_event_scan::@11
to:keyboard_event_scan::@23
keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@9
(byte~) keyboard_event_scan::$23 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_RSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$23
to:keyboard_event_scan::@10
keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@23
(byte~) keyboard_event_scan::$28 ← call keyboard_event_pressed (byte) KEY_COMMODORE
(boolean~) keyboard_event_scan::$29 ← (byte~) keyboard_event_scan::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$30 ← ! (boolean~) keyboard_event_scan::$29
if((boolean~) keyboard_event_scan::$30) goto keyboard_event_scan::@12
to:keyboard_event_scan::@24
keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@10
(byte~) keyboard_event_scan::$27 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_CTRL
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$27
to:keyboard_event_scan::@11
keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@24
to:keyboard_event_scan::@return
keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@11
(byte~) keyboard_event_scan::$31 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_COMMODORE
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$31
to:keyboard_event_scan::@12
keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@12
return
to:@return
@5: scope:[] from @4
to:@6
keyboard_event_pressed: scope:[keyboard_event_pressed] from
(byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_event_pressed::row_bits ← *((byte[8]) keyboard_scan_values + (byte~) keyboard_event_pressed::$0)
(byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode & (byte/signed byte/word/signed word/dword/signed dword) 7
(byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits & *((byte[8]) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1)
(byte) keyboard_event_pressed::return ← (byte~) keyboard_event_pressed::$2
to:keyboard_event_pressed::@return
keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed keyboard_event_pressed::@1
(byte) keyboard_event_pressed::return ← (byte) keyboard_event_pressed::return
return (byte) keyboard_event_pressed::return
to:@return
keyboard_event_pressed::@1: scope:[keyboard_event_pressed] from
to:keyboard_event_pressed::@return
@6: scope:[] from @5
to:@7
keyboard_event_get: scope:[keyboard_event_get] from
(boolean~) keyboard_event_get::$0 ← (byte) keyboard_events_size == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_get::$1 ← ! (boolean~) keyboard_event_get::$0
if((boolean~) keyboard_event_get::$1) goto keyboard_event_get::@1
to:keyboard_event_get::@3
keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@5
(byte) keyboard_events_size ← -- (byte) keyboard_events_size
(byte) keyboard_event_get::return ← *((byte[8]) keyboard_events + (byte) keyboard_events_size)
to:keyboard_event_get::@return
keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get
(byte) keyboard_event_get::return ← (byte/word/signed word/dword/signed dword) 255
to:keyboard_event_get::@return
keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get::@1 keyboard_event_get::@2 keyboard_event_get::@3
(byte) keyboard_event_get::return ← (byte) keyboard_event_get::return
return (byte) keyboard_event_get::return
to:@return
keyboard_event_get::@4: scope:[keyboard_event_get] from
to:keyboard_event_get::@2
keyboard_event_get::@2: scope:[keyboard_event_get] from keyboard_event_get::@4 keyboard_event_get::@6
to:keyboard_event_get::@return
keyboard_event_get::@5: scope:[keyboard_event_get] from
to:keyboard_event_get::@1
keyboard_event_get::@6: scope:[keyboard_event_get] from
to:keyboard_event_get::@2
@7: scope:[] from @6
to:@8
main: scope:[main] from
(void~) main::$0 ← call keyboard_init
to:main::@1
@ -879,12 +1333,15 @@ main::@12: scope:[main] from
main::@return: scope:[main] from main::@3
return
to:@return
@5: scope:[] from @4
@8: scope:[] from @7
call main
to:@end
@end: scope:[] from @5
@end: scope:[] from @8
Removing unused procedure keyboard_get_keycode
Removing unused procedure keyboard_event_scan
Removing unused procedure keyboard_event_get
Removing unused procedure keyboard_event_pressed
Eliminating unused variable (byte*) PROCPORT_DDR and assignment [0] (byte*) PROCPORT_DDR ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) PROCPORT_DDR_MEMORY_MASK and assignment [1] (byte) PROCPORT_DDR_MEMORY_MASK ← (byte/signed byte/word/signed word/dword/signed dword) 7
Eliminating unused variable (byte*) PROCPORT and assignment [2] (byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
@ -957,6 +1414,13 @@ Eliminating unused variable (byte) KEY_CTRL and assignment [123] (byte) KEY_CTRL
Eliminating unused variable (byte) KEY_COMMODORE and assignment [126] (byte) KEY_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 61
Eliminating unused variable (byte) KEY_RUNSTOP and assignment [128] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
Eliminating unused variable (byte[]) keyboard_char_keycodes and assignment [129] (byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
Eliminating unused variable (byte[8]) keyboard_events and assignment [150] (byte[8]) keyboard_events ← { fill( 8, 0) }
Eliminating unused variable (byte) keyboard_events_size and assignment [151] (byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) keyboard_modifiers and assignment [152] (byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) KEY_MODIFIER_CTRL and assignment [155] (byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
Eliminating unused variable (byte) KEY_MODIFIER_COMMODORE and assignment [156] (byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
Eliminating unused variable (byte) KEY_MODIFIER_SHIFT and assignment [158] (byte) KEY_MODIFIER_SHIFT ← (byte~) $0
Eliminating unused variable (byte[8]) keyboard_scan_values and assignment [159] (byte[8]) keyboard_scan_values ← { fill( 8, 0) }
Eliminating unused variable - keeping the call (void~) main::$0
Eliminating unused variable (byte) KEY_3 and assignment [8] (byte) KEY_3 ← (byte/signed byte/word/signed word/dword/signed dword) 8
Eliminating unused variable (byte) KEY_W and assignment [9] (byte) KEY_W ← (byte/signed byte/word/signed word/dword/signed dword) 9
@ -1007,12 +1471,18 @@ Eliminating unused variable (byte) KEY_1 and assignment [53] (byte) KEY_1 ← (b
Eliminating unused variable (byte) KEY_ARROW_LEFT and assignment [54] (byte) KEY_ARROW_LEFT ← (byte/signed byte/word/signed word/dword/signed dword) 57
Eliminating unused variable (byte) KEY_2 and assignment [55] (byte) KEY_2 ← (byte/signed byte/word/signed word/dword/signed dword) 59
Eliminating unused variable (byte) KEY_Q and assignment [57] (byte) KEY_Q ← (byte/signed byte/word/signed word/dword/signed dword) 62
Eliminating unused variable (byte~) $0 and assignment [80] (byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
Eliminating unused variable (byte) KEY_MODIFIER_LSHIFT and assignment [29] (byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
Eliminating unused variable (byte) KEY_MODIFIER_RSHIFT and assignment [30] (byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
Removing empty block @1
Removing empty block keyboard_matrix_read::@1
Removing empty block @2
Removing empty block keyboard_key_pressed::@1
Removing empty block @3
Removing empty block @4
Removing empty block @5
Removing empty block @6
Removing empty block @7
Removing empty block main::@7
Removing empty block main::@3
Removing empty block main::@8
@ -1035,8 +1505,8 @@ CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
(byte) BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6
(byte) KEY_SPACE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 60
(byte[8]) keyboard_matrix_row_bitmask#0 ← { (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[]) keyboard_matrix_col_bitmask#0 ← { (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 }
to:@5
(byte[8]) keyboard_matrix_col_bitmask#0 ← { (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 }
to:@8
keyboard_init: scope:[keyboard_init] from main
*((byte*) CIA1_PORT_A_DDR#0) ← (byte/word/signed word/dword/signed dword) 255
*((byte*) CIA1_PORT_B_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
@ -1070,7 +1540,7 @@ keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_presse
(byte) keyboard_key_pressed::colidx#1 ← phi( keyboard_key_pressed/(byte) keyboard_key_pressed::colidx#0 )
(byte) keyboard_matrix_read::return#4 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::return#2 )
(byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#4
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#1)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#1)
(byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
@ -1078,7 +1548,7 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p
(byte) keyboard_key_pressed::return#1 ← (byte) keyboard_key_pressed::return#3
return
to:@return
main: scope:[main] from @5
main: scope:[main] from @8
call keyboard_init param-assignment
to:main::@13
main::@13: scope:[main] from main
@ -1113,16 +1583,16 @@ main::@10: scope:[main] from main::@14
main::@return: scope:[main] from main::@1
return
to:@return
@5: scope:[] from @begin
@8: scope:[] from @begin
call main param-assignment
to:@6
@6: scope:[] from @5
to:@9
@9: scope:[] from @8
to:@end
@end: scope:[] from @6
@end: scope:[] from @9
SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @8
(label) @9
(label) @begin
(label) @end
(byte*) BGCOL
@ -1166,8 +1636,8 @@ SYMBOL TABLE SSA
(byte) keyboard_key_pressed::return#4
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0
(byte[]) keyboard_matrix_col_bitmask
(byte[]) keyboard_matrix_col_bitmask#0
(byte[8]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask#0
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -1202,7 +1672,7 @@ SYMBOL TABLE SSA
OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@2
Culled Empty Block (label) @6
Culled Empty Block (label) @9
Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) main::$4 ← (byte~) main::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) main::$3 ← (byte~) main::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0
Succesful SSA optimization Pass2UnaryNotSimplification
@ -1245,7 +1715,7 @@ Constant (const byte) GREEN#0 = 5
Constant (const byte) BLUE#0 = 6
Constant (const byte) KEY_SPACE#0 = 60
Constant (const byte[8]) keyboard_matrix_row_bitmask#0 = { 254, 253, 251, 247, 239, 223, 191, 127 }
Constant (const byte[]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Constant (const byte[8]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) keyboard_key_pressed::key#0 = KEY_SPACE#0
Succesful SSA optimization Pass2ConstantIdentification
@ -1265,10 +1735,10 @@ OPTIMIZING CONTROL FLOW GRAPH
Constant inlined keyboard_key_pressed::key#0 = (const byte) KEY_SPACE#0
Constant inlined keyboard_matrix_read::rowid#0 = (const byte) keyboard_key_pressed::rowidx#0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @5 @end main main::@1 main::@return main::@4 main::@9 main::@14 main::@10 main::@5 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @5 @end main main::@1 main::@return main::@4 main::@9 main::@14 main::@10 main::@5 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @8 @end main main::@1 main::@return main::@4 main::@9 main::@14 main::@10 main::@5 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @8 @end main main::@1 main::@return main::@4 main::@9 main::@14 main::@10 main::@5 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_init keyboard_init::@return
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @8
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@9
@ -1283,9 +1753,9 @@ Propagating live ranges...
Propagating live ranges...
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Block Sequence Planned @begin @5 @end main main::@1 main::@return main::@4 main::@9 main::@14 main::@10 main::@5 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @8 @end main main::@1 main::@return main::@4 main::@9 main::@14 main::@10 main::@5 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_init keyboard_init::@return
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @8
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@9
@ -1297,14 +1767,14 @@ Propagating live ranges...
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi() [ ] ( )
to:@5
@5: scope:[] from @begin
to:@8
@8: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @5
@end: scope:[] from @8
[3] phi() [ ] ( )
main: scope:[main] from @5
main: scope:[main] from @8
[4] phi() [ ] ( main:2 [ ] )
[5] call keyboard_init param-assignment [ ] ( main:2 [ ] )
to:main::@1
@ -1339,7 +1809,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@9
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[19] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::$2 ] )
[20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )
[20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[21] return [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )
@ -1361,23 +1831,23 @@ keyboard_init::@return: scope:[keyboard_init] from keyboard_init
DOMINATORS
@begin dominated by @begin
@5 dominated by @begin @5
@end dominated by @begin @end @5
main dominated by @begin main @5
main::@1 dominated by @begin main @5 main::@1
main::@return dominated by main::@return @begin main @5 main::@1
main::@4 dominated by @begin main @5 main::@1 main::@4
main::@9 dominated by main::@9 @begin main @5 main::@1 main::@4
main::@14 dominated by main::@9 @begin main main::@14 @5 main::@1 main::@4
main::@10 dominated by main::@9 @begin main::@10 main main::@14 @5 main::@1 main::@4
main::@5 dominated by main::@9 @begin main main::@14 @5 main::@1 main::@5 main::@4
keyboard_key_pressed dominated by main::@9 @begin main keyboard_key_pressed @5 main::@1 main::@4
keyboard_key_pressed::@2 dominated by main::@9 @begin main keyboard_key_pressed @5 main::@1 keyboard_key_pressed::@2 main::@4
keyboard_key_pressed::@return dominated by main::@9 @begin main keyboard_key_pressed keyboard_key_pressed::@return @5 main::@1 keyboard_key_pressed::@2 main::@4
keyboard_matrix_read dominated by main::@9 @begin keyboard_matrix_read main keyboard_key_pressed @5 main::@1 main::@4
keyboard_matrix_read::@return dominated by main::@9 @begin keyboard_matrix_read main keyboard_matrix_read::@return keyboard_key_pressed @5 main::@1 main::@4
keyboard_init dominated by @begin main keyboard_init @5
keyboard_init::@return dominated by @begin main keyboard_init @5 keyboard_init::@return
@8 dominated by @begin @8
@end dominated by @begin @end @8
main dominated by @begin main @8
main::@1 dominated by @begin main @8 main::@1
main::@return dominated by main::@return @begin main @8 main::@1
main::@4 dominated by @begin main @8 main::@1 main::@4
main::@9 dominated by main::@9 @begin main @8 main::@1 main::@4
main::@14 dominated by main::@9 @begin main main::@14 @8 main::@1 main::@4
main::@10 dominated by main::@9 @begin main::@10 main main::@14 @8 main::@1 main::@4
main::@5 dominated by main::@9 @begin main main::@14 @8 main::@1 main::@5 main::@4
keyboard_key_pressed dominated by main::@9 @begin main keyboard_key_pressed @8 main::@1 main::@4
keyboard_key_pressed::@2 dominated by main::@9 @begin main keyboard_key_pressed @8 main::@1 keyboard_key_pressed::@2 main::@4
keyboard_key_pressed::@return dominated by main::@9 @begin main keyboard_key_pressed keyboard_key_pressed::@return @8 main::@1 keyboard_key_pressed::@2 main::@4
keyboard_matrix_read dominated by main::@9 @begin keyboard_matrix_read main keyboard_key_pressed @8 main::@1 main::@4
keyboard_matrix_read::@return dominated by main::@9 @begin keyboard_matrix_read main keyboard_matrix_read::@return keyboard_key_pressed @8 main::@1 main::@4
keyboard_init dominated by @begin main keyboard_init @8
keyboard_init::@return dominated by @begin main keyboard_init @8 keyboard_init::@return
NATURAL LOOPS
Found back edge: Loop head: main::@4 tails: main::@4 blocks: null
@ -1421,7 +1891,7 @@ VARIABLE REGISTER WEIGHTS
(byte) keyboard_key_pressed::return#0 4.333333333333333
(byte) keyboard_key_pressed::return#2 22.0
(byte) keyboard_key_pressed::rowidx
(byte[]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte) keyboard_matrix_read::return
(byte) keyboard_matrix_read::return#0 1.3333333333333333
@ -1470,17 +1940,17 @@ INITIAL ASM
.const KEY_SPACE = $3c
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
jmp b5
//SEG4 @5
b5:
//SEG3 [1] phi from @begin to @8 [phi:@begin->@8]
b8_from_bbegin:
jmp b8
//SEG4 @8
b8:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
//SEG6 [4] phi from @8 to main [phi:@8->main]
main_from_b8:
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
//SEG7 [3] phi from @8 to @end [phi:@8->@end]
bend_from_b8:
jmp bend
//SEG8 @end
bend:
@ -1558,7 +2028,7 @@ keyboard_key_pressed: {
//SEG33 [19] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::$2 ] ) -- vbuz1=vbuz2
lda keyboard_matrix_read.return_2
sta _2
//SEG34 [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) -- vbuz1=vbuz2_band__deref_pbuc1
//SEG34 [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) -- vbuz1=vbuz2_band__deref_pbuc1
lda keyboard_matrix_col_bitmask+colidx
and _2
sta return
@ -1606,7 +2076,7 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [14] *((const byte*) BGCOL#0) ← (const byte) GREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [15] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) always clobbers reg byte a
Statement [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) always clobbers reg byte a
Statement [22] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:2::keyboard_key_pressed:10::keyboard_matrix_read:17 [ ] ) always clobbers reg byte a
Statement [23] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_key_pressed:10::keyboard_matrix_read:17 [ keyboard_matrix_read::return#0 ] ) always clobbers reg byte a
Statement [25] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte/word/signed word/dword/signed dword) 255 [ ] ( main:2::keyboard_init:5 [ ] ) always clobbers reg byte a
@ -1648,17 +2118,17 @@ ASSEMBLER BEFORE OPTIMIZATION
.const KEY_SPACE = $3c
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
jmp b5
//SEG4 @5
b5:
//SEG3 [1] phi from @begin to @8 [phi:@begin->@8]
b8_from_bbegin:
jmp b8
//SEG4 @8
b8:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
//SEG6 [4] phi from @8 to main [phi:@8->main]
main_from_b8:
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
//SEG7 [3] phi from @8 to @end [phi:@8->@end]
bend_from_b8:
jmp bend
//SEG8 @end
bend:
@ -1728,7 +2198,7 @@ keyboard_key_pressed: {
b2:
//SEG33 [19] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::$2 ] )
// (byte~) keyboard_key_pressed::$2 = (byte) keyboard_matrix_read::return#2 // register copy reg byte a
//SEG34 [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band__deref_pbuc1
//SEG34 [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band__deref_pbuc1
and keyboard_matrix_col_bitmask+colidx
jmp breturn
//SEG35 keyboard_key_pressed::@return
@ -1768,7 +2238,7 @@ keyboard_init: {
keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b5
Removing instruction jmp b8
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
@ -1781,13 +2251,13 @@ Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b5_from_bbegin:
Removing instruction main_from_b5:
Removing instruction bend_from_b5:
Removing instruction b8_from_bbegin:
Removing instruction main_from_b8:
Removing instruction bend_from_b8:
Removing instruction b9_from_b4:
Removing instruction keyboard_key_pressed_from_b9:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b5:
Removing instruction b8:
Removing instruction bend:
Removing instruction breturn:
Removing instruction b9:
@ -1809,7 +2279,7 @@ Removing instruction b1:
Succesful ASM optimization Pass5RedundantLabelElimination
FINAL SYMBOL TABLE
(label) @5
(label) @8
(label) @begin
(label) @end
(byte*) BGCOL
@ -1844,8 +2314,8 @@ FINAL SYMBOL TABLE
(byte) keyboard_key_pressed::return#2 reg byte a 22.0
(byte) keyboard_key_pressed::rowidx
(const byte) keyboard_key_pressed::rowidx#0 rowidx = (const byte) KEY_SPACE#0>>(byte/signed byte/word/signed word/dword/signed dword) 3
(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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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
@ -1891,12 +2361,12 @@ Score: 1147
.const BLUE = 6
.const KEY_SPACE = $3c
//SEG2 @begin
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
//SEG4 @5
//SEG3 [1] phi from @begin to @8 [phi:@begin->@8]
//SEG4 @8
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @5 to main [phi:@5->main]
//SEG6 [4] phi from @8 to main [phi:@8->main]
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
//SEG7 [3] phi from @8 to @end [phi:@8->@end]
//SEG8 @end
//SEG9 main
main: {
@ -1948,7 +2418,7 @@ keyboard_key_pressed: {
//SEG32 keyboard_key_pressed::@2
//SEG33 [19] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::$2 ] )
// (byte~) keyboard_key_pressed::$2 = (byte) keyboard_matrix_read::return#2 // register copy reg byte a
//SEG34 [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band__deref_pbuc1
//SEG34 [20] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] ) -- vbuaa=vbuaa_band__deref_pbuc1
and keyboard_matrix_col_bitmask+colidx
//SEG35 keyboard_key_pressed::@return
//SEG36 [21] return [ keyboard_key_pressed::return#0 ] ( main:2::keyboard_key_pressed:10 [ keyboard_key_pressed::return#0 ] )

View File

@ -1,4 +1,4 @@
(label) @5
(label) @8
(label) @begin
(label) @end
(byte*) BGCOL
@ -33,8 +33,8 @@
(byte) keyboard_key_pressed::return#2 reg byte a 22.0
(byte) keyboard_key_pressed::rowidx
(const byte) keyboard_key_pressed::rowidx#0 rowidx = (const byte) KEY_SPACE#0>>(byte/signed byte/word/signed word/dword/signed dword) 3
(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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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

View File

@ -1,13 +1,13 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@5
@5: scope:[] from @begin
to:@8
@8: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @5
@end: scope:[] from @8
[3] phi() [ ] ( )
main: scope:[main] from @5
main: scope:[main] from @8
[4] phi() [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@1
@ -108,7 +108,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@22
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[56] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] )
[57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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
[58] 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 ] )

View File

@ -152,7 +152,7 @@ const byte[] keyboard_char_keycodes = {
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 };
byte[8] keyboard_matrix_col_bitmask = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 };
// Initialize keyboard reading by setting CIA#$ Data Direction Registers
void keyboard_init() {
@ -172,7 +172,7 @@ byte keyboard_matrix_read(byte rowid) {
return row_pressed_bits;
}
// Determines whether a specific key is currently pressed
// Determines whether a specific key is currently pressed by accessing the matrix directly
// 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
@ -189,6 +189,97 @@ byte keyboard_key_pressed(byte key) {
byte keyboard_get_keycode(byte ch) {
return keyboard_char_keycodes[ch];
}
// Keyboard event buffer. Contains keycodes for key presses/releases. Presses are represented by the keycode. Releases by keycode | $40. The buffer is filled by keyboard_scan()
byte[8] keyboard_events;
// Keyboard event buffer size. The number of events currently in the event buffer
byte keyboard_events_size = 0;
// Current keyboard modifiers (left shift, right shift, ctrl, commodore)
byte keyboard_modifiers = 0;
// Left shift is pressed
const byte KEY_MODIFIER_LSHIFT = 1;
// Right shift is pressed
const byte KEY_MODIFIER_RSHIFT = 2;
// CTRL is pressed
const byte KEY_MODIFIER_CTRL = 4;
// Commodore is pressed
const byte KEY_MODIFIER_COMMODORE = 8;
// Any shift is pressed
const byte KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT;
// The values scanned values for each row. Set by keyboard_scan() and used by keyboard_get_event()
byte[8] keyboard_scan_values;
// Scans the entire matrix to determine which keys have been pressed/depressed.
// Generates keyboard events into the event buffer. Events can be read using keyboard_event_get().
// Handles debounce and only generates events when the status of a key changes.
// Also stores current status of modifiers in keyboard_modifiers.
void keyboard_event_scan() {
byte keycode = 0;
for(byte row : 0..7) {
byte row_scan = keyboard_matrix_read(row);
if(row_scan!=keyboard_scan_values[row]) {
// Something has changed on the keyboard row - check each column
for(byte col : 0..7){
// XOR of row scan with the last seen row scan AND'ed with the col bitmask will be non-0 if the key status is changed
if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) {
// Key(row, col) status has changed. We have an event.
// Only process event if there is still room in the buffer
if(keyboard_events_size!=8) {
// AND of row scan and bit mask determines if key is pressed or released
byte event_type = row_scan&keyboard_matrix_col_bitmask[col];
if(event_type==0) {
// Key released
keyboard_events[keyboard_events_size++] = keycode|$40;
} else {
// Key pressed
keyboard_events[keyboard_events_size++] = keycode;
}
}
}
keycode++;
}
// Store the current keyboard status for the row to debounce
keyboard_scan_values[row] = row_scan;
} else {
// Update current keycode
keycode = keycode + 8;
}
}
// Update the keyboard modifiers
keyboard_modifiers = 0;
if(keyboard_event_pressed(KEY_LSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_LSHIFT;
}
if(keyboard_event_pressed(KEY_RSHIFT)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_RSHIFT;
}
if(keyboard_event_pressed(KEY_CTRL)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_CTRL;
}
if(keyboard_event_pressed(KEY_COMMODORE)!= 0) {
keyboard_modifiers = keyboard_modifiers | KEY_MODIFIER_COMMODORE;
}
}
// Determine if a specific key is currently pressed based on the last keyboard_event_scan()
// Returns 0 is not pressed and non-0 if pressed
byte keyboard_event_pressed(byte keycode) {
byte row_bits = keyboard_scan_values[keycode>>3];
return row_bits & keyboard_matrix_col_bitmask[keycode&7];
}
// Get the next event from the keyboard event buffer.
// Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process.
// The buffer is filled by keyboard_scan()
byte keyboard_event_get() {
if(keyboard_events_size==0) {
return $ff;
} else {
return keyboard_events[--keyboard_events_size];
}
}
Importing c64.kc
PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc
// Commodore 64 Registers and Constants
@ -285,6 +376,10 @@ const byte LIGHT_GREEN = $d;
const byte LIGHT_BLUE = $e;
const byte LIGHT_GREY = $f;
Adding pre/post-modifier (byte) keyboard_events_size ← ++ (byte) keyboard_events_size
Adding pre/post-modifier (byte) keyboard_events_size ← ++ (byte) keyboard_events_size
Adding pre/post-modifier (byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
Adding pre/post-modifier (byte) keyboard_events_size ← -- (byte) keyboard_events_size
Adding pre/post-modifier (byte*) main::sc ← ++ (byte*) main::sc
Adding pre/post-modifier (byte) main::i ← ++ (byte) main::i
Adding pre/post-modifier (byte) main::i ← ++ (byte) main::i
@ -421,7 +516,7 @@ STATEMENTS
(byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
(byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) 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 }
(byte[]) 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[8]) 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 }
proc (void()) keyboard_init()
*((byte*) CIA1_PORT_A_DDR) ← (byte/word/signed word/dword/signed dword) 255
*((byte*) CIA1_PORT_B_DDR) ← (byte/signed byte/word/signed word/dword/signed dword) 0
@ -444,7 +539,7 @@ proc (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
(byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_key_pressed::rowidx ← (byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2 ← call keyboard_matrix_read (byte) keyboard_key_pressed::rowidx
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte) keyboard_key_pressed::return ← (byte~) keyboard_key_pressed::$3
goto keyboard_key_pressed::@return
keyboard_key_pressed::@return:
@ -458,6 +553,122 @@ keyboard_get_keycode::@return:
(byte) keyboard_get_keycode::return ← (byte) keyboard_get_keycode::return
return (byte) keyboard_get_keycode::return
endproc // keyboard_get_keycode()
(byte[8]) keyboard_events ← { fill( 8, 0) }
(byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
(byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT ← (byte~) $0
(byte[8]) keyboard_scan_values ← { fill( 8, 0) }
proc (void()) keyboard_event_scan()
(byte) keyboard_event_scan::keycode ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_event_scan::row ← (byte/signed byte/word/signed word/dword/signed dword) 0
keyboard_event_scan::@1:
(byte~) keyboard_event_scan::$0 ← call keyboard_matrix_read (byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan ← (byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan != *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(boolean~) keyboard_event_scan::$2 ← ! (boolean~) keyboard_event_scan::$1
if((boolean~) keyboard_event_scan::$2) goto keyboard_event_scan::@2
(byte) keyboard_event_scan::col ← (byte/signed byte/word/signed word/dword/signed dword) 0
keyboard_event_scan::@3:
(byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan ^ *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(boolean~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$6 ← ! (boolean~) keyboard_event_scan::$5
if((boolean~) keyboard_event_scan::$6) goto keyboard_event_scan::@4
(boolean~) keyboard_event_scan::$7 ← (byte) keyboard_events_size != (byte/signed byte/word/signed word/dword/signed dword) 8
(boolean~) keyboard_event_scan::$8 ← ! (boolean~) keyboard_event_scan::$7
if((boolean~) keyboard_event_scan::$8) goto keyboard_event_scan::@5
(byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(byte) keyboard_event_scan::event_type ← (byte~) keyboard_event_scan::$9
(boolean~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$11 ← ! (boolean~) keyboard_event_scan::$10
if((boolean~) keyboard_event_scan::$11) goto keyboard_event_scan::@6
(byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode | (byte/signed byte/word/signed word/dword/signed dword) 64
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte/word/dword~) keyboard_event_scan::$12
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
goto keyboard_event_scan::@7
keyboard_event_scan::@6:
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte) keyboard_event_scan::keycode
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
keyboard_event_scan::@7:
keyboard_event_scan::@5:
keyboard_event_scan::@4:
(byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::col ← ++ (byte) keyboard_event_scan::col
(boolean~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::col != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$13) goto keyboard_event_scan::@3
*((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row) ← (byte) keyboard_event_scan::row_scan
goto keyboard_event_scan::@8
keyboard_event_scan::@2:
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) keyboard_event_scan::keycode ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
keyboard_event_scan::@8:
(byte) keyboard_event_scan::row ← ++ (byte) keyboard_event_scan::row
(boolean~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$15) goto keyboard_event_scan::@1
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) keyboard_event_scan::$16 ← call keyboard_event_pressed (byte) KEY_LSHIFT
(boolean~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$18 ← ! (boolean~) keyboard_event_scan::$17
if((boolean~) keyboard_event_scan::$18) goto keyboard_event_scan::@9
(byte~) keyboard_event_scan::$19 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_LSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$19
keyboard_event_scan::@9:
(byte~) keyboard_event_scan::$20 ← call keyboard_event_pressed (byte) KEY_RSHIFT
(boolean~) keyboard_event_scan::$21 ← (byte~) keyboard_event_scan::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$22 ← ! (boolean~) keyboard_event_scan::$21
if((boolean~) keyboard_event_scan::$22) goto keyboard_event_scan::@10
(byte~) keyboard_event_scan::$23 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_RSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$23
keyboard_event_scan::@10:
(byte~) keyboard_event_scan::$24 ← call keyboard_event_pressed (byte) KEY_CTRL
(boolean~) keyboard_event_scan::$25 ← (byte~) keyboard_event_scan::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$26 ← ! (boolean~) keyboard_event_scan::$25
if((boolean~) keyboard_event_scan::$26) goto keyboard_event_scan::@11
(byte~) keyboard_event_scan::$27 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_CTRL
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$27
keyboard_event_scan::@11:
(byte~) keyboard_event_scan::$28 ← call keyboard_event_pressed (byte) KEY_COMMODORE
(boolean~) keyboard_event_scan::$29 ← (byte~) keyboard_event_scan::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$30 ← ! (boolean~) keyboard_event_scan::$29
if((boolean~) keyboard_event_scan::$30) goto keyboard_event_scan::@12
(byte~) keyboard_event_scan::$31 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_COMMODORE
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$31
keyboard_event_scan::@12:
keyboard_event_scan::@return:
return
endproc // keyboard_event_scan()
proc (byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_event_pressed::row_bits ← *((byte[8]) keyboard_scan_values + (byte~) keyboard_event_pressed::$0)
(byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode & (byte/signed byte/word/signed word/dword/signed dword) 7
(byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits & *((byte[8]) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1)
(byte) keyboard_event_pressed::return ← (byte~) keyboard_event_pressed::$2
goto keyboard_event_pressed::@return
keyboard_event_pressed::@return:
(byte) keyboard_event_pressed::return ← (byte) keyboard_event_pressed::return
return (byte) keyboard_event_pressed::return
endproc // keyboard_event_pressed()
proc (byte()) keyboard_event_get()
(boolean~) keyboard_event_get::$0 ← (byte) keyboard_events_size == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_get::$1 ← ! (boolean~) keyboard_event_get::$0
if((boolean~) keyboard_event_get::$1) goto keyboard_event_get::@1
(byte) keyboard_event_get::return ← (byte/word/signed word/dword/signed dword) 255
goto keyboard_event_get::@return
goto keyboard_event_get::@2
keyboard_event_get::@1:
(byte) keyboard_events_size ← -- (byte) keyboard_events_size
(byte) keyboard_event_get::return ← *((byte[8]) keyboard_events + (byte) keyboard_events_size)
goto keyboard_event_get::@return
keyboard_event_get::@2:
keyboard_event_get::@return:
(byte) keyboard_event_get::return ← (byte) keyboard_event_get::return
return (byte) keyboard_event_get::return
endproc // keyboard_event_get()
proc (void()) main()
(byte*) main::sc ← (word/signed word/dword/signed dword) 1024
main::@1:
@ -534,6 +745,7 @@ endproc // main()
call main
SYMBOLS
(byte~) $0
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
@ -603,6 +815,11 @@ SYMBOLS
(byte) KEY_LSHIFT
(byte) KEY_M
(byte) KEY_MINUS
(byte) KEY_MODIFIER_COMMODORE
(byte) KEY_MODIFIER_CTRL
(byte) KEY_MODIFIER_LSHIFT
(byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT
(byte) KEY_N
(byte) KEY_O
(byte) KEY_P
@ -664,6 +881,74 @@ SYMBOLS
(byte) WHITE
(byte) YELLOW
(byte[]) keyboard_char_keycodes
(byte()) keyboard_event_get()
(boolean~) keyboard_event_get::$0
(boolean~) keyboard_event_get::$1
(label) keyboard_event_get::@1
(label) keyboard_event_get::@2
(label) keyboard_event_get::@return
(byte) keyboard_event_get::return
(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode)
(byte~) keyboard_event_pressed::$0
(byte~) keyboard_event_pressed::$1
(byte~) keyboard_event_pressed::$2
(label) keyboard_event_pressed::@return
(byte) keyboard_event_pressed::keycode
(byte) keyboard_event_pressed::return
(byte) keyboard_event_pressed::row_bits
(void()) keyboard_event_scan()
(byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1
(boolean~) keyboard_event_scan::$10
(boolean~) keyboard_event_scan::$11
(byte/word/dword~) keyboard_event_scan::$12
(boolean~) keyboard_event_scan::$13
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
(boolean~) keyboard_event_scan::$15
(byte~) keyboard_event_scan::$16
(boolean~) keyboard_event_scan::$17
(boolean~) keyboard_event_scan::$18
(byte~) keyboard_event_scan::$19
(boolean~) keyboard_event_scan::$2
(byte~) keyboard_event_scan::$20
(boolean~) keyboard_event_scan::$21
(boolean~) keyboard_event_scan::$22
(byte~) keyboard_event_scan::$23
(byte~) keyboard_event_scan::$24
(boolean~) keyboard_event_scan::$25
(boolean~) keyboard_event_scan::$26
(byte~) keyboard_event_scan::$27
(byte~) keyboard_event_scan::$28
(boolean~) keyboard_event_scan::$29
(byte~) keyboard_event_scan::$3
(boolean~) keyboard_event_scan::$30
(byte~) keyboard_event_scan::$31
(byte~) keyboard_event_scan::$4
(boolean~) keyboard_event_scan::$5
(boolean~) keyboard_event_scan::$6
(boolean~) keyboard_event_scan::$7
(boolean~) keyboard_event_scan::$8
(byte~) keyboard_event_scan::$9
(label) keyboard_event_scan::@1
(label) keyboard_event_scan::@10
(label) keyboard_event_scan::@11
(label) keyboard_event_scan::@12
(label) keyboard_event_scan::@2
(label) keyboard_event_scan::@3
(label) keyboard_event_scan::@4
(label) keyboard_event_scan::@5
(label) keyboard_event_scan::@6
(label) keyboard_event_scan::@7
(label) keyboard_event_scan::@8
(label) keyboard_event_scan::@9
(label) keyboard_event_scan::@return
(byte) keyboard_event_scan::col
(byte) keyboard_event_scan::event_type
(byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan
(byte[8]) keyboard_events
(byte) keyboard_events_size
(byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch)
(label) keyboard_get_keycode::@return
(byte) keyboard_get_keycode::ch
@ -680,7 +965,7 @@ SYMBOLS
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::rowidx
(byte[]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -688,6 +973,8 @@ SYMBOLS
(byte) keyboard_matrix_read::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte[8]) keyboard_matrix_row_bitmask
(byte) keyboard_modifiers
(byte[8]) keyboard_scan_values
(void()) main()
(word/signed word/dword/signed dword~) main::$0
(boolean~) main::$1
@ -904,7 +1191,7 @@ INITIAL CONTROL FLOW GRAPH
(byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
(byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (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, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 }
(byte[8]) 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 }
(byte[]) 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[8]) 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 }
to:@1
keyboard_init: scope:[keyboard_init] from
*((byte*) CIA1_PORT_A_DDR) ← (byte/word/signed word/dword/signed dword) 255
@ -935,7 +1222,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from
(byte~) keyboard_key_pressed::$1 ← (byte) keyboard_key_pressed::key >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_key_pressed::rowidx ← (byte~) keyboard_key_pressed::$1
(byte~) keyboard_key_pressed::$2 ← call keyboard_matrix_read (byte) keyboard_key_pressed::rowidx
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_key_pressed::colidx)
(byte) keyboard_key_pressed::return ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed keyboard_key_pressed::@1
@ -956,7 +1243,174 @@ keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_k
keyboard_get_keycode::@1: scope:[keyboard_get_keycode] from
to:keyboard_get_keycode::@return
@4: scope:[] from @3
(byte[8]) keyboard_events ← { fill( 8, 0) }
(byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
(byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
(byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
(byte) KEY_MODIFIER_SHIFT ← (byte~) $0
(byte[8]) keyboard_scan_values ← { fill( 8, 0) }
to:@5
keyboard_event_scan: scope:[keyboard_event_scan] from
(byte) keyboard_event_scan::keycode ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte) keyboard_event_scan::row ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:keyboard_event_scan::@1
keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8
(byte~) keyboard_event_scan::$0 ← call keyboard_matrix_read (byte) keyboard_event_scan::row
(byte) keyboard_event_scan::row_scan ← (byte~) keyboard_event_scan::$0
(boolean~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan != *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(boolean~) keyboard_event_scan::$2 ← ! (boolean~) keyboard_event_scan::$1
if((boolean~) keyboard_event_scan::$2) goto keyboard_event_scan::@2
to:keyboard_event_scan::@13
keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@1 keyboard_event_scan::@19
(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14 ← (byte) keyboard_event_scan::keycode + (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) keyboard_event_scan::keycode ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$14
to:keyboard_event_scan::@8
keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@1
(byte) keyboard_event_scan::col ← (byte/signed byte/word/signed word/dword/signed dword) 0
to:keyboard_event_scan::@3
keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@13 keyboard_event_scan::@4
(byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan ^ *((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row)
(byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(boolean~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$6 ← ! (boolean~) keyboard_event_scan::$5
if((boolean~) keyboard_event_scan::$6) goto keyboard_event_scan::@4
to:keyboard_event_scan::@14
keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@3 keyboard_event_scan::@5
(byte) keyboard_event_scan::keycode ← ++ (byte) keyboard_event_scan::keycode
(byte) keyboard_event_scan::col ← ++ (byte) keyboard_event_scan::col
(boolean~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::col != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$13) goto keyboard_event_scan::@3
to:keyboard_event_scan::@18
keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@3
(boolean~) keyboard_event_scan::$7 ← (byte) keyboard_events_size != (byte/signed byte/word/signed word/dword/signed dword) 8
(boolean~) keyboard_event_scan::$8 ← ! (boolean~) keyboard_event_scan::$7
if((boolean~) keyboard_event_scan::$8) goto keyboard_event_scan::@5
to:keyboard_event_scan::@15
keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@14 keyboard_event_scan::@7
to:keyboard_event_scan::@4
keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@14
(byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan & *((byte[8]) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col)
(byte) keyboard_event_scan::event_type ← (byte~) keyboard_event_scan::$9
(boolean~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$11 ← ! (boolean~) keyboard_event_scan::$10
if((boolean~) keyboard_event_scan::$11) goto keyboard_event_scan::@6
to:keyboard_event_scan::@16
keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@17
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte) keyboard_event_scan::keycode
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
to:keyboard_event_scan::@7
keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15
(byte/word/dword~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::keycode | (byte/signed byte/word/signed word/dword/signed dword) 64
*((byte[8]) keyboard_events + (byte) keyboard_events_size) ← (byte/word/dword~) keyboard_event_scan::$12
(byte) keyboard_events_size ← ++ (byte) keyboard_events_size
to:keyboard_event_scan::@7
keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@16 keyboard_event_scan::@6
to:keyboard_event_scan::@5
keyboard_event_scan::@17: scope:[keyboard_event_scan] from
to:keyboard_event_scan::@6
keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@4
*((byte[8]) keyboard_scan_values + (byte) keyboard_event_scan::row) ← (byte) keyboard_event_scan::row_scan
to:keyboard_event_scan::@8
keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@2
(byte) keyboard_event_scan::row ← ++ (byte) keyboard_event_scan::row
(boolean~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row != (byte/signed byte/word/signed word/dword/signed dword) 8
if((boolean~) keyboard_event_scan::$15) goto keyboard_event_scan::@1
to:keyboard_event_scan::@20
keyboard_event_scan::@19: scope:[keyboard_event_scan] from
to:keyboard_event_scan::@2
keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@8
(byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
(byte~) keyboard_event_scan::$16 ← call keyboard_event_pressed (byte) KEY_LSHIFT
(boolean~) keyboard_event_scan::$17 ← (byte~) keyboard_event_scan::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$18 ← ! (boolean~) keyboard_event_scan::$17
if((boolean~) keyboard_event_scan::$18) goto keyboard_event_scan::@9
to:keyboard_event_scan::@21
keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@20 keyboard_event_scan::@21
(byte~) keyboard_event_scan::$20 ← call keyboard_event_pressed (byte) KEY_RSHIFT
(boolean~) keyboard_event_scan::$21 ← (byte~) keyboard_event_scan::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$22 ← ! (boolean~) keyboard_event_scan::$21
if((boolean~) keyboard_event_scan::$22) goto keyboard_event_scan::@10
to:keyboard_event_scan::@22
keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@20
(byte~) keyboard_event_scan::$19 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_LSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$19
to:keyboard_event_scan::@9
keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@9
(byte~) keyboard_event_scan::$24 ← call keyboard_event_pressed (byte) KEY_CTRL
(boolean~) keyboard_event_scan::$25 ← (byte~) keyboard_event_scan::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$26 ← ! (boolean~) keyboard_event_scan::$25
if((boolean~) keyboard_event_scan::$26) goto keyboard_event_scan::@11
to:keyboard_event_scan::@23
keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@9
(byte~) keyboard_event_scan::$23 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_RSHIFT
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$23
to:keyboard_event_scan::@10
keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@23
(byte~) keyboard_event_scan::$28 ← call keyboard_event_pressed (byte) KEY_COMMODORE
(boolean~) keyboard_event_scan::$29 ← (byte~) keyboard_event_scan::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_scan::$30 ← ! (boolean~) keyboard_event_scan::$29
if((boolean~) keyboard_event_scan::$30) goto keyboard_event_scan::@12
to:keyboard_event_scan::@24
keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@10
(byte~) keyboard_event_scan::$27 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_CTRL
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$27
to:keyboard_event_scan::@11
keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@24
to:keyboard_event_scan::@return
keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@11
(byte~) keyboard_event_scan::$31 ← (byte) keyboard_modifiers | (byte) KEY_MODIFIER_COMMODORE
(byte) keyboard_modifiers ← (byte~) keyboard_event_scan::$31
to:keyboard_event_scan::@12
keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@12
return
to:@return
@5: scope:[] from @4
to:@6
keyboard_event_pressed: scope:[keyboard_event_pressed] from
(byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode >> (byte/signed byte/word/signed word/dword/signed dword) 3
(byte) keyboard_event_pressed::row_bits ← *((byte[8]) keyboard_scan_values + (byte~) keyboard_event_pressed::$0)
(byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode & (byte/signed byte/word/signed word/dword/signed dword) 7
(byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits & *((byte[8]) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1)
(byte) keyboard_event_pressed::return ← (byte~) keyboard_event_pressed::$2
to:keyboard_event_pressed::@return
keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed keyboard_event_pressed::@1
(byte) keyboard_event_pressed::return ← (byte) keyboard_event_pressed::return
return (byte) keyboard_event_pressed::return
to:@return
keyboard_event_pressed::@1: scope:[keyboard_event_pressed] from
to:keyboard_event_pressed::@return
@6: scope:[] from @5
to:@7
keyboard_event_get: scope:[keyboard_event_get] from
(boolean~) keyboard_event_get::$0 ← (byte) keyboard_events_size == (byte/signed byte/word/signed word/dword/signed dword) 0
(boolean~) keyboard_event_get::$1 ← ! (boolean~) keyboard_event_get::$0
if((boolean~) keyboard_event_get::$1) goto keyboard_event_get::@1
to:keyboard_event_get::@3
keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@5
(byte) keyboard_events_size ← -- (byte) keyboard_events_size
(byte) keyboard_event_get::return ← *((byte[8]) keyboard_events + (byte) keyboard_events_size)
to:keyboard_event_get::@return
keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get
(byte) keyboard_event_get::return ← (byte/word/signed word/dword/signed dword) 255
to:keyboard_event_get::@return
keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get::@1 keyboard_event_get::@2 keyboard_event_get::@3
(byte) keyboard_event_get::return ← (byte) keyboard_event_get::return
return (byte) keyboard_event_get::return
to:@return
keyboard_event_get::@4: scope:[keyboard_event_get] from
to:keyboard_event_get::@2
keyboard_event_get::@2: scope:[keyboard_event_get] from keyboard_event_get::@4 keyboard_event_get::@6
to:keyboard_event_get::@return
keyboard_event_get::@5: scope:[keyboard_event_get] from
to:keyboard_event_get::@1
keyboard_event_get::@6: scope:[keyboard_event_get] from
to:keyboard_event_get::@2
@7: scope:[] from @6
to:@8
main: scope:[main] from
(byte*) main::sc ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:main::@1
@ -1067,11 +1521,14 @@ main::@26: scope:[main] from
main::@return: scope:[main] from main::@4
return
to:@return
@5: scope:[] from @4
@8: scope:[] from @7
call main
to:@end
@end: scope:[] from @5
@end: scope:[] from @8
Removing unused procedure keyboard_event_scan
Removing unused procedure keyboard_event_get
Removing unused procedure keyboard_event_pressed
Eliminating unused variable (byte*) PROCPORT_DDR and assignment [0] (byte*) PROCPORT_DDR ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) PROCPORT_DDR_MEMORY_MASK and assignment [1] (byte) PROCPORT_DDR_MEMORY_MASK ← (byte/signed byte/word/signed word/dword/signed dword) 7
Eliminating unused variable (byte*) PROCPORT and assignment [2] (byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
@ -1146,7 +1603,17 @@ Eliminating unused variable (byte) KEY_RSHIFT and assignment [117] (byte) KEY_RS
Eliminating unused variable (byte) KEY_CTRL and assignment [123] (byte) KEY_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 58
Eliminating unused variable (byte) KEY_COMMODORE and assignment [126] (byte) KEY_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 61
Eliminating unused variable (byte) KEY_RUNSTOP and assignment [128] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63
Eliminating unused variable (byte[8]) keyboard_events and assignment [153] (byte[8]) keyboard_events ← { fill( 8, 0) }
Eliminating unused variable (byte) keyboard_events_size and assignment [154] (byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) keyboard_modifiers and assignment [155] (byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0
Eliminating unused variable (byte) KEY_MODIFIER_CTRL and assignment [158] (byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4
Eliminating unused variable (byte) KEY_MODIFIER_COMMODORE and assignment [159] (byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8
Eliminating unused variable (byte) KEY_MODIFIER_SHIFT and assignment [161] (byte) KEY_MODIFIER_SHIFT ← (byte~) $0
Eliminating unused variable (byte[8]) keyboard_scan_values and assignment [162] (byte[8]) keyboard_scan_values ← { fill( 8, 0) }
Eliminating unused variable - keeping the call (void~) main::$2
Eliminating unused variable (byte~) $0 and assignment [81] (byte~) $0 ← (byte) KEY_MODIFIER_LSHIFT | (byte) KEY_MODIFIER_RSHIFT
Eliminating unused variable (byte) KEY_MODIFIER_LSHIFT and assignment [79] (byte) KEY_MODIFIER_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 1
Eliminating unused variable (byte) KEY_MODIFIER_RSHIFT and assignment [80] (byte) KEY_MODIFIER_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 2
Removing empty block @1
Removing empty block keyboard_matrix_read::@1
Removing empty block @2
@ -1154,6 +1621,9 @@ Removing empty block keyboard_key_pressed::@1
Removing empty block @3
Removing empty block keyboard_get_keycode::@1
Removing empty block @4
Removing empty block @5
Removing empty block @6
Removing empty block @7
Removing empty block main::@15
Removing empty block main::@4
Removing empty block main::@16
@ -1228,8 +1698,8 @@ CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
(byte) KEY_Q#0 ← (byte/signed byte/word/signed word/dword/signed dword) 62
(byte[]) keyboard_char_keycodes#0 ← { (byte) KEY_AT#0, (byte) KEY_A#0, (byte) KEY_B#0, (byte) KEY_C#0, (byte) KEY_D#0, (byte) KEY_E#0, (byte) KEY_F#0, (byte) KEY_G#0, (byte) KEY_H#0, (byte) KEY_I#0, (byte) KEY_J#0, (byte) KEY_K#0, (byte) KEY_L#0, (byte) KEY_M#0, (byte) KEY_N#0, (byte) KEY_O#0, (byte) KEY_P#0, (byte) KEY_Q#0, (byte) KEY_R#0, (byte) KEY_S#0, (byte) KEY_T#0, (byte) KEY_U#0, (byte) KEY_V#0, (byte) KEY_W#0, (byte) KEY_X#0, (byte) KEY_Y#0, (byte) KEY_Z#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP#0, (byte) KEY_ARROW_LEFT#0, (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, (byte) KEY_ASTERISK#0, (byte) KEY_PLUS#0, (byte) KEY_COMMA#0, (byte) KEY_MINUS#0, (byte) KEY_DOT#0, (byte) KEY_SLASH#0, (byte) KEY_0#0, (byte) KEY_1#0, (byte) KEY_2#0, (byte) KEY_3#0, (byte) KEY_4#0, (byte) KEY_5#0, (byte) KEY_6#0, (byte) KEY_7#0, (byte) KEY_8#0, (byte) KEY_9#0, (byte) KEY_COLON#0, (byte) KEY_SEMICOLON#0, (byte/signed byte/word/signed word/dword/signed dword) 63, (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[8]) keyboard_matrix_row_bitmask#0 ← { (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[]) keyboard_matrix_col_bitmask#0 ← { (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 }
to:@5
(byte[8]) keyboard_matrix_col_bitmask#0 ← { (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 }
to:@8
keyboard_init: scope:[keyboard_init] from main::@14
*((byte*) CIA1_PORT_A_DDR#0) ← (byte/word/signed word/dword/signed dword) 255
*((byte*) CIA1_PORT_B_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
@ -1263,7 +1733,7 @@ keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_presse
(byte) keyboard_key_pressed::colidx#1 ← phi( keyboard_key_pressed/(byte) keyboard_key_pressed::colidx#0 )
(byte) keyboard_matrix_read::return#5 ← phi( keyboard_key_pressed/(byte) keyboard_matrix_read::return#2 )
(byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#5
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#1)
(byte~) keyboard_key_pressed::$3 ← (byte~) keyboard_key_pressed::$2 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#1)
(byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$3
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
@ -1280,7 +1750,7 @@ keyboard_get_keycode::@return: scope:[keyboard_get_keycode] from keyboard_get_k
(byte) keyboard_get_keycode::return#1 ← (byte) keyboard_get_keycode::return#3
return
to:@return
main: scope:[main] from @5
main: scope:[main] from @8
(byte*) main::sc#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:main::@1
main::@1: scope:[main] from main main::@1
@ -1444,16 +1914,16 @@ main::@13: scope:[main] from main::@11 main::@13
main::@return: scope:[main] from main::@2
return
to:@return
@5: scope:[] from @begin
@8: scope:[] from @begin
call main param-assignment
to:@6
@6: scope:[] from @5
to:@9
@9: scope:[] from @8
to:@end
@end: scope:[] from @6
@end: scope:[] from @9
SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @8
(label) @9
(label) @begin
(label) @end
(byte*) CIA1_PORT_A
@ -1602,8 +2072,8 @@ SYMBOL TABLE SSA
(byte) keyboard_key_pressed::return#4
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0
(byte[]) keyboard_matrix_col_bitmask
(byte[]) keyboard_matrix_col_bitmask#0
(byte[8]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask#0
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte~) keyboard_matrix_read::$0
(label) keyboard_matrix_read::@return
@ -1745,7 +2215,7 @@ SYMBOL TABLE SSA
OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) main::@27
Culled Empty Block (label) main::@3
Culled Empty Block (label) @6
Culled Empty Block (label) @9
Succesful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not (boolean~) main::$7 ← (byte~) main::$5 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) main::$6 ← (byte~) main::$5 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not (boolean~) main::$15 ← (byte) main::key#0 == (byte/signed byte/word/signed word/dword/signed dword) 63 from (boolean~) main::$14 ← (byte) main::key#0 != (byte/signed byte/word/signed word/dword/signed dword) 63
@ -1908,7 +2378,7 @@ Constant (const byte) KEY_2#0 = 59
Constant (const byte) KEY_SPACE#0 = 60
Constant (const byte) KEY_Q#0 = 62
Constant (const byte[8]) keyboard_matrix_row_bitmask#0 = { 254, 253, 251, 247, 239, 223, 191, 127 }
Constant (const byte[]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Constant (const byte[8]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 }
Constant (const byte*) main::sc#0 = ((byte*))1024
Constant (const word/signed word/dword/signed dword) main::$0 = 1024+1000
Constant (const byte*) main::screen#0 = ((byte*))1024
@ -1976,7 +2446,7 @@ Constant inlined main::sc#0 = ((byte*))(word/signed word/dword/signed dword) 102
Constant inlined main::row#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::ch#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @5 @end main main::@1 main::@14 main::@2 main::@return main::@5 main::@6 main::@28 main::@7 main::@18 main::@9 main::@20 main::@21 main::@10 main::@29 main::@22 main::@30 main::@23 main::@11 main::@13 main::@8 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_get_keycode keyboard_get_keycode::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @8 @end main main::@1 main::@14 main::@2 main::@return main::@5 main::@6 main::@28 main::@7 main::@18 main::@9 main::@20 main::@21 main::@10 main::@29 main::@22 main::@30 main::@23 main::@11 main::@13 main::@8 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_get_keycode keyboard_get_keycode::@return keyboard_init keyboard_init::@return
Added new block during phi lifting main::@31(between main::@1 and main::@1)
Added new block during phi lifting main::@32(between main::@20 and main::@6)
Added new block during phi lifting main::@33(between main::@9 and main::@7)
@ -1985,9 +2455,9 @@ Added new block during phi lifting main::@35(between main::@30 and main::@11)
Added new block during phi lifting main::@36(between main::@29 and main::@11)
Added new block during phi lifting main::@37(between main::@11 and main::@13)
Added new block during phi lifting main::@38(between main::@13 and main::@13)
Block Sequence Planned @begin @5 @end main main::@1 main::@14 main::@2 main::@return main::@5 main::@6 main::@28 main::@7 main::@18 main::@9 main::@20 main::@21 main::@10 main::@29 main::@22 main::@30 main::@23 main::@11 main::@37 main::@13 main::@38 main::@34 main::@35 main::@36 main::@32 main::@33 main::@8 main::@31 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_get_keycode keyboard_get_keycode::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @8 @end main main::@1 main::@14 main::@2 main::@return main::@5 main::@6 main::@28 main::@7 main::@18 main::@9 main::@20 main::@21 main::@10 main::@29 main::@22 main::@30 main::@23 main::@11 main::@37 main::@13 main::@38 main::@34 main::@35 main::@36 main::@32 main::@33 main::@8 main::@31 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_get_keycode keyboard_get_keycode::@return keyboard_init keyboard_init::@return
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @8
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@14
@ -2035,9 +2505,9 @@ Culled Empty Block (label) main::@36
Culled Empty Block (label) main::@32
Culled Empty Block (label) main::@33
Culled Empty Block (label) main::@31
Block Sequence Planned @begin @5 @end main main::@1 main::@14 main::@2 main::@return main::@5 main::@6 main::@28 main::@7 main::@18 main::@9 main::@20 main::@21 main::@10 main::@29 main::@22 main::@30 main::@23 main::@11 main::@13 main::@8 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_get_keycode keyboard_get_keycode::@return keyboard_init keyboard_init::@return
Block Sequence Planned @begin @8 @end main main::@1 main::@14 main::@2 main::@return main::@5 main::@6 main::@28 main::@7 main::@18 main::@9 main::@20 main::@21 main::@10 main::@29 main::@22 main::@30 main::@23 main::@11 main::@13 main::@8 keyboard_key_pressed keyboard_key_pressed::@2 keyboard_key_pressed::@return keyboard_matrix_read keyboard_matrix_read::@return keyboard_get_keycode keyboard_get_keycode::@return keyboard_init keyboard_init::@return
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @8
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@14
@ -2057,14 +2527,14 @@ Propagating live ranges...
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi() [ ] ( )
to:@5
@5: scope:[] from @begin
to:@8
@8: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @5
@end: scope:[] from @8
[3] phi() [ ] ( )
main: scope:[main] from @5
main: scope:[main] from @8
[4] phi() [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@1
@ -2165,7 +2635,7 @@ keyboard_key_pressed: scope:[keyboard_key_pressed] from main::@22
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[56] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] )
[57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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
[58] 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 ] )
@ -2194,38 +2664,38 @@ keyboard_init::@return: scope:[keyboard_init] from keyboard_init
DOMINATORS
@begin dominated by @begin
@5 dominated by @begin @5
@end dominated by @end @begin @5
main dominated by main @begin @5
main::@1 dominated by main main::@1 @begin @5
main::@14 dominated by main main::@1 @begin main::@14 @5
main::@2 dominated by main main::@1 main::@2 @begin main::@14 @5
main::@return dominated by main::@return main main::@1 main::@2 @begin main::@14 @5
main::@5 dominated by main main::@1 main::@2 main::@5 @begin main::@14 @5
main::@6 dominated by main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
main::@28 dominated by main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
main::@7 dominated by main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
main::@18 dominated by main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@18 main::@14 @5
main::@9 dominated by main::@9 main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
main::@20 dominated by main::@9 main::@20 main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
main::@21 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
main::@10 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 @5
main::@29 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 @5
main::@22 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 @5
main::@30 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 main::@30 @begin main::@10 main::@14 @5
main::@23 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@23 main::@1 main::@2 main::@5 main::@6 main::@30 @begin main::@10 main::@14 @5
main::@11 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 main::@11 @begin main::@10 main::@14 @5
main::@13 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 main::@11 @begin main::@10 main::@13 main::@14 @5
main::@8 dominated by main::@7 main::@8 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
keyboard_key_pressed dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 keyboard_key_pressed @5
keyboard_key_pressed::@2 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 keyboard_key_pressed::@2 main::@5 main::@6 @begin main::@10 main::@14 keyboard_key_pressed @5
keyboard_key_pressed::@return dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 keyboard_key_pressed::@return main::@1 main::@2 keyboard_key_pressed::@2 main::@5 main::@6 @begin main::@10 main::@14 keyboard_key_pressed @5
keyboard_matrix_read dominated by keyboard_matrix_read main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @5
keyboard_matrix_read::@return dominated by keyboard_matrix_read main main::@1 main::@2 main::@5 main::@6 @begin keyboard_matrix_read::@return main::@14 @5
keyboard_get_keycode dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 keyboard_get_keycode @begin main::@10 main::@14 @5
keyboard_get_keycode::@return dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 keyboard_get_keycode @begin main::@10 main::@14 @5 keyboard_get_keycode::@return
keyboard_init dominated by main keyboard_init main::@1 @begin main::@14 @5
keyboard_init::@return dominated by main keyboard_init main::@1 keyboard_init::@return @begin main::@14 @5
@8 dominated by @begin @8
@end dominated by @end @begin @8
main dominated by main @begin @8
main::@1 dominated by main main::@1 @begin @8
main::@14 dominated by main main::@1 @begin main::@14 @8
main::@2 dominated by main main::@1 main::@2 @begin main::@14 @8
main::@return dominated by main::@return main main::@1 main::@2 @begin main::@14 @8
main::@5 dominated by main main::@1 main::@2 main::@5 @begin main::@14 @8
main::@6 dominated by main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
main::@28 dominated by main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
main::@7 dominated by main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
main::@18 dominated by main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@18 main::@14 @8
main::@9 dominated by main::@9 main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
main::@20 dominated by main::@9 main::@20 main::@7 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
main::@21 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
main::@10 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 @8
main::@29 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 @8
main::@22 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 @8
main::@30 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 main::@30 @begin main::@10 main::@14 @8
main::@23 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@23 main::@1 main::@2 main::@5 main::@6 main::@30 @begin main::@10 main::@14 @8
main::@11 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 main::@11 @begin main::@10 main::@14 @8
main::@13 dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 main::@11 @begin main::@10 main::@13 main::@14 @8
main::@8 dominated by main::@7 main::@8 main::@28 main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
keyboard_key_pressed dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 main::@5 main::@6 @begin main::@10 main::@14 keyboard_key_pressed @8
keyboard_key_pressed::@2 dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 main::@1 main::@2 keyboard_key_pressed::@2 main::@5 main::@6 @begin main::@10 main::@14 keyboard_key_pressed @8
keyboard_key_pressed::@return dominated by main::@9 main::@20 main::@7 main::@22 main::@21 main::@28 main main::@29 keyboard_key_pressed::@return main::@1 main::@2 keyboard_key_pressed::@2 main::@5 main::@6 @begin main::@10 main::@14 keyboard_key_pressed @8
keyboard_matrix_read dominated by keyboard_matrix_read main main::@1 main::@2 main::@5 main::@6 @begin main::@14 @8
keyboard_matrix_read::@return dominated by keyboard_matrix_read main main::@1 main::@2 main::@5 main::@6 @begin keyboard_matrix_read::@return main::@14 @8
keyboard_get_keycode dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 keyboard_get_keycode @begin main::@10 main::@14 @8
keyboard_get_keycode::@return dominated by main::@9 main::@20 main::@7 main::@21 main::@28 main main::@1 main::@2 main::@5 main::@6 keyboard_get_keycode @begin main::@10 main::@14 @8 keyboard_get_keycode::@return
keyboard_init dominated by main keyboard_init main::@1 @begin main::@14 @8
keyboard_init::@return dominated by main keyboard_init main::@1 keyboard_init::@return @begin main::@14 @8
NATURAL LOOPS
Found back edge: Loop head: main::@1 tails: main::@1 blocks: null
@ -2348,7 +2818,7 @@ VARIABLE REGISTER WEIGHTS
(byte) keyboard_key_pressed::return#2 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 4.0
(byte[]) keyboard_matrix_col_bitmask
(byte[8]) keyboard_matrix_col_bitmask
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
(byte) keyboard_matrix_read::return
(byte) keyboard_matrix_read::return#0 26.25
@ -2530,17 +3000,17 @@ INITIAL ASM
.const KEY_Q = $3e
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
jmp b5
//SEG4 @5
b5:
//SEG3 [1] phi from @begin to @8 [phi:@begin->@8]
b8_from_bbegin:
jmp b8
//SEG4 @8
b8:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
//SEG6 [4] phi from @8 to main [phi:@8->main]
main_from_b8:
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
//SEG7 [3] phi from @8 to @end [phi:@8->@end]
bend_from_b8:
jmp bend
//SEG8 @end
bend:
@ -2852,7 +3322,7 @@ keyboard_key_pressed: {
//SEG107 [56] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ) -- vbuz1=vbuz2
lda keyboard_matrix_read.return_2
sta _2
//SEG108 [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3
//SEG108 [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3
lda _2
ldy colidx
and keyboard_matrix_col_bitmask,y
@ -2935,7 +3405,7 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ ma
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ keyboard_key_pressed::key#0 ]
Statement [52] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#0 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ keyboard_key_pressed::colidx#0 ]
Statement [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) always clobbers reg byte a
Statement [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) always clobbers reg byte a
Statement [60] *((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:54 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a
Statement [61] (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:54 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a
Statement [65] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte/word/signed word/dword/signed dword) 255 [ ] ( main:2::keyboard_init:10 [ ] ) always clobbers reg byte a
@ -2952,7 +3422,7 @@ Statement [47] *((byte*) main::screen#2 + (byte) main::i#4) ← (byte) ' ' [ mai
Statement [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 ] ) always clobbers reg byte a
Statement [51] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#0 keyboard_key_pressed::colidx#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::key#0 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a
Statement [52] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#0 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ) always clobbers reg byte a
Statement [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) always clobbers reg byte a
Statement [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) always clobbers reg byte a
Statement [60] *((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:54 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 ] ) always clobbers reg byte a
Statement [61] (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:54 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a
Statement [65] *((const byte*) CIA1_PORT_A_DDR#0) ← (byte/word/signed word/dword/signed dword) 255 [ ] ( main:2::keyboard_init:10 [ ] ) always clobbers reg byte a
@ -3079,17 +3549,17 @@ ASSEMBLER BEFORE OPTIMIZATION
.const KEY_Q = $3e
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
jmp b5
//SEG4 @5
b5:
//SEG3 [1] phi from @begin to @8 [phi:@begin->@8]
b8_from_bbegin:
jmp b8
//SEG4 @8
b8:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @5 to main [phi:@5->main]
main_from_b5:
//SEG6 [4] phi from @8 to main [phi:@8->main]
main_from_b8:
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
//SEG7 [3] phi from @8 to @end [phi:@8->@end]
bend_from_b8:
jmp bend
//SEG8 @end
bend:
@ -3372,7 +3842,7 @@ keyboard_key_pressed: {
b2:
//SEG107 [56] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
// (byte~) keyboard_key_pressed::$2 = (byte) keyboard_matrix_read::return#2 // register copy reg byte a
//SEG108 [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1
//SEG108 [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1
ldy colidx
and keyboard_matrix_col_bitmask,y
jmp breturn
@ -3424,7 +3894,7 @@ keyboard_init: {
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_P, 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
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b5
Removing instruction jmp b8
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b14
@ -3460,9 +3930,9 @@ Replacing label b11_from_b30 with b11
Replacing label b10_from_b11 with b10
Replacing label b13_from_b13 with b13
Removing instruction bbegin:
Removing instruction b5_from_bbegin:
Removing instruction main_from_b5:
Removing instruction bend_from_b5:
Removing instruction b8_from_bbegin:
Removing instruction main_from_b8:
Removing instruction bend_from_b8:
Removing instruction b1_from_b1:
Removing instruction b14_from_b1:
Removing instruction b6_from_b20:
@ -3474,7 +3944,7 @@ Removing instruction b11_from_b30:
Removing instruction b13_from_b11:
Removing instruction b13_from_b13:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b5:
Removing instruction b8:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b14:
@ -3512,7 +3982,7 @@ Removing instruction b2:
Succesful ASM optimization Pass5RedundantLabelElimination
FINAL SYMBOL TABLE
(label) @5
(label) @8
(label) @begin
(label) @end
(byte*) CIA1_PORT_A
@ -3649,8 +4119,8 @@ FINAL SYMBOL TABLE
(byte) keyboard_key_pressed::return#2 reg byte a 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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
@ -3803,12 +4273,12 @@ Score: 56827
.const KEY_SPACE = $3c
.const KEY_Q = $3e
//SEG2 @begin
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
//SEG4 @5
//SEG3 [1] phi from @begin to @8 [phi:@begin->@8]
//SEG4 @8
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @5 to main [phi:@5->main]
//SEG6 [4] phi from @8 to main [phi:@8->main]
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
//SEG7 [3] phi from @8 to @end [phi:@8->@end]
//SEG8 @end
//SEG9 main
main: {
@ -4036,7 +4506,7 @@ keyboard_key_pressed: {
//SEG106 keyboard_key_pressed::@2
//SEG107 [56] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::keyboard_key_pressed:37 [ main::screen#2 main::ch#2 main::i#10 keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
// (byte~) keyboard_key_pressed::$2 = (byte) keyboard_matrix_read::return#2 // register copy reg byte a
//SEG108 [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1
//SEG108 [57] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_key_pressed::colidx#0) [ 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 ] ) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1
ldy colidx
and keyboard_matrix_col_bitmask,y
//SEG109 keyboard_key_pressed::@return

View File

@ -1,4 +1,4 @@
(label) @5
(label) @8
(label) @begin
(label) @end
(byte*) CIA1_PORT_A
@ -135,8 +135,8 @@
(byte) keyboard_key_pressed::return#2 reg byte a 202.0
(byte) keyboard_key_pressed::rowidx
(byte) keyboard_key_pressed::rowidx#0 reg byte a 4.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[8]) keyboard_matrix_col_bitmask
(const byte[8]) 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