This commit is contained in:
Ingy döt Net 2013-10-27 22:24:23 +00:00
parent 6f050a029e
commit 776bba907c
3887 changed files with 59894 additions and 7280 deletions

View file

@ -16,16 +16,16 @@
; reg x is the string pointer ;
; reg a holds the ascii char to be output ;
;-----------------------------------------------------;
outeee = $e1d1 ROM: console putchar routine
outeee = $e1d1 ;ROM: console putchar routine
.or $0f00
;-----------------------------------------------------;
main ldx #string Point to the string
bra puts and print it
outs jsr outeee Emit a as ascii
inx Advance the string pointer
puts ldaa ,x Load a string character
bne outs Print it if non-null
swi else return to the monitor
main ldx #string ;Point to the string
bra puts ; and print it
outs jsr outeee ;Emit a as ascii
inx ;Advance the string pointer
puts ldaa ,x ;Load a string character
bne outs ;Print it if non-null
swi ; else return to the monitor
;=====================================================;
string .as "Goodbye, World!",#13,#10,#0
.en

View file

@ -0,0 +1 @@
? "Goodbye, World!"

View file

@ -1,4 +1,4 @@
#symbol Program =
[
'program'output << "Goodbye, World!%n".
system'console writeLine:"Goodbye, World!".
].

View file

@ -2,6 +2,6 @@
% the initialization/1 directive argument is automatically executed
% when the object is loaded into memory:
:- initialization((nl, write('Goodbye, World!'), nl)).
:- initialization(write('Goodbye, World!\n')).
:- end_object.

View file

@ -1,4 +1,4 @@
local chars = {"G","o","o","d","b","y","e",",","W","o","r","l","d","!"}
local chars = {"G","o","o","d","b","y","e",","," ","W","o","r","l","d","!"}
for i = 1, #chars do
write(chars[i])
end

View file

@ -0,0 +1 @@
SELECT 'Goodbye, World!';

View file

@ -1,3 +1,3 @@
fn main() {
io::println("Goodbye, World!");
println("Goodbye, World!");
}

View file

@ -0,0 +1 @@
println("Goodbye, World!")

View file

@ -0,0 +1 @@
System.out.println("Goodbye, World!")

View file

@ -0,0 +1 @@
println("Goodbye, World!")

View file

@ -0,0 +1 @@
Console.withErr(Console.out) { Console.err.println("This goes to default _out_") }

View file

@ -0,0 +1,4 @@
Console.err.println ("Err not deviated")
Console.setErr(Console.out)
Console.err.println ("Err deviated")
Console.setErr(Console.err) // Reset to normal

View file

@ -1 +1 @@
`r``````````````.G.o.o.d.b.y.e.,. .W.o.r.l.di
`r```````````````.G.o.o.d.b.y.e.,. .W.o.r.l.d.!i