Created
October 14, 2021 01:43
-
-
Save sumeet/83c6a27a96800f9fda5927d5d7a95e29 to your computer and use it in GitHub Desktop.
exapunks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| smt { | |
| open(300) { | |
| username = fread() | |
| } | |
| link 800 | |
| open(199) { | |
| while (username != fread()) { | |
| file.seek(2) | |
| } | |
| fseek(1) | |
| user_file_id = fread() | |
| } | |
| link 799 | |
| open(user_file_id) { | |
| fseek(2) | |
| sum = 0 | |
| while (!feof) { | |
| sum += fread() | |
| } | |
| fseek(-9999) | |
| fseek(2) | |
| while (sum > 75) { | |
| fwrite(75) | |
| sum -= 75 | |
| } | |
| if (sum > 0) { | |
| fwrite(sum) | |
| } | |
| } | |
| HALT | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GRAB 300 | |
| COPY F X | |
| DROP | |
| LINK 800 | |
| GRAB 199 | |
| MARK WH_ST_GnYFe | |
| TEST X = F | |
| TJMP WH_EN_GnYFe | |
| SEEK 2 | |
| JUMP WH_ST_GnYFe | |
| MARK WH_EN_GnYFe | |
| SEEK 1 | |
| COPY F X | |
| DROP | |
| LINK 799 | |
| GRAB X | |
| SEEK 2 | |
| COPY 0 X | |
| MARK WH_ST_79NK8 | |
| TEST EOF | |
| TJMP WH_EN_79NK8 | |
| ADDI F X X | |
| JUMP WH_ST_79NK8 | |
| MARK WH_EN_79NK8 | |
| SEEK -9999 | |
| SEEK 2 | |
| MARK WH_ST_EuOJ3 | |
| TEST X > 75 | |
| FJMP WH_EN_EuOJ3 | |
| COPY 75 F | |
| SUBI X 75 X | |
| JUMP WH_ST_EuOJ3 | |
| MARK WH_EN_EuOJ3 | |
| TEST X > 0 | |
| FJMP IF_EN_0nkpi | |
| COPY X F | |
| MARK IF_EN_0nkpi | |
| DROP | |
| HALT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment