Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* The below code does not do input validation. It assumes the input string is a sequence of numbers */
- ReallyBigRegister D;
- char c;
- char EOL = 0x0D;
- char Subtract1 = 0x30;
- char Subtract2 = 0x37; // Might require some fine-tuning
- Start:
- For each character in String
- c = String[x];
- If c =/= EOL // Check if character is end of line
- If c > 39
- c = c-Subtract1;
- Goto Shift
- Else
- c = c-Subtract2;
- Else
- Shift:
- D=(D<<4)|c;
- //Could also use (D<<4)+c;
- Goto Start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement