1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-11 12:23:45 +00:00

Better test image for Two Plane Bitmap Mode. Added keyboard glitch tester and operator hi/lo problem test.

This commit is contained in:
jespergravgaard 2018-03-26 23:49:07 +02:00
parent 6cfa6633f4
commit 472e6c43bd
23 changed files with 6994 additions and 2476 deletions

View File

@ -0,0 +1,4 @@
asl
asl
asl
asl

View File

@ -45,6 +45,16 @@ public class TestPrograms {
AsmFragmentTemplateUsages.logUsages(log, false, false, false, false, false, false);
}
@Test
public void testOperatorLoHiProblem() throws IOException, URISyntaxException {
compileAndCompare("operator-lohi-problem");
}
@Test
public void testKeyboardGlitch() throws IOException, URISyntaxException {
compileAndCompare("keyboard-glitch");
}
@Test
public void testC64DtvGfxModes() throws IOException, URISyntaxException {
compileAndCompare("c64dtv-gfxmodes");

View File

@ -4,6 +4,7 @@ import "print.kc"
import "keyboard.kc"
void main() {
asm { sei } // Disable normal interrupt (prevent keyboard reading glitches)
*DTV_FEATURE = DTV_FEATURE_ENABLE;
while(true) {
menu();
@ -36,9 +37,14 @@ byte[] MENU_TEXT =
" (V) vicII (H) vicII+hicol (D) c64dtv@" +
"@" ;
const dword DTV_COLOR_BANK_DEFAULT = $1d800;
void menu() {
// DTV Graphics Bank
*DTV_GRAPHICS_VIC_BANK = (byte)((dword)MENU_CHARSET/$10000);
// DTV Color Bank
*DTV_COLOR_BANK_LO = <((word)(DTV_COLOR_BANK_DEFAULT/$400));
*DTV_COLOR_BANK_HI = 0; // >((word)(DTV_COLOR_BANK_DEFAULT/$400)) - fails currently because the high operator can't see the word type of the operand;
// DTV Graphics Mode
*DTV_CONTROL = 0;
// VIC Graphics Bank
@ -49,6 +55,10 @@ void menu() {
*VIC_CONTROL2 = VIC_CSEL;
// VIC Memory Pointers
*VIC_MEMORY = (byte)((((word)MENU_SCREEN&$3fff)/$40)|(((word)MENU_CHARSET&$3fff)/$400));
// DTV Palette - default
for(byte i : 0..$f) {
DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i];
}
// Char Colors
for(byte* c=COLS;c!=COLS+1000;c++) *c=LIGHT_GREEN;
// Screen colors
@ -64,14 +74,13 @@ void menu() {
mode_twoplanebitmap();
return;
}
byte* last = MENU_SCREEN+999;
(*last)++;
}
}
const byte* TWOPLANE_PLANEA = $4000;
const byte* TWOPLANE_PLANEB = $6000;
const byte* TWOPLANE_COLORS = $8000;
// Test the Two Plane Bitmap - generated from the two DTV linear graphics plane counters
// Two Plane Bitmap Mode (CHUNK/COLDIS/MCM = 0, ECM/BMM/HICOL/LINEAR = 1)
@ -95,13 +104,26 @@ void mode_twoplanebitmap() {
*DTV_PLANEB_STEP = 1;
*DTV_PLANEB_MODULO_LO = 0;
*DTV_PLANEB_MODULO_HI = 0;
// DTV Color Bank
*DTV_COLOR_BANK_LO = <(TWOPLANE_COLORS/$400);
*DTV_COLOR_BANK_HI = >(TWOPLANE_COLORS/$400);
// DTV Palette - Grey Tone
for(byte i : 0..$f) {
DTV_PALETTE[i] = i;
}
// Screen colors
*BORDERCOL = 0;
*BGCOL1 = GREEN; // Color for bits 00
*BGCOL2 = BLUE; // Color for bits 11
*BORDERCOL = $00;
*BGCOL1 = $70; // Color for bits 00
*BGCOL2 = $d4; // Color for bits 11
// Colors for bits 01 / 10
for(byte* c=COLS;c!=COLS+1000;c++) *c= <c;
byte* col=TWOPLANE_COLORS;
for(byte cy: 0..24 ) {
for(byte cx: 0..39) {
*col++ = (cy & $f)<<4 | (cx &$f);
}
}
// Graphics for Plane A - horizontal stripes
byte* gfxa = TWOPLANE_PLANEA;
for(byte ay : 0..199) {

View File

@ -21,9 +21,12 @@ const byte DTV_CONTROL_COLORRAM_OFF = $10;
const byte DTV_CONTROL_BADLINE_OFF = $20;
const byte DTV_CONTROL_CHUNKY_ON = $40;
// The contains colors for the 16 first colors ($00-$0f)
// Defines colors for the 16 first colors ($00-$0f)
const byte* DTV_PALETTE = $d200;
// Default vallues for the palette
byte[16] DTV_PALETTE_DEFAULT = { $00, $0f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, $05, $07, $df, $9a, $0a };
// Linear Graphics Plane A Counter Control
const byte* DTV_PLANEA_START_LO = $d03a;
const byte* DTV_PLANEA_START_MI = $d03b;

View File

@ -0,0 +1,50 @@
// Exploring keyboard glitch that finds "C" press when pressing space
// The glitch is caused by the "normal" C64 interrupt occuring just as the keyboard is read.
// Press "I" to disable interrupts (red border)
// Press "E" to enable interrupts (green border)
// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again.
// Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border)
// but never when they are disabled (red border)
import "keyboard.kc"
import "c64.kc"
void main() {
*BORDERCOL = GREEN;
while(true) {
menu();
}
}
byte* SCREEN = $400;
void menu() {
// Wait for key press
while(true) {
if(keyboard_key_pressed(KEY_C)!=0) {
pressed();
return;
}
if(keyboard_key_pressed(KEY_I)!=0) {
*BORDERCOL = RED;
asm { sei }
return;
}
if(keyboard_key_pressed(KEY_E)!=0) {
*BORDERCOL = GREEN;
asm { cli }
return;
}
(*SCREEN)++;
}
}
void pressed() {
(*BGCOL)++;
// Wait for key press
while(true) {
if(keyboard_key_pressed(KEY_SPACE)!=0) {
return;
}
}
}

View File

@ -115,6 +115,8 @@ void keyboard_init() {
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
byte keyboard_matrix_read(byte rowid) {
*CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid];
byte row_pressed_bits = ~*CIA1_PORT_B;
@ -128,7 +130,7 @@ byte keyboard_matrix_read(byte rowid) {
byte keyboard_key_pressed(byte key) {
byte colidx = key&7;
byte rowidx = key>>3;
return keyboard_matrix_read(rowidx)&keyboard_matrix_col_bitmask[colidx];
return keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx];
}
// Get the keycode corresponding to a specific screen code character

View File

@ -0,0 +1,13 @@
// Illustrates problem with constant evaluation of lo/hi-operator
// $20000 /$400 results in a byte value - confusing the lo/hi-evaluation
// which currently relies on getting the type from the literal value.
// A fix could be adding support for "declared" types for constant literal values
// - enabling the lo/hi to know that their operand is a word (from the cast).
const dword DVAL = $20000;
const byte* SCREEN = $400;
void main() {
SCREEN[0] = <(word)(DVAL/$400);
SCREEN[1] = >(word)(DVAL/$400);
}

View File

@ -53,9 +53,12 @@ const byte DTV_CONTROL_COLORRAM_OFF = $10;
const byte DTV_CONTROL_BADLINE_OFF = $20;
const byte DTV_CONTROL_CHUNKY_ON = $40;
// The contains colors for the 16 first colors ($00-$0f)
// Defines colors for the 16 first colors ($00-$0f)
const byte* DTV_PALETTE = $d200;
// Default vallues for the palette
byte[16] DTV_PALETTE_DEFAULT = { $00, $0f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, $05, $07, $df, $9a, $0a };
// Linear Graphics Plane A Counter Control
const byte* DTV_PLANEA_START_LO = $d03a;
const byte* DTV_PLANEA_START_MI = $d03b;
@ -239,6 +242,7 @@ STATEMENTS
(byte) DTV_CONTROL_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) DTV_CONTROL_CHUNKY_ON ← (byte/signed byte/word/signed word/dword/signed dword) 64
(byte*) DTV_PALETTE ← (word/dword/signed dword) 53760
(byte[16]) 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 }
(byte*) DTV_PLANEA_START_LO ← (word/dword/signed dword) 53306
(byte*) DTV_PLANEA_START_MI ← (word/dword/signed dword) 53307
(byte*) DTV_PLANEA_START_HI ← (word/dword/signed dword) 53317
@ -335,6 +339,7 @@ SYMBOLS
(byte*) DTV_GRAPHICS_HICOL_BANK
(byte*) DTV_GRAPHICS_VIC_BANK
(byte*) DTV_PALETTE
(byte[16]) DTV_PALETTE_DEFAULT
(byte*) DTV_PLANEA_MODULO_HI
(byte*) DTV_PLANEA_MODULO_LO
(byte*) DTV_PLANEA_START_HI
@ -524,6 +529,7 @@ INITIAL CONTROL FLOW GRAPH
(byte) DTV_CONTROL_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32
(byte) DTV_CONTROL_CHUNKY_ON ← (byte/signed byte/word/signed word/dword/signed dword) 64
(byte*) DTV_PALETTE ← ((byte*)) (word/dword/signed dword) 53760
(byte[16]) 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 }
(byte*) DTV_PLANEA_START_LO ← ((byte*)) (word/dword/signed dword) 53306
(byte*) DTV_PLANEA_START_MI ← ((byte*)) (word/dword/signed dword) 53307
(byte*) DTV_PLANEA_START_HI ← ((byte*)) (word/dword/signed dword) 53317
@ -665,23 +671,24 @@ Eliminating unused variable (byte) DTV_CONTROL_LINEAR_ADDRESSING_ON and assignme
Eliminating unused variable (byte) DTV_CONTROL_OVERSCAN_ON and assignment [63] (byte) DTV_CONTROL_OVERSCAN_ON ← (byte/signed byte/word/signed word/dword/signed dword) 8
Eliminating unused variable (byte) DTV_CONTROL_COLORRAM_OFF and assignment [64] (byte) DTV_CONTROL_COLORRAM_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 16
Eliminating unused variable (byte) DTV_CONTROL_CHUNKY_ON and assignment [66] (byte) DTV_CONTROL_CHUNKY_ON ← (byte/signed byte/word/signed word/dword/signed dword) 64
Eliminating unused variable (byte*) DTV_PLANEA_START_LO and assignment [68] (byte*) DTV_PLANEA_START_LO ← ((byte*)) (word/dword/signed dword) 53306
Eliminating unused variable (byte*) DTV_PLANEA_START_MI and assignment [69] (byte*) DTV_PLANEA_START_MI ← ((byte*)) (word/dword/signed dword) 53307
Eliminating unused variable (byte*) DTV_PLANEA_START_HI and assignment [70] (byte*) DTV_PLANEA_START_HI ← ((byte*)) (word/dword/signed dword) 53317
Eliminating unused variable (byte*) DTV_PLANEA_STEP and assignment [71] (byte*) DTV_PLANEA_STEP ← ((byte*)) (word/dword/signed dword) 53318
Eliminating unused variable (byte*) DTV_PLANEA_MODULO_LO and assignment [72] (byte*) DTV_PLANEA_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53304
Eliminating unused variable (byte*) DTV_PLANEA_MODULO_HI and assignment [73] (byte*) DTV_PLANEA_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53305
Eliminating unused variable (byte*) DTV_PLANEB_START_LO and assignment [74] (byte*) DTV_PLANEB_START_LO ← ((byte*)) (word/dword/signed dword) 53321
Eliminating unused variable (byte*) DTV_PLANEB_START_MI and assignment [75] (byte*) DTV_PLANEB_START_MI ← ((byte*)) (word/dword/signed dword) 53322
Eliminating unused variable (byte*) DTV_PLANEB_START_HI and assignment [76] (byte*) DTV_PLANEB_START_HI ← ((byte*)) (word/dword/signed dword) 53323
Eliminating unused variable (byte*) DTV_PLANEB_STEP and assignment [77] (byte*) DTV_PLANEB_STEP ← ((byte*)) (word/dword/signed dword) 53324
Eliminating unused variable (byte*) DTV_PLANEB_MODULO_LO and assignment [78] (byte*) DTV_PLANEB_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53319
Eliminating unused variable (byte*) DTV_PLANEB_MODULO_HI and assignment [79] (byte*) DTV_PLANEB_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53320
Eliminating unused variable (byte*) DTV_SPRITE_BANK and assignment [80] (byte*) DTV_SPRITE_BANK ← ((byte*)) (word/dword/signed dword) 53325
Eliminating unused variable (byte*) DTV_COLOR_BANK_LO and assignment [81] (byte*) DTV_COLOR_BANK_LO ← ((byte*)) (word/dword/signed dword) 53302
Eliminating unused variable (byte*) DTV_COLOR_BANK_HI and assignment [82] (byte*) DTV_COLOR_BANK_HI ← ((byte*)) (word/dword/signed dword) 53303
Eliminating unused variable (byte*) DTV_GRAPHICS_VIC_BANK and assignment [83] (byte*) DTV_GRAPHICS_VIC_BANK ← ((byte*)) (word/dword/signed dword) 53309
Eliminating unused variable (byte*) DTV_GRAPHICS_HICOL_BANK and assignment [84] (byte*) DTV_GRAPHICS_HICOL_BANK ← ((byte*)) (word/dword/signed dword) 53310
Eliminating unused variable (byte[16]) DTV_PALETTE_DEFAULT and assignment [68] (byte[16]) 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 }
Eliminating unused variable (byte*) DTV_PLANEA_START_LO and assignment [69] (byte*) DTV_PLANEA_START_LO ← ((byte*)) (word/dword/signed dword) 53306
Eliminating unused variable (byte*) DTV_PLANEA_START_MI and assignment [70] (byte*) DTV_PLANEA_START_MI ← ((byte*)) (word/dword/signed dword) 53307
Eliminating unused variable (byte*) DTV_PLANEA_START_HI and assignment [71] (byte*) DTV_PLANEA_START_HI ← ((byte*)) (word/dword/signed dword) 53317
Eliminating unused variable (byte*) DTV_PLANEA_STEP and assignment [72] (byte*) DTV_PLANEA_STEP ← ((byte*)) (word/dword/signed dword) 53318
Eliminating unused variable (byte*) DTV_PLANEA_MODULO_LO and assignment [73] (byte*) DTV_PLANEA_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53304
Eliminating unused variable (byte*) DTV_PLANEA_MODULO_HI and assignment [74] (byte*) DTV_PLANEA_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53305
Eliminating unused variable (byte*) DTV_PLANEB_START_LO and assignment [75] (byte*) DTV_PLANEB_START_LO ← ((byte*)) (word/dword/signed dword) 53321
Eliminating unused variable (byte*) DTV_PLANEB_START_MI and assignment [76] (byte*) DTV_PLANEB_START_MI ← ((byte*)) (word/dword/signed dword) 53322
Eliminating unused variable (byte*) DTV_PLANEB_START_HI and assignment [77] (byte*) DTV_PLANEB_START_HI ← ((byte*)) (word/dword/signed dword) 53323
Eliminating unused variable (byte*) DTV_PLANEB_STEP and assignment [78] (byte*) DTV_PLANEB_STEP ← ((byte*)) (word/dword/signed dword) 53324
Eliminating unused variable (byte*) DTV_PLANEB_MODULO_LO and assignment [79] (byte*) DTV_PLANEB_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53319
Eliminating unused variable (byte*) DTV_PLANEB_MODULO_HI and assignment [80] (byte*) DTV_PLANEB_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53320
Eliminating unused variable (byte*) DTV_SPRITE_BANK and assignment [81] (byte*) DTV_SPRITE_BANK ← ((byte*)) (word/dword/signed dword) 53325
Eliminating unused variable (byte*) DTV_COLOR_BANK_LO and assignment [82] (byte*) DTV_COLOR_BANK_LO ← ((byte*)) (word/dword/signed dword) 53302
Eliminating unused variable (byte*) DTV_COLOR_BANK_HI and assignment [83] (byte*) DTV_COLOR_BANK_HI ← ((byte*)) (word/dword/signed dword) 53303
Eliminating unused variable (byte*) DTV_GRAPHICS_VIC_BANK and assignment [84] (byte*) DTV_GRAPHICS_VIC_BANK ← ((byte*)) (word/dword/signed dword) 53309
Eliminating unused variable (byte*) DTV_GRAPHICS_HICOL_BANK and assignment [85] (byte*) DTV_GRAPHICS_HICOL_BANK ← ((byte*)) (word/dword/signed dword) 53310
Removing empty block main::@9
Removing empty block main::@3
Removing empty block main::@10

View File

@ -18,14 +18,13 @@
.label CIA1_PORT_B = $dc01
.label CIA2_PORT_A = $dd00
.label CIA2_PORT_A_DDR = $dd02
.const GREEN = 5
.const BLUE = 6
.const LIGHT_GREEN = $d
.label DTV_FEATURE = $d03f
.const DTV_FEATURE_ENABLE = 1
.label DTV_CONTROL = $d03c
.const DTV_CONTROL_LINEAR_ADDRESSING_ON = 1
.const DTV_CONTROL_HIGHCOLOR_ON = 4
.label DTV_PALETTE = $d200
.label DTV_PLANEA_START_LO = $d03a
.label DTV_PLANEA_START_MI = $d03b
.label DTV_PLANEA_START_HI = $d045
@ -38,17 +37,22 @@
.label DTV_PLANEB_STEP = $d04c
.label DTV_PLANEB_MODULO_LO = $d047
.label DTV_PLANEB_MODULO_HI = $d048
.label DTV_COLOR_BANK_LO = $d036
.label DTV_COLOR_BANK_HI = $d037
.label DTV_GRAPHICS_VIC_BANK = $d03d
.const KEY_C = $14
.const KEY_SPACE = $3c
.label MENU_SCREEN = $8000
.label MENU_CHARSET = $9800
.const DTV_COLOR_BANK_DEFAULT = $1d800
.label TWOPLANE_PLANEA = $4000
.label TWOPLANE_PLANEB = $6000
.label TWOPLANE_COLORS = $8000
.label print_char_cursor = 5
.label print_line_cursor = 7
jsr main
main: {
sei
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
b2:
@ -56,11 +60,13 @@ main: {
jmp b2
}
menu: {
.label last = MENU_SCREEN+$3e7
.label c = 2
lda #($ffffffff&MENU_CHARSET)/$10000
sta DTV_GRAPHICS_VIC_BANK
lda #DTV_COLOR_BANK_DEFAULT/$400
sta DTV_COLOR_BANK_LO
lda #0
sta DTV_COLOR_BANK_HI
sta DTV_CONTROL
lda #3
sta CIA2_PORT_A_DDR
@ -72,11 +78,18 @@ menu: {
sta VIC_CONTROL2
lda #(MENU_SCREEN&$3fff)/$40|(MENU_CHARSET&$3fff)/$400
sta VIC_MEMORY
ldx #0
b1:
lda DTV_PALETTE_DEFAULT,x
sta DTV_PALETTE,x
inx
cpx #$10
bne b1
lda #<COLS
sta c
lda #>COLS
sta c+1
b1:
b2:
lda #LIGHT_GREEN
ldy #0
sta (c),y
@ -86,32 +99,31 @@ menu: {
!:
lda c+1
cmp #>COLS+$3e8
bne b1
bne b2
lda c
cmp #<COLS+$3e8
bne b1
bne b2
lda #0
sta BGCOL
sta BORDERCOL
jsr print_set_screen
jsr print_cls
jsr print_str_lines
jmp b3
jmp b4
breturn:
rts
b3:
b4:
ldy #KEY_C
jsr keyboard_key_pressed
cmp #0
beq b5
beq b4
jsr mode_twoplanebitmap
jmp breturn
b5:
inc last
jmp b3
}
mode_twoplanebitmap: {
.label c = 2
.label _15 = 9
.label col = 2
.label cy = 4
.label gfxa = 2
.label ay = 4
.label gfxb = 2
@ -144,42 +156,69 @@ mode_twoplanebitmap: {
lda #0
sta DTV_PLANEB_MODULO_LO
sta DTV_PLANEB_MODULO_HI
sta BORDERCOL
lda #GREEN
sta BGCOL1
lda #BLUE
sta BGCOL2
lda #<COLS
sta c
lda #>COLS
sta c+1
lda #<TWOPLANE_COLORS/$400
sta DTV_COLOR_BANK_LO
lda #>TWOPLANE_COLORS/$400
sta DTV_COLOR_BANK_HI
lda #0
b1:
lda c
tax
sta DTV_PALETTE,x
clc
adc #1
cmp #$10
bne b1
lda #0
sta BORDERCOL
lda #$70
sta BGCOL1
lda #$d4
sta BGCOL2
lda #<TWOPLANE_COLORS
sta col
lda #>TWOPLANE_COLORS
sta col+1
lda #0
sta cy
b2:
ldx #0
b3:
lda #$f
and cy
asl
asl
asl
asl
sta _15
txa
and #$f
ora _15
ldy #0
sta (c),y
inc c
sta (col),y
inc col
bne !+
inc c+1
inc col+1
!:
lda c+1
cmp #>COLS+$3e8
bne b1
lda c
cmp #<COLS+$3e8
bne b1
inx
cpx #$28
bne b3
inc cy
lda cy
cmp #$19
bne b2
lda #<TWOPLANE_PLANEA
sta gfxa
lda #>TWOPLANE_PLANEA
sta gfxa+1
lda #0
sta ay
b2:
b4:
ldx #0
b3:
b5:
lda #4
and ay
cmp #0
bne b4
bne b6
lda #0
tay
sta (gfxa),y
@ -187,23 +226,23 @@ mode_twoplanebitmap: {
bne !+
inc gfxa+1
!:
b5:
b7:
inx
cpx #$28
bne b3
bne b5
inc ay
lda ay
cmp #$c8
bne b2
bne b4
lda #0
sta by
lda #<TWOPLANE_PLANEB
sta gfxb
lda #>TWOPLANE_PLANEB
sta gfxb+1
b6:
b8:
ldx #0
b7:
b9:
lda #$f
ldy #0
sta (gfxb),y
@ -213,21 +252,21 @@ mode_twoplanebitmap: {
!:
inx
cpx #$28
bne b7
bne b9
inc by
lda by
cmp #$c8
bne b6
jmp b9
bne b8
jmp b11
breturn:
rts
b9:
b11:
ldy #KEY_SPACE
jsr keyboard_key_pressed
cmp #0
beq b9
beq b11
jmp breturn
b4:
b6:
lda #$ff
ldy #0
sta (gfxa),y
@ -235,7 +274,7 @@ mode_twoplanebitmap: {
bne !+
inc gfxa+1
!:
jmp b5
jmp b7
}
keyboard_key_pressed: {
tya
@ -346,6 +385,7 @@ print_cls: {
print_set_screen: {
rts
}
DTV_PALETTE_DEFAULT: .byte 0, $f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, 5, 7, $df, $9a, $a
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
MENU_TEXT: .text "C64DTV Graphics Modes EMBLHCC@"+" CCMIIHO@"+" MMMNCUL@"+"----------------------------------------@"+"1. Standard Char (V) 0000000@"+"2. Extended Color Char (V) 1000000@"+"3. Multicolor Char (V) 0100000@"+"4. Standard Bitmap (V) 0010000@"+"5. Multicolor Bitmap (V) 0110000@"+"6. High Color Standard Char (H) 0000100@"+"7. High Extended Color Char (H) 1000100@"+"8. High Multicolor Char (H) 0100100@"+"9. High Multicolor Bitmap (H) 0110100@"+"a. Sixs Fred (D) 1111100@"+"b. Sixs Fred 2 (D) 1111000@"+"c. Two Plane Bitmap (D) 1011100@"+"d. Two Plane Multicol Bitmap (D) 1111100@"+"e. 8bpp Pixel Cell (D) 1101110@"+"f. Chunky 8bpp Bitmap (D) 1101111@"+"----------------------------------------@"+" (V) vicII (H) vicII+hicol (D) c64dtv@"+"@"

View File

@ -8,233 +8,262 @@
@end: scope:[] from @21
[3] phi() [ ] ( )
main: scope:[main] from @21
[4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] )
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
[5] if(true) goto main::@2 [ ] ( main:2 [ ] )
[6] if(true) goto main::@2 [ ] ( main:2 [ ] )
to:main::@return
main::@return: scope:[main] from main::@1
[6] return [ ] ( main:2 [ ] )
[7] return [ ] ( main:2 [ ] )
to:@return
main::@2: scope:[main] from main::@1
[7] phi() [ ] ( main:2 [ ] )
[8] call menu param-assignment [ ] ( main:2 [ ] )
[8] phi() [ ] ( main:2 [ ] )
[9] call menu param-assignment [ ] ( main:2 [ ] )
to:main::@1
menu: scope:[menu] from main::@2
[9] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← ((byte))((dword))(const byte*) MENU_CHARSET#0/(dword/signed dword) 65536 [ ] ( main:2::menu:8 [ ] )
[10] *((const byte*) DTV_CONTROL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8 [ ] )
[11] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2::menu:8 [ ] )
[12] *((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 [ ] ( main:2::menu:8 [ ] )
[13] *((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 [ ] ( main:2::menu:8 [ ] )
[14] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_CSEL#0 [ ] ( main:2::menu:8 [ ] )
[15] *((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 [ ] ( main:2::menu:8 [ ] )
[10] *((const byte*) DTV_GRAPHICS_VIC_BANK#0) ← ((byte))((dword))(const byte*) MENU_CHARSET#0/(dword/signed dword) 65536 [ ] ( main:2::menu:9 [ ] )
[11] *((const byte*) DTV_COLOR_BANK_LO#0) ← <((word))(const dword) DTV_COLOR_BANK_DEFAULT#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2::menu:9 [ ] )
[12] *((const byte*) DTV_COLOR_BANK_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9 [ ] )
[13] *((const byte*) DTV_CONTROL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9 [ ] )
[14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2::menu:9 [ ] )
[15] *((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 [ ] ( main:2::menu:9 [ ] )
[16] *((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 [ ] ( main:2::menu:9 [ ] )
[17] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_CSEL#0 [ ] ( main:2::menu:9 [ ] )
[18] *((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 [ ] ( main:2::menu:9 [ ] )
to:menu::@1
menu::@1: scope:[menu] from menu menu::@1
[16] (byte*) menu::c#2 ← phi( menu/(const byte*) COLS#0 menu::@1/(byte*) menu::c#1 ) [ menu::c#2 ] ( main:2::menu:8 [ menu::c#2 ] )
[17] *((byte*) menu::c#2) ← (const byte) LIGHT_GREEN#0 [ menu::c#2 ] ( main:2::menu:8 [ menu::c#2 ] )
[18] (byte*) menu::c#1 ← ++ (byte*) menu::c#2 [ menu::c#1 ] ( main:2::menu:8 [ menu::c#1 ] )
[19] if((byte*) menu::c#1!=(const byte*) COLS#0+(word/signed word/dword/signed dword) 1000) goto menu::@1 [ menu::c#1 ] ( main:2::menu:8 [ menu::c#1 ] )
to:menu::@6
menu::@6: scope:[menu] from menu::@1
[20] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8 [ ] )
[21] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8 [ ] )
[22] call print_set_screen param-assignment [ ] ( main:2::menu:8 [ ] )
to:menu::@12
menu::@12: scope:[menu] from menu::@6
[23] phi() [ ] ( main:2::menu:8 [ ] )
[24] call print_cls param-assignment [ ] ( main:2::menu:8 [ ] )
to:menu::@13
menu::@13: scope:[menu] from menu::@12
[25] phi() [ ] ( main:2::menu:8 [ ] )
[26] call print_str_lines param-assignment [ ] ( main:2::menu:8 [ ] )
[19] (byte) menu::i#2 ← phi( menu/(byte/signed byte/word/signed word/dword/signed dword) 0 menu::@1/(byte) menu::i#1 ) [ menu::i#2 ] ( main:2::menu:9 [ menu::i#2 ] )
[20] *((const byte*) DTV_PALETTE#0 + (byte) menu::i#2) ← *((const byte[16]) DTV_PALETTE_DEFAULT#0 + (byte) menu::i#2) [ menu::i#2 ] ( main:2::menu:9 [ menu::i#2 ] )
[21] (byte) menu::i#1 ← ++ (byte) menu::i#2 [ menu::i#1 ] ( main:2::menu:9 [ menu::i#1 ] )
[22] if((byte) menu::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto menu::@1 [ menu::i#1 ] ( main:2::menu:9 [ menu::i#1 ] )
to:menu::@2
menu::@2: scope:[menu] from menu::@13 menu::@5
[27] if(true) goto menu::@3 [ ] ( main:2::menu:8 [ ] )
to:menu::@return
menu::@return: scope:[menu] from menu::@2 menu::@9
[28] return [ ] ( main:2::menu:8 [ ] )
to:@return
menu::@3: scope:[menu] from menu::@2
[29] phi() [ ] ( main:2::menu:8 [ ] )
[30] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:8 [ keyboard_key_pressed::return#0 ] )
[31] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#2 ] ( main:2::menu:8 [ keyboard_key_pressed::return#2 ] )
menu::@2: scope:[menu] from menu::@1 menu::@2
[23] (byte*) menu::c#2 ← phi( menu::@2/(byte*) menu::c#1 menu::@1/(const byte*) COLS#0 ) [ menu::c#2 ] ( main:2::menu:9 [ menu::c#2 ] )
[24] *((byte*) menu::c#2) ← (const byte) LIGHT_GREEN#0 [ menu::c#2 ] ( main:2::menu:9 [ menu::c#2 ] )
[25] (byte*) menu::c#1 ← ++ (byte*) menu::c#2 [ menu::c#1 ] ( main:2::menu:9 [ menu::c#1 ] )
[26] if((byte*) menu::c#1!=(const byte*) COLS#0+(word/signed word/dword/signed dword) 1000) goto menu::@2 [ menu::c#1 ] ( main:2::menu:9 [ menu::c#1 ] )
to:menu::@8
menu::@8: scope:[menu] from menu::@2
[27] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9 [ ] )
[28] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9 [ ] )
[29] call print_set_screen param-assignment [ ] ( main:2::menu:9 [ ] )
to:menu::@14
menu::@14: scope:[menu] from menu::@8
[30] phi() [ ] ( main:2::menu:9 [ ] )
[31] call print_cls param-assignment [ ] ( main:2::menu:9 [ ] )
to:menu::@15
menu::@15: scope:[menu] from menu::@3
[32] (byte~) menu::$22 ← (byte) keyboard_key_pressed::return#2 [ menu::$22 ] ( main:2::menu:8 [ menu::$22 ] )
[33] if((byte~) menu::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@5 [ ] ( main:2::menu:8 [ ] )
to:menu::@9
menu::@9: scope:[menu] from menu::@15
[34] phi() [ ] ( main:2::menu:8 [ ] )
[35] call mode_twoplanebitmap param-assignment [ ] ( main:2::menu:8 [ ] )
menu::@15: scope:[menu] from menu::@14
[32] phi() [ ] ( main:2::menu:9 [ ] )
[33] call print_str_lines param-assignment [ ] ( main:2::menu:9 [ ] )
to:menu::@3
menu::@3: scope:[menu] from menu::@15 menu::@17
[34] if(true) goto menu::@4 [ ] ( main:2::menu:9 [ ] )
to:menu::@return
menu::@5: scope:[menu] from menu::@15
[36] *((const byte*) menu::last#0) ← ++ *((const byte*) menu::last#0) [ ] ( main:2::menu:8 [ ] )
to:menu::@2
mode_twoplanebitmap: scope:[mode_twoplanebitmap] from menu::@9
[37] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_CONTROL_HIGHCOLOR_ON#0|(const byte) DTV_CONTROL_LINEAR_ADDRESSING_ON#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[38] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[39] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_CSEL#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[40] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) TWOPLANE_PLANEA#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[41] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) TWOPLANE_PLANEA#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[42] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[43] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[44] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[45] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[46] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) TWOPLANE_PLANEB#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[47] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) TWOPLANE_PLANEB#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[48] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[49] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[50] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[51] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[52] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[53] *((const byte*) BGCOL1#0) ← (const byte) GREEN#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[54] *((const byte*) BGCOL2#0) ← (const byte) BLUE#0 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
menu::@return: scope:[menu] from menu::@11 menu::@3
[35] return [ ] ( main:2::menu:9 [ ] )
to:@return
menu::@4: scope:[menu] from menu::@3
[36] phi() [ ] ( main:2::menu:9 [ ] )
[37] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:9 [ keyboard_key_pressed::return#0 ] )
[38] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#2 ] ( main:2::menu:9 [ keyboard_key_pressed::return#2 ] )
to:menu::@17
menu::@17: scope:[menu] from menu::@4
[39] (byte~) menu::$26 ← (byte) keyboard_key_pressed::return#2 [ menu::$26 ] ( main:2::menu:9 [ menu::$26 ] )
[40] if((byte~) menu::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@3 [ ] ( main:2::menu:9 [ ] )
to:menu::@11
menu::@11: scope:[menu] from menu::@17
[41] phi() [ ] ( main:2::menu:9 [ ] )
[42] call mode_twoplanebitmap param-assignment [ ] ( main:2::menu:9 [ ] )
to:menu::@return
mode_twoplanebitmap: scope:[mode_twoplanebitmap] from menu::@11
[43] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_CONTROL_HIGHCOLOR_ON#0|(const byte) DTV_CONTROL_LINEAR_ADDRESSING_ON#0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[44] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_ECM#0|(const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[45] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_CSEL#0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[46] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) TWOPLANE_PLANEA#0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[47] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) TWOPLANE_PLANEA#0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[48] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[49] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[50] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[51] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[52] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) TWOPLANE_PLANEB#0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[53] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) TWOPLANE_PLANEB#0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[54] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[55] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[56] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[57] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[58] *((const byte*) DTV_COLOR_BANK_LO#0) ← <(const byte*) TWOPLANE_COLORS#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[59] *((const byte*) DTV_COLOR_BANK_HI#0) ← >(const byte*) TWOPLANE_COLORS#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
to:mode_twoplanebitmap::@1
mode_twoplanebitmap::@1: scope:[mode_twoplanebitmap] from mode_twoplanebitmap mode_twoplanebitmap::@1
[55] (byte*) mode_twoplanebitmap::c#2 ← phi( mode_twoplanebitmap/(const byte*) COLS#0 mode_twoplanebitmap::@1/(byte*) mode_twoplanebitmap::c#1 ) [ mode_twoplanebitmap::c#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::c#2 ] )
[56] (byte~) mode_twoplanebitmap::$9 ← < (byte*) mode_twoplanebitmap::c#2 [ mode_twoplanebitmap::c#2 mode_twoplanebitmap::$9 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::c#2 mode_twoplanebitmap::$9 ] )
[57] *((byte*) mode_twoplanebitmap::c#2) ← (byte~) mode_twoplanebitmap::$9 [ mode_twoplanebitmap::c#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::c#2 ] )
[58] (byte*) mode_twoplanebitmap::c#1 ← ++ (byte*) mode_twoplanebitmap::c#2 [ mode_twoplanebitmap::c#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::c#1 ] )
[59] if((byte*) mode_twoplanebitmap::c#1!=(const byte*) COLS#0+(word/signed word/dword/signed dword) 1000) goto mode_twoplanebitmap::@1 [ mode_twoplanebitmap::c#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::c#1 ] )
[60] (byte) mode_twoplanebitmap::i#2 ← phi( mode_twoplanebitmap/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@1/(byte) mode_twoplanebitmap::i#1 ) [ mode_twoplanebitmap::i#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::i#2 ] )
[61] *((const byte*) DTV_PALETTE#0 + (byte) mode_twoplanebitmap::i#2) ← (byte) mode_twoplanebitmap::i#2 [ mode_twoplanebitmap::i#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::i#2 ] )
[62] (byte) mode_twoplanebitmap::i#1 ← ++ (byte) mode_twoplanebitmap::i#2 [ mode_twoplanebitmap::i#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::i#1 ] )
[63] if((byte) mode_twoplanebitmap::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto mode_twoplanebitmap::@1 [ mode_twoplanebitmap::i#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::i#1 ] )
to:mode_twoplanebitmap::@14
mode_twoplanebitmap::@14: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@1
[64] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[65] *((const byte*) BGCOL1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 112 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[66] *((const byte*) BGCOL2#0) ← (byte/word/signed word/dword/signed dword) 212 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
to:mode_twoplanebitmap::@2
mode_twoplanebitmap::@2: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@1 mode_twoplanebitmap::@15
[60] (byte*) mode_twoplanebitmap::gfxa#6 ← phi( mode_twoplanebitmap::@1/(const byte*) TWOPLANE_PLANEA#0 mode_twoplanebitmap::@15/(byte*) mode_twoplanebitmap::gfxa#7 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] )
[60] (byte) mode_twoplanebitmap::ay#4 ← phi( mode_twoplanebitmap::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@15/(byte) mode_twoplanebitmap::ay#1 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] )
mode_twoplanebitmap::@2: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@14 mode_twoplanebitmap::@15
[67] (byte*) mode_twoplanebitmap::col#3 ← phi( mode_twoplanebitmap::@14/(const byte*) TWOPLANE_COLORS#0 mode_twoplanebitmap::@15/(byte*) mode_twoplanebitmap::col#1 ) [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#3 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#3 ] )
[67] (byte) mode_twoplanebitmap::cy#4 ← phi( mode_twoplanebitmap::@14/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@15/(byte) mode_twoplanebitmap::cy#1 ) [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#3 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#3 ] )
to:mode_twoplanebitmap::@3
mode_twoplanebitmap::@3: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@2 mode_twoplanebitmap::@5
[61] (byte) mode_twoplanebitmap::ax#2 ← phi( mode_twoplanebitmap::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@5/(byte) mode_twoplanebitmap::ax#1 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[61] (byte*) mode_twoplanebitmap::gfxa#3 ← phi( mode_twoplanebitmap::@2/(byte*) mode_twoplanebitmap::gfxa#6 mode_twoplanebitmap::@5/(byte*) mode_twoplanebitmap::gfxa#7 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[62] (byte~) mode_twoplanebitmap::$12 ← (byte) mode_twoplanebitmap::ay#4 & (byte/signed byte/word/signed word/dword/signed dword) 4 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::$12 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::$12 ] )
[63] if((byte~) mode_twoplanebitmap::$12!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_twoplanebitmap::@4 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
to:mode_twoplanebitmap::@13
mode_twoplanebitmap::@13: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@3
[64] *((byte*) mode_twoplanebitmap::gfxa#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[65] (byte*) mode_twoplanebitmap::gfxa#2 ← ++ (byte*) mode_twoplanebitmap::gfxa#3 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#2 ] )
to:mode_twoplanebitmap::@5
mode_twoplanebitmap::@5: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@13 mode_twoplanebitmap::@4
[66] (byte*) mode_twoplanebitmap::gfxa#7 ← phi( mode_twoplanebitmap::@13/(byte*) mode_twoplanebitmap::gfxa#2 mode_twoplanebitmap::@4/(byte*) mode_twoplanebitmap::gfxa#1 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#2 ] )
[67] (byte) mode_twoplanebitmap::ax#1 ← ++ (byte) mode_twoplanebitmap::ax#2 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] )
[68] if((byte) mode_twoplanebitmap::ax#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto mode_twoplanebitmap::@3 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] )
mode_twoplanebitmap::@3: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@2 mode_twoplanebitmap::@3
[68] (byte*) mode_twoplanebitmap::col#2 ← phi( mode_twoplanebitmap::@2/(byte*) mode_twoplanebitmap::col#3 mode_twoplanebitmap::@3/(byte*) mode_twoplanebitmap::col#1 ) [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 ] )
[68] (byte) mode_twoplanebitmap::cx#2 ← phi( mode_twoplanebitmap::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@3/(byte) mode_twoplanebitmap::cx#1 ) [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 ] )
[69] (byte~) mode_twoplanebitmap::$14 ← (byte) mode_twoplanebitmap::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$14 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$14 ] )
[70] (byte~) mode_twoplanebitmap::$15 ← (byte~) mode_twoplanebitmap::$14 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$15 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$15 ] )
[71] (byte~) mode_twoplanebitmap::$16 ← (byte) mode_twoplanebitmap::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$15 mode_twoplanebitmap::$16 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$15 mode_twoplanebitmap::$16 ] )
[72] (byte~) mode_twoplanebitmap::$17 ← (byte~) mode_twoplanebitmap::$15 | (byte~) mode_twoplanebitmap::$16 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$17 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 mode_twoplanebitmap::$17 ] )
[73] *((byte*) mode_twoplanebitmap::col#2) ← (byte~) mode_twoplanebitmap::$17 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cx#2 mode_twoplanebitmap::col#2 ] )
[74] (byte*) mode_twoplanebitmap::col#1 ← ++ (byte*) mode_twoplanebitmap::col#2 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#1 mode_twoplanebitmap::cx#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#1 mode_twoplanebitmap::cx#2 ] )
[75] (byte) mode_twoplanebitmap::cx#1 ← ++ (byte) mode_twoplanebitmap::cx#2 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#1 mode_twoplanebitmap::cx#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#1 mode_twoplanebitmap::cx#1 ] )
[76] if((byte) mode_twoplanebitmap::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto mode_twoplanebitmap::@3 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#1 mode_twoplanebitmap::cx#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::col#1 mode_twoplanebitmap::cx#1 ] )
to:mode_twoplanebitmap::@15
mode_twoplanebitmap::@15: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@5
[69] (byte) mode_twoplanebitmap::ay#1 ← ++ (byte) mode_twoplanebitmap::ay#4 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] )
[70] if((byte) mode_twoplanebitmap::ay#1!=(byte/word/signed word/dword/signed dword) 200) goto mode_twoplanebitmap::@2 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] )
to:mode_twoplanebitmap::@6
mode_twoplanebitmap::@6: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@15 mode_twoplanebitmap::@17
[71] (byte) mode_twoplanebitmap::by#4 ← phi( mode_twoplanebitmap::@15/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@17/(byte) mode_twoplanebitmap::by#1 ) [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] )
[71] (byte*) mode_twoplanebitmap::gfxb#3 ← phi( mode_twoplanebitmap::@15/(const byte*) TWOPLANE_PLANEB#0 mode_twoplanebitmap::@17/(byte*) mode_twoplanebitmap::gfxb#1 ) [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] )
to:mode_twoplanebitmap::@7
mode_twoplanebitmap::@7: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@6 mode_twoplanebitmap::@7
[72] (byte) mode_twoplanebitmap::bx#2 ← phi( mode_twoplanebitmap::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@7/(byte) mode_twoplanebitmap::bx#1 ) [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] )
[72] (byte*) mode_twoplanebitmap::gfxb#2 ← phi( mode_twoplanebitmap::@6/(byte*) mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::@7/(byte*) mode_twoplanebitmap::gfxb#1 ) [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] )
[73] *((byte*) mode_twoplanebitmap::gfxb#2) ← (byte/signed byte/word/signed word/dword/signed dword) 15 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] )
[74] (byte*) mode_twoplanebitmap::gfxb#1 ← ++ (byte*) mode_twoplanebitmap::gfxb#2 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#2 ] )
[75] (byte) mode_twoplanebitmap::bx#1 ← ++ (byte) mode_twoplanebitmap::bx#2 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] )
[76] if((byte) mode_twoplanebitmap::bx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto mode_twoplanebitmap::@7 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] )
to:mode_twoplanebitmap::@17
mode_twoplanebitmap::@17: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@7
[77] (byte) mode_twoplanebitmap::by#1 ← ++ (byte) mode_twoplanebitmap::by#4 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] )
[78] if((byte) mode_twoplanebitmap::by#1!=(byte/word/signed word/dword/signed dword) 200) goto mode_twoplanebitmap::@6 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] )
to:mode_twoplanebitmap::@8
mode_twoplanebitmap::@8: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@17 mode_twoplanebitmap::@24
[79] if(true) goto mode_twoplanebitmap::@9 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
to:mode_twoplanebitmap::@return
mode_twoplanebitmap::@return: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@24 mode_twoplanebitmap::@8
[80] return [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
to:@return
mode_twoplanebitmap::@9: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@8
[81] phi() [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
[82] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ keyboard_key_pressed::return#0 ] )
[83] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#3 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ keyboard_key_pressed::return#3 ] )
to:mode_twoplanebitmap::@24
mode_twoplanebitmap::@24: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@9
[84] (byte~) mode_twoplanebitmap::$19 ← (byte) keyboard_key_pressed::return#3 [ mode_twoplanebitmap::$19 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::$19 ] )
[85] if((byte~) mode_twoplanebitmap::$19==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_twoplanebitmap::@8 [ ] ( main:2::menu:8::mode_twoplanebitmap:35 [ ] )
to:mode_twoplanebitmap::@return
mode_twoplanebitmap::@4: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@3
[86] *((byte*) mode_twoplanebitmap::gfxa#3) ← (byte/word/signed word/dword/signed dword) 255 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[87] (byte*) mode_twoplanebitmap::gfxa#1 ← ++ (byte*) mode_twoplanebitmap::gfxa#3 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#1 ] ( main:2::menu:8::mode_twoplanebitmap:35 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#1 ] )
mode_twoplanebitmap::@15: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@3
[77] (byte) mode_twoplanebitmap::cy#1 ← ++ (byte) mode_twoplanebitmap::cy#4 [ mode_twoplanebitmap::cy#1 mode_twoplanebitmap::col#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#1 mode_twoplanebitmap::col#1 ] )
[78] if((byte) mode_twoplanebitmap::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto mode_twoplanebitmap::@2 [ mode_twoplanebitmap::cy#1 mode_twoplanebitmap::col#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::cy#1 mode_twoplanebitmap::col#1 ] )
to:mode_twoplanebitmap::@4
mode_twoplanebitmap::@4: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@15 mode_twoplanebitmap::@19
[79] (byte*) mode_twoplanebitmap::gfxa#6 ← phi( mode_twoplanebitmap::@15/(const byte*) TWOPLANE_PLANEA#0 mode_twoplanebitmap::@19/(byte*) mode_twoplanebitmap::gfxa#7 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] )
[79] (byte) mode_twoplanebitmap::ay#4 ← phi( mode_twoplanebitmap::@15/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@19/(byte) mode_twoplanebitmap::ay#1 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#6 ] )
to:mode_twoplanebitmap::@5
keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@3 mode_twoplanebitmap::@9
[88] (byte) keyboard_key_pressed::key#2 ← phi( menu::@3/(const byte) KEY_C#0 mode_twoplanebitmap::@9/(const byte) KEY_SPACE#0 ) [ keyboard_key_pressed::key#2 ] ( main:2::menu:8::keyboard_key_pressed:30 [ keyboard_key_pressed::key#2 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::key#2 ] )
[89] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#2 keyboard_key_pressed::colidx#0 ] ( main:2::menu:8::keyboard_key_pressed:30 [ keyboard_key_pressed::key#2 keyboard_key_pressed::colidx#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::key#2 keyboard_key_pressed::colidx#0 ] )
[90] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#2 >> (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:30 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] )
[91] (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:8::keyboard_key_pressed:30 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] )
[92] call keyboard_matrix_read param-assignment [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ( main:2::menu:8::keyboard_key_pressed:30 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[93] (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:8::keyboard_key_pressed:30 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] )
mode_twoplanebitmap::@5: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@4 mode_twoplanebitmap::@7
[80] (byte) mode_twoplanebitmap::ax#2 ← phi( mode_twoplanebitmap::@4/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@7/(byte) mode_twoplanebitmap::ax#1 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[80] (byte*) mode_twoplanebitmap::gfxa#3 ← phi( mode_twoplanebitmap::@4/(byte*) mode_twoplanebitmap::gfxa#6 mode_twoplanebitmap::@7/(byte*) mode_twoplanebitmap::gfxa#7 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[81] (byte~) mode_twoplanebitmap::$20 ← (byte) mode_twoplanebitmap::ay#4 & (byte/signed byte/word/signed word/dword/signed dword) 4 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::$20 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::$20 ] )
[82] if((byte~) mode_twoplanebitmap::$20!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_twoplanebitmap::@6 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
to:mode_twoplanebitmap::@17
mode_twoplanebitmap::@17: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@5
[83] *((byte*) mode_twoplanebitmap::gfxa#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[84] (byte*) mode_twoplanebitmap::gfxa#2 ← ++ (byte*) mode_twoplanebitmap::gfxa#3 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#2 ] )
to:mode_twoplanebitmap::@7
mode_twoplanebitmap::@7: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@17 mode_twoplanebitmap::@6
[85] (byte*) mode_twoplanebitmap::gfxa#7 ← phi( mode_twoplanebitmap::@17/(byte*) mode_twoplanebitmap::gfxa#2 mode_twoplanebitmap::@6/(byte*) mode_twoplanebitmap::gfxa#1 ) [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#2 ] )
[86] (byte) mode_twoplanebitmap::ax#1 ← ++ (byte) mode_twoplanebitmap::ax#2 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] )
[87] if((byte) mode_twoplanebitmap::ax#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto mode_twoplanebitmap::@5 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::ax#1 ] )
to:mode_twoplanebitmap::@19
mode_twoplanebitmap::@19: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@7
[88] (byte) mode_twoplanebitmap::ay#1 ← ++ (byte) mode_twoplanebitmap::ay#4 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] )
[89] if((byte) mode_twoplanebitmap::ay#1!=(byte/word/signed word/dword/signed dword) 200) goto mode_twoplanebitmap::@4 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#1 mode_twoplanebitmap::gfxa#7 ] )
to:mode_twoplanebitmap::@8
mode_twoplanebitmap::@8: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@19 mode_twoplanebitmap::@21
[90] (byte) mode_twoplanebitmap::by#4 ← phi( mode_twoplanebitmap::@19/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@21/(byte) mode_twoplanebitmap::by#1 ) [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] )
[90] (byte*) mode_twoplanebitmap::gfxb#3 ← phi( mode_twoplanebitmap::@19/(const byte*) TWOPLANE_PLANEB#0 mode_twoplanebitmap::@21/(byte*) mode_twoplanebitmap::gfxb#1 ) [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::by#4 ] )
to:mode_twoplanebitmap::@9
mode_twoplanebitmap::@9: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@8 mode_twoplanebitmap::@9
[91] (byte) mode_twoplanebitmap::bx#2 ← phi( mode_twoplanebitmap::@8/(byte/signed byte/word/signed word/dword/signed dword) 0 mode_twoplanebitmap::@9/(byte) mode_twoplanebitmap::bx#1 ) [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] )
[91] (byte*) mode_twoplanebitmap::gfxb#2 ← phi( mode_twoplanebitmap::@8/(byte*) mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::@9/(byte*) mode_twoplanebitmap::gfxb#1 ) [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] )
[92] *((byte*) mode_twoplanebitmap::gfxb#2) ← (byte/signed byte/word/signed word/dword/signed dword) 15 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::bx#2 ] )
[93] (byte*) mode_twoplanebitmap::gfxb#1 ← ++ (byte*) mode_twoplanebitmap::gfxb#2 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#2 ] )
[94] (byte) mode_twoplanebitmap::bx#1 ← ++ (byte) mode_twoplanebitmap::bx#2 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] )
[95] if((byte) mode_twoplanebitmap::bx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto mode_twoplanebitmap::@9 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::bx#1 ] )
to:mode_twoplanebitmap::@21
mode_twoplanebitmap::@21: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@9
[96] (byte) mode_twoplanebitmap::by#1 ← ++ (byte) mode_twoplanebitmap::by#4 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] )
[97] if((byte) mode_twoplanebitmap::by#1!=(byte/word/signed word/dword/signed dword) 200) goto mode_twoplanebitmap::@8 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::gfxb#1 mode_twoplanebitmap::by#1 ] )
to:mode_twoplanebitmap::@10
mode_twoplanebitmap::@10: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@21 mode_twoplanebitmap::@28
[98] if(true) goto mode_twoplanebitmap::@11 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
to:mode_twoplanebitmap::@return
mode_twoplanebitmap::@return: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@10 mode_twoplanebitmap::@28
[99] return [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
to:@return
mode_twoplanebitmap::@11: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@10
[100] phi() [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
[101] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ keyboard_key_pressed::return#0 ] )
[102] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#3 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ keyboard_key_pressed::return#3 ] )
to:mode_twoplanebitmap::@28
mode_twoplanebitmap::@28: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@11
[103] (byte~) mode_twoplanebitmap::$27 ← (byte) keyboard_key_pressed::return#3 [ mode_twoplanebitmap::$27 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::$27 ] )
[104] if((byte~) mode_twoplanebitmap::$27==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_twoplanebitmap::@10 [ ] ( main:2::menu:9::mode_twoplanebitmap:42 [ ] )
to:mode_twoplanebitmap::@return
mode_twoplanebitmap::@6: scope:[mode_twoplanebitmap] from mode_twoplanebitmap::@5
[105] *((byte*) mode_twoplanebitmap::gfxa#3) ← (byte/word/signed word/dword/signed dword) 255 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::ax#2 ] )
[106] (byte*) mode_twoplanebitmap::gfxa#1 ← ++ (byte*) mode_twoplanebitmap::gfxa#3 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#1 ] ( main:2::menu:9::mode_twoplanebitmap:42 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ax#2 mode_twoplanebitmap::gfxa#1 ] )
to:mode_twoplanebitmap::@7
keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@4 mode_twoplanebitmap::@11
[107] (byte) keyboard_key_pressed::key#2 ← phi( menu::@4/(const byte) KEY_C#0 mode_twoplanebitmap::@11/(const byte) KEY_SPACE#0 ) [ keyboard_key_pressed::key#2 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::key#2 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::key#2 ] )
[108] (byte) keyboard_key_pressed::colidx#0 ← (byte) keyboard_key_pressed::key#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_key_pressed::key#2 keyboard_key_pressed::colidx#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::key#2 keyboard_key_pressed::colidx#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::key#2 keyboard_key_pressed::colidx#0 ] )
[109] (byte) keyboard_key_pressed::rowidx#0 ← (byte) keyboard_key_pressed::key#2 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::rowidx#0 ] )
[110] (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:9::keyboard_key_pressed:37 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] )
[111] call keyboard_matrix_read param-assignment [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[112] (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:9::keyboard_key_pressed:37 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ 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
[94] (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:30 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[95] (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:30 [ keyboard_key_pressed::return#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::return#0 ] )
[113] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::colidx#0 keyboard_key_pressed::$2 ] )
[114] (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:9::keyboard_key_pressed:37 [ keyboard_key_pressed::return#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[96] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::keyboard_key_pressed:30 [ keyboard_key_pressed::return#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82 [ keyboard_key_pressed::return#0 ] )
[115] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::return#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101 [ keyboard_key_pressed::return#0 ] )
to:@return
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
[97] *((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:30::keyboard_matrix_read:92 [ keyboard_key_pressed::colidx#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82::keyboard_matrix_read:92 [ keyboard_key_pressed::colidx#0 ] )
[98] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::menu:8::keyboard_key_pressed:30::keyboard_matrix_read:92 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82::keyboard_matrix_read:92 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[116] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::menu:9::keyboard_key_pressed:37::keyboard_matrix_read:111 [ keyboard_key_pressed::colidx#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101::keyboard_matrix_read:111 [ keyboard_key_pressed::colidx#0 ] )
[117] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37::keyboard_matrix_read:111 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101::keyboard_matrix_read:111 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[99] return [ keyboard_matrix_read::return#0 ] ( main:2::menu:8::keyboard_key_pressed:30::keyboard_matrix_read:92 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::mode_twoplanebitmap:35::keyboard_key_pressed:82::keyboard_matrix_read:92 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[118] return [ keyboard_matrix_read::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37::keyboard_matrix_read:111 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:9::mode_twoplanebitmap:42::keyboard_key_pressed:101::keyboard_matrix_read:111 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
to:@return
print_str_lines: scope:[print_str_lines] from menu::@13
[100] phi() [ ] ( main:2::menu:8::print_str_lines:26 [ ] )
print_str_lines: scope:[print_str_lines] from menu::@15
[119] phi() [ ] ( main:2::menu:9::print_str_lines:33 [ ] )
to:print_str_lines::@1
print_str_lines::@1: scope:[print_str_lines] from print_str_lines print_str_lines::@9
[101] (byte*) print_line_cursor#17 ← phi( print_str_lines/(const byte*) MENU_SCREEN#0 print_str_lines::@9/(byte*) print_line_cursor#19 ) [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:8::print_str_lines:26 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[101] (byte*) print_char_cursor#19 ← phi( print_str_lines/(const byte*) MENU_SCREEN#0 print_str_lines::@9/(byte*~) print_char_cursor#54 ) [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:8::print_str_lines:26 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[101] (byte*) print_str_lines::str#2 ← phi( print_str_lines/(const string) MENU_TEXT#0 print_str_lines::@9/(byte*) print_str_lines::str#0 ) [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:8::print_str_lines:26 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[102] if(*((byte*) print_str_lines::str#2)!=(byte) '@') goto print_str_lines::@4 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:8::print_str_lines:26 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[120] (byte*) print_line_cursor#17 ← phi( print_str_lines/(const byte*) MENU_SCREEN#0 print_str_lines::@9/(byte*) print_line_cursor#19 ) [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[120] (byte*) print_char_cursor#19 ← phi( print_str_lines/(const byte*) MENU_SCREEN#0 print_str_lines::@9/(byte*~) print_char_cursor#56 ) [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[120] (byte*) print_str_lines::str#2 ← phi( print_str_lines/(const string) MENU_TEXT#0 print_str_lines::@9/(byte*) print_str_lines::str#0 ) [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
[121] if(*((byte*) print_str_lines::str#2)!=(byte) '@') goto print_str_lines::@4 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#2 print_char_cursor#19 print_line_cursor#17 ] )
to:print_str_lines::@return
print_str_lines::@return: scope:[print_str_lines] from print_str_lines::@1
[103] return [ ] ( main:2::menu:8::print_str_lines:26 [ ] )
[122] return [ ] ( main:2::menu:9::print_str_lines:33 [ ] )
to:@return
print_str_lines::@4: scope:[print_str_lines] from print_str_lines::@1 print_str_lines::@5
[104] (byte*) print_char_cursor#17 ← phi( print_str_lines::@1/(byte*) print_char_cursor#19 print_str_lines::@5/(byte*) print_char_cursor#32 ) [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] )
[104] (byte*) print_str_lines::str#3 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#2 print_str_lines::@5/(byte*) print_str_lines::str#0 ) [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] )
[105] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#3) [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 print_str_lines::ch#0 ] )
[106] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#3 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] )
[107] if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] )
[123] (byte*) print_char_cursor#17 ← phi( print_str_lines::@1/(byte*) print_char_cursor#19 print_str_lines::@5/(byte*) print_char_cursor#32 ) [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] )
[123] (byte*) print_str_lines::str#3 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#2 print_str_lines::@5/(byte*) print_str_lines::str#0 ) [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 ] )
[124] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#3) [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#3 print_char_cursor#17 print_str_lines::ch#0 ] )
[125] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#3 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] )
[126] if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] )
to:print_str_lines::@8
print_str_lines::@8: scope:[print_str_lines] from print_str_lines::@4
[108] *((byte*) print_char_cursor#17) ← (byte) print_str_lines::ch#0 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] )
[109] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#17 [ print_line_cursor#17 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] )
[127] *((byte*) print_char_cursor#17) ← (byte) print_str_lines::ch#0 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#17 print_str_lines::ch#0 ] )
[128] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#17 [ print_line_cursor#17 print_str_lines::str#0 print_str_lines::ch#0 print_char_cursor#1 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 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
[110] (byte*) print_char_cursor#32 ← phi( print_str_lines::@4/(byte*) print_char_cursor#17 print_str_lines::@8/(byte*) print_char_cursor#1 ) [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 print_str_lines::ch#0 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 print_str_lines::ch#0 ] )
[111] if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] )
[129] (byte*) print_char_cursor#32 ← phi( print_str_lines::@4/(byte*) print_char_cursor#17 print_str_lines::@8/(byte*) print_char_cursor#1 ) [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 print_str_lines::ch#0 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 print_str_lines::ch#0 ] )
[130] if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] )
to:print_str_lines::@9
print_str_lines::@9: scope:[print_str_lines] from print_str_lines::@5
[112] phi() [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] ( main:2::menu:8::print_str_lines:26 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] )
[113] call print_ln param-assignment [ print_str_lines::str#0 print_line_cursor#19 ] ( main:2::menu:8::print_str_lines:26 [ print_str_lines::str#0 print_line_cursor#19 ] )
[114] (byte*~) print_char_cursor#54 ← (byte*) print_line_cursor#19 [ print_str_lines::str#0 print_char_cursor#54 print_line_cursor#19 ] ( main:2::menu:8::print_str_lines:26 [ print_str_lines::str#0 print_char_cursor#54 print_line_cursor#19 ] )
[131] phi() [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] ( main:2::menu:9::print_str_lines:33 [ print_line_cursor#17 print_str_lines::str#0 print_char_cursor#32 ] )
[132] call print_ln param-assignment [ print_str_lines::str#0 print_line_cursor#19 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#0 print_line_cursor#19 ] )
[133] (byte*~) print_char_cursor#56 ← (byte*) print_line_cursor#19 [ print_str_lines::str#0 print_char_cursor#56 print_line_cursor#19 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#0 print_char_cursor#56 print_line_cursor#19 ] )
to:print_str_lines::@1
print_ln: scope:[print_ln] from print_str_lines::@9
[115] phi() [ print_line_cursor#17 print_char_cursor#32 ] ( main:2::menu:8::print_str_lines:26::print_ln:113 [ print_str_lines::str#0 print_line_cursor#17 print_char_cursor#32 ] )
[134] phi() [ print_line_cursor#17 print_char_cursor#32 ] ( main:2::menu:9::print_str_lines:33::print_ln:132 [ print_str_lines::str#0 print_line_cursor#17 print_char_cursor#32 ] )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[116] (byte*) print_line_cursor#18 ← phi( print_ln/(byte*) print_line_cursor#17 print_ln::@1/(byte*) print_line_cursor#19 ) [ print_char_cursor#32 print_line_cursor#18 ] ( main:2::menu:8::print_str_lines:26::print_ln:113 [ print_str_lines::str#0 print_char_cursor#32 print_line_cursor#18 ] )
[117] (byte*) print_line_cursor#19 ← (byte*) print_line_cursor#18 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ print_line_cursor#19 print_char_cursor#32 ] ( main:2::menu:8::print_str_lines:26::print_ln:113 [ print_str_lines::str#0 print_line_cursor#19 print_char_cursor#32 ] )
[118] if((byte*) print_line_cursor#19<(byte*) print_char_cursor#32) goto print_ln::@1 [ print_line_cursor#19 print_char_cursor#32 ] ( main:2::menu:8::print_str_lines:26::print_ln:113 [ print_str_lines::str#0 print_line_cursor#19 print_char_cursor#32 ] )
[135] (byte*) print_line_cursor#18 ← phi( print_ln/(byte*) print_line_cursor#17 print_ln::@1/(byte*) print_line_cursor#19 ) [ print_char_cursor#32 print_line_cursor#18 ] ( main:2::menu:9::print_str_lines:33::print_ln:132 [ print_str_lines::str#0 print_char_cursor#32 print_line_cursor#18 ] )
[136] (byte*) print_line_cursor#19 ← (byte*) print_line_cursor#18 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ print_line_cursor#19 print_char_cursor#32 ] ( main:2::menu:9::print_str_lines:33::print_ln:132 [ print_str_lines::str#0 print_line_cursor#19 print_char_cursor#32 ] )
[137] if((byte*) print_line_cursor#19<(byte*) print_char_cursor#32) goto print_ln::@1 [ print_line_cursor#19 print_char_cursor#32 ] ( main:2::menu:9::print_str_lines:33::print_ln:132 [ print_str_lines::str#0 print_line_cursor#19 print_char_cursor#32 ] )
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[119] return [ print_line_cursor#19 ] ( main:2::menu:8::print_str_lines:26::print_ln:113 [ print_str_lines::str#0 print_line_cursor#19 ] )
[138] return [ print_line_cursor#19 ] ( main:2::menu:9::print_str_lines:33::print_ln:132 [ print_str_lines::str#0 print_line_cursor#19 ] )
to:@return
print_cls: scope:[print_cls] from menu::@12
[120] phi() [ ] ( main:2::menu:8::print_cls:24 [ ] )
print_cls: scope:[print_cls] from menu::@14
[139] phi() [ ] ( main:2::menu:9::print_cls:31 [ ] )
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
[121] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) MENU_SCREEN#0 print_cls::@1/(byte*) print_cls::sc#1 ) [ print_cls::sc#2 ] ( main:2::menu:8::print_cls:24 [ print_cls::sc#2 ] )
[122] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:2::menu:8::print_cls:24 [ print_cls::sc#2 ] )
[123] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 [ print_cls::sc#1 ] ( main:2::menu:8::print_cls:24 [ print_cls::sc#1 ] )
[124] if((byte*) print_cls::sc#1!=(const byte*) MENU_SCREEN#0+(word/signed word/dword/signed dword) 1000) goto print_cls::@1 [ print_cls::sc#1 ] ( main:2::menu:8::print_cls:24 [ print_cls::sc#1 ] )
[140] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) MENU_SCREEN#0 print_cls::@1/(byte*) print_cls::sc#1 ) [ print_cls::sc#2 ] ( main:2::menu:9::print_cls:31 [ print_cls::sc#2 ] )
[141] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:2::menu:9::print_cls:31 [ print_cls::sc#2 ] )
[142] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 [ print_cls::sc#1 ] ( main:2::menu:9::print_cls:31 [ print_cls::sc#1 ] )
[143] if((byte*) print_cls::sc#1!=(const byte*) MENU_SCREEN#0+(word/signed word/dword/signed dword) 1000) goto print_cls::@1 [ print_cls::sc#1 ] ( main:2::menu:9::print_cls:31 [ print_cls::sc#1 ] )
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls::@1
[125] return [ ] ( main:2::menu:8::print_cls:24 [ ] )
[144] return [ ] ( main:2::menu:9::print_cls:31 [ ] )
to:@return
print_set_screen: scope:[print_set_screen] from menu::@6
[126] phi() [ ] ( main:2::menu:8::print_set_screen:22 [ ] )
print_set_screen: scope:[print_set_screen] from menu::@8
[145] phi() [ ] ( main:2::menu:9::print_set_screen:29 [ ] )
to:print_set_screen::@return
print_set_screen::@return: scope:[print_set_screen] from print_set_screen
[127] return [ ] ( main:2::menu:8::print_set_screen:22 [ ] )
[146] return [ ] ( main:2::menu:9::print_set_screen:29 [ ] )
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,6 @@
(const byte*) BGCOL1#0 BGCOL1 = ((byte*))(word/dword/signed dword) 53281
(byte*) BGCOL2
(const byte*) BGCOL2#0 BGCOL2 = ((byte*))(word/dword/signed dword) 53282
(byte) BLUE
(const byte) BLUE#0 BLUE = (byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280
(byte*) CIA1_PORT_A
@ -21,6 +19,12 @@
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = ((byte*))(word/dword/signed dword) 56578
(byte*) COLS
(const byte*) COLS#0 COLS = ((byte*))(word/dword/signed dword) 55296
(dword) DTV_COLOR_BANK_DEFAULT
(const dword) DTV_COLOR_BANK_DEFAULT#0 DTV_COLOR_BANK_DEFAULT = (dword/signed dword) 120832
(byte*) DTV_COLOR_BANK_HI
(const byte*) DTV_COLOR_BANK_HI#0 DTV_COLOR_BANK_HI = ((byte*))(word/dword/signed dword) 53303
(byte*) DTV_COLOR_BANK_LO
(const byte*) DTV_COLOR_BANK_LO#0 DTV_COLOR_BANK_LO = ((byte*))(word/dword/signed dword) 53302
(byte*) DTV_CONTROL
(const byte*) DTV_CONTROL#0 DTV_CONTROL = ((byte*))(word/dword/signed dword) 53308
(byte) DTV_CONTROL_HIGHCOLOR_ON
@ -33,6 +37,10 @@
(const byte) DTV_FEATURE_ENABLE#0 DTV_FEATURE_ENABLE = (byte/signed byte/word/signed word/dword/signed dword) 1
(byte*) DTV_GRAPHICS_VIC_BANK
(const byte*) DTV_GRAPHICS_VIC_BANK#0 DTV_GRAPHICS_VIC_BANK = ((byte*))(word/dword/signed dword) 53309
(byte*) DTV_PALETTE
(const byte*) DTV_PALETTE#0 DTV_PALETTE = ((byte*))(word/dword/signed dword) 53760
(byte[16]) DTV_PALETTE_DEFAULT
(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 }
(byte*) DTV_PLANEA_MODULO_HI
(const byte*) DTV_PLANEA_MODULO_HI#0 DTV_PLANEA_MODULO_HI = ((byte*))(word/dword/signed dword) 53305
(byte*) DTV_PLANEA_MODULO_LO
@ -57,8 +65,6 @@
(const byte*) DTV_PLANEB_START_MI#0 DTV_PLANEB_START_MI = ((byte*))(word/dword/signed dword) 53322
(byte*) DTV_PLANEB_STEP
(const byte*) DTV_PLANEB_STEP#0 DTV_PLANEB_STEP = ((byte*))(word/dword/signed dword) 53324
(byte) GREEN
(const byte) GREEN#0 GREEN = (byte/signed byte/word/signed word/dword/signed dword) 5
(byte) KEY_C
(const byte) KEY_C#0 KEY_C = (byte/signed byte/word/signed word/dword/signed dword) 20
(byte) KEY_SPACE
@ -71,6 +77,8 @@
(const byte*) MENU_SCREEN#0 MENU_SCREEN = ((byte*))(word/dword/signed dword) 32768
(byte[]) MENU_TEXT
(const string) MENU_TEXT#0 MENU_TEXT = (string) "C64DTV Graphics Modes EMBLHCC@"+(string) " CCMIIHO@"+(string) " MMMNCUL@"+(string) "----------------------------------------@"+(string) "1. Standard Char (V) 0000000@"+(string) "2. Extended Color Char (V) 1000000@"+(string) "3. Multicolor Char (V) 0100000@"+(string) "4. Standard Bitmap (V) 0010000@"+(string) "5. Multicolor Bitmap (V) 0110000@"+(string) "6. High Color Standard Char (H) 0000100@"+(string) "7. High Extended Color Char (H) 1000100@"+(string) "8. High Multicolor Char (H) 0100100@"+(string) "9. High Multicolor Bitmap (H) 0110100@"+(string) "a. Sixs Fred (D) 1111100@"+(string) "b. Sixs Fred 2 (D) 1111000@"+(string) "c. Two Plane Bitmap (D) 1011100@"+(string) "d. Two Plane Multicol Bitmap (D) 1111100@"+(string) "e. 8bpp Pixel Cell (D) 1101110@"+(string) "f. Chunky 8bpp Bitmap (D) 1101111@"+(string) "----------------------------------------@"+(string) " (V) vicII (H) vicII+hicol (D) c64dtv@"+(string) "@"
(byte*) TWOPLANE_COLORS
(const byte*) TWOPLANE_COLORS#0 TWOPLANE_COLORS = ((byte*))(word/dword/signed dword) 32768
(byte*) TWOPLANE_PLANEA
(const byte*) TWOPLANE_PLANEA#0 TWOPLANE_PLANEA = ((byte*))(word/signed word/dword/signed dword) 16384
(byte*) TWOPLANE_PLANEB
@ -122,32 +130,40 @@
(label) main::@2
(label) main::@return
(void()) menu()
(byte~) menu::$22 reg byte a 202.0
(byte~) menu::$26 reg byte a 202.0
(label) menu::@1
(label) menu::@12
(label) menu::@13
(label) menu::@11
(label) menu::@14
(label) menu::@15
(label) menu::@17
(label) menu::@2
(label) menu::@3
(label) menu::@5
(label) menu::@6
(label) menu::@9
(label) menu::@4
(label) menu::@8
(label) menu::@return
(byte*) menu::c
(byte*) menu::c#1 c zp ZP_WORD:2 151.5
(byte*) menu::c#2 c zp ZP_WORD:2 151.5
(byte*) menu::last
(const byte*) menu::last#0 last = (const byte*) MENU_SCREEN#0+(word/signed word/dword/signed dword) 999
(byte) menu::i
(byte) menu::i#1 reg byte x 151.5
(byte) menu::i#2 reg byte x 202.0
(void()) mode_twoplanebitmap()
(byte~) mode_twoplanebitmap::$12 reg byte a 2002.0
(byte~) mode_twoplanebitmap::$19 reg byte a 202.0
(byte~) mode_twoplanebitmap::$9 reg byte a 202.0
(byte~) mode_twoplanebitmap::$14 reg byte a 2002.0
(byte~) mode_twoplanebitmap::$15 $15 zp ZP_BYTE:9 1001.0
(byte~) mode_twoplanebitmap::$16 reg byte a 2002.0
(byte~) mode_twoplanebitmap::$17 reg byte a 2002.0
(byte~) mode_twoplanebitmap::$20 reg byte a 2002.0
(byte~) mode_twoplanebitmap::$27 reg byte a 202.0
(label) mode_twoplanebitmap::@1
(label) mode_twoplanebitmap::@13
(label) mode_twoplanebitmap::@10
(label) mode_twoplanebitmap::@11
(label) mode_twoplanebitmap::@14
(label) mode_twoplanebitmap::@15
(label) mode_twoplanebitmap::@17
(label) mode_twoplanebitmap::@19
(label) mode_twoplanebitmap::@2
(label) mode_twoplanebitmap::@24
(label) mode_twoplanebitmap::@21
(label) mode_twoplanebitmap::@28
(label) mode_twoplanebitmap::@3
(label) mode_twoplanebitmap::@4
(label) mode_twoplanebitmap::@5
@ -168,9 +184,16 @@
(byte) mode_twoplanebitmap::by
(byte) mode_twoplanebitmap::by#1 by zp ZP_BYTE:4 151.5
(byte) mode_twoplanebitmap::by#4 by zp ZP_BYTE:4 33.666666666666664
(byte*) mode_twoplanebitmap::c
(byte*) mode_twoplanebitmap::c#1 c zp ZP_WORD:2 151.5
(byte*) mode_twoplanebitmap::c#2 c zp ZP_WORD:2 134.66666666666666
(byte*) mode_twoplanebitmap::col
(byte*) mode_twoplanebitmap::col#1 col zp ZP_WORD:2 420.59999999999997
(byte*) mode_twoplanebitmap::col#2 col zp ZP_WORD:2 517.3333333333334
(byte*) mode_twoplanebitmap::col#3 col zp ZP_WORD:2 202.0
(byte) mode_twoplanebitmap::cx
(byte) mode_twoplanebitmap::cx#1 reg byte x 1501.5
(byte) mode_twoplanebitmap::cx#2 reg byte x 429.0
(byte) mode_twoplanebitmap::cy
(byte) mode_twoplanebitmap::cy#1 cy zp ZP_BYTE:4 151.5
(byte) mode_twoplanebitmap::cy#4 cy zp ZP_BYTE:4 120.29999999999998
(byte*) mode_twoplanebitmap::gfxa
(byte*) mode_twoplanebitmap::gfxa#1 gfxa zp ZP_WORD:2 2002.0
(byte*) mode_twoplanebitmap::gfxa#2 gfxa zp ZP_WORD:2 2002.0
@ -181,12 +204,15 @@
(byte*) mode_twoplanebitmap::gfxb#1 gfxb zp ZP_WORD:2 420.59999999999997
(byte*) mode_twoplanebitmap::gfxb#2 gfxb zp ZP_WORD:2 1552.0
(byte*) mode_twoplanebitmap::gfxb#3 gfxb zp ZP_WORD:2 202.0
(byte) mode_twoplanebitmap::i
(byte) mode_twoplanebitmap::i#1 reg byte a 151.5
(byte) mode_twoplanebitmap::i#2 reg byte a 202.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:5 2002.0
(byte*) print_char_cursor#17 print_char_cursor zp ZP_WORD:5 821.0
(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:5 101.0
(byte*) print_char_cursor#32 print_char_cursor zp ZP_WORD:5 572.0
(byte*~) print_char_cursor#54 print_char_cursor zp ZP_WORD:5 202.0
(byte*~) print_char_cursor#56 print_char_cursor zp ZP_WORD:5 202.0
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
@ -218,19 +244,25 @@
(byte*) print_str_lines::str#2 str zp ZP_WORD:2 151.5
(byte*) print_str_lines::str#3 str zp ZP_WORD:2 1552.0
zp ZP_WORD:2 [ menu::c#2 menu::c#1 mode_twoplanebitmap::c#2 mode_twoplanebitmap::c#1 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::gfxa#6 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::gfxa#2 mode_twoplanebitmap::gfxa#1 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::gfxb#1 print_str_lines::str#3 print_str_lines::str#2 print_str_lines::str#0 print_cls::sc#2 print_cls::sc#1 ]
zp ZP_BYTE:4 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ]
reg byte x [ menu::i#2 menu::i#1 ]
zp ZP_WORD:2 [ menu::c#2 menu::c#1 mode_twoplanebitmap::col#2 mode_twoplanebitmap::col#3 mode_twoplanebitmap::col#1 mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::gfxa#6 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::gfxa#2 mode_twoplanebitmap::gfxa#1 mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::gfxb#1 print_str_lines::str#3 print_str_lines::str#2 print_str_lines::str#0 print_cls::sc#2 print_cls::sc#1 ]
reg byte a [ mode_twoplanebitmap::i#2 mode_twoplanebitmap::i#1 ]
zp ZP_BYTE:4 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ]
reg byte x [ mode_twoplanebitmap::cx#2 mode_twoplanebitmap::cx#1 ]
reg byte x [ mode_twoplanebitmap::ax#2 mode_twoplanebitmap::ax#1 ]
reg byte x [ mode_twoplanebitmap::bx#2 mode_twoplanebitmap::bx#1 ]
reg byte y [ keyboard_key_pressed::key#2 ]
zp ZP_WORD:5 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#54 print_char_cursor#32 print_char_cursor#1 ]
zp ZP_WORD:5 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#56 print_char_cursor#32 print_char_cursor#1 ]
zp ZP_WORD:7 [ print_line_cursor#18 print_line_cursor#17 print_line_cursor#19 ]
reg byte a [ keyboard_key_pressed::return#2 ]
reg byte a [ menu::$22 ]
reg byte a [ mode_twoplanebitmap::$9 ]
reg byte a [ mode_twoplanebitmap::$12 ]
reg byte a [ menu::$26 ]
reg byte a [ mode_twoplanebitmap::$14 ]
zp ZP_BYTE:9 [ mode_twoplanebitmap::$15 ]
reg byte a [ mode_twoplanebitmap::$16 ]
reg byte a [ mode_twoplanebitmap::$17 ]
reg byte a [ mode_twoplanebitmap::$20 ]
reg byte a [ keyboard_key_pressed::return#3 ]
reg byte a [ mode_twoplanebitmap::$19 ]
reg byte a [ mode_twoplanebitmap::$27 ]
reg byte x [ keyboard_key_pressed::colidx#0 ]
reg byte a [ keyboard_key_pressed::rowidx#0 ]
reg byte a [ keyboard_matrix_read::rowid#0 ]

View File

@ -358,6 +358,8 @@ void keyboard_init() {
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
byte keyboard_matrix_read(byte rowid) {
*CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid];
byte row_pressed_bits = ~*CIA1_PORT_B;
@ -371,7 +373,7 @@ byte keyboard_matrix_read(byte rowid) {
byte keyboard_key_pressed(byte key) {
byte colidx = key&7;
byte rowidx = key>>3;
return keyboard_matrix_read(rowidx)&keyboard_matrix_col_bitmask[colidx];
return keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx];
}
// Get the keycode corresponding to a specific screen code character

View File

@ -0,0 +1,91 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label BORDERCOL = $d020
.label BGCOL = $d021
.label CIA1_PORT_A = $dc00
.label CIA1_PORT_B = $dc01
.const RED = 2
.const GREEN = 5
.const KEY_E = $e
.const KEY_C = $14
.const KEY_I = $21
.const KEY_SPACE = $3c
.label SCREEN = $400
jsr main
main: {
lda #GREEN
sta BORDERCOL
b2:
jsr menu
jmp b2
}
menu: {
jmp b2
breturn:
rts
b2:
ldx #KEY_C
jsr keyboard_key_pressed
cmp #0
beq b4
jsr pressed
jmp breturn
b4:
ldx #KEY_I
jsr keyboard_key_pressed
cmp #0
beq b5
lda #RED
sta BORDERCOL
sei
jmp breturn
b5:
ldx #KEY_E
jsr keyboard_key_pressed
cmp #0
beq b6
lda #GREEN
sta BORDERCOL
cli
jmp breturn
b6:
inc SCREEN
jmp b2
}
keyboard_key_pressed: {
.label colidx = 2
txa
and #7
sta colidx
txa
lsr
lsr
lsr
jsr keyboard_matrix_read
ldy colidx
and keyboard_matrix_col_bitmask,y
rts
}
keyboard_matrix_read: {
tay
lda keyboard_matrix_row_bitmask,y
sta CIA1_PORT_A
lda CIA1_PORT_B
eor #$ff
rts
}
pressed: {
inc BGCOL
jmp b2
breturn:
rts
b2:
ldx #KEY_SPACE
jsr keyboard_key_pressed
cmp #0
beq b2
jmp breturn
}
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

View File

@ -0,0 +1,113 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@7
@7: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @7
[3] phi() [ ] ( )
main: scope:[main] from @7
[4] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@2
[5] if(true) goto main::@2 [ ] ( main:2 [ ] )
to:main::@return
main::@return: scope:[main] from main::@1
[6] return [ ] ( main:2 [ ] )
to:@return
main::@2: scope:[main] from main::@1
[7] phi() [ ] ( main:2 [ ] )
[8] call menu param-assignment [ ] ( main:2 [ ] )
to:main::@1
menu: scope:[menu] from main::@2
[9] phi() [ ] ( main:2::menu:8 [ ] )
to:menu::@1
menu::@1: scope:[menu] from menu menu::@6
[10] if(true) goto menu::@2 [ ] ( main:2::menu:8 [ ] )
to:menu::@return
menu::@return: scope:[menu] from menu::@1 menu::@11 menu::@13 menu::@9
[11] return [ ] ( main:2::menu:8 [ ] )
to:@return
menu::@2: scope:[menu] from menu::@1
[12] phi() [ ] ( main:2::menu:8 [ ] )
[13] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:8 [ keyboard_key_pressed::return#0 ] )
[14] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#2 ] ( main:2::menu:8 [ keyboard_key_pressed::return#2 ] )
to:menu::@16
menu::@16: scope:[menu] from menu::@2
[15] (byte~) menu::$0 ← (byte) keyboard_key_pressed::return#2 [ menu::$0 ] ( main:2::menu:8 [ menu::$0 ] )
[16] if((byte~) menu::$0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@4 [ ] ( main:2::menu:8 [ ] )
to:menu::@9
menu::@9: scope:[menu] from menu::@16
[17] phi() [ ] ( main:2::menu:8 [ ] )
[18] call pressed param-assignment [ ] ( main:2::menu:8 [ ] )
to:menu::@return
menu::@4: scope:[menu] from menu::@16
[19] phi() [ ] ( main:2::menu:8 [ ] )
[20] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:8 [ keyboard_key_pressed::return#0 ] )
[21] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#3 ] ( main:2::menu:8 [ keyboard_key_pressed::return#3 ] )
to:menu::@17
menu::@17: scope:[menu] from menu::@4
[22] (byte~) menu::$4 ← (byte) keyboard_key_pressed::return#3 [ menu::$4 ] ( main:2::menu:8 [ menu::$4 ] )
[23] if((byte~) menu::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@5 [ ] ( main:2::menu:8 [ ] )
to:menu::@11
menu::@11: scope:[menu] from menu::@17
[24] *((const byte*) BORDERCOL#0) ← (const byte) RED#0 [ ] ( main:2::menu:8 [ ] )
asm { sei }
to:menu::@return
menu::@5: scope:[menu] from menu::@17
[26] phi() [ ] ( main:2::menu:8 [ ] )
[27] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:8 [ keyboard_key_pressed::return#0 ] )
[28] (byte) keyboard_key_pressed::return#4 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#4 ] ( main:2::menu:8 [ keyboard_key_pressed::return#4 ] )
to:menu::@19
menu::@19: scope:[menu] from menu::@5
[29] (byte~) menu::$7 ← (byte) keyboard_key_pressed::return#4 [ menu::$7 ] ( main:2::menu:8 [ menu::$7 ] )
[30] if((byte~) menu::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@6 [ ] ( main:2::menu:8 [ ] )
to:menu::@13
menu::@13: scope:[menu] from menu::@19
[31] *((const byte*) BORDERCOL#0) ← (const byte) GREEN#0 [ ] ( main:2::menu:8 [ ] )
asm { cli }
to:menu::@return
menu::@6: scope:[menu] from menu::@19
[33] *((const byte*) SCREEN#0) ← ++ *((const byte*) SCREEN#0) [ ] ( main:2::menu:8 [ ] )
to:menu::@1
keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@2 menu::@4 menu::@5 pressed::@2
[34] (byte) keyboard_key_pressed::key#4 ← phi( menu::@2/(const byte) KEY_C#0 menu::@4/(const byte) KEY_I#0 menu::@5/(const byte) KEY_E#0 pressed::@2/(const byte) KEY_SPACE#0 ) [ keyboard_key_pressed::key#4 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::key#4 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::key#4 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::key#4 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::key#4 ] )
[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 ] )
[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 ] )
[37] (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:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::rowid#0 ] )
[38] call keyboard_matrix_read param-assignment [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] ( main:2::menu:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#0 ] )
[39] (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:8::keyboard_key_pressed:13 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:8::keyboard_key_pressed:20 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:8::keyboard_key_pressed:27 [ keyboard_key_pressed::colidx#0 keyboard_matrix_read::return#2 ] main:2::menu:8::pressed:18::keyboard_key_pressed:50 [ 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
[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 ] )
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 ] )
to:@return
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
[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 ] )
[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 ] )
to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[45] return [ 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 ] )
to:@return
pressed: scope:[pressed] from menu::@9
[46] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) [ ] ( main:2::menu:8::pressed:18 [ ] )
to:pressed::@1
pressed::@1: scope:[pressed] from pressed pressed::@10
[47] if(true) goto pressed::@2 [ ] ( main:2::menu:8::pressed:18 [ ] )
to:pressed::@return
pressed::@return: scope:[pressed] from pressed::@1 pressed::@10
[48] return [ ] ( main:2::menu:8::pressed:18 [ ] )
to:@return
pressed::@2: scope:[pressed] from pressed::@1
[49] phi() [ ] ( main:2::menu:8::pressed:18 [ ] )
[50] call keyboard_key_pressed param-assignment [ keyboard_key_pressed::return#0 ] ( main:2::menu:8::pressed:18 [ keyboard_key_pressed::return#0 ] )
[51] (byte) keyboard_key_pressed::return#10 ← (byte) keyboard_key_pressed::return#0 [ keyboard_key_pressed::return#10 ] ( main:2::menu:8::pressed:18 [ keyboard_key_pressed::return#10 ] )
to:pressed::@10
pressed::@10: scope:[pressed] from pressed::@2
[52] (byte~) pressed::$0 ← (byte) keyboard_key_pressed::return#10 [ pressed::$0 ] ( main:2::menu:8::pressed:18 [ pressed::$0 ] )
[53] if((byte~) pressed::$0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto pressed::@1 [ ] ( main:2::menu:8::pressed:18 [ ] )
to:pressed::@return

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,96 @@
(label) @7
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) 53281
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280
(byte*) CIA1_PORT_A
(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320
(byte*) CIA1_PORT_B
(const byte*) CIA1_PORT_B#0 CIA1_PORT_B = ((byte*))(word/dword/signed dword) 56321
(byte) GREEN
(const byte) GREEN#0 GREEN = (byte/signed byte/word/signed word/dword/signed dword) 5
(byte) KEY_C
(const byte) KEY_C#0 KEY_C = (byte/signed byte/word/signed word/dword/signed dword) 20
(byte) KEY_E
(const byte) KEY_E#0 KEY_E = (byte/signed byte/word/signed word/dword/signed dword) 14
(byte) KEY_I
(const byte) KEY_I#0 KEY_I = (byte/signed byte/word/signed word/dword/signed dword) 33
(byte) KEY_SPACE
(const byte) KEY_SPACE#0 KEY_SPACE = (byte/signed byte/word/signed word/dword/signed dword) 60
(byte) RED
(const byte) RED#0 RED = (byte/signed byte/word/signed word/dword/signed dword) 2
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(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 colidx zp ZP_BYTE:2 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 67.66666666666667
(byte) keyboard_key_pressed::return#10 reg byte a 202.0
(byte) keyboard_key_pressed::return#2 reg byte a 202.0
(byte) keyboard_key_pressed::return#3 reg byte a 202.0
(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()) 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::row_pressed_bits
(byte) keyboard_matrix_read::rowid
(byte) keyboard_matrix_read::rowid#0 reg byte a 4.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 }
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return
(void()) menu()
(byte~) menu::$0 reg byte a 202.0
(byte~) menu::$4 reg byte a 202.0
(byte~) menu::$7 reg byte a 202.0
(label) menu::@1
(label) menu::@11
(label) menu::@13
(label) menu::@16
(label) menu::@17
(label) menu::@19
(label) menu::@2
(label) menu::@4
(label) menu::@5
(label) menu::@6
(label) menu::@9
(label) menu::@return
(void()) pressed()
(byte~) pressed::$0 reg byte a 202.0
(label) pressed::@1
(label) pressed::@10
(label) pressed::@2
(label) pressed::@return
reg byte x [ keyboard_key_pressed::key#4 ]
reg byte a [ keyboard_key_pressed::return#2 ]
reg byte a [ menu::$0 ]
reg byte a [ keyboard_key_pressed::return#3 ]
reg byte a [ menu::$4 ]
reg byte a [ keyboard_key_pressed::return#4 ]
reg byte a [ menu::$7 ]
zp ZP_BYTE:2 [ keyboard_key_pressed::colidx#0 ]
reg byte a [ keyboard_key_pressed::rowidx#0 ]
reg byte a [ 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 ]
reg byte a [ keyboard_matrix_read::return#0 ]
reg byte a [ keyboard_key_pressed::return#10 ]
reg byte a [ pressed::$0 ]

View File

@ -0,0 +1,12 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.const DVAL = $20000
.label SCREEN = $400
jsr main
main: {
lda #DVAL/$400
sta SCREEN+0
sta SCREEN+1
rts
}

View File

@ -0,0 +1,16 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@1
@1: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @1
[3] phi() [ ] ( )
main: scope:[main] from @1
[4] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] )
[5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] )
to:main::@return
main::@return: scope:[main] from main
[6] return [ ] ( main:2 [ ] )
to:@return

View File

@ -0,0 +1,341 @@
PARSING src/test/java/dk/camelot64/kickc/test/kc/operator-lohi-problem.kc
// Illustrates problem with constant evaluation of lo/hi-operator
// $20000 /$400 results in a byte value - confusing the lo/hi-evaluation
// which currently relies on getting the type from the literal value.
// A fix could be adding support for "declared" types for constant literal values
// - enabling the lo/hi to know that their operand is a word (from the cast).
const dword DVAL = $20000;
const byte* SCREEN = $400;
void main() {
SCREEN[0] = <(word)(DVAL/$400);
SCREEN[1] = >(word)(DVAL/$400);
}
STATEMENTS
(dword) DVAL ← (dword/signed dword) 131072
(byte*) SCREEN ← (word/signed word/dword/signed dword) 1024
proc (void()) main()
(dword~) main::$0 ← (dword) DVAL / (word/signed word/dword/signed dword) 1024
(word~) main::$1 ← ((word)) (dword~) main::$0
(byte~) main::$2 ← < (word~) main::$1
*((byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$2
(dword~) main::$3 ← (dword) DVAL / (word/signed word/dword/signed dword) 1024
(word~) main::$4 ← ((word)) (dword~) main::$3
(byte~) main::$5 ← > (word~) main::$4
*((byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$5
main::@return:
return
endproc // main()
call main
SYMBOLS
(dword) DVAL
(byte*) SCREEN
(void()) main()
(dword~) main::$0
(word~) main::$1
(byte~) main::$2
(dword~) main::$3
(word~) main::$4
(byte~) main::$5
(label) main::@return
Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
INITIAL CONTROL FLOW GRAPH
@begin: scope:[] from
(dword) DVAL ← (dword/signed dword) 131072
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:@1
main: scope:[main] from
(dword~) main::$0 ← (dword) DVAL / (word/signed word/dword/signed dword) 1024
(word~) main::$1 ← ((word)) (dword~) main::$0
(byte~) main::$2 ← < (word~) main::$1
*((byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$2
(dword~) main::$3 ← (dword) DVAL / (word/signed word/dword/signed dword) 1024
(word~) main::$4 ← ((word)) (dword~) main::$3
(byte~) main::$5 ← > (word~) main::$4
*((byte*) SCREEN + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$5
to:main::@return
main::@return: scope:[main] from main
return
to:@return
@1: scope:[] from @begin
call main
to:@end
@end: scope:[] from @1
PROCEDURE MODIFY VARIABLE ANALYSIS
Completing Phi functions...
CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
@begin: scope:[] from
(dword) DVAL#0 ← (dword/signed dword) 131072
(byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:@1
main: scope:[main] from @1
(dword~) main::$0 ← (dword) DVAL#0 / (word/signed word/dword/signed dword) 1024
(word~) main::$1 ← ((word)) (dword~) main::$0
(byte~) main::$2 ← < (word~) main::$1
*((byte*) SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$2
(dword~) main::$3 ← (dword) DVAL#0 / (word/signed word/dword/signed dword) 1024
(word~) main::$4 ← ((word)) (dword~) main::$3
(byte~) main::$5 ← > (word~) main::$4
*((byte*) SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte~) main::$5
to:main::@return
main::@return: scope:[main] from main
return
to:@return
@1: scope:[] from @begin
call main param-assignment
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(dword) DVAL
(dword) DVAL#0
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(dword~) main::$0
(word~) main::$1
(byte~) main::$2
(dword~) main::$3
(word~) main::$4
(byte~) main::$5
(label) main::@return
OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) @2
Succesful SSA optimization Pass2CullEmptyBlocks
Constant (const dword) DVAL#0 = 131072
Constant (const byte*) SCREEN#0 = ((byte*))1024
Succesful SSA optimization Pass2ConstantIdentification
Constant (const dword) main::$0 = DVAL#0/1024
Constant (const dword) main::$3 = DVAL#0/1024
Succesful SSA optimization Pass2ConstantIdentification
Constant (const word) main::$1 = ((word))main::$0
Constant (const word) main::$4 = ((word))main::$3
Succesful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$2 = <main::$1
Constant (const byte) main::$5 = >main::$4
Succesful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in *(SCREEN#0+0)
Consolidated array index constant in *(SCREEN#0+1)
Succesful SSA optimization Pass2ConstantAdditionElimination
OPTIMIZING CONTROL FLOW GRAPH
Constant inlined main::$1 = ((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024
Constant inlined main::$2 = <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024
Constant inlined main::$0 = (const dword) DVAL#0/(word/signed word/dword/signed dword) 1024
Constant inlined main::$5 = >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024
Constant inlined main::$3 = (const dword) DVAL#0/(word/signed word/dword/signed dword) 1024
Constant inlined main::$4 = ((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @1 @end main main::@return
Block Sequence Planned @begin @1 @end main main::@return
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:2
Propagating live ranges...
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Block Sequence Planned @begin @1 @end main main::@return
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Propagating live ranges...
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi() [ ] ( )
to:@1
@1: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @1
[3] phi() [ ] ( )
main: scope:[main] from @1
[4] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] )
[5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] )
to:main::@return
main::@return: scope:[main] from main
[6] return [ ] ( main:2 [ ] )
to:@return
DOMINATORS
@begin dominated by @begin
@1 dominated by @1 @begin
@end dominated by @1 @begin @end
main dominated by @1 @begin main
main::@return dominated by main::@return @1 @begin main
NATURAL LOOPS
NATURAL LOOPS WITH DEPTH
Found 0 loops in scope []
Found 0 loops in scope [main]
VARIABLE REGISTER WEIGHTS
(dword) DVAL
(byte*) SCREEN
(void()) main()
Initial phi equivalence classes
Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const DVAL = $20000
.label SCREEN = $400
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG4 @1
b1:
//SEG5 [2] call main param-assignment [ ] ( )
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG7 @end
bend:
//SEG8 main
main: {
//SEG9 [4] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
lda #DVAL/$400
sta SCREEN+0
//SEG10 [5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
lda #DVAL/$400
sta SCREEN+1
jmp breturn
//SEG11 main::@return
breturn:
//SEG12 [6] return [ ] ( main:2 [ ] )
rts
}
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
Uplift Scope []
Uplifting [main] best 33 combination
Uplifting [] best 33 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const DVAL = $20000
.label SCREEN = $400
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
//SEG4 @1
b1:
//SEG5 [2] call main param-assignment [ ] ( )
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
//SEG7 @end
bend:
//SEG8 main
main: {
//SEG9 [4] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
lda #DVAL/$400
sta SCREEN+0
//SEG10 [5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
lda #DVAL/$400
sta SCREEN+1
jmp breturn
//SEG11 main::@return
breturn:
//SEG12 [6] return [ ] ( main:2 [ ] )
rts
}
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #DVAL/$400
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(dword) DVAL
(const dword) DVAL#0 DVAL = (dword/signed dword) 131072
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(void()) main()
(label) main::@return
FINAL ASSEMBLER
Score: 22
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const DVAL = $20000
.label SCREEN = $400
//SEG2 @begin
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main param-assignment [ ] ( )
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main
main: {
//SEG9 [4] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← <((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
lda #DVAL/$400
sta SCREEN+0
//SEG10 [5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← >((word))(const dword) DVAL#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2
sta SCREEN+1
//SEG11 main::@return
//SEG12 [6] return [ ] ( main:2 [ ] )
rts
}

View File

@ -0,0 +1,10 @@
(label) @1
(label) @begin
(label) @end
(dword) DVAL
(const dword) DVAL#0 DVAL = (dword/signed dword) 131072
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(void()) main()
(label) main::@return

View File

@ -133,6 +133,8 @@ void keyboard_init() {
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
byte keyboard_matrix_read(byte rowid) {
*CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid];
byte row_pressed_bits = ~*CIA1_PORT_B;
@ -146,7 +148,7 @@ byte keyboard_matrix_read(byte rowid) {
byte keyboard_key_pressed(byte key) {
byte colidx = key&7;
byte rowidx = key>>3;
return keyboard_matrix_read(rowidx)&keyboard_matrix_col_bitmask[colidx];
return keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx];
}
// Get the keycode corresponding to a specific screen code character

View File

@ -164,6 +164,8 @@ void keyboard_init() {
// Read a single row of the keyboard matrix
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
// Returns the keys pressed on the row as bits according to the C64 key matrix.
// Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write
// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader.
byte keyboard_matrix_read(byte rowid) {
*CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid];
byte row_pressed_bits = ~*CIA1_PORT_B;
@ -177,7 +179,7 @@ byte keyboard_matrix_read(byte rowid) {
byte keyboard_key_pressed(byte key) {
byte colidx = key&7;
byte rowidx = key>>3;
return keyboard_matrix_read(rowidx)&keyboard_matrix_col_bitmask[colidx];
return keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx];
}
// Get the keycode corresponding to a specific screen code character