Croissant Runtime
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crsn/examples/stdio_rot13.csn

20 lines
353 B

#!/usr/bin/env crsn
(
(:again)
(ld r0 @cin
(eof? (halt))
(inval? (j :again)))
(rcmp r0 'A' 'Z'
(eq? (ld r1 'A'))
(ne? (rcmp r0 'a' 'z'
(eq? (ld r1 'a'))
(ne? (j :print)))))
(sub r0 r1)
(add r0 13)
(mod r0 26)
(add r0 r1)
(:print)
(ld @cout r0)
(j :again)
)