What is an ASN?

ASN are a relatively recent addition to the experimental branch of DGD 1.2 (at 1.2.51), this is what Dworkin wrote at their introduction:

ASN stands for "arbitrary size number". In LPC, such numbers are represented by big-endian strings. If the highest bit of the first character of the string is set, the number is assumed to be negative, and in two's complement format. If you want to represent a positive number that starts with a byte that would make the string representation negative, simply precede it with a \0 character.

For example,

"\0\xff"

represents the positive number 0xff.

All of the ASN functions except for asn_mod() take 3 arguments, the third argument being the modulus, which must be a positive number greater than zero.

To compile DGD1.2.51 with MSVC, make sure to add the new source file, asn.c, to the project.

These kfuns were added to manipulate ASNs:

It is recommended to upgrade at least to 1.2.55 to use this new feature.