flat assembler
Message board for the users of flat assembler.
Index
> Main > Help with array and memory allocation |
Author |
|
revolution 25 Sep 2014, 11:21
See this recent topic for an explanation:
http://board.flatassembler.net/topic.php?t=17260 Moved to Main |
|||
25 Sep 2014, 11:21 |
|
sakkiesalm 25 Sep 2014, 11:54
revolution wrote: See this recent topic for an explanation: Thanks for the reply.I still do not understand how to apply this to the struc MagicArray. Where do i place the dq instead of the rq so that it doesn't get added to the file. I tried several combinations,shifting the struc,etc etc without any luck |
|||
25 Sep 2014, 11:54 |
|
revolution 25 Sep 2014, 15:49
You need to place the line "My MagicArray" at the end of a section.
The structure definition can be placed anywhere as long as it is before you instantiate it with "My MagicArray". |
|||
25 Sep 2014, 15:49 |
|
sakkiesalm 26 Sep 2014, 06:59
revolution wrote: You need to place the line "My MagicArray" at the end of a section. Thanks! |
|||
26 Sep 2014, 06:59 |
|
edfed 26 Sep 2014, 07:35
it is not really good to instanciate large memory blocks in source code. better to use any malloc function to do the job, don't forget to free the memory at the end...
what do you think about that revolution? |
|||
26 Sep 2014, 07:35 |
|
revolution 26 Sep 2014, 18:11
edfed: Like everything else it depends upon what you are doing. In general I would say that is reasonable advice for anything that one intends to use for a serious application. For quick-and-dirty though I guess it makes little difference, just don't tell anyone what you did and it will be fine.
|
|||
26 Sep 2014, 18:11 |
|
m3ntal 12 Oct 2014, 23:34
To allocate an array:
Code: Array.P=Allocate(Array.N*Array.Scale) * Array.P: Pointer, base address * Array.I: Index * Array.N: # indices * Array.S: Index scale/size New: Ultimate Visual Menus |
|||
12 Oct 2014, 23:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.