CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Linked List

  1. #1
    Join Date
    Sep 2005
    Posts
    1

    Linked List

    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.

  2. #2
    Join Date
    Nov 2004
    Posts
    34

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured