mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-05 09:30:44 +00:00
Added fragments.
This commit is contained in:
parent
85714461d5
commit
7c73c20033
@ -0,0 +1,17 @@
|
|||||||
|
lda {m1}
|
||||||
|
sta $fc
|
||||||
|
clc
|
||||||
|
sty $fe
|
||||||
|
adc $fe
|
||||||
|
sta $fe
|
||||||
|
lda {m1}+1
|
||||||
|
sta $fd
|
||||||
|
adc #00
|
||||||
|
sta $ff
|
||||||
|
ldy #0
|
||||||
|
!:
|
||||||
|
lda ($fe),y
|
||||||
|
sta ($fc),y
|
||||||
|
iny
|
||||||
|
dex
|
||||||
|
bne !-
|
@ -2,7 +2,7 @@ lda #<{c2}
|
|||||||
sta {c1},x
|
sta {c1},x
|
||||||
lda #>{c2}
|
lda #>{c2}
|
||||||
sta {c1}+1,x
|
sta {c1}+1,x
|
||||||
lda #<{c2}>>16
|
lda #<{c2}>>$10
|
||||||
sta {c1}+2,x
|
sta {c1}+2,x
|
||||||
lda #>{c2}>>16
|
lda #>{c2}>>$10
|
||||||
sta {c1}+3,x
|
sta {c1}+3,x
|
@ -2,7 +2,7 @@ lda #<{c2}
|
|||||||
sta {c1},y
|
sta {c1},y
|
||||||
lda #>{c2}
|
lda #>{c2}
|
||||||
sta {c1}+1,y
|
sta {c1}+1,y
|
||||||
lda #<{c2}>>16
|
lda #<{c2}>>$10
|
||||||
sta {c1}+2,y
|
sta {c1}+2,y
|
||||||
lda #>{c2}>>16
|
lda #>{c2}>>$10
|
||||||
sta {c1}+3,y
|
sta {c1}+3,y
|
@ -8,8 +8,8 @@ iny
|
|||||||
lda #>{c2}
|
lda #>{c2}
|
||||||
sta ($fe),y
|
sta ($fe),y
|
||||||
iny
|
iny
|
||||||
lda #<{c2}>>16
|
lda #<{c2}>>$10
|
||||||
sta ($fe),y
|
sta ($fe),y
|
||||||
iny
|
iny
|
||||||
lda #>{c2}>>16
|
lda #>{c2}>>$10
|
||||||
sta ($fe),y
|
sta ($fe),y
|
@ -0,0 +1,13 @@
|
|||||||
|
lda {m2}
|
||||||
|
ora {m2}+1
|
||||||
|
bne {la1}
|
||||||
|
iny
|
||||||
|
lda ({z1}),y
|
||||||
|
cmp {m2}+1
|
||||||
|
bcc {la1}
|
||||||
|
bne !+
|
||||||
|
dey
|
||||||
|
lda ({z1}),y
|
||||||
|
cmp {m2}
|
||||||
|
bcc {la1}
|
||||||
|
!:
|
1
src/main/fragment/mos6502-common/vbuaa=vdsm1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuaa=vdsm1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
lda {m1}
|
1
src/main/fragment/mos6502-common/vbuaa=vdum1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuaa=vdum1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
lda {m1}
|
1
src/main/fragment/mos6502-common/vbuaa=vwuc1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuaa=vwuc1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
lda #<{c1}
|
1
src/main/fragment/mos6502-common/vbuaa=vwum1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuaa=vwum1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
lda {m1}
|
1
src/main/fragment/mos6502-common/vbuxx=vdsm1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuxx=vdsm1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldx {m1}
|
1
src/main/fragment/mos6502-common/vbuxx=vdum1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuxx=vdum1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldx {m1}
|
1
src/main/fragment/mos6502-common/vbuxx=vwuc1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuxx=vwuc1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldx #<{c1}
|
1
src/main/fragment/mos6502-common/vbuxx=vwum1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuxx=vwum1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldx {m1}
|
1
src/main/fragment/mos6502-common/vbuyy=vdsm1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuyy=vdsm1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldy {m1}
|
1
src/main/fragment/mos6502-common/vbuyy=vdum1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuyy=vdum1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldy {m1}
|
1
src/main/fragment/mos6502-common/vbuyy=vwuc1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuyy=vwuc1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldy #<{c1}
|
1
src/main/fragment/mos6502-common/vbuyy=vwum1.asm
Normal file
1
src/main/fragment/mos6502-common/vbuyy=vwum1.asm
Normal file
@ -0,0 +1 @@
|
|||||||
|
ldy {m1}
|
@ -12,9 +12,9 @@ adc #>{c1}
|
|||||||
sta {m1}+1
|
sta {m1}+1
|
||||||
iny
|
iny
|
||||||
lda ($fe),y
|
lda ($fe),y
|
||||||
adc #<{c1}>>16
|
adc #<{c1}>>$10
|
||||||
sta {m1}+2
|
sta {m1}+2
|
||||||
iny
|
iny
|
||||||
lda ($fe),y
|
lda ($fe),y
|
||||||
adc #>{c1}>>16
|
adc #>{c1}>>$10
|
||||||
sta {m1}+3
|
sta {m1}+3
|
@ -0,0 +1,16 @@
|
|||||||
|
lda {m1}
|
||||||
|
sec
|
||||||
|
sbc ({z2}),y
|
||||||
|
sta {m1}
|
||||||
|
iny
|
||||||
|
lda {m1}+1
|
||||||
|
sbc ({z2}),y
|
||||||
|
sta {m1}+1
|
||||||
|
iny
|
||||||
|
lda {m1}+2
|
||||||
|
sbc ({z2}),y
|
||||||
|
sta {m1}+2
|
||||||
|
iny
|
||||||
|
lda {m1}+3
|
||||||
|
sbc ({z2}),y
|
||||||
|
sta {m1}+3
|
13
src/main/fragment/mos6502-common/vdum1=vdum1_minus_vwum2.asm
Normal file
13
src/main/fragment/mos6502-common/vdum1=vdum1_minus_vwum2.asm
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
lda {m1}
|
||||||
|
sec
|
||||||
|
sbc {m2}
|
||||||
|
sta {m1}
|
||||||
|
lda {m1}+1
|
||||||
|
sbc {m2}+1
|
||||||
|
sta {m1}+1
|
||||||
|
lda {m1}+2
|
||||||
|
sbc #0
|
||||||
|
sta {m1}+2
|
||||||
|
lda {m1}+3
|
||||||
|
sbc #0
|
||||||
|
sta {m1}+3
|
13
src/main/fragment/mos6502-common/vdum1_eq_vdsc1_then_la1.asm
Normal file
13
src/main/fragment/mos6502-common/vdum1_eq_vdsc1_then_la1.asm
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
lda {m1}+3
|
||||||
|
cmp #>{c1}>>$10
|
||||||
|
bne !+
|
||||||
|
lda {m1}+2
|
||||||
|
cmp #<{c1}>>$10
|
||||||
|
bne !+
|
||||||
|
lda {m1}+1
|
||||||
|
cmp #>{c1}
|
||||||
|
bne !+
|
||||||
|
lda {m1}
|
||||||
|
cmp #<{c1}
|
||||||
|
beq {la1}
|
||||||
|
!:
|
@ -751,12 +751,18 @@ class AsmFragmentTemplateSynthesisRule {
|
|||||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*)z1(.*)", twoZM1 + "|" + twoZM2, null, "$1z1$2z2$3", null, mapZM2Swap, false));
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*)z1(.*)", twoZM1 + "|" + twoZM2, null, "$1z1$2z2$3", null, mapZM2Swap, false));
|
||||||
// Correct wrong ordered Z2/Z1
|
// Correct wrong ordered Z2/Z1
|
||||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)m1(.*)", twoZM1 + "|" + twoZM2, null, "$1m1$2m2$3", null, mapZM2Swap, false));
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)m1(.*)", twoZM1 + "|" + twoZM2, null, "$1m1$2m2$3", null, mapZM2Swap, false));
|
||||||
|
// Correct wrong ordered M2/Z1
|
||||||
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)z1(.*)", twoZM1 + "|" + twoZM2, null, "$1m1$2z2$3", null, mapZM2Swap, false));
|
||||||
|
// Correct wrong ordered Z2/M1
|
||||||
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z2(.*)m1(.*)", twoZM1 + "|" + twoZM2, null, "$1z1$2m2$3", null, mapZM2Swap, false));
|
||||||
// Correct wrong ordered Z3/Z2
|
// Correct wrong ordered Z3/Z2
|
||||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m3(.*)m2(.*)", twoZM2 + "|" + twoZM3, null, "$1m2$2m3$3", null, mapZM3Swap, false));
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m3(.*)m2(.*)", twoZM2 + "|" + twoZM3, null, "$1m2$2m3$3", null, mapZM3Swap, false));
|
||||||
// Correct wrong ordered Z4/Z3
|
// Correct wrong ordered Z4/Z3
|
||||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m4(.*)m3(.*)", twoZM3 + "|" + twoZM4, null, "$1m3$2m4$3", null, mapZM4Swap, false));
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m4(.*)m3(.*)", twoZM3 + "|" + twoZM4, null, "$1m3$2m4$3", null, mapZM4Swap, false));
|
||||||
// Correct wrong ordered Z2/Z1
|
// Correct wrong ordered M2/M2/M1
|
||||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)m2(.*)m1(.*)", twoZM1 + "|" + threeZM2, null, "$1m1$2m1$3m2$4", null, mapZM2Swap, false));
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)m2(.*)m1(.*)", twoZM1 + "|" + threeZM2, null, "$1m1$2m1$3m2$4", null, mapZM2Swap, false));
|
||||||
|
// Correct wrong ordered M2/M2/Z1
|
||||||
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)m2(.*)m2(.*)z1(.*)", twoZM1 + "|" + threeZM2, null, "$1m1$2m1$3z2$4", null, mapZM2Swap, false));
|
||||||
// Correct wrong ordered C2/C1
|
// Correct wrong ordered C2/C1
|
||||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)c2(.*)c1(.*)", twoC1 + "|" + twoC2, null, "$1c1$2c2$3", null, mapC2Swap, false));
|
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)c2(.*)c1(.*)", twoC1 + "|" + twoC2, null, "$1c1$2c2$3", null, mapC2Swap, false));
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ void memcpy_dma(void* dest, void* src, unsigned int num);
|
|||||||
|
|
||||||
/// Copy a memory block anywhere in first 4MB memory space using MEGA65 DMagic DMA
|
/// Copy a memory block anywhere in first 4MB memory space using MEGA65 DMagic DMA
|
||||||
/// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
/// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
||||||
/// @param dest_bank The 64KB bank for the destination (0-63)
|
/// @param dest_bank The 64KB bank for the destination (0-127)
|
||||||
/// @param dest The destination address (within the MB and bank)
|
/// @param dest The destination address (within the MB and bank)
|
||||||
/// @param src_bank The 64KB bank for the source (0-63)
|
/// @param src_bank The 64KB bank for the source (0-127)
|
||||||
/// @param src The source address (within the MB and bank)
|
/// @param src The source address (within the MB and bank)
|
||||||
/// @param num The number of bytes to copy
|
/// @param num The number of bytes to copy
|
||||||
void memcpy_dma4(char dest_bank, void* dest, char src_bank, void* src, unsigned int num);
|
void memcpy_dma4(char dest_bank, void* dest, char src_bank, void* src, unsigned int num);
|
||||||
|
@ -39,9 +39,9 @@ struct DMA_LIST_F018B memcpy_dma_command = {
|
|||||||
|
|
||||||
// Copy a memory block anywhere in first 4MB memory space using MEGA65 DMagic DMA
|
// Copy a memory block anywhere in first 4MB memory space using MEGA65 DMagic DMA
|
||||||
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
||||||
// - dest_bank The 64KB bank for the destination (0-63)
|
// - dest_bank The 64KB bank for the destination (0-127)
|
||||||
// - dest The destination address (within the MB and bank)
|
// - dest The destination address (within the MB and bank)
|
||||||
// - src_bank The 64KB bank for the source (0-63)
|
// - src_bank The 64KB bank for the source (0-127)
|
||||||
// - src The source address (within the MB and bank)
|
// - src The source address (within the MB and bank)
|
||||||
// - num The number of bytes to copy
|
// - num The number of bytes to copy
|
||||||
void memcpy_dma4(char dest_bank, void* dest, char src_bank, void* src, unsigned int num) {
|
void memcpy_dma4(char dest_bank, void* dest, char src_bank, void* src, unsigned int num) {
|
||||||
|
Loading…
Reference in New Issue
Block a user