# Scream very loudly

Write a script that outputs A to stdout infinitely.

There shold be no newlines or seperators between the characters

Standard loopholes apply

This is . The shortest solution in each language wins.

• @FryAmTheEggman I respectfully disagree with this being marked as duplicate. This has a few almost (but not quite!) trivial distinctions from the other questions. For example, printing to stdout without printing a new line, and in the other challenge, looping without output – Tornado547 Feb 29 at 1:41
• @FryAmTheEggman The other challenge clearly states "producing no output". This is not "producing no output". – S.S. Anne Feb 29 at 1:46
• @Post Rock Garf Hunter I'm still not entirely convinced that the two challenges are the same. The additional restrictions on this challenge, notaby printing to stdout without newline, and printing a specific character instead of whatever character you want. Maybe I'm wrong – Tornado547 Feb 29 at 3:44
• "Infinite output" is significantly different from "a specific char infinitely many times without new lines". I don't think this is a duplicate. Let's reopen it if this comment gets four upvotes – Luis Mendo Feb 29 at 22:00
• @Tornado547 If you update the requirement, you need to notify current answers. Alternatively, you can keep the infinite output requirement, and include a sentence saying something like "The code should theoretically produce infinite output, given enough time and memory, and disregarding any data-type limitations. It is acceptable if in practice the output stops due to some of those limitations" – Luis Mendo Mar 1 at 20:56

# x86-16, IBM PC DOS, 7 6 bytes

00000000: b041 cd29 ebfc                           .A.)..


Unassembled listing:

B0 41   MOV  AL, 'A'    ; put 'A' into AL
PRINT:
CD 29   INT  29H        ; DOS fast console output char in AL
EB FC   JMP  PRINT      ; loop infinitely


As a bonus, if you run this on your IBM 5151 monitor for a few hours this will actually produce infinite output on that screen until the end of time.

• I'd hate to be the idiot that didn't put a screensaver on after running this for even a single minute. – S.S. Anne Feb 29 at 1:05
• Nice use of an undocumented interrups. – S.S. Anne Mar 1 at 20:58
• @S.S.Anne funny to read today that int 29h is undocumented... when virtually every resource on DOS programming tells about it. – Ruslan Mar 4 at 9:22
• Actually, this doesn't print to STDOUT as required in the OP. It prints directly to the screen, so you won't be able to e.g. redirect the output to a file as SCREAM > OUT.TXT. – Ruslan Mar 4 at 9:53

# brainfuck, 16 bytes

+[+[<]>>+<+]>[.]


Credit to the Brainfuck constants page for 65!

Try it online!

# Turing Machine Code, 9 bytes

0 * A r 0


Try it online!

One of the very few times that Turing Machine Code can compete overall.

• indeed! +1 for spotting this really nice use case :D – RGS Mar 1 at 19:45

# Bash + core utilities, 16 14 13 bytes

Saved 2 3 bytes thanks to Mitchell Spector!!!

yes|tr \\ny A


Try it online!

Also for 13 bytes (written by Mitchell Spector):

# Bash, 13 bytes

printf A;./$0  Try it online! • Grr... I was going to do this next. Good job, though. – S.S. Anne Feb 29 at 0:40 • 13 bytes: yes|tr \\ny A – Mitchell Spector Feb 29 at 3:17 • You could also do printf A;./$0 -- this avoids both the filename and PATH issues, but is 3 bytes longer. – Mitchell Spector Feb 29 at 17:36
• @MitchellSpector That's pretty cool! :-) – Noodle9 Feb 29 at 18:17
• @JDL Because you have to get rid of the newlines. You've got to generate a continuous stream of As, not one of A\ns that yes A will generate. They're actually \nAs which is what this post uses. – Noodle9 Mar 2 at 12:38

## Apple II 6502 Assembly code, 7 bytes

L1: A9 C1      LDA #'A'
20 ED FD   JSR COUT
50 F9      BVC L1

# Vim, 14 7 10 bytes

qqiA^[@qq@q


Added 3 bytes to fx a bug kindly pointed out by David.

If you fire up vim (with no command line options) and type in these key strokes (^[ is the esc key) then the screen will fill up with A's.

Explanation:

qqiA^[@qq@q
qq          Start recording macro-q
i         Enter insert mode
A        Insert A
^[      Exit insert mode
@q    Call macro-q from within macro-q
q   Stop recording macro-q
@q Call macro-q


### Note: You'll probably have to kill that session of vim to stop it!

You can try to stopping the macro with ctrl-c, if that works you can exit with :q!<Enter>.

• Does ^z kill $! work? – S.S. Anne Feb 29 at 1:10 • @S.S.Anne You'll have to kill it from another terminal on Linux. Windows you can use the task manager. – Noodle9 Feb 29 at 1:11 • Or you can just click on the screen, ^c and type :q!. I knew there was some way to do it. – S.S. Anne Feb 29 at 1:13 • You have to click on the Vim window first. – S.S. Anne Feb 29 at 1:54 • The trick being that you call the macro while still creating it. Nice! – Jonta Mar 2 at 15:24 # Python 3, 25 22 bytes while 1:print(end='A')  Saved 3 bytes thanks to xnor Try it online! • Traditionally, you don't answer your own question for a couple of days. However, that's usually for more complex challenges. This one is quite trivial, so I suppose it's OK. – S.S. Anne Feb 29 at 0:22 • You can actually do print(end="A"). – xnor Feb 29 at 0:24 • Why not just Print('A')? – BruceWayne Mar 1 at 23:34 • @BruceWayne, print('A') includes the newline – PenumbraBrah Mar 2 at 1:45 # ><>, 4 bytes 'A'o  Try it online! ### How it works The instruction pointer begins at left, and its initial direction is to the right. ' starts string parsing mode. Everything until the next ' will be interpreted as individual characters, that will get pushed onto the stack. So A pushes that character, and then the second ' ends string parsing mode. o pops the character from the stack and outputs it to STDOUT. The instruction pointer has now reached the end of the code, so it wraps around to the initial position and keeps moving to the right, causing an infinite loop. # Burlesque, 3 bytes @'A  Try it online! @ is an odd operator. • For integers, it converts to double (@1 => 1.0) • For two letters, it pushes both to the stack individually (@az => 'a, 'z) • For characters it prints the character infinitely as a string (@'a => "aaaaaaaaaa....") • For anything else, it does nothing and just remains on the stack (@1.0 => @, 1.0). @ # A symbol which does odd things. For a char, it repeats infinitely. 'A # Literal A  • Is it useful for the "anything else" scenario? – S.S. Anne Mar 5 at 18:28 • @S.S.Anne Not really, I suspect you could push it into a block and eval it. But I've never found cause to. – DeathIncarnate Mar 6 at 10:10 # Hexagony, 3 bytes A.;  Try it online!  A . ; . . . .  A sets the value of the current memory edge to A (ASCII 65). . is a no-op that places the next command on a new row. ; prints the value of the current memory edge to STDOUT. The no-op is required because the instruction pointer never returns to the top row after executing A. It only loops over the second and third rows. • .A; also works. – Λ̸̸ Mar 2 at 5:34 # Keg, 3 bytes {A,  Try it online! That was fun! This is literally an infinite loop that prints As over and over # C (gcc), 20 bytes A(){A(putchar(65));}  -4 bytes thanks to ceilingcat! How could I have forgotten recursion... Try it online! # Pyth, 4 bytes #p\A  Explanation: #p\A # While 1: p Print without newline \A Character A  Try it online! # 05AB1E, 4 bytes ['A?  Try it online! [ # infinite loop 'A # "A" ? # print without a trailing newline  # x86-16 machine code (DOS 1+), 8 bytes Disassembled listing (objdump -D -bbinary -mi8086 scream.com):  0: b4 02 mov$0x2,%ah
2:   b2 41                   mov    $0x41,%dl 4: cd 21 int$0x21
6:   eb f8                   jmp    0x0


Output (DOSBox 0.74, and a lot faster than it looks):

Here's my ldscript and command-line options for anyone interested:

OUTPUT_ARCH(i8086)
SECTIONS {
. = 0;
}
ENTRY(_start)
OUTPUT_FORMAT(binary)


commands:

as --32 scream.s -o scream.o
ld scream.o -Tldscript.lds -o scream.com
dosbox ./scream.com


and unmolested scream.s file:

_start:
mov $0x02, %ah mov$0x41, %dl
int $0x21 jmp _start  • Tested and works just fine as advertised on DOS 1.0! – 640KB Feb 29 at 2:05 • @640KB I guess I should give credit to Ralf Brown's Interrupt List while I'm at it. – S.S. Anne Feb 29 at 2:08 • @640KB I was into this a while back but I stopped. It was fun writing low-level code and learning about all the stuff you could and couldn't do. – S.S. Anne Feb 29 at 2:16 • @640KB Roll 'em once and use 'em everywhere. – S.S. Anne Feb 29 at 2:33 # Common Lisp, 15 bytes (loop(princ'a))  Try it online! # Piet, 30 26 Codels It's a .png 13x2 codels, a few are technically not used (4 white unused, 1 white as transition and 1 black to change direction). But since I don't know how to compress it further, I still count them. Original file (codel size 1): With codel size 10: For some reason, the codel size 10 looks disproportional. Maybe it's an issue with the IDE Pseudo code (incl. stack): push 2 | Stack: 2 push 4 | Stack: 2, 4 push 2 | Stack: 2, 4, 2 push 4 | Stack: 2, 4, 2, 4 * | Stack: 2, 4, 8 * | Stack: 2, 32 * | Stack: 64 push 1 | Stack: 64, 1 + | Stack: 65 dup | Stack: 65, 65 out(char) | Stack: 65 | Output: A  dup and out(char) are repeated indefinitely. Try it online! This is my first submission here and my first "real" program in Piet. I'm sure it still has some room for improvement, but I just wanted to share (what I think of as) a lovely language :D Edit: Compressed down from 15x2 to 13x2. ## Lua, 22 bytes ::a::io.write"A"goto a  • I do think this is strictly suppossed to be an uppercase "A". Doesn't change your byte count though. – ouflak Mar 3 at 8:24 • Dang it, completely forgot about goto! Fun fact: solutions with while and recursion both use 25 bytes. – val says Reinstate Monica Mar 4 at 10:57 # PowerShell25 23 bytes for(1){Write-Host -n A}  Try it online! A works same as "A" and saves 2 bytes. # AWK, 28 bytes BEGIN{for(ORS="";;)print"A"}  Try it online! • I think using the END block instead of the BEGIN block works. – dingledooper Mar 6 at 3:45 # Haskell, 20 bytes main=putStr$cycle"A"


Try it online!

• Also 20 bytes: main=putStr"A">>main – cole Mar 1 at 18:45

# 33, 7 bytes

"A"j[p]

"A"     Put "A" in the source string
j    Copy the value into the accumulator, so the loop never terminates
[p] Print infinitely


Try it online!

## Wj, 3 bytes

'AI


## Explanation.

  I % Forever:
'A  % Calculate the string "A"
% Implicit output

Flag:j % Without a newline
$$$$


# Ruby, 12 bytes

1while\$><<?A


Try it online!

# Whitespace, 23 bytes

[N
S S N
_Create_Label_LOOP][S S S T S S S S S T N
_Push_65_A][T   N
S S _Print_as_character_to_STDOUT][N
S N
N
_Jump_to_Label_LOOP]


Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Try it online (with raw spaces, tabs and new-lines only).

Explanation in pseudo-code:

Start LOOP:
Character c = 'A'
Print c as character to STDOUT
Go to next iteration of LOOP


# Batch, 42 bytes

@for /l %%a in (0,0,0) do @set /p="A" <nul
`