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

17 lines
303 B

(
(:again)
(ld r0 @stdin (inval? (halt)))
(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 @stdout r0)
(j :again)
)