flat assembler
Message board for the users of flat assembler.
Index
> Windows > yes another sizeof error! |
Author |
|
okasvi 19 Jul 2006, 19:46
1. It's 'sizeof.*'
2. I think it does _not_ work for '<label> db/dw/dd <size> dup (?)' but read this too: http://flatassembler.net/docs.php?article=manual#2.3.4 |
|||
19 Jul 2006, 19:46 |
|
vid 19 Jul 2006, 21:56
"sizeof.*" is just normal constant that gets defined along with "struc" definition. you can define size yourself, like:
Code: sName db 30h dup (?) sizeof.sName = $-sName or more fasm-y way: Code: sName rb 30h sizeof.sName = $-sName and if you want to know size of every such-way-defined string, or buffer, i suggest automatizing sizeof variable declaration with macro Code: struc buffer size { . rb size sizeof.#. = $ - . } MyString buffer 120 can be extended to work also for initialized data... btw: how did you come to "another sizeof error"? |
|||
19 Jul 2006, 21:56 |
|
Kenny80 20 Jul 2006, 06:52
Wonderful, thx for all answers!
vid wrote: "btw: how did you come to "another sizeof error"? Just naming thing, i searched first for sizeof post but didn't find what i needed so instead of posting "i got sizeof error" and get reply "search forum, morron" ;D , instead i added "another" |
|||
20 Jul 2006, 06:52 |
|
vid 20 Jul 2006, 09:05
well, it suggest there was some previous.... and it suggest error is on fasm's side
|
|||
20 Jul 2006, 09:05 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.