GN_Xdl, Delete an entry from a linked list

Register parameters

RST 20H, DEFW $4809
IN:
     CDE = pointer to previous entry
     BHL = pointer to entry to delete
OUT, if call successful:
     Fc = 0
     CDE = pointer to prior entry
     BHL = entry after deleted entry
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_BAD ($04), if BHL(in) = 0

Registers changed after return:
     ...CDE../IXIY same
     AFB...HL/.... different 

Notes

Algorithm: Assuming deleting entry I between entries X and Y (for more details, read Linked lists):

 *X = *X XOR I XOR Y
*Y = *Y XOR I XOR X

Related calls

GN_Xin, insert an entry into a linked list 
GN_Xnx, index next entry in linked list

web analytics