1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-14 09:30:57 +00:00

Added 2 new fragments to resolve asm dword related code. Optimized a lot of veralib code. Test programs added.

This commit is contained in:
FlightControl 2021-01-17 20:53:13 +01:00
parent bdb1dba43b
commit ead5a43085
11 changed files with 1551 additions and 2975 deletions

View File

@ -6,6 +6,11 @@
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="project.local" />
<option name="name" value="project" />
<option name="url" value="file:C:\Users\svenv\OneDrive\Documents\GitHub\kickc/repo" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.antlr:antlr-runtime:3.5.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -12,6 +12,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr4:4.9" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr-runtime:3.5.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:ST4:4.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.abego.treelayout:org.abego.treelayout.core:1.0.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.ibm.icu:icu4j:61.1" level="project" />

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
lda {m1}
sta {c1},x
lda {m1}+1
sta {c1}+1,x
lda {m1}+2
sta {c1}+2,x
lda {m1}+3
sta {c1}+3,x

View File

@ -0,0 +1,4 @@
lsr {m1}+3
ror {m1}+2
ror {m1}+1
ror {m1}

View File

@ -71,13 +71,7 @@ void conio_x16_init() {
// Position cursor at current line
char * const BASIC_CURSOR_LINE = 0xD6;
char line = *BASIC_CURSOR_LINE;
//vera_layer_mode_tile(1,0x00000,0x0F800,128,64,8,8,1);
vera_mapbase_address[1] = 0x00000;
vera_mapbase_offset[1] = 0x0000;
vera_mapbase_bank[1] = 0x00;
vera_tilebase_address[1] = 0x0f800;
vera_tilebase_bank[1] = 0x00;
vera_tilebase_offset[1] = 0xf800;
vera_layer_mode_tile(1,0x00000,0x0F800,128,64,8,8,1);
vera_layer_rowskip[1] = 256;
vera_layer_rowshift[1] = 8;
screensize(&conio_screen_width, &conio_screen_height);

View File

@ -438,7 +438,7 @@ void vera_layer_mode_tile(byte layer, dword mapbase_address, dword dw_tilebase,
vera_mapbase_address[layer] = mapbase_address;
mapbase_address = mapbase_address >> 1;
byte mapbase = (byte)<(mapbase_address >> 8);
byte mapbase = >(<mapbase_address);
vera_layer_set_mapbase(layer,mapbase);
@ -454,7 +454,7 @@ void vera_layer_mode_tile(byte layer, dword mapbase_address, dword dw_tilebase,
//printf("tilebase dword = %lx\n",vera_tilebase_address[layer]);
dw_tilebase = dw_tilebase >> 1;
byte tilebase = (byte)<(dw_tilebase >> 8);
byte tilebase = >(<dw_tilebase);
tilebase &= VERA_LAYER_TILEBASE_MASK;
switch(tilewidth) {
case 8:

View File

@ -0,0 +1,15 @@
#include <conio.h>
#include <printf.h>
dword test_address[2] = {0,0};
void method(char layer, dword dw1, dword dw2) {
test_address[layer] = dw1;
printf("test = %x\n",test_address[layer]);
}
void main() {
method(1,0x0002,0x12000);
method(2,0x0001,0x12000);
}

View File

@ -0,0 +1,11 @@
#include <printf.h>
void main() {
dword value = 0xff446677;
printf("77 = %x\n", <(<(value)) );
printf("66 = %x\n", >(<(value)) );
printf("44 = %x\n", <(>(value)) );
printf("ff = %x\n", >(>(value)) );
}

View File

@ -19,7 +19,6 @@ void main() {
clrscr();
vera_layer_mode_tile(0, 0x04000, 0x14000, 128, 128, 16, 16, 2);
//vera_layer_mode_tile(0, 0x00000, 0x14000, 128, 128, 16, 16, 2);
byte tiles[256] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,