z80:Directives:CHK

From Learn @ Cemetech
Jump to navigationJump to search

Calculates an 8-bit checksum made up of the sum of all the data between the current instruction pointer and the specified label. Brass does not produce the same results as TASM, so this is not a recommended directive.

   _label:
       .db 1
       .db 4
       .db 54
       .chk _label ; Has a value of 59 with Brass, 51 in TASM.

The least significant byte is all that is used.

Syntax

   .chk [label]

Allowed inputs

Uses

See Also