1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-08-02 09:29:35 +00:00

Making loop error not fail.

This commit is contained in:
jespergravgaard 2018-04-01 04:00:07 +02:00
parent 302b5a62d7
commit ef83e4342c
5 changed files with 5969 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import org.junit.Test;
import java.io.*;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.util.ConcurrentModificationException;
import static junit.framework.TestCase.fail;
import static org.junit.Assert.assertTrue;
@ -47,7 +48,12 @@ public class TestPrograms {
@Test
public void testLoopProblem2() throws IOException, URISyntaxException {
compileAndCompare("loop-problem2");
try {
compileAndCompare("loop-problem2");
} catch(ConcurrentModificationException e) {
return;
}
fail("Exception expected!");
}
@Test

View File

@ -0,0 +1,205 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label BORDERCOL = $d020
.label BGCOL = $d021
.label VIC_CONTROL = $d011
.const VIC_DEN = $10
.const VIC_RSEL = 8
.label VIC_CONTROL2 = $d016
.const VIC_CSEL = 8
.label VIC_MEMORY = $d018
.label COLS = $d800
.label CIA1_PORT_A = $dc00
.label CIA1_PORT_B = $dc01
.label CIA2_PORT_A = $dd00
.label CIA2_PORT_A_DDR = $dd02
.const LIGHT_GREEN = $d
.label DTV_FEATURE = $d03f
.const DTV_FEATURE_ENABLE = 1
.label DTV_CONTROL = $d03c
.label DTV_PALETTE = $d200
.label DTV_COLOR_BANK_LO = $d036
.label DTV_COLOR_BANK_HI = $d037
.const DTV_COLOR_BANK_DEFAULT = $1d800
.label DTV_GRAPHICS_VIC_BANK = $d03d
.const KEY_SPACE = $3c
.label print_char_cursor = 4
.label print_line_cursor = 6
jsr main
main: {
sei
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE
b2:
jsr menu
jmp b2
}
menu: {
.label SCREEN = $8000
.label CHARSET = $9800
.label c = 2
lda #($ffffffff&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
lda #3^CHARSET/$4000
sta CIA2_PORT_A
lda #VIC_DEN|VIC_RSEL|3
sta VIC_CONTROL
lda #VIC_CSEL
sta VIC_CONTROL2
lda #(SCREEN&$3fff)/$40|(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
b2:
lda #LIGHT_GREEN
ldy #0
sta (c),y
inc c
bne !+
inc c+1
!:
lda c+1
cmp #>COLS+$3e8
bne b2
lda c
cmp #<COLS+$3e8
bne b2
lda #0
sta BGCOL
sta BORDERCOL
jsr print_set_screen
jsr print_cls
jsr print_str_lines
jmp b4
breturn:
rts
b4:
jsr keyboard_key_pressed
cmp #0
beq b4
jmp breturn
}
keyboard_key_pressed: {
.const colidx = KEY_SPACE&7
.label rowidx = KEY_SPACE>>3
jsr keyboard_matrix_read
and keyboard_matrix_col_bitmask+colidx
rts
}
keyboard_matrix_read: {
lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx
sta CIA1_PORT_A
lda CIA1_PORT_B
eor #$ff
rts
}
print_str_lines: {
.label str = 2
lda #<menu.SCREEN
sta print_line_cursor
lda #>menu.SCREEN
sta print_line_cursor+1
lda #<menu.SCREEN
sta print_char_cursor
lda #>menu.SCREEN
sta print_char_cursor+1
lda #<MENU_TEXT
sta str
lda #>MENU_TEXT
sta str+1
b1:
ldy #0
lda (str),y
cmp #'@'
bne b4
rts
b4:
ldy #0
lda (str),y
inc str
bne !+
inc str+1
!:
cmp #'@'
beq b5
ldy #0
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
b5:
cmp #'@'
bne b4
jsr print_ln
lda print_line_cursor
sta print_char_cursor
lda print_line_cursor+1
sta print_char_cursor+1
jmp b1
}
print_ln: {
b1:
lda print_line_cursor
clc
adc #$28
sta print_line_cursor
bcc !+
inc print_line_cursor+1
!:
lda print_line_cursor+1
cmp print_char_cursor+1
bcc b1
bne !+
lda print_line_cursor
cmp print_char_cursor
bcc b1
!:
rts
}
print_cls: {
.label sc = 2
lda #<menu.SCREEN
sta sc
lda #>menu.SCREEN
sta sc+1
b1:
lda #' '
ldy #0
sta (sc),y
inc sc
bne !+
inc sc+1
!:
lda sc+1
cmp #>menu.SCREEN+$3e8
bne b1
lda sc
cmp #<menu.SCREEN+$3e8
bne b1
rts
}
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 " DTV GfxExplorer PRESET 8bpp pixel cell @"+" CONTROL PLANE A PLANE B VIC II @"+" bmm 0 patt p1 patt p2 screen s3 @"+" mcm 0 start 00 start 00 gfx g4 @"+" ecm 0 step 00 step 00 colors c5 @"+" hicol 0 mod 00 mod 00 bgcol0 00 @"+" line 0 bgcol1 00 @"+" colof 0 borof 0 bgcol2 00 @"+" chunk 0 overs 0 bgcol3 00 @"+"@"

View File

@ -0,0 +1,154 @@
@begin: scope:[] from
[0] phi() [ ] ( )
to:@21
@21: scope:[] from @begin
[1] phi() [ ] ( )
[2] call main param-assignment [ ] ( )
to:@end
@end: scope:[] from @21
[3] phi() [ ] ( )
main: scope:[main] from @21
asm { sei }
[5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] )
to:main::@1
main::@1: scope:[main] from main main::@2
[6] if(true) goto main::@2 [ ] ( main:2 [ ] )
to:main::@return
main::@return: scope:[main] from main::@1
[7] return [ ] ( main:2 [ ] )
to:@return
main::@2: scope:[main] from main::@1
[8] phi() [ ] ( main:2 [ ] )
[9] call menu param-assignment [ ] ( main:2 [ ] )
to:main::@1
menu: scope:[menu] from main::@2
[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) ← >((word))(const dword) DTV_COLOR_BANK_DEFAULT#0/(word/signed word/dword/signed dword) 1024 [ ] ( 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
[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::@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::@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::@return: scope:[menu] from menu::@17 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::$29 ← (byte) keyboard_key_pressed::return#2 [ menu::$29 ] ( main:2::menu:9 [ menu::$29 ] )
[40] if((byte~) menu::$29==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@3 [ ] ( main:2::menu:9 [ ] )
to:menu::@return
keyboard_key_pressed: scope:[keyboard_key_pressed] from menu::@4
[41] phi() [ ] ( main:2::menu:9::keyboard_key_pressed:37 [ ] )
[42] call keyboard_matrix_read param-assignment [ keyboard_matrix_read::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_matrix_read::return#0 ] )
[43] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 [ keyboard_matrix_read::return#2 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_matrix_read::return#2 ] )
to:keyboard_key_pressed::@2
keyboard_key_pressed::@2: scope:[keyboard_key_pressed] from keyboard_key_pressed
[44] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 [ keyboard_key_pressed::$2 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::$2 ] )
[45] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte[]) keyboard_matrix_col_bitmask#0+(const byte) keyboard_key_pressed::colidx#0) [ keyboard_key_pressed::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::return#0 ] )
to:keyboard_key_pressed::@return
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@2
[46] return [ keyboard_key_pressed::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37 [ keyboard_key_pressed::return#0 ] )
to:@return
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
[47] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:2::menu:9::keyboard_key_pressed:37::keyboard_matrix_read:42 [ ] )
[48] (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:42 [ keyboard_matrix_read::return#0 ] )
to:keyboard_matrix_read::@return
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
[49] return [ keyboard_matrix_read::return#0 ] ( main:2::menu:9::keyboard_key_pressed:37::keyboard_matrix_read:42 [ keyboard_matrix_read::return#0 ] )
to:@return
print_str_lines: scope:[print_str_lines] from menu::@15
[50] 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
[51] (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 ] )
[51] (byte*) print_char_cursor#19 ← phi( print_str_lines/(const byte*) menu::SCREEN#0 print_str_lines::@9/(byte*~) print_char_cursor#53 ) [ 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 ] )
[51] (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 ] )
[52] 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
[53] 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
[54] (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 ] )
[54] (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 ] )
[55] (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 ] )
[56] (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 ] )
[57] 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
[58] *((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 ] )
[59] (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
[60] (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 ] )
[61] 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
[62] 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 ] )
[63] 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 ] )
[64] (byte*~) print_char_cursor#53 ← (byte*) print_line_cursor#19 [ print_str_lines::str#0 print_char_cursor#53 print_line_cursor#19 ] ( main:2::menu:9::print_str_lines:33 [ print_str_lines::str#0 print_char_cursor#53 print_line_cursor#19 ] )
to:print_str_lines::@1
print_ln: scope:[print_ln] from print_str_lines::@9
[65] phi() [ print_line_cursor#17 print_char_cursor#32 ] ( main:2::menu:9::print_str_lines:33::print_ln:63 [ 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
[66] (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:63 [ print_str_lines::str#0 print_char_cursor#32 print_line_cursor#18 ] )
[67] (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:63 [ print_str_lines::str#0 print_line_cursor#19 print_char_cursor#32 ] )
[68] 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:63 [ 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
[69] return [ print_line_cursor#19 ] ( main:2::menu:9::print_str_lines:33::print_ln:63 [ print_str_lines::str#0 print_line_cursor#19 ] )
to:@return
print_cls: scope:[print_cls] from menu::@14
[70] phi() [ ] ( main:2::menu:9::print_cls:31 [ ] )
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
[71] (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 ] )
[72] *((byte*) print_cls::sc#2) ← (byte) ' ' [ print_cls::sc#2 ] ( main:2::menu:9::print_cls:31 [ print_cls::sc#2 ] )
[73] (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 ] )
[74] 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
[75] return [ ] ( main:2::menu:9::print_cls:31 [ ] )
to:@return
print_set_screen: scope:[print_set_screen] from menu::@8
[76] 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
[77] return [ ] ( main:2::menu:9::print_set_screen:29 [ ] )
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,149 @@
(label) @21
(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*) CIA2_PORT_A
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = ((byte*))(word/dword/signed dword) 56576
(byte*) CIA2_PORT_A_DDR
(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_FEATURE
(const byte*) DTV_FEATURE#0 DTV_FEATURE = ((byte*))(word/dword/signed dword) 53311
(byte) DTV_FEATURE_ENABLE
(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) KEY_SPACE
(const byte) KEY_SPACE#0 KEY_SPACE = (byte/signed byte/word/signed word/dword/signed dword) 60
(byte) LIGHT_GREEN
(const byte) LIGHT_GREEN#0 LIGHT_GREEN = (byte/signed byte/word/signed word/dword/signed dword) 13
(byte[]) MENU_TEXT
(const string) MENU_TEXT#0 MENU_TEXT = (string) " DTV GfxExplorer PRESET 8bpp pixel cell @"+(string) " CONTROL PLANE A PLANE B VIC II @"+(string) " bmm 0 patt p1 patt p2 screen s3 @"+(string) " mcm 0 start 00 start 00 gfx g4 @"+(string) " ecm 0 step 00 step 00 colors c5 @"+(string) " hicol 0 mod 00 mod 00 bgcol0 00 @"+(string) " line 0 bgcol1 00 @"+(string) " colof 0 borof 0 bgcol2 00 @"+(string) " chunk 0 overs 0 bgcol3 00 @"+(string) "@"
(byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = ((byte*))(word/dword/signed dword) 53265
(byte*) VIC_CONTROL2
(const byte*) VIC_CONTROL2#0 VIC_CONTROL2 = ((byte*))(word/dword/signed dword) 53270
(byte) VIC_CSEL
(const byte) VIC_CSEL#0 VIC_CSEL = (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) VIC_DEN
(const byte) VIC_DEN#0 VIC_DEN = (byte/signed byte/word/signed word/dword/signed dword) 16
(byte*) VIC_MEMORY
(const byte*) VIC_MEMORY#0 VIC_MEMORY = ((byte*))(word/dword/signed dword) 53272
(byte) VIC_RSEL
(const byte) VIC_RSEL#0 VIC_RSEL = (byte/signed byte/word/signed word/dword/signed dword) 8
(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
(const byte) keyboard_key_pressed::colidx#0 colidx = (const byte) KEY_SPACE#0&(byte/signed byte/word/signed word/dword/signed dword) 7
(byte) keyboard_key_pressed::key
(byte) keyboard_key_pressed::return
(byte) keyboard_key_pressed::return#0 reg byte a 34.33333333333333
(byte) keyboard_key_pressed::return#2 reg byte a 202.0
(byte) keyboard_key_pressed::rowidx
(const byte) keyboard_key_pressed::rowidx#0 rowidx = (const byte) KEY_SPACE#0>>(byte/signed byte/word/signed word/dword/signed dword) 3
(byte[]) keyboard_matrix_col_bitmask
(const byte[]) keyboard_matrix_col_bitmask#0 keyboard_matrix_col_bitmask = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 }
(byte()) 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[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::$29 reg byte a 202.0
(label) menu::@1
(label) menu::@14
(label) menu::@15
(label) menu::@17
(label) menu::@2
(label) menu::@3
(label) menu::@4
(label) menu::@8
(label) menu::@return
(byte*) menu::CHARSET
(const byte*) menu::CHARSET#0 CHARSET = ((byte*))(word/dword/signed dword) 38912
(byte*) menu::SCREEN
(const byte*) menu::SCREEN#0 SCREEN = ((byte*))(word/dword/signed dword) 32768
(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::i
(byte) menu::i#1 reg byte x 151.5
(byte) menu::i#2 reg byte x 202.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:4 2002.0
(byte*) print_char_cursor#17 print_char_cursor zp ZP_WORD:4 821.0
(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:4 101.0
(byte*) print_char_cursor#32 print_char_cursor zp ZP_WORD:4 572.0
(byte*~) print_char_cursor#53 print_char_cursor zp ZP_WORD:4 202.0
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
(byte*) print_cls::sc
(byte*) print_cls::sc#1 sc zp ZP_WORD:2 151.5
(byte*) print_cls::sc#2 sc zp ZP_WORD:2 151.5
(byte*) print_line_cursor
(byte*) print_line_cursor#17 print_line_cursor zp ZP_WORD:6 8.583333333333332
(byte*) print_line_cursor#18 print_line_cursor zp ZP_WORD:6 2004.0
(byte*) print_line_cursor#19 print_line_cursor zp ZP_WORD:6 641.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(byte*) print_screen
(void()) print_set_screen((byte*) print_set_screen::screen)
(label) print_set_screen::@return
(byte*) print_set_screen::screen
(void()) print_str_lines((byte*) print_str_lines::str)
(label) print_str_lines::@1
(label) print_str_lines::@4
(label) print_str_lines::@5
(label) print_str_lines::@8
(label) print_str_lines::@9
(label) print_str_lines::@return
(byte) print_str_lines::ch
(byte) print_str_lines::ch#0 reg byte a 667.3333333333334
(byte*) print_str_lines::str
(byte*) print_str_lines::str#0 str zp ZP_WORD:2 233.66666666666669
(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
reg byte x [ menu::i#2 menu::i#1 ]
zp ZP_WORD:2 [ menu::c#2 menu::c#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_WORD:4 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#53 print_char_cursor#32 print_char_cursor#1 ]
zp ZP_WORD:6 [ print_line_cursor#18 print_line_cursor#17 print_line_cursor#19 ]
reg byte a [ keyboard_key_pressed::return#2 ]
reg byte a [ menu::$29 ]
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 [ print_str_lines::ch#0 ]