[Lazarus] Firefox OS
pascaldragon at googlemail.com
Wed Jul 17 09:44:35 CEST 2013
Am 16.07.2013 23:34, schrieb Mark Morgan Lloyd:
> Mattias Gaertner wrote:
>> On Tue, 16 Jul 2013 19:19:34 +0000
>> Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
>>> [...]asm.js has strictly numeric types,
>>> so you can't write a conventional "Hello, World!" in it.
> Yes, but asm.js is usually used as an intermediate language akin to
> Java bytecodes. cf Emscripten etc.
Nevertheless you are free to call normal JS code without problems.
asm.js is a subset of JS after all. How do you think the emscripten
libraries are implemented?
asm.js can run on any JS interpreter that supports a certain JS
standard. The only difference is that interpreters with special support
for asm.js can optimize that code more than usual JS code.
Also CPUs don't know strings either, nevertheless you can see them on
your screen. It's all about interpreting the memory in the correct way
and writing to the correct location.
>>> If you want to do that, then you have to write it in a suitable
>>> could be confusing so let's just accept /anything/ here.
>>> Now if something like that can't, ultimately, be run from a shell or
>>> a makefile it's going to be problematic for an FPC port.
>> When I google for "asm.js command line tool" then the first hit is the
>> SpiderMonkey engine. Do you mean that?
> program from the command line (or from a makefile etc.) and getting
> text output.
> For example, this (via Google)
> shows a "Hello, World" in C++ being compiled using Emscripten, but the
> target is an HTML file rather than something that could be run from a
> shell or makefile.
> [Later] Something like Rhino Shell might do the job. Possibly others.
Please read the tutorial of emscripten as it explains how to run a
JS/asm.js program on the command line:
More information about the Lazarus