mirror of
https://github.com/irmen/prog8.git
synced 2025-01-13 10:29:52 +00:00
compiler name change: prog8c (was p8compile)
fat jar file also changed: prog8c-X.Y-all.jar (was: prog8compiler-X.Y-all.jar)
This commit is contained in:
parent
ca5f7ae32f
commit
abbf7c7cb0
4
Makefile
4
Makefile
@ -4,9 +4,9 @@
|
||||
|
||||
all:
|
||||
gradle installdist installshadowdist
|
||||
@echo "compiler launch script can be found here: compiler/build/install/compiler-shadow/bin/p8compile"
|
||||
@echo "compiler launch script can be found here: compiler/build/install/compiler-shadow/bin/prog8c"
|
||||
|
||||
test:
|
||||
gradle build
|
||||
@echo "compiler launch script can be found here: compiler/build/install/compiler-shadow/bin/p8compile"
|
||||
@echo "compiler launch script can be found here: compiler/build/install/compiler-shadow/bin/prog8c"
|
||||
|
||||
|
@ -9,4 +9,4 @@ emu: benchmark.prg
|
||||
x16emu -run -prg $< -warp
|
||||
|
||||
benchmark.prg: benchmark.p8 b_3d.p8 b_adpcm.p8 b_circles.p8 b_life.p8 b_mandelbrot.p8 b_maze.p8 b_queens.p8 b_textelite.p8
|
||||
p8compile $< -target cx16
|
||||
prog8c $< -target cx16
|
||||
|
@ -80,11 +80,11 @@ startScripts.enabled = true
|
||||
|
||||
application {
|
||||
mainClass = 'prog8.CompilerMainKt'
|
||||
applicationName = 'p8compile'
|
||||
applicationName = 'prog8c'
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveBaseName = 'prog8compiler'
|
||||
archiveBaseName = 'prog8c'
|
||||
archiveVersion = version
|
||||
// minimize()
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ clean:
|
||||
rm -f *.prg *.asm *.vice-*
|
||||
|
||||
test: clean
|
||||
p8compile -target cx16 *.p8 >/dev/null
|
||||
prog8c -target cx16 *.p8 >/dev/null
|
||||
for program in *.prg; do \
|
||||
echo "RUNNING:" $$program ; \
|
||||
x16emu -run -prg $$program >/dev/null ; \
|
||||
|
@ -12,7 +12,7 @@ generate:
|
||||
python make_eq_tests_splitw.py
|
||||
python make_cmp_tests.py
|
||||
python make_cmp_tests_splitw.py
|
||||
p8compile -target cx16 -sourcelines *.p8 >/dev/null
|
||||
prog8c -target cx16 -sourcelines *.p8 >/dev/null
|
||||
|
||||
test_prgs:
|
||||
x16emu -run -prg ifelse.prg
|
||||
|
@ -17,12 +17,12 @@ help:
|
||||
|
||||
symboldumps:
|
||||
mkdir -p source/_static/symboldumps
|
||||
p8compile -target atari import-all-atari.p8 -dumpsymbols > source/_static/symboldumps/skeletons-atari.txt
|
||||
p8compile -target c64 import-all-c64.p8 -dumpsymbols > source/_static/symboldumps/skeletons-c64.txt
|
||||
p8compile -target c128 import-all-c128.p8 -dumpsymbols > source/_static/symboldumps/skeletons-c128.txt
|
||||
p8compile -target cx16 import-all-cx16.p8 -dumpsymbols > source/_static/symboldumps/skeletons-cx16.txt
|
||||
p8compile -target pet32 import-all-pet32.p8 -dumpsymbols > source/_static/symboldumps/skeletons-pet32.txt
|
||||
p8compile -target virtual import-all-virtual.p8 -dumpsymbols > source/_static/symboldumps/skeletons-virtual.txt
|
||||
prog8c -target atari import-all-atari.p8 -dumpsymbols > source/_static/symboldumps/skeletons-atari.txt
|
||||
prog8c -target c64 import-all-c64.p8 -dumpsymbols > source/_static/symboldumps/skeletons-c64.txt
|
||||
prog8c -target c128 import-all-c128.p8 -dumpsymbols > source/_static/symboldumps/skeletons-c128.txt
|
||||
prog8c -target cx16 import-all-cx16.p8 -dumpsymbols > source/_static/symboldumps/skeletons-cx16.txt
|
||||
prog8c -target pet32 import-all-pet32.p8 -dumpsymbols > source/_static/symboldumps/skeletons-pet32.txt
|
||||
prog8c -target virtual import-all-virtual.p8 -dumpsymbols > source/_static/symboldumps/skeletons-virtual.txt
|
||||
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
|
@ -13,8 +13,8 @@ Then you can choose a few ways to get a compiler:
|
||||
|
||||
**Download an official release version from Github:**
|
||||
|
||||
#. download a recent "fat-jar" (called something like "prog8compiler-all.jar") from `the releases on Github <https://github.com/irmen/prog8/releases>`_
|
||||
#. run the compiler with "java -jar prog8compiler.jar" to see how you can use it (use the correct name and version of the jar file you've downloaded).
|
||||
#. download a recent "fat-jar" (called something like "prog8c-all.jar") from `the releases on Github <https://github.com/irmen/prog8/releases>`_
|
||||
#. run the compiler with "java -jar prog8c.jar" to see how you can use it (use the correct name and version of the jar file you've downloaded).
|
||||
|
||||
**Or, install via a Package Manager:**
|
||||
|
||||
@ -22,7 +22,7 @@ Currently, it's only available on `AUR <https://wiki.archlinux.org/title/Arch_Us
|
||||
The package is called `"prog8" <https://aur.archlinux.org/packages/prog8>`_.
|
||||
|
||||
This package, alongside the compiler itself, also globally installs syntax highlighting for ``vim`` and ``nano``.
|
||||
In order to run compiler, you can type either ``p8compile`` or ``prog8c``. The usage of those commands is exactly the same as with the ``java -jar`` method.
|
||||
In order to run compiler, you can type ``prog8c``. The usage of those commands is exactly the same as with the ``java -jar`` method.
|
||||
|
||||
In case you prefer to install AUR packages in a traditional manner, make sure to install `"tass64" package <https://aur.archlinux.org/packages/tass64>`_
|
||||
before installing prog8, as `makepkg <https://wiki.archlinux.org/title/Makepkg>`_ itself doesn't fetch AUR dependencies.
|
||||
@ -31,7 +31,7 @@ before installing prog8, as `makepkg <https://wiki.archlinux.org/title/Makepkg>`
|
||||
|
||||
#. find the latest CI build on `the actions page on Github <https://github.com/irmen/prog8/actions>`_
|
||||
#. download the zipped jar artifact from that build, and unzip it.
|
||||
#. run the compiler with "java -jar prog8compiler.jar" (use the correct name and version of the jar file you've downloaded).
|
||||
#. run the compiler with "java -jar prog8c.jar" (use the correct name and version of the jar file you've downloaded).
|
||||
|
||||
**Or, use the Gradle build system to build it yourself from source:**
|
||||
|
||||
@ -45,7 +45,7 @@ The most interesting gradle commands to run are probably the ones listed below.
|
||||
Read below at those tasks for where the resulting compiler jar file gets written.
|
||||
``./gradlew installDist``
|
||||
Builds the compiler and installs it with scripts to run it, in the directory
|
||||
``./compiler/build/install/p8compile``
|
||||
``./compiler/build/install/prog8c``
|
||||
``./gradlew installShadowDist``
|
||||
Creates a 'fat-jar' that contains the compiler and all dependencies, in a single
|
||||
executable .jar file, and includes few start scripts to run it.
|
||||
@ -56,7 +56,7 @@ The most interesting gradle commands to run are probably the ones listed below.
|
||||
|
||||
For normal use, the ``installDist`` task should suffice and after succesful completion, you can start the compiler with:
|
||||
|
||||
``./compiler/build/install/p8compile/bin/p8compile <options> <sourcefile>``
|
||||
``./compiler/build/install/prog8c/bin/prog8c <options> <sourcefile>``
|
||||
|
||||
(You should probably make an alias or link...)
|
||||
|
||||
@ -110,7 +110,7 @@ The compiler will link everything together into one output program at the end.
|
||||
If you start the compiler without arguments, it will print a short usage text.
|
||||
For normal use the compiler can be invoked with the command:
|
||||
|
||||
``$ java -jar prog8compiler.jar -target cx16 sourcefile.p8``
|
||||
``$ java -jar prog8c.jar -target cx16 sourcefile.p8``
|
||||
|
||||
(Use the appropriate name and version of the jar file downloaded from one of the Git releases.
|
||||
Other ways to invoke the compiler are also available: see the introduction page about how
|
||||
@ -391,9 +391,9 @@ There are cross-platform examples that can be compiled for various systems unalt
|
||||
and there are also examples specific to certain computers (C64, X16, etcetera).
|
||||
So for instance, to compile and run the Commodore 64 rasterbars example program, use this command::
|
||||
|
||||
$ java -jar prog8compiler.jar -target c64 -emu examples/c64/rasterbars.p8
|
||||
$ java -jar prog8c.jar -target c64 -emu examples/c64/rasterbars.p8
|
||||
|
||||
or::
|
||||
|
||||
$ /path/to/p8compile -target c64 -emu examples/c64/rasterbars.p8
|
||||
$ /path/to/prog8c -target c64 -emu examples/c64/rasterbars.p8
|
||||
|
||||
|
@ -4,18 +4,29 @@
|
||||
|
||||
main {
|
||||
|
||||
bool[] barray = [true, false, true, false]
|
||||
uword[] warray = [&value1, &barray, &value5, 4242]
|
||||
|
||||
bool @shared value1
|
||||
bool @shared value2 = barray[2] ; should be const!
|
||||
bool @shared value3 = true
|
||||
bool @shared value4 = false
|
||||
bool @shared value5 = barray[cx16.r0L] ; cannot be const
|
||||
uword @shared value6 = warray[3] ; should be const!
|
||||
uword @shared value7 = warray[2] ; cannot be const
|
||||
|
||||
sub start() {
|
||||
bool[] barray = [true, false, true, false]
|
||||
uword[] warray = [&value1, &barray, &value5, 4242]
|
||||
|
||||
bool @shared value1
|
||||
bool @shared value2 = barray[2] ; should be const!
|
||||
bool @shared value3 = true
|
||||
bool @shared value4 = false
|
||||
bool @shared value5 = barray[cx16.r0L] ; cannot be const
|
||||
uword @shared value6 = warray[3] ; should be const!
|
||||
uword @shared value7 = warray[2] ; cannot be const
|
||||
|
||||
txt.print_bool(value1)
|
||||
txt.spc()
|
||||
txt.print_bool(value2)
|
||||
txt.spc()
|
||||
txt.print_bool(value3)
|
||||
txt.spc()
|
||||
txt.print_bool(value4)
|
||||
txt.spc()
|
||||
txt.print_bool(value5)
|
||||
txt.spc()
|
||||
txt.print_uw(value6)
|
||||
txt.nl()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user