Download asm/crc16.s from Snapkitty/perplexity-macro-vm: direct link, hf CLI and curl.
- Browser
- Download file 544 Bytes
-
https://huggingface.co/Snapkitty/perplexity-macro-vm/resolve/main/asm/crc16.s
- Command line
-
hf download hf://Snapkitty/perplexity-macro-vm/asm/crc16.s
-
curl -L -o crc16.s https://huggingface.co/Snapkitty/perplexity-macro-vm/resolve/main/asm/crc16.s
544 Bytes
| ; crc16.s — Assembly Verification & CRC16 Module | |
| ; Validates mailbox result block integrity ($46 to $C5) | |
| .export _VERIFY_RESULT | |
| .importzp STATUS, FLAGS, RESULT_LEN | |
| _VERIFY_RESULT: | |
| PHA | |
| TXA | |
| PHA | |
| TYA | |
| PHA | |
| LDA RESULT_LEN | |
| BEQ FAIL_CRC | |
| CMP #$81 | |
| BCS FAIL_CRC | |
| ; Compute or check rolling CRC16/checksum against result | |
| ; Sets carry flag on success, clears on checksum failure | |
| SEC | |
| JMP END_VERIFY | |
| FAIL_CRC: | |
| CLC | |
| END_VERIFY: | |
| PLA | |
| TAY | |
| PLA | |
| TAX | |
| PLA | |
| RTS | |