Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
category:
- Simple
from: http://rosettacode.org/wiki/Loops/Infinite
note: Iteration

View file

@ -0,0 +1,22 @@
;Task:
Print out &nbsp; &nbsp; &nbsp; <big> '''SPAM''' </big> &nbsp; &nbsp; &nbsp; followed by a &nbsp; ''newline'' &nbsp; in an infinite loop.
;Related tasks:
* &nbsp; [[Loop over multiple arrays simultaneously]]
* &nbsp; [[Loops/Break]]
* &nbsp; [[Loops/Continue]]
* &nbsp; [[Loops/Do-while]]
* &nbsp; [[Loops/Downward for]]
* &nbsp; [[Loops/For]]
* &nbsp; [[Loops/For with a specified step]]
* &nbsp; [[Loops/Foreach]]
* &nbsp; [[Loops/Increment loop index within loop body]]
* &nbsp; [[Loops/Infinite]]
* &nbsp; [[Loops/N plus one half]]
* &nbsp; [[Loops/Nested]]
* &nbsp; [[Loops/While]]
* &nbsp; [[Loops/with multiple ranges]]
* &nbsp; [[Loops/Wrong ranges]]
<br><br>

View file

@ -0,0 +1,2 @@
L
print(SPAM)

View file

@ -0,0 +1,16 @@
INFINITE CSECT , this PGM control section
INFINITE AMODE 31 addressing mode 31 bit
INFINITE RMODE ANY loader can load either 24 or 31
BAKR 14,0 stack caller's register contents
LR 12,15 establish base
LA 13,0 no savearea
USING INFINITE,12 base to assembler
LA 10,1 1 in reg 10
LA 11,2 2 in reg 11
LOOP EQU *
CR 10,11 1==2?
BE RETURN Yes, exit.
WTO 'SPAM',ROUTCDE=11 print SPAM to syslog
B LOOP No, check again.
RETURN PR , return to caller
END INFINITE

View file

@ -0,0 +1,4 @@
@echo off
do forever
echo SPAM
enddo

View file

@ -0,0 +1,9 @@
InfiniteLoop LDX #0
PrintLoop: LDA MSG,x
JSR PrintAccumulator ;routine not implemented
INX
CPX #5
BNE PrintLoop
BEQ InfiniteLoop
MSG .byte "SPAM", $0A

View file

@ -0,0 +1,31 @@
.cr 6800
.tf spam6800.obj,AP1
.lf spam6800
;=====================================================;
; Infinite SPAM loop for the Motorola 6800 ;
; by barrym 2013-04-10 ;
;-----------------------------------------------------;
; Prints the message "SPAM" repeatedly to an ascii ;
; terminal (console) connected to a 1970s vintage ;
; SWTPC 6800 system, which is the target device for ;
; this assembly. ;
; Many thanks to: ;
; swtpc.com for hosting Michael Holley's documents! ;
; sbprojects.com for a very nice assembler! ;
; swtpcemu.com for a very capable emulator! ;
; reg x is the string pointer ;
; reg a holds the ascii char to be output ;
;-----------------------------------------------------;
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
bra main ;else restart
;=====================================================;
string .as "SPAM",#13,#10,#0
.en

View file

@ -0,0 +1,8 @@
doSPAM:
LEA Message,A0
JSR PrintString
JMP doSPAM
Message:
DC.B "SPAM",13,10,0
EVEN

View file

@ -0,0 +1,21 @@
Spam:
mov ah,02h
mov dl,'S' ;VASM replaces a character in single quotes with its ascii equivalent
int 21h ;Print Char routine
mov dl,'P'
int 21h
mov dl, 'A'
int 21h
mov dl, 'M'
int 21h
mov dl,13 ;Carriage Return
int 21h
mov dl,10 ;New Line
int 21h
jmp Spam

View file

@ -0,0 +1,17 @@
mov ah, 02h ;prep int 21h for printing to screen
mov ax, seg SpamMessage ;load into ax whatever segment the address of our message is in.
mov ds, ax ;segment registers on the original 8086 must be loaded from a register
cld ;clear the direction flag, this makes commands like "lodsb" auto-increment
SpamOuter:
mov si, offset SpamMessage ;load the address of SpamMessage into the source index
SpamInner:
lodsb ;mov al,[ds:si] and increment si by 1.
cmp al,0 ;is this the terminator?
jz SpamOuter ;point si to the beginning of the message again
mov dl,al ;the DOS interrupt for printing requires the desired character to be in DL
int 21h ;print the chosen character to the screen
jmp SpamInner
SpamMessage db "SPAM",13,10,0

View file

@ -0,0 +1 @@
: inf "SPAM\n" . recurse ;

View file

@ -0,0 +1 @@
: inf repeat "SPAM\n" . again ;

View file

@ -0,0 +1,33 @@
/* ARM assembly AARCH64 Raspberry PI 3B */
/* program infinite64.s */
/*******************************************/
/* Constantes file */
/*******************************************/
/* for this file see task include a file in language AArch64 assembly*/
.include "../includeConstantesARM64.inc"
/*********************************/
/* Initialized data */
/*********************************/
.data
szMessage: .asciz "SPAM\n"
/*********************************/
/* code section */
/*********************************/
.text
.global main
main:
loop:
ldr x0,qAdrszMessage
bl affichageMess
b loop
qAdrszMessage: .quad szMessage
/********************************************************/
/* File Include fonctions */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"

View file

@ -0,0 +1,6 @@
(defun spam ()
(declare (xargs :mode :program))
(if nil
nil
(prog2$ (cw "SPAM~%")
(spam))))

View file

@ -0,0 +1,5 @@
'BEGIN' 'COMMENT' Loops/Infinite - Algol60 - 23/06/2018;
'INTEGER' I;
'FOR' I := 1 'STEP' 0 'UNTIL' 2 'DO'
OUTSTRING(1,'('SPAM')')
'END'

View file

@ -0,0 +1,3 @@
DO
printf($"SPAM"l$)
OD

View file

@ -0,0 +1,3 @@
loop x:
printf($"SPAM"l$);
loop x

View file

@ -0,0 +1,3 @@
begin
for i := 1 step 0 until 2 do write( "SPAM" )
end.

View file

@ -0,0 +1,11 @@
.global main
main:
loop:
ldr r0, =message
bl printf
b loop
message:
.asciz "SPAM\n"

View file

@ -0,0 +1,5 @@
BEGIN {
while(1) {
print "SPAM"
}
}

View file

@ -0,0 +1,5 @@
PROC Main()
DO
PrintE("SPAM")
OD
RETURN

View file

@ -0,0 +1,3 @@
while (true) {
trace("SPAM");
}

View file

@ -0,0 +1,3 @@
loop
Put_Line("SPAM");
end loop;

View file

@ -0,0 +1,3 @@
do
print( "SPAM" )
od

View file

@ -0,0 +1,3 @@
while (1) {
o_text("SPAM\n");
}

View file

@ -0,0 +1,5 @@
PROC main()
LOOP
WriteF('SPAM')
ENDLOOP
ENDPROC

View file

@ -0,0 +1,3 @@
repeat
log "SPAM"
end repeat

View file

@ -0,0 +1 @@
FOR I = 0 TO 1 STEP 0 : PRINT "SPAM" : NEXT

View file

@ -0,0 +1,5 @@
IT'S SHOWTIME
STICK AROUND @NO PROBLEMO
TALK TO THE HAND "SPAM"
CHILL
YOU HAVE BEEN TERMINATED

View file

@ -0,0 +1,3 @@
while [true] [
print "SPAM"
]

View file

@ -0,0 +1,2 @@
Loop
MsgBox SPAM `n

View file

@ -0,0 +1,3 @@
While 1
Disp "SPAM",i
End

View file

@ -0,0 +1,3 @@
while 1
print "SPAM"
wend

View file

@ -0,0 +1,3 @@
do
print "SPAM"
loop

View file

@ -0,0 +1,3 @@
for i = 1 to 10 step 0
print "SPAM"
next i

View file

@ -0,0 +1,2 @@
10 print "SPAM"
20 goto 10

View file

@ -0,0 +1 @@
10 clr:print "Commodore Spam! ";:gosub 10

View file

@ -0,0 +1 @@
10 clear : print "Apple Spam! ";: gosub 10

View file

@ -0,0 +1,3 @@
10 for i = 1 to 10 step 0 : rem A zero step makes the loop infinite
20 print "SPAM";
30 next i

View file

@ -0,0 +1,2 @@
10 print "Spam! ";
20 run

View file

@ -0,0 +1 @@
10 print "SPAM SPAM! ";:if 1 then 10

View file

@ -0,0 +1,3 @@
while true
print "SPAM"
end while

View file

@ -0,0 +1,3 @@
REPEAT
PRINT "SPAM"
UNTIL FALSE

View file

@ -0,0 +1,3 @@
get "libhdr"
let start() be writes("SPAM*N") repeat

View file

@ -0,0 +1 @@
{𝕊 •Out 𝕩}"SPAM"

View file

@ -0,0 +1,4 @@
@echo off
:loop
echo SPAM
goto loop

View file

@ -0,0 +1 @@
for /l %%x in (1,0,2) do @echo SPAM

View file

@ -0,0 +1,2 @@
while (1) "SPAM
"

View file

@ -0,0 +1,2 @@
_>`SPA`p
bN`M`<

View file

@ -0,0 +1 @@
55+"MAPS",,,,,

View file

@ -0,0 +1,3 @@
while true
print("SPAM")
end

View file

@ -0,0 +1,2 @@
10 print "SPAM"
20 goto 10

View file

@ -0,0 +1,2 @@
10 print "SPAM"
20 run

View file

@ -0,0 +1 @@
whl'out$SPAM

View file

@ -0,0 +1,2 @@
++++++++++[->++++++>++++++++>+<<<]>+++++>
[+++.---.<.>---.+++>.<]

View file

@ -0,0 +1,4 @@
10++++++++++
[-> 8++++++++ > 8++++++++ > 6++++++ > 8++++++++ > 1+ <<<<<]>
83+++ > 80 > 65+++++ > 77--- <<<
[.>.>.>.>.<<<<]

View file

@ -0,0 +1 @@
loop { p "SPAM" }

View file

@ -0,0 +1,2 @@
while (true)
std::cout << "SPAM\n";

View file

@ -0,0 +1,2 @@
for (;;)
std::cout << "SPAM\n";

View file

@ -0,0 +1,3 @@
do
std::cout << "SPAM\n";
while (true);

View file

@ -0,0 +1,3 @@
while (1)
echo SPAM
end

View file

@ -0,0 +1,4 @@
while (true)
{
Console.WriteLine("SPAM");
}

View file

@ -0,0 +1 @@
while(1) puts("SPAM");

View file

@ -0,0 +1 @@
for(;;) puts("SPAM");

View file

@ -0,0 +1 @@
do { puts("SPAM"); } while(1);

View file

@ -0,0 +1 @@
while(puts("SPAM"));

View file

@ -0,0 +1,2 @@
spam: puts("SPAM");
goto spam;

View file

@ -0,0 +1,10 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. Spam.
PROCEDURE DIVISION.
PERFORM UNTIL 1 <> 1
DISPLAY "SPAM"
END-PERFORM
GOBACK
.

View file

@ -0,0 +1 @@
while true do writeln("SPAM");

View file

@ -0,0 +1,3 @@
10 while 1
20 print "SPAM"
30 wend

View file

@ -0,0 +1 @@
while(true) <<<"SPAM">>>;

View file

@ -0,0 +1 @@
(loop [] (println "SPAM") (recur))

View file

@ -0,0 +1,2 @@
loop
console.log 'SPAM'

View file

@ -0,0 +1,3 @@
<cfloop condition = "true NEQ false">
SPAM
</cfloop>

View file

@ -0,0 +1,6 @@
<cfscript>
while( true != false )
{
writeOutput( "SPAM" );
}
</cfscript>

View file

@ -0,0 +1,3 @@
LOOP
PRINT "SPAM"
ENDLOOP

View file

@ -0,0 +1 @@
(loop (write-line "SPAM"))

View file

@ -0,0 +1,3 @@
(do () ; Not initialization
(nil) ; Not break condition
(print "SPAM")) ; On every loop as requested

View file

@ -0,0 +1,3 @@
:top
print Spam!
goto top

View file

@ -0,0 +1,5 @@
include "cowgol.coh";
loop
print("Spam\n");
end loop;

View file

@ -0,0 +1,3 @@
loop do
puts "SPAM"
end

View file

@ -0,0 +1,3 @@
while true
puts "SPAM"
end

View file

@ -0,0 +1,3 @@
until false
puts "SPAM"
end

View file

@ -0,0 +1,3 @@
(0..).each do
puts "SPAM"
end

View file

@ -0,0 +1,6 @@
import std.stdio;
void main() {
while (true)
writeln("SPAM");
}

View file

@ -0,0 +1,7 @@
import std.stdio;
void main() {
do
writeln("SPAM");
while (true);
}

View file

@ -0,0 +1,6 @@
import std.stdio;
void main() {
for ( ; ; )
writeln("SPAM");
}

View file

@ -0,0 +1,7 @@
import std.stdio;
void main() {
LOOP:
writeln("SPAM");
goto LOOP;
}

View file

@ -0,0 +1,3 @@
$ loop:
$ write sys$output "SPAM"
$ goto loop

View file

@ -0,0 +1,2 @@
while True do
PrintLn('SPAM');

View file

@ -0,0 +1,5 @@
main() {
while(true) {
print("SPAM");
}
}

View file

@ -0,0 +1,2 @@
[[SPAM
]P dx]dx

View file

@ -0,0 +1,5 @@
proc nonrec main() void:
while true do
writeln("SPAM")
od
corp

View file

@ -0,0 +1,3 @@
while true {
print("SPAM")
}

View file

@ -0,0 +1,3 @@
while (true) {
println("SPAM")
}

View file

@ -0,0 +1,5 @@
def f() {
println("SPAM")
f <- ()
}
f <- ()

View file

@ -0,0 +1,33 @@
[ Infinite loop
=============
A program for the EDSAC
Works with Initial Orders 2 ]
T56K
GK
O10@ [ letter shift ]
[ 1 ] A17@ [ a += C(17@) ]
O11@
O12@
O13@
O14@
O15@
O16@
T17@ [ C(17@) = a; a = 0 ]
E1@ [ if a >= 0 goto 1@ ]
[ 10 ] *F
[ 11 ] SF
[ 12 ] PF
[ 13 ] AF
[ 14 ] MF
[ 15 ] @F [ carriage return ]
[ 16 ] &F [ line feed ]
[ 17 ] PF
EZPF

View file

@ -0,0 +1,3 @@
for ever
writeLine("SPAM")
end

View file

@ -0,0 +1,3 @@
LOOP
PRINT("SPAM")
END LOOP

View file

@ -0,0 +1,3 @@
while 0 = 0
print "SPAM"
.

Some files were not shown because too many files have changed in this diff Show more