how to declare 1024 nodes of 4 bytes each in assembly language?

but what is " size node" and "*" operator is perhaps not applicable in assembly

the problem is that i haven't studied structures in assembly
i am supposed to deal with linked lists

Before we go further, can you tell us which assembler you're working in? There are significant differences in how different assemblers handles structures.

Also, if you're working in linked lists, we'll also need to know the operating system, as you'll need to use the system calls for memory allocation and deleting.

This thread may help you understand how structures in assembly work, though it uses a specific assembler/emulator (SPIM, a MIPS emulator) for its examples; more advanced assemblers such as MASM and Netwide Assembler have built-in support for structures that is comparable to languages such as C.

Edited 6 Years Ago by Schol-R-LEA: n/a

the problem is that i haven't studied structures in assembly
i am supposed to deal with linked lists

Well you had better get to studying them because that's what linked lists use. In assembly language structures may be also called records.

OK, then. Assuming that we're talking about 16-bit code, a simple linked list node in MASM might look like this:

node STRUCT
    data WORD ?
    next WORD ?
node ENDS

Of course, the structure itself isn't the only important factor; it's how you use it that counts. The structure is more or less a template or pattern for a particular interpretation of a block of memory. In the case of a linked list, generally speaking this memory will be allocated at run time from the operating system.

This question has already been answered. Start a new discussion instead.