* make resources available in compilerAst/test s; *you may have to re-import the gradle project into IDEA*

Note: these resources are NOT going into the production .jar
This commit is contained in:
meisl 2021-07-10 20:50:07 +02:00
parent 7530fb67c8
commit c3e9d4a9f8
4 changed files with 32 additions and 4 deletions

View File

@ -45,15 +45,15 @@ sourceSets {
main { main {
java { java {
srcDirs = ["${project.projectDir}/src"] srcDirs = ["${project.projectDir}/src"]
} }
resources {
srcDirs = ["${project.projectDir}/res"]
}
} }
test { test {
java { java {
srcDirs = ["${project.projectDir}/test"] srcDirs = ["${project.projectDir}/test"]
} }
resources {
srcDirs = ["${project.projectDir}/res"]
}
} }
} }

View File

@ -3,6 +3,7 @@
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content> </content>

View File

@ -0,0 +1,20 @@
; just for tests - DISFUNCTIONAL!
math_store_reg .byte 0 ; temporary storage
multiply_bytes .proc
; -- multiply 2 bytes A and Y, result as byte in A (signed or unsigned)
sta P8ZP_SCRATCH_B1 ; num1
sty P8ZP_SCRATCH_REG ; num2
lda #0
beq _enterloop
_doAdd clc
adc P8ZP_SCRATCH_B1
_loop asl P8ZP_SCRATCH_B1
_enterloop lsr P8ZP_SCRATCH_REG
bcs _doAdd
bne _loop
rts
.pend

View File

@ -0,0 +1,7 @@
; Internal Math library routines - always included by the compiler
;
; Written by Irmen de Jong (irmen@razorvine.net) - license: GNU GPL 3.0
math {
%asminclude "library:math.asm"
}