Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Strings

itIsBrando edited this page Jun 5, 2021 · 1 revision

string.asm is a low-level string library similar to that of the standard library of C.

Note: All strings are assumed to be zero-terminated

List of routines:

strlen

  • Gets the length of the string in HL

Parameters: HL - string pointer

Outputs: BC - length of string

Destroys: AF, HL

strcmp

  • Compares two string

Parameters: DE - string 1, HL - string 2

Outputs: Z - if strings are equal, C if HL > DE, NC if HL < DE

Destroys: All

strcpy

  • Copies the string in HL to DE

Parameters: HL - source string, DE - destination buffer

Destroys: AF, DE, HL

Clone this wiki locally