Z88 Developers' Notes | ||
---|---|---|
Contents | Contents of System Calls |
GN_Xdl, delete an entry from a linked list
RST 20H, DEFW $4809
IN:
CDE = pointer to previous entry BHL = pointer to entry to deleteOUT, if call successful:
Fc = 0 CDE = pointer to prior entry BHL = entry after deleted entryOUT, if call failed:
Fc = 1 A = error code: RC_BAD ($04), if BHL(in) = 0Registers changed after return:
...CDE../IXIY same AFB...HL/.... differentNotes:
Algorithm: Assuming deleting entry I between entries X and Y:Bugs:
*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