REDIVIVUS

Proposals / #1492

Mac SNET_ComputePacketChecksum: uint16_t __fastcc (byte* pData ECX, uint32_t nLength EDX)

checked · by KierTaylor · submitted 2026-11-08

ECX = the packet bytes (read backwards as [ECX+EDX-1]). EDX = the byte count (loop counter; 0 gives checksum 0). It computes a Fletcher-style mod-255 sum pair and returns MOVZX EAX,SI ((sum2 mod 255) | sum1<<8) at 0x0001a2c8. There are no stack args and plain RET. Callers: SNET_ConnSendMessage 0x00019d1a and SNET_ConnResendMessage 0x00019e34.

Changes 1, applied together

  1. Set prototype mac 0x0001a27c

    signatureundefined SNET_ComputePacketChecksum(void)→uint16_t SNET_ComputePacketChecksum(byte* pData, uint32_t nLength)
    conventionunknown→__fastcc