mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-03 12:07:26 +00:00
Added missing fragments for Paul Gardner-Stephens Unit 3.5
This commit is contained in:
parent
891a4c21c2
commit
13f2f14b9d
9
src/main/fragment/vwuz1=pwuz2_derefidx_vbuyy_plus_1.asm
Normal file
9
src/main/fragment/vwuz1=pwuz2_derefidx_vbuyy_plus_1.asm
Normal file
@ -0,0 +1,9 @@
|
||||
lda ({z2}),y
|
||||
clc
|
||||
adc #1
|
||||
sta {z1}
|
||||
iny
|
||||
lda ({z2}),y
|
||||
adc #0
|
||||
sta {z1}+1
|
||||
|
10
src/main/fragment/vwuz1_gt_pwuz2_derefidx_vbuyy_then_la1.asm
Normal file
10
src/main/fragment/vwuz1_gt_pwuz2_derefidx_vbuyy_then_la1.asm
Normal file
@ -0,0 +1,10 @@
|
||||
iny
|
||||
lda ({z2}),y
|
||||
cmp {z1}+1
|
||||
bcc {la1}
|
||||
bne !+
|
||||
dey
|
||||
lda ({z2}),y
|
||||
cmp {z1}
|
||||
bcc {la1}
|
||||
!:
|
10
src/main/fragment/vwuz1_lt__deref_pwuz2_then_la1.asm
Normal file
10
src/main/fragment/vwuz1_lt__deref_pwuz2_then_la1.asm
Normal file
@ -0,0 +1,10 @@
|
||||
ldy #1
|
||||
lda {z1}+1
|
||||
cmp ({z2}),y
|
||||
bcc {la1}
|
||||
bne !+
|
||||
dey
|
||||
lda {z1}
|
||||
cmp ({z2}),y
|
||||
bcc {la1}
|
||||
!:
|
@ -44,5 +44,51 @@ public class TestKickAssRun {
|
||||
return new File(tmpDir.toFile(), kcPath.getFileName().toString() + extension);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPetsciiEscapeSequences() {
|
||||
|
||||
printPetscii("petscii_mixed", '\b', "\\b");
|
||||
printPetscii("petscii_mixed", '\f', "\\f");
|
||||
printPetscii("petscii_mixed", '\n', "\\n");
|
||||
printPetscii("petscii_mixed", '\r', "\\r");
|
||||
printPetscii("petscii_mixed", '\t', "\\t");
|
||||
printPetscii("petscii_mixed", '\\', "\\\\");
|
||||
printPetscii("petscii_mixed", '\'', "\\'");
|
||||
printPetscii("petscii_mixed", '\"', "\\\"");
|
||||
|
||||
printPetscii("petscii_upper", '\b', "\\b");
|
||||
printPetscii("petscii_upper", '\f', "\\f");
|
||||
printPetscii("petscii_upper", '\n', "\\n");
|
||||
printPetscii("petscii_upper", '\r', "\\r");
|
||||
printPetscii("petscii_upper", '\t', "\\t");
|
||||
printPetscii("petscii_upper", '\\', "\\\\");
|
||||
printPetscii("petscii_upper", '\'', "\\'");
|
||||
printPetscii("petscii_upper", '\"', "\\\"");
|
||||
|
||||
printPetscii("screencode_mixed", '\b', "\\b");
|
||||
printPetscii("screencode_mixed", '\f', "\\f");
|
||||
printPetscii("screencode_mixed", '\n', "\\n");
|
||||
printPetscii("screencode_mixed", '\r', "\\r");
|
||||
printPetscii("screencode_mixed", '\t', "\\t");
|
||||
printPetscii("screencode_mixed", '\\', "\\\\");
|
||||
printPetscii("screencode_mixed", '\'', "\\'");
|
||||
printPetscii("screencode_mixed", '\"', "\\\"");
|
||||
|
||||
printPetscii("screencode_upper", '\b', "\\b");
|
||||
printPetscii("screencode_upper", '\f', "\\f");
|
||||
printPetscii("screencode_upper", '\n', "\\n");
|
||||
printPetscii("screencode_upper", '\r', "\\r");
|
||||
printPetscii("screencode_upper", '\t', "\\t");
|
||||
printPetscii("screencode_upper", '\\', "\\\\");
|
||||
printPetscii("screencode_upper", '\'', "\\'");
|
||||
printPetscii("screencode_upper", '\"', "\\\"");
|
||||
}
|
||||
|
||||
private void printPetscii(String encoding, char ch, String sCh) {
|
||||
CharToPetsciiConverter.setCurrentEncoding(encoding);
|
||||
Byte petscii = CharToPetsciiConverter.convert(ch);
|
||||
System.out.println(encoding+": "+sCh+" > "+(petscii==null?"null":(int)petscii));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user