flat assembler
Message board for the users of flat assembler.

Index > Windows > String Resource

Author
Thread Post new topic Reply to topic
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 18 Jul 2009, 02:43
Hello
I have not found info on stringtable resource.
Right now i use globals but LoadStringX is desired.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 18 Jul 2009, 02:43
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 18 Jul 2009, 05:46
Hi bitshifter,

To create string resource:
Code:
STRINGTABLE DISCARDABLE
BEGIN
      IDM_FILE_NEW, "New file"
  IDM_FILE_OPEN, "Open file"
        IDM_FILE_SAVE, "Save file"
END
    

To get the string:
Code:
      invoke LoadString,hInstance,IDM_FILE_NEW,addr buffer,sizeof buffer
    



or:
Code:
      invoke     LoadStringX,addr buffer,IDM_FILE_NEW
    


regards

_________________
down under
Post 18 Jul 2009, 05:46
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 18 Jul 2009, 07:16
FASM don't want assemble your string table example implemented in a test file with resources.

the STRINGTABLE line has an "illegal instruction" when assemble it.
Can you post an example ASM file with stringtables?

Thanks
Post 18 Jul 2009, 07:16
View user's profile Send private message Send e-mail Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 18 Jul 2009, 07:41
bitshifter,

Look at:

http://board.flatassembler.net/topic.php?t=5324

hth,

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 18 Jul 2009, 07:41
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 18 Jul 2009, 09:55
Pirata Derek

you should create resource file 'name.rc' and compile it separately with some resource compiler (MS rc.exe)

There are two ways to build applications: PE or COFF
if you build PE than you have to include it with:
Code:
section '.rsrc' resource from 'name.res' data readable
    

for COFF apps you just link .obj and .res

If you want to see how it works you can check topic:
MDIRichEditor http://board.flatassembler.net/topic.php?t=9144

regards

_________________
down under
Post 18 Jul 2009, 09:55
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 18 Jul 2009, 10:38
I needed olny the direct FASM method, because i use only PURE FASM assembler when programming.

Tanks however
Post 18 Jul 2009, 10:38
View user's profile Send private message Send e-mail Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 18 Jul 2009, 11:11
Pirata Derek

I prefer HYBRID instead of PURE
If you want to be able to debug your FASM programs at source level, the best option is to build MS COFF objects and link them with the MS Link.exe
For the Release version you can use PoLink.exe

Why would someone limit themselves with PURE things???

best regards

_________________
down under
Post 18 Jul 2009, 11:11
View user's profile Send private message Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 18 Jul 2009, 17:48
Pure things are easier to compile. I also prefer pure.
Post 18 Jul 2009, 17:48
View user's profile Send private message Reply with quote
eskizo



Joined: 22 Nov 2005
Posts: 59
eskizo 18 Jul 2009, 18:26
I prefer pure too. Everything becomes "learnable".
Post 18 Jul 2009, 18:26
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 18 Jul 2009, 18:35
Ah, now I know why this looked familiar to me: http://board.flatassembler.net/topic.php?t=5324

No idea what I did with that however. Since it was in 2006 then probably was yet another abandoned project without even seriously started it...
Post 18 Jul 2009, 18:35
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 18 Jul 2009, 23:11
Anything can be easy if you know how to do it, but to learn new things is hard, and there is the challenge but also the satisfaction.
Why do we program in assembly language? Because it is easier or because it is better and harder? PURE sounds to me a little bit Nazi
Post 18 Jul 2009, 23:11
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 19 Jul 2009, 04:41
Thanks for the replies.
I never use linker so i like pure method.
Post 19 Jul 2009, 04:41
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 20 Jul 2009, 14:05
Quote:
Why would someone limit themselves with PURE things???

Quote:
Why do we program in assembly language?

BECAUSE:
1) Assembly is the base of programming languages, the REAL machine language
2) Assembly is flexible and it premits us to create simple and powerful programs.
3) The only limitation of assembly is if its instruction set is supported by target CPU. (infact there're some assembly languages)
4) The only limitations of FASM is if it implements the macros or the functionalities to do what you want.

(Remember: Tomasz always work to make fasm better)

One programming language (flat assembly), one program (FASM)
Post 20 Jul 2009, 14:05
View user's profile Send private message Send e-mail Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 20 Jul 2009, 17:14
Pure things pwn hybrid things except in large projects.

I don't know the format used in resources, for sure it can be done with FASM macros. Smile
Post 20 Jul 2009, 17:14
View user's profile Send private message Reply with quote
habran



Joined: 31 Aug 2008
Posts: 82
Location: South Australia
habran 21 Jul 2009, 01:15
Pirata Derek
I personally think that FASM is number one at this moment, but this is because of its flexibility. It is OK to build PURE FASM when you build simple applications, but for complex applications you would probably need .obj and .res files. I think that's why Tomasz made possible those features and -s option, to be able to debug programs at source level.
Everybody has right (and a duty) to follow their own ideas and I appreciate people who do that. I try to be open minded and flexible and not reject things before I tried them.

best regards

_________________
down under
Post 21 Jul 2009, 01:15
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 21 Jul 2009, 07:24
For more complex programs i use multiples include modules.

I assembled a lot of program that has more than 2'700 code lines!
If you download the package into this topic you will find one of my personal program (it is the old version of networker) i'm telling you.
Also I has the new version of it and it has more than 40'000 code lines!!!!!!!!!!! (splitted into about 25 files *.ASM, *.INC, etc...)

No exceptions for complex program projects, only orded code lines, data and files;
FASM thinks to the other things... Cool
Post 21 Jul 2009, 07:24
View user's profile Send private message Send e-mail Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 21 Jul 2009, 08:39
looks like another useless endless holywar. there can be different ways to get result with asm: each one has own lacks and advantages, more or less important on specific situation. we have to resume about string resources in fasm: they can be added with macro through pure fasm code or with whole externally built resource section.
Post 21 Jul 2009, 08:39
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.