Skip to content
SashaCrofter edited this page Jul 24, 2012 · 2 revisions

typ.ffw (pointer, word)

Finds the first word matching word after pointer, and returns the number of words between pointer and that word.

modifies A

typ.ffz (pointer)

Finds the first zero after pointer, and returns the number of words between pointer and that zero.

modifies A

typ.htoascii (hextet, outputPointer)

Converts hextet (a 16-bit unsigned integer) to ASCII, and writes that ASCII to outputPointer. Always produces four ASCII characters.

returns the location following the last character of the ASCII writing.

typ.asciitoh (inputPointer)

Scans a 4-character string in hex form and produces a single word output containing the value that string represents.

returns the value represented by the hex string

author lukevers

typ.cCopy (inputPointer, outputPointer)

Copies the null-terminated string at inputPointer to outputPointer. returns the location following the last character of the copy at the outputPointer location

typ.pCopy (inputPointer, outputPointer, length)

Copies data of length from inputPointer to outputPointer. returns a pointer to the word following the last output word

typ.cUnpack (inputPointer, outputPointer)

Reads a packed (0b0YYY YYYY 0XXX XXXX) null-terminated at inputPointer(A) and outputs an unpacked (0b0000 0000 0XXX XXXX) string at outputPointer(B).

returns the null location after the last unpacked character

typ.pPack (inputLocation, inputLength, outputLocation)

Reads an unpacked (0b0000 0000 0XXX XXXX) string from inputLocation of inputLength and outputs a packed (0b0YYY YYYY 0XXX XXXX) little-endian style string at outputLocation.

typ.pUnpack (inputPointer, inputLength, outputPoiner)

Reads a packed (0b0YYY YYYY 0XXX XXXX) in little-endian at inputPointer of inputLength and outputs an unpacked (0b0000 0000 0XXX XXXX) string at outputPointer.

typ.memfill (startPointer, length, value)

Fills length words with value, starting at startPointer

typ.memzero (startPointer, length)

Fills length words with 0, starting at startPointer

typ.asciitod (inputPointer)

Reads decimal digits from the null-terminated ASCII string inputPointer. Returns the value of that decimal number in A. Returns 0 on empty string. Does NOT check for overflow, but it won't crash if fed too large a number (> 65535) Doesn't check that the characters in the string are actually digits. Reads the value unsigned, and doesn't expect a -.

typ.dtoascii (word, outputBuffer)

Writes the (unsigned) value of word to outputBuffer as ASCII. Returns the position after the last character in outputBuffer. Reads the value unsigned, and doesn't expect a -.

Clone this wiki locally