mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-27 09:31:18 +00:00
Added a partial 3x5 font - ref data
This commit is contained in:
parent
f652d14fed
commit
e01be9d33b
@ -1 +0,0 @@
|
||||
ora ({z1}),y
|
72
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.asm
Normal file
72
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.asm
Normal file
@ -0,0 +1,72 @@
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label VIC_MEMORY = $d018
|
||||
.label SCREEN = $400
|
||||
.label CHARSET = $3000
|
||||
jsr main
|
||||
main: {
|
||||
.label charset = 2
|
||||
.label c = 4
|
||||
lda #0
|
||||
sta c
|
||||
lda #<CHARSET+8
|
||||
sta charset
|
||||
lda #>CHARSET+8
|
||||
sta charset+1
|
||||
b1:
|
||||
ldy c
|
||||
lda charset_spec_row,y
|
||||
sta gen_char3.spec
|
||||
lda charset_spec_row+1,y
|
||||
sta gen_char3.spec+1
|
||||
jsr gen_char3
|
||||
lda charset
|
||||
clc
|
||||
adc #8
|
||||
sta charset
|
||||
bcc !+
|
||||
inc charset+1
|
||||
!:
|
||||
lda #2
|
||||
clc
|
||||
adc c
|
||||
sta c
|
||||
cmp #6
|
||||
bne b1
|
||||
lda #SCREEN/$40|CHARSET/$400
|
||||
sta VIC_MEMORY
|
||||
rts
|
||||
}
|
||||
gen_char3: {
|
||||
.label dst = 2
|
||||
.label spec = 5
|
||||
.label b = 7
|
||||
ldy #0
|
||||
b1:
|
||||
ldx #0
|
||||
txa
|
||||
sta b
|
||||
b2:
|
||||
lda spec+1
|
||||
and #$80
|
||||
cmp #0
|
||||
beq b3
|
||||
lda #1
|
||||
ora b
|
||||
sta b
|
||||
b3:
|
||||
asl b
|
||||
asl spec
|
||||
rol spec+1
|
||||
inx
|
||||
cpx #3
|
||||
bne b2
|
||||
lda b
|
||||
sta (dst),y
|
||||
iny
|
||||
cpy #5
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
charset_spec_row: .word $f7da, $f7de, $f24e, $d6de
|
63
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.cfg
Normal file
63
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.cfg
Normal file
@ -0,0 +1,63 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main param-assignment [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @2
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
[5] (byte) main::c#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::c#1 ) [ main::charset#2 main::c#2 ] ( main:2 [ main::charset#2 main::c#2 ] )
|
||||
[5] (byte*) main::charset#2 ← phi( main/(const byte*) CHARSET#0+(byte/signed byte/word/signed word/dword/signed dword) 8 main::@3/(byte*) main::charset#1 ) [ main::charset#2 main::c#2 ] ( main:2 [ main::charset#2 main::c#2 ] )
|
||||
[6] (byte*) gen_char3::dst#0 ← (byte*) main::charset#2 [ main::charset#2 main::c#2 gen_char3::dst#0 ] ( main:2 [ main::charset#2 main::c#2 gen_char3::dst#0 ] )
|
||||
[7] (word) gen_char3::spec#0 ← *((const word[]) charset_spec_row#0 + (byte) main::c#2) [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#0 ] ( main:2 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#0 ] )
|
||||
[8] call gen_char3 param-assignment [ main::charset#2 main::c#2 ] ( main:2 [ main::charset#2 main::c#2 ] )
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
[9] (byte*) main::charset#1 ← (byte*) main::charset#2 + (byte/signed byte/word/signed word/dword/signed dword) 8 [ main::c#2 main::charset#1 ] ( main:2 [ main::c#2 main::charset#1 ] )
|
||||
[10] (byte) main::c#1 ← (byte) main::c#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 [ main::charset#1 main::c#1 ] ( main:2 [ main::charset#1 main::c#1 ] )
|
||||
[11] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@1 [ main::charset#1 main::c#1 ] ( main:2 [ main::charset#1 main::c#1 ] )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@3
|
||||
[12] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) CHARSET#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] )
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
[13] return [ ] ( main:2 [ ] )
|
||||
to:@return
|
||||
gen_char3: scope:[gen_char3] from main::@1
|
||||
[14] phi() [ gen_char3::dst#0 gen_char3::spec#0 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#0 ] )
|
||||
to:gen_char3::@1
|
||||
gen_char3::@1: scope:[gen_char3] from gen_char3 gen_char3::@5
|
||||
[15] (byte) gen_char3::r#6 ← phi( gen_char3/(byte/signed byte/word/signed word/dword/signed dword) 0 gen_char3::@5/(byte) gen_char3::r#1 ) [ gen_char3::dst#0 gen_char3::spec#4 gen_char3::r#6 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#4 gen_char3::r#6 ] )
|
||||
[15] (word) gen_char3::spec#4 ← phi( gen_char3/(word) gen_char3::spec#0 gen_char3::@5/(word) gen_char3::spec#1 ) [ gen_char3::dst#0 gen_char3::spec#4 gen_char3::r#6 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#4 gen_char3::r#6 ] )
|
||||
to:gen_char3::@2
|
||||
gen_char3::@2: scope:[gen_char3] from gen_char3::@1 gen_char3::@3
|
||||
[16] (byte) gen_char3::c#2 ← phi( gen_char3::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gen_char3::@3/(byte) gen_char3::c#1 ) [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] )
|
||||
[16] (byte) gen_char3::b#4 ← phi( gen_char3::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gen_char3::@3/(byte) gen_char3::b#1 ) [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] )
|
||||
[16] (word) gen_char3::spec#2 ← phi( gen_char3::@1/(word) gen_char3::spec#4 gen_char3::@3/(word) gen_char3::spec#1 ) [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] )
|
||||
[17] (byte~) gen_char3::$0 ← > (word) gen_char3::spec#2 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 gen_char3::$0 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 gen_char3::$0 ] )
|
||||
[18] (byte~) gen_char3::$1 ← (byte~) gen_char3::$0 & (byte/word/signed word/dword/signed dword) 128 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 gen_char3::$1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 gen_char3::$1 ] )
|
||||
[19] if((byte~) gen_char3::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gen_char3::@3 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::b#4 gen_char3::c#2 ] )
|
||||
to:gen_char3::@4
|
||||
gen_char3::@4: scope:[gen_char3] from gen_char3::@2
|
||||
[20] (byte) gen_char3::b#2 ← (byte) gen_char3::b#4 | (byte/signed byte/word/signed word/dword/signed dword) 1 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::c#2 gen_char3::b#2 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::c#2 gen_char3::b#2 ] )
|
||||
to:gen_char3::@3
|
||||
gen_char3::@3: scope:[gen_char3] from gen_char3::@2 gen_char3::@4
|
||||
[21] (byte) gen_char3::b#3 ← phi( gen_char3::@2/(byte) gen_char3::b#4 gen_char3::@4/(byte) gen_char3::b#2 ) [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::c#2 gen_char3::b#3 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::c#2 gen_char3::b#3 ] )
|
||||
[22] (byte) gen_char3::b#1 ← (byte) gen_char3::b#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::c#2 gen_char3::b#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#2 gen_char3::c#2 gen_char3::b#1 ] )
|
||||
[23] (word) gen_char3::spec#1 ← (word) gen_char3::spec#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 gen_char3::c#2 gen_char3::b#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 gen_char3::c#2 gen_char3::b#1 ] )
|
||||
[24] (byte) gen_char3::c#1 ← ++ (byte) gen_char3::c#2 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 gen_char3::b#1 gen_char3::c#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 gen_char3::b#1 gen_char3::c#1 ] )
|
||||
[25] if((byte) gen_char3::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto gen_char3::@2 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 gen_char3::b#1 gen_char3::c#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 gen_char3::b#1 gen_char3::c#1 ] )
|
||||
to:gen_char3::@5
|
||||
gen_char3::@5: scope:[gen_char3] from gen_char3::@3
|
||||
[26] *((byte*) gen_char3::dst#0 + (byte) gen_char3::r#6) ← (byte) gen_char3::b#1 [ gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::r#6 gen_char3::spec#1 ] )
|
||||
[27] (byte) gen_char3::r#1 ← ++ (byte) gen_char3::r#6 [ gen_char3::dst#0 gen_char3::spec#1 gen_char3::r#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#1 gen_char3::r#1 ] )
|
||||
[28] if((byte) gen_char3::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 5) goto gen_char3::@1 [ gen_char3::dst#0 gen_char3::spec#1 gen_char3::r#1 ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 gen_char3::dst#0 gen_char3::spec#1 gen_char3::r#1 ] )
|
||||
to:gen_char3::@return
|
||||
gen_char3::@return: scope:[gen_char3] from gen_char3::@5
|
||||
[29] return [ ] ( main:2::gen_char3:8 [ main::charset#2 main::c#2 ] )
|
||||
to:@return
|
1490
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.log
Normal file
1490
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.log
Normal file
File diff suppressed because it is too large
Load Diff
58
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.sym
Normal file
58
src/test/java/dk/camelot64/kickc/test/ref/norom-charset.sym
Normal file
@ -0,0 +1,58 @@
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) CHARSET
|
||||
(const byte*) CHARSET#0 CHARSET = ((byte*))(word/signed word/dword/signed dword) 12288
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
|
||||
(byte*) VIC_MEMORY
|
||||
(const byte*) VIC_MEMORY#0 VIC_MEMORY = ((byte*))(word/dword/signed dword) 53272
|
||||
(word[]) charset_spec_row
|
||||
(const word[]) charset_spec_row#0 charset_spec_row = { (word/dword/signed dword) 63450, (word/dword/signed dword) 63454, (word/dword/signed dword) 62030, (word/dword/signed dword) 55006 }
|
||||
(void()) gen_char3((byte*) gen_char3::dst , (word) gen_char3::spec)
|
||||
(byte~) gen_char3::$0 reg byte a 2002.0
|
||||
(byte~) gen_char3::$1 reg byte a 2002.0
|
||||
(label) gen_char3::@1
|
||||
(label) gen_char3::@2
|
||||
(label) gen_char3::@3
|
||||
(label) gen_char3::@4
|
||||
(label) gen_char3::@5
|
||||
(label) gen_char3::@return
|
||||
(byte) gen_char3::b
|
||||
(byte) gen_char3::b#1 b zp ZP_BYTE:7 525.75
|
||||
(byte) gen_char3::b#2 b zp ZP_BYTE:7 2002.0
|
||||
(byte) gen_char3::b#3 b zp ZP_BYTE:7 3003.0
|
||||
(byte) gen_char3::b#4 b zp ZP_BYTE:7 750.75
|
||||
(byte) gen_char3::c
|
||||
(byte) gen_char3::c#1 reg byte x 1501.5
|
||||
(byte) gen_char3::c#2 reg byte x 250.25
|
||||
(byte*) gen_char3::dst
|
||||
(byte*) gen_char3::dst#0 dst zp ZP_WORD:2 6.588235294117648
|
||||
(byte) gen_char3::r
|
||||
(byte) gen_char3::r#1 reg byte y 151.5
|
||||
(byte) gen_char3::r#6 reg byte y 25.25
|
||||
(word) gen_char3::spec
|
||||
(word) gen_char3::spec#0 spec zp ZP_WORD:5 6.5
|
||||
(word) gen_char3::spec#1 spec zp ZP_WORD:5 350.5
|
||||
(word) gen_char3::spec#2 spec zp ZP_WORD:5 443.42857142857144
|
||||
(word) gen_char3::spec#4 spec zp ZP_WORD:5 204.0
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@return
|
||||
(byte) main::c
|
||||
(byte) main::c#1 c zp ZP_BYTE:4 16.5
|
||||
(byte) main::c#2 c zp ZP_BYTE:4 6.6000000000000005
|
||||
(byte*) main::charset
|
||||
(byte*) main::charset#1 charset zp ZP_WORD:2 7.333333333333333
|
||||
(byte*) main::charset#2 charset zp ZP_WORD:2 8.25
|
||||
|
||||
zp ZP_WORD:2 [ main::charset#2 main::charset#1 gen_char3::dst#0 ]
|
||||
zp ZP_BYTE:4 [ main::c#2 main::c#1 ]
|
||||
reg byte y [ gen_char3::r#6 gen_char3::r#1 ]
|
||||
zp ZP_WORD:5 [ gen_char3::spec#2 gen_char3::spec#4 gen_char3::spec#0 gen_char3::spec#1 ]
|
||||
reg byte x [ gen_char3::c#2 gen_char3::c#1 ]
|
||||
zp ZP_BYTE:7 [ gen_char3::b#3 gen_char3::b#4 gen_char3::b#1 gen_char3::b#2 ]
|
||||
reg byte a [ gen_char3::$0 ]
|
||||
reg byte a [ gen_char3::$1 ]
|
Loading…
Reference in New Issue
Block a user