5.25 · exercise
caesar's little secret
The string in .data was encrypted the way Julius Caesar liked it: every letter shifted three places forward, wrapping around the end of the alphabet. Decode it in place and print the result.
Walk the bytes with ldrb. For each lowercase letter, shift back by three; if that falls below 'a', add 26 to wrap around. Store the decoded byte back with strb and leave the spaces alone. The printf at the bottom prints the string you repaired.
what is checked
- the decoded message is printed
- the program exits cleanly
- the decode happens byte by byte in memory (
ldrbandstrb, no pasting the answer into.data)
Specification
args
stdoutprints the expected output
exitexits with the expected code
sourceuses
ldrbsourceuses
strbsourcecomputes the result (does not hardcode it)
Checked by running your program against expected behavior, never by matching a stored solution.
loading editor...