September 27th, 2005, 09:49 AM
Hi guys im new to assembly programming and need some help. I have a linked list of strucs which contains details about people. Each struc contain details about each persons age,height,weight....etc.
I want to now detach or 'delink' one of the strucs from the linked list and store it into free temp storage space in 'freeSpace' that i have allocated. How do i actually go about and do this? i dont know which instruction to use and how to actually detach the whole record (one record has a total size of 52bytes).
Any help is appreciated.
September 27th, 2005, 11:18 PM
Re: Linked List
That really depends on your linked list is setup in memory.
Theoretically, if it's a "linked list" you should have at least a "next" field in the structure that points to the next record in the linked list (some lists also have a "prev" field). In such a case, de-attaching a record is as simple as changing the pointer of the 'next' field (after saving it of course). So you don't even have to set up a 'temporary' memory area for it.
(note: as there are many assemblers and processors, please indicate which processor/assembler you are using, so that any example code posted could at least be something you recognize)
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!