Hello world/Line printer: Difference between revisions

m
(Added GW-BASIC, MSX Basic and True BASIC)
m (→‎{{header|Wren}}: Minor tidy)
 
(One intermediate revision by one other user not shown)
Line 441:
EZPF</syntaxhighlight>
 
==={{header| Alternative}} ===
As noted, null in the sense of zero cannot be used as a string terminator on EDSAC. However, it is possible to use the EDSAC null, whose 5-bit code is 10000. The subroutine below demonstrates this.
 
Line 1,164:
=={{header|Wren}}==
It is not currently possible to communicate with the printer using Wren-cli. So we need to write a minimal embedded program (no error checking) so the C host can do this for us.
<syntaxhighlight lang="ecmascriptwren">/* hello_world_line_printerHello_world_Line_printer.wren */
 
class C {
Line 1,173:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">/* gcc hello_world_line_printerHello_world_Line_printer.c -o hello_world_line_printerHello_world_Line_printer -lwren -lm */
 
#include <stdio.h>
Line 1,228:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "hello_world_line_printerHello_world_Line_printer.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,485

edits