mirror of
https://github.com/DoctorWkt/pdp7-unix.git
synced 2026-01-23 19:08:17 +00:00
22 lines
459 B
Brainfuck
22 lines
459 B
Brainfuck
/* ** 08-rest.pdf page 4 */
|
|
main $(
|
|
auto ch;
|
|
extrn read, write;
|
|
|
|
goto loop;
|
|
while (ch != 04)
|
|
$( if (ch > 0100 & ch < 0133)
|
|
ch = ch + 040;
|
|
if (ch==015) goto loop;
|
|
if (ch==014) goto loop;
|
|
/* -->------------------------> if (ch == 0177) goto loop; */
|
|
if (ch==011)
|
|
$( ch = 040040;
|
|
write(040040);
|
|
write(040040);
|
|
$)
|
|
write(ch);
|
|
loop:
|
|
ch = read()&0177;
|
|
$)
|
|
$) |