Ich habe die L1VM mit Emscripten compiliert zu WebAssembly. WebAssembly läuft mit Javascript im Webbrowser. Also meine L1VM kann im Webbrowser Programme ausführen! Das ist zu Demos ganz hilfreich. Ich habe ein Programm das die Primzahlen bis 10000 sucht und ausgibt:

L1VM WebAssembly Primzahlen

Hier ist das Brackets Programm das ausgeführt wird:

// primes-4-web.l1com - Sieve of Eratosthenes
// primenum search
//
//
(main func)
	(set int64 1 zero 0)
	(set byte 10000 primes)
	(set int64 1 limit 10000)
	//(set int64 1 limit 100)
	(set int64 1 one 1)
	(set int64 1 two 2)
	(set int64 1 i 2)
	(set int64 1 j 0)
	(set int64 1 z 1)
	(set int64 1 f 0)
	(set int64 1 a 0)
	(set int64 1 k 0)
	(set int64 1 n 0)
	// array primes is filled by zeroes
	//
	// search primes
	//
	(optimize-if)
	(two i =)
	(:search_primes)
	((i i *) n =)
	(((n limit <) f =) f if)
		(primes [ i ] a =)
		(((a zero ==) f =) f if)
			(i j =)
			(:search)
			((i j *) k =)
			(((k limit <) f =) f if)
				(one primes [ k ] =)
				((j one +) j =)
				(:search jmp)
			(endif)
		(endif)
		((i one +) i =)
		(:search_primes jmp)
	(endif)
	// print primes
	//
	(two i =)
	(:print_primes)
	(((i limit <) f =) f if)
		(primes [ i ] a =)
		(((a zero ==) f =) f if)
			(4 i 0 0 intr0)
			(7 0 0 0 intr0)
		(endif)
		((i one +) i =)
		(:print_primes jmp)
	(endif)
	(255 0 0 0 intr0)
(funcend)