mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 15:33:02 +00:00
* 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:
parent
7530fb67c8
commit
c3e9d4a9f8
@ -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"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
20
compilerAst/res/prog8lib/math.asm
Normal file
20
compilerAst/res/prog8lib/math.asm
Normal 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
|
7
compilerAst/res/prog8lib/math.p8
Normal file
7
compilerAst/res/prog8lib/math.p8
Normal 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"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user