Good to see not everybody did forget JAT :) What do you intent to do with it?
As for the html pages: I am afraid there aren't any...
The target directories provide batch/make files to convert a specific
jal source to C and compile it (assumed the proper C compiler is
installed). The source/test directory has .jal files with all
statements that are supported. Feel free to ask me any questions and
create a wiki of your achievements while you're at it ;)
As for the perspective: JAT could support JAL, but will not behave
exactly the same on a detailled level and discussions on this list
learned that that would be unacceptable for some. This in combination
with the lack of potential users led me to the descision to suspend
development.
I also did some research on a C backend for the JAL V2 compiler and
learned this is feasable, but has two major disadvantages over JAT: it
would work for 8 and 16-bit systems only (so no proper ARM support)
and would require a jallib-alike effort for each target family.
Joep
2010/8/18 funlw65 <fun...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "jallib" group.
> To post to this group, send email to jal...@googlegroups.com.
> To unsubscribe from this group, send email to jallib+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
>
>
The main difference between JAT and a JALV2 C-backend is that JAT is a
translator and JALV2 is a compiler.
JAT translates JAL to C code, but does not compile+link (synthesise).
So it does not need to be complete or fully aware of all details of
the target code. This is left to the C-compiler. This means you can
use logical names (like DDRA) and let the compiler decide (based on
the exact target chip, defined in its include files / libraries).
Also, it is possible to provide a jal procedure structure with C code
as a content to be passed to the C compiler by JAT. And you can use
C-libraries from jal (maybe you need to provide the prototypes).
JALV2 is a read compiler. It takes JAL code as input and converts this
into intermediate code. The only thing left is converting it to
assembler (hex) or C. This means all consants (registers, 'device
file') and (probably available) library functions like pwm, serial
etc. need to be provided in jal. Assuming the sourcecode of the
libraries are available, you need to translate this from C into JAL
for every target chip. Thus, a jallib-alike project for each target
family to create device files an functions to interface with the
hardware.
@32bit support. Kyle told me that JALV2 is basicaly a 16bit compiler
and changing it to 32bit - if possible- is a substantial effort. IMO
there should be a commitment to start such a jallib-alike project for
at least one 32-bit target to consider such an effort.
@PIC12, PIC16, PIC18 support: Boths paths described will add overhead
to the code and it does not make sense to use either one to generate
code for targets that have native support.
@other 8bit targets: Again, with the added overhead you will pay a
price. Arduino is an obvious target since it attracks a lot of
attention. Faster targets are however more likely targets to benefit
from the translation since they can deliver more power than native
target chips.
I expect there might be commitment to start a jallib-alike project for
largers PICs that have similar peripherals as 16f/18f chips. So a C
backend could be an alternative to adding these targets, but does
probably require 32-bit address support anyway. So quite a lot of
effort (32-bit support, the C backend and device files).
As for JAT: this won't be 100% compatible with the current language
which is a major issue for some. An alternative would be to
investigate the major advantages from JAL over C and create a new
language (Yet Another Language?) if it is worth while (adds enough
value over C++).
An other option would be to port the PIC emulator to new targets and
run it as a virtual machine that emulate code generated by the jal
compiler.
Joep
2010/8/21 funlw65 <fun...@gmail.com>:
> Well, I referred JAT as a Pascal to C translator... which is possible
> if you have the same functions/procedures on the other side... but
> having problems at data types for "bigger" targets
Well... the data type size can probably be fixed.
But what is the major advantage to program in JAL in stead of Pascal or C?
> One major flaw which Jallib have is the way you are working with
> libraries and constants... you can't find the same on C and Pascal
> language and you will have problems in porting JAL programs to those
> targets...
> Some how, we are sending parameters to libraries in many cases (we are
> messing with global constants/variables) and this is not possible in
> Pascal and C.... parameters are only for functions/procedures.
Don't confuse JAL libraries with C libraries. JAL libraries are common
source files, while C libraries are pre-compiled. If you use
sourcefiles like jal-libraries in C too.
>So, the major conclusion is that the Jallib libraries are not portable
> because the way they are designed/used.
> It require a redesign of Jallib, using the standard rules of C and
> Pascal.
This is true, but I don't see why this is an issue.
Joep
2010/8/21 mattschinkel <mattsc...@hotmail.com>:
> There does not need to be a "jallib-alike effort for each target
> family".
If you mean there are a dozen libraries that are not device-specific,
then you're right. And if you mean jallib supports over 300 devices
and most other families are smaller, you're right too. And since we
are more experienced now, we can probably work more efficient and it
takes only half the effort.
> I'm sure libraries and samples for other devices will be
> welcome here.
I am not arguing it should be separate, on the contrary. My statement
is it will take a lot of effort, maybe more than many of us are aware
of, and much of which is executed by Rob.
Joep
> So, if Kyle is not willing to add 32bit support to JalV2 over time,
> then we could continue with JAT. If we where to choose one C compiler
> I think JAT could act exactally like JALv2. Leave the decision up to
> Kyle, since he did not agree with JAT.
Iirc he did not say he disagreed. He asked to consider the alternative
of a C backend, which I did.
Choosing either option does however have it's impact (compatibility vs
maintenance), which seems to be ignored.
>>But what is the major advantage to program in JAL in stead of Pascal or C?
> The syntax, and jallib are the major advantages.
Could you be more specific what of the syntax are a major advantage
over Pascal or C++? It should justify the effort *and* the lack of
features of these languages that are not in JAL.
> Having a project stop because of a decision that can't be resolved
> seems silly to me.
This is not the case. We have two projects, both of which can be
continued. It is however wise for each of them to consider the effort
required and the result that can be achieved.
JAT is my personal favorite, but dit does create an other 'JAL'
branche and there is little interest in the result. The C backend is
much cleaner, but don't think this will be successful due to the
inability to use target C libraries and since I did not yet heard a
clear advantage of JAL over C.
Joep
> Good syntax, readability, learning curve are all great features of JAL
> compared to other languages (mainly C), and are quite important. As
> for other features, JAL may have them some day.
What of the JAL syntax is better than C and why? What's the difference
in learning curce, e.g. related to Arduino? And what are those great
features (except longer vars, of course) that are unique for JAL?
I am not saying I disagree, I just want to understand what you think
is the added value of JAL over, say Arduino / C. So please be
specific.
> Why can't C backend use C libraries? I thought the output would be a C
> file to be later compiled by a C compiler. Procedures written in C
> could be easily added to the output, or even to the JAL code if kyle
> adds support.
Adding functions and varialbes C-compile-time is easy, but you can't
use them in your JAL program when they are not defined in JAL.
(actually, you currently can use functions by using prototypes due to
a compiler bug. But that will be changed and there is no similar way
to specify variables).
And of course it's all software, so almost everything can be made
possible if you have unlimited resources. But if the list of required
changes keeps growing, it becomes less likely that it will be actually
implemented.
Joep