mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-24 04:31:02 +00:00
Added missing fragments.
This commit is contained in:
parent
946327da37
commit
e3cd22ecab
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 1097427c14 109742972a
|
||||
//KICKC FRAGMENT CACHE 1098941965 1098943491
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 1097427c14 109742972a
|
||||
//KICKC FRAGMENT CACHE 1098941965 1098943491
|
||||
//FRAGMENT _deref_pbuc1=vbuc2
|
||||
lda #{c2}
|
||||
sta {c1}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 1097427c14 109742972a
|
||||
//KICKC FRAGMENT CACHE 1098941965 1098943491
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
202
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
202
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 1097427c14 109742972a
|
||||
//KICKC FRAGMENT CACHE 1098941965 1098943491
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
@ -14811,17 +14811,15 @@ lda #0
|
||||
iny
|
||||
sta ({z1}),y
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vbuc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vbsc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vwuc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vwsc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vduc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vdsc2
|
||||
NO_SYNTHESIS
|
||||
lda #{c2}
|
||||
ldy #{c1}
|
||||
clc
|
||||
adc ({z1}),y
|
||||
sta ({z1}),y
|
||||
iny
|
||||
lda #0
|
||||
adc ({z1}),y
|
||||
sta ({z1}),y
|
||||
//FRAGMENT vwuz1=_deref_pwuz2_ror_8
|
||||
ldy #1
|
||||
lda ({z2}),y
|
||||
@ -14829,23 +14827,21 @@ sta {z1}
|
||||
lda #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vwuc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vduc2
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vdsc2
|
||||
NO_SYNTHESIS
|
||||
ldy #{c1}
|
||||
lda #<{c2}
|
||||
eor ({z1}),y
|
||||
sta ({z1}),y
|
||||
iny
|
||||
lda #>{c2}
|
||||
eor ({z1}),y
|
||||
sta ({z1}),y
|
||||
//FRAGMENT vwuz1=pwuz2_derefidx_vbuc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz2_derefidx_vbsc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz2_derefidx_vwuc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz2_derefidx_vwsc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz2_derefidx_vduc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz2_derefidx_vdsc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
ldy #{c1}
|
||||
lda #0
|
||||
sta {z1}+1
|
||||
iny
|
||||
lda ({z2}),y
|
||||
sta {z1}
|
||||
//FRAGMENT vwuz1_lt_vbuz2_then_la1
|
||||
lda {z1}+1
|
||||
bne !+
|
||||
@ -14952,6 +14948,14 @@ lda #{c2}
|
||||
clc
|
||||
adc {c1},y
|
||||
tay
|
||||
//FRAGMENT vwuz1_lt_vbuxx_then_la1
|
||||
lda {z1}+1
|
||||
bne !+
|
||||
stx $ff
|
||||
lda {z1}
|
||||
cmp $ff
|
||||
bcc {la1}
|
||||
!:
|
||||
//FRAGMENT vwuz1_ge_vbuxx_then_la1
|
||||
lda {z1}+1
|
||||
bne {la1}
|
||||
@ -14968,14 +14972,10 @@ lda {z1}
|
||||
cmp $ff
|
||||
bcs {la1}
|
||||
!:
|
||||
//FRAGMENT vbuaa=vbuz1_minus_2
|
||||
lda {z1}
|
||||
sec
|
||||
sbc #2
|
||||
//FRAGMENT vbuxx=vbuz1_minus_2
|
||||
ldx {z1}
|
||||
//FRAGMENT vbuz1=vbuxx_minus_2
|
||||
dex
|
||||
dex
|
||||
stx {z1}
|
||||
//FRAGMENT pbuc1_derefidx_vbuaa=_byte_vwuz1
|
||||
tay
|
||||
lda {z1}
|
||||
@ -15005,6 +15005,14 @@ ldx {z1}+1
|
||||
lda {z1}
|
||||
//FRAGMENT vbuxx=_lo_pvoz1
|
||||
ldx {z1}
|
||||
//FRAGMENT vbuaa=vbuz1_minus_2
|
||||
lda {z1}
|
||||
sec
|
||||
sbc #2
|
||||
//FRAGMENT vbuxx=vbuz1_minus_2
|
||||
ldx {z1}
|
||||
dex
|
||||
dex
|
||||
//FRAGMENT vbuyy=vbuz1_minus_2
|
||||
ldy {z1}
|
||||
dey
|
||||
@ -15020,17 +15028,12 @@ sta {z1}
|
||||
dey
|
||||
sty {z1}+1
|
||||
//FRAGMENT vwuz1=pwuz1_derefidx_vbuc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz1_derefidx_vbsc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz1_derefidx_vwuc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz1_derefidx_vwsc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz1_derefidx_vduc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
//FRAGMENT vwuz1=pwuz1_derefidx_vdsc1_ror_8
|
||||
NO_SYNTHESIS
|
||||
ldy #{c1}
|
||||
iny
|
||||
lda ({z1}),y
|
||||
sta {z1}
|
||||
lda #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT _deref_pbuz1=vbum2
|
||||
lda {m2}
|
||||
ldy #0
|
||||
@ -15048,6 +15051,59 @@ lda {m1}
|
||||
ldx {m1}
|
||||
//FRAGMENT vbuyy=vbum1
|
||||
ldy {m1}
|
||||
//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuz2
|
||||
ldy {z2}
|
||||
lda {c2},y
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda #>{c1}
|
||||
adc #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT pbuz1_derefidx_vbuz2=_byte_vwuz3
|
||||
lda {z3}
|
||||
ldy {z2}
|
||||
sta ({z1}),y
|
||||
//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuaa
|
||||
tay
|
||||
lda {c2},y
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda #>{c1}
|
||||
adc #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuxx
|
||||
lda {c2},x
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda #>{c1}
|
||||
adc #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuyy
|
||||
lda {c2},y
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda #>{c1}
|
||||
adc #0
|
||||
sta {z1}+1
|
||||
//FRAGMENT pbuz1_derefidx_vbuxx=_byte_vwuz2
|
||||
txa
|
||||
tay
|
||||
lda {z2}
|
||||
sta ({z1}),y
|
||||
//FRAGMENT pbuz1_derefidx_vbuyy=_byte_vwuz2
|
||||
lda {z2}
|
||||
sta ({z1}),y
|
||||
//FRAGMENT vbuz1=vbuz2_bor__hi_vwuz3
|
||||
lda {z2}
|
||||
ora {z3}+1
|
||||
sta {z1}
|
||||
//FRAGMENT vbuz1=vbuz1_bor_vbuaa
|
||||
ora {z1}
|
||||
sta {z1}
|
||||
//FRAGMENT pbuz1_ge_pbuc1_then_la1
|
||||
lda {z1}+1
|
||||
cmp #>{c1}
|
||||
@ -15427,6 +15483,34 @@ sta {c1}
|
||||
lda {c1}
|
||||
cmp #0
|
||||
bne {la1}
|
||||
//FRAGMENT pbuz1_derefidx_vbuc1=_byte_vwuz2
|
||||
ldy #{c1}
|
||||
lda {z2}
|
||||
sta ({z1}),y
|
||||
//FRAGMENT pssz1=pssc1_plus_vwuz2
|
||||
lda {z2}
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
adc #>{c1}
|
||||
sta {z1}+1
|
||||
//FRAGMENT _deref_pssz1=_deref_pssz2_memcpy_vbuc1
|
||||
ldy #00
|
||||
!:
|
||||
lda ({z2}),y
|
||||
sta ({z1}),y
|
||||
iny
|
||||
cpy #{c1}
|
||||
bne !-
|
||||
//FRAGMENT pssz1=pssc1_plus_vwuz1
|
||||
clc
|
||||
lda {z1}
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda {z1}+1
|
||||
adc #>{c1}
|
||||
sta {z1}+1
|
||||
//FRAGMENT _deref_pbuc1=_deref_pbuc1_plus_vbuc2
|
||||
lda #{c2}
|
||||
clc
|
||||
@ -16229,22 +16313,6 @@ lda ({z1}),y
|
||||
sta {z1}+1
|
||||
pla
|
||||
sta {z1}
|
||||
//FRAGMENT pssz1=pssc1_plus_vwuz2
|
||||
lda {z2}
|
||||
clc
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda {z2}+1
|
||||
adc #>{c1}
|
||||
sta {z1}+1
|
||||
//FRAGMENT pssz1=pssc1_plus_vwuz1
|
||||
clc
|
||||
lda {z1}
|
||||
adc #<{c1}
|
||||
sta {z1}
|
||||
lda {z1}+1
|
||||
adc #>{c1}
|
||||
sta {z1}+1
|
||||
//FRAGMENT _deref_pbuz1_eq__deref_pbuz2_then_la1
|
||||
ldy #0
|
||||
lda ({z1}),y
|
||||
@ -18625,14 +18693,6 @@ sta {c1},y
|
||||
lda {c1}+1,y
|
||||
eor #>{c2}
|
||||
sta {c1}+1,y
|
||||
//FRAGMENT vwuz1_lt_vbuxx_then_la1
|
||||
lda {z1}+1
|
||||
bne !+
|
||||
stx $ff
|
||||
lda {z1}
|
||||
cmp $ff
|
||||
bcc {la1}
|
||||
!:
|
||||
//FRAGMENT vwuz1_lt_vbuyy_then_la1
|
||||
lda {z1}+1
|
||||
bne !+
|
||||
@ -18641,10 +18701,6 @@ lda {z1}
|
||||
cmp $ff
|
||||
bcc {la1}
|
||||
!:
|
||||
//FRAGMENT vbuz1=vbuxx_minus_2
|
||||
dex
|
||||
dex
|
||||
stx {z1}
|
||||
//FRAGMENT pwuc1_derefidx_vbuz1=vbuaa
|
||||
ldy {z1}
|
||||
sta {c1},y
|
||||
|
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 1097427c14 109742972a
|
||||
//KICKC FRAGMENT CACHE 1098941965 1098943491
|
||||
//FRAGMENT vbuz1=_deref_pbuc1
|
||||
lda {c1}
|
||||
sta {z1}
|
||||
|
@ -0,0 +1,7 @@
|
||||
lda #<{c1}
|
||||
eor ({z1}),y
|
||||
sta ({z1}),y
|
||||
iny
|
||||
lda #>{c1}
|
||||
eor ({z1}),y
|
||||
sta ({z1}),y
|
@ -0,0 +1,7 @@
|
||||
clc
|
||||
adc ({z1}),y
|
||||
sta ({z1}),y
|
||||
iny
|
||||
lda #0
|
||||
adc ({z1}),y
|
||||
sta ({z1}),y
|
@ -0,0 +1,5 @@
|
||||
lda #0
|
||||
sta {m1}+1
|
||||
iny
|
||||
lda ({z2}),y
|
||||
sta {m1}
|
@ -0,0 +1,5 @@
|
||||
iny
|
||||
lda ({z1}),y
|
||||
sta {z1}
|
||||
lda #0
|
||||
sta {z1}+1
|
@ -218,4 +218,17 @@ public class StatementSource implements Serializable {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public String toStringShort() {
|
||||
if(getFileName() != null) {
|
||||
String fileName = getFileName();
|
||||
final int slashIdx = fileName.lastIndexOf("/");
|
||||
if(slashIdx>0)
|
||||
fileName = fileName.substring(slashIdx+1);
|
||||
return "File " + fileName + "\nLine " + getLineNumber() + "\n" + getCode();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -804,7 +804,7 @@ public class Pass4CodeGeneration {
|
||||
generateStatementAsm(asm, block, statement, aluState, true);
|
||||
} catch(AsmFragmentTemplateSynthesizer.UnknownFragmentException e) {
|
||||
if(warnFragmentMissing) {
|
||||
program.getLog().append("Warning! Unknown fragment for statement " + statement.toString(program, false) + "\nMissing ASM fragment " + e.getFragmentSignature() + "\n" + statement.getSource().toString());
|
||||
program.getLog().append("Warning! Unknown fragment for statement " + statement.toString(program, false) + "\nMissing ASM fragment " + e.getFragmentSignature() + "\n" + statement.getSource().toStringShort());
|
||||
asm.addLine(new AsmInlineKickAsm(".assert \"Missing ASM fragment " + e.getFragmentSignature() + "\", 0, 1", 0L, 0L));
|
||||
} else {
|
||||
throw new CompileError("Unknown fragment for statement " + statement.toString(program, false) + "\nMissing ASM fragment " + e.getFragmentSignature(), statement.getSource());
|
||||
|
@ -395,7 +395,15 @@ main: {
|
||||
adc (__63),y
|
||||
sta (__63),y
|
||||
// balls[i].y_velocity += WEIGHT
|
||||
.assert "Missing ASM fragment Fragment not found pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vbuc2. Attempted variations pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vbuc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vbsc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vwuc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vwsc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vduc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vdsc2 ", 0, 1
|
||||
lda #$10
|
||||
ldy #6
|
||||
clc
|
||||
adc (__63),y
|
||||
sta (__63),y
|
||||
iny
|
||||
lda #0
|
||||
adc (__63),y
|
||||
sta (__63),y
|
||||
// balls[i].y_position += (balls[i].y_velocity += WEIGHT)
|
||||
ldy #6
|
||||
clc
|
||||
@ -429,7 +437,14 @@ main: {
|
||||
lda.z __44+1
|
||||
adc #>balls
|
||||
sta.z __71+1
|
||||
.assert "Missing ASM fragment Fragment not found pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vwuc2. Attempted variations pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vwuc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vduc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vdsc2 ", 0, 1
|
||||
ldy #4
|
||||
lda #<$ffff
|
||||
eor (__71),y
|
||||
sta (__71),y
|
||||
iny
|
||||
lda #>$ffff
|
||||
eor (__71),y
|
||||
sta (__71),y
|
||||
__b9:
|
||||
// balls[i].y_position >> 8
|
||||
lda.z __44
|
||||
@ -439,8 +454,18 @@ main: {
|
||||
lda.z __44+1
|
||||
adc #>balls
|
||||
sta.z __69+1
|
||||
.assert "Missing ASM fragment Fragment not found vwuz1=pwuz2_derefidx_vbuc1_ror_8. Attempted variations vwuz1=pwuz2_derefidx_vbuc1_ror_8 vwuz1=pwuz2_derefidx_vbsc1_ror_8 vwuz1=pwuz2_derefidx_vwuc1_ror_8 vwuz1=pwuz2_derefidx_vwsc1_ror_8 vwuz1=pwuz2_derefidx_vduc1_ror_8 vwuz1=pwuz2_derefidx_vdsc1_ror_8 ", 0, 1
|
||||
.assert "Missing ASM fragment Fragment not found vwuz1=pwuz1_derefidx_vbuc1_ror_8. Attempted variations vwuz1=pwuz1_derefidx_vbuc1_ror_8 vwuz1=pwuz1_derefidx_vbsc1_ror_8 vwuz1=pwuz1_derefidx_vwuc1_ror_8 vwuz1=pwuz1_derefidx_vwsc1_ror_8 vwuz1=pwuz1_derefidx_vduc1_ror_8 vwuz1=pwuz1_derefidx_vdsc1_ror_8 ", 0, 1
|
||||
ldy #2
|
||||
lda #0
|
||||
sta.z __23+1
|
||||
iny
|
||||
lda (__69),y
|
||||
sta.z __23
|
||||
ldy #2
|
||||
iny
|
||||
lda (__25),y
|
||||
sta.z __25
|
||||
lda #0
|
||||
sta.z __25+1
|
||||
// h_bar + 8
|
||||
lax.z h_bar
|
||||
axs #-[8]
|
||||
@ -466,7 +491,14 @@ main: {
|
||||
lda.z __44+1
|
||||
adc #>balls
|
||||
sta.z __76+1
|
||||
.assert "Missing ASM fragment Fragment not found pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vwuc2. Attempted variations pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vwuc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vduc2 pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vdsc2 ", 0, 1
|
||||
ldy #6
|
||||
lda #<$ffff
|
||||
eor (__76),y
|
||||
sta (__76),y
|
||||
iny
|
||||
lda #>$ffff
|
||||
eor (__76),y
|
||||
sta (__76),y
|
||||
// h_bar - 2
|
||||
lda.z h_bar
|
||||
sec
|
||||
@ -494,7 +526,12 @@ main: {
|
||||
lda.z __73+1
|
||||
adc #>balls
|
||||
sta.z __73+1
|
||||
.assert "Missing ASM fragment Fragment not found vwuz1=pwuz2_derefidx_vbuc1_ror_8. Attempted variations vwuz1=pwuz2_derefidx_vbuc1_ror_8 vwuz1=pwuz2_derefidx_vbsc1_ror_8 vwuz1=pwuz2_derefidx_vwuc1_ror_8 vwuz1=pwuz2_derefidx_vwsc1_ror_8 vwuz1=pwuz2_derefidx_vduc1_ror_8 vwuz1=pwuz2_derefidx_vdsc1_ror_8 ", 0, 1
|
||||
ldy #2
|
||||
lda #0
|
||||
sta.z __32+1
|
||||
iny
|
||||
lda (__73),y
|
||||
sta.z __32
|
||||
// SPRITE_BUFFER[sprite_idx].y = (unsigned char) (balls[i].y_position >> 8)
|
||||
lda.z sprite_idx
|
||||
asl
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user