2015-07-08 20:48:14 -04:00
|
|
|
void putc(char c)
|
|
|
|
{
|
|
|
|
*(volatile char*)0x10000000 = c;
|
|
|
|
}
|
|
|
|
|
|
|
|
void puts(const char *s)
|
|
|
|
{
|
|
|
|
while (*s) putc(*s++);
|
|
|
|
}
|
|
|
|
|
2015-07-16 05:10:02 -04:00
|
|
|
void *memcpy(void *dest, const void *src, int n)
|
|
|
|
{
|
|
|
|
while (n) {
|
|
|
|
n--;
|
|
|
|
((char*)dest)[n] = ((char*)src)[n];
|
|
|
|
}
|
|
|
|
return dest;
|
|
|
|
}
|
|
|
|
|
2015-07-08 20:48:14 -04:00
|
|
|
void main()
|
|
|
|
{
|
2015-07-16 05:10:02 -04:00
|
|
|
char message[] = "$Uryyb+Jbeyq!+Vs+lbh+pna+ernq+guvf+zrffntr+gura$gur+CvpbEI32+PCH"
|
|
|
|
"+frrzf+gb+or+jbexvat+whfg+svar.$$++++++++++++++++GRFG+CNFFRQ!$$";
|
|
|
|
for (int i = 0; message[i]; i++)
|
|
|
|
switch (message[i])
|
|
|
|
{
|
|
|
|
case 'a' ... 'm':
|
|
|
|
case 'A' ... 'M':
|
|
|
|
message[i] += 13;
|
|
|
|
break;
|
|
|
|
case 'n' ... 'z':
|
|
|
|
case 'N' ... 'Z':
|
|
|
|
message[i] -= 13;
|
|
|
|
break;
|
|
|
|
case '$':
|
|
|
|
message[i] = '\n';
|
|
|
|
break;
|
|
|
|
case '+':
|
|
|
|
message[i] = ' ';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
puts(message);
|
2015-07-08 20:48:14 -04:00
|
|
|
}
|