flat assembler
Message board for the users of flat assembler.

Index > Windows > fasm general windows questions

Author
Thread Post new topic Reply to topic
mikeb



Joined: 22 Feb 2014
Posts: 12
Location: london u.k.
mikeb
i would like to format a string of output data (numeric originally but cast to asci) in a list box probably right justified .. any ideas would be most welcome ..
.. then does anyone have the format for rcdata resource files . . looking through the hex code of my program indicated they had a 0200 0000 FFFF beggining and what may be a doubly linked list of locations from one to the next .. though they werent exact (?) .. also .. has anybody coded up a fourier . . i'm not sure i want to copy it as ive got some slightly different ideas that are non orthogonal and come under pattern matching rather than rigorous determination mathematically . . also ive written some programs using masm and although i note that i could compile them in fasm is there any way of getting them run thro the preprocessor and out in fasm format ???
any help would be greatly appreciated
regards to all ... mikeb

_________________
zzzzz
Post 15 Mar 2014, 15:26
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17474
Location: In your JS exploiting you and your system
revolution
You need to give us some idea of where you are at with your app. We have no idea at what level to pitch the answers. You have asked questions ranging from simple number-to-ASCII to PE formatting details to GUI listbox controls to complex mathematical equations. Examples of all those areas already exist on this board if you are willing to search. Are you looking for code? Or explanations of algorithms? Or preprocessor macro syntax? Or specification documents? All of the above? It would help if you were to concentrate on one question at a time.
Post 15 Mar 2014, 20:42
View user's profile Send private message Visit poster's website Reply with quote
mikeb



Joined: 22 Feb 2014
Posts: 12
Location: london u.k.
mikeb
the c library print functions probably do enough formating .. i output lines containing results that relate to columns of data .. the varying lengths of the results means that its difficult to tie them in with column headers unless using say a listview .. problem is there might be a hundred or so columns in extreme cases the norm being 4 or 5 .. i could put the data in memory .. the problem with this is that there may be results with say a few lines of output .. to several hundred thousand (not that you could look at them all) .. any ideas welcome
ps. thanks for the reply

_________________
zzzzz
Post 22 Mar 2014, 14:35
View user's profile Send private message Visit poster's website Reply with quote
mikeb



Joined: 22 Feb 2014
Posts: 12
Location: london u.k.
mikeb
part 2 and 3 .. just intruiged by rcdata format in my program .. as for the fourier .. there was some info on the site which i found after posting which was enough ... as for the masm to fasm i would be interested to know how to do that quickly as much of the stuff ive written to date uses masm
and i dont fancy going thro all the masm code and recreating it for fasm ... someone must have already done it anyway i would have thought ..
Post 22 Mar 2014, 14:41
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17474
Location: In your JS exploiting you and your system
revolution
What do you want actually? Do you want advice on how to display 100,000 rows by 100 columns? Do you want advice on how to store the data in memory? Do you want advice on how to generate the formatted data?
Post 22 Mar 2014, 14:41
View user's profile Send private message Visit poster's website Reply with quote
mikeb



Joined: 22 Feb 2014
Posts: 12
Location: london u.k.
mikeb
okay whats the best strategy for storing and outputting output that varies from say 3 or 4 cols by 3 or 4 lines min ... to 100000 by 100 cols max
ps that is a very fast response .. so thanks i didnt realise this was personal tuition .. do i have to pay a fee ???? ( ps i wont be able to afford it unless i can pay with paintings )
Post 22 Mar 2014, 14:46
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17474
Location: In your JS exploiting you and your system
revolution
There is no "best" strategy. It all depends upon what you are actually doing and what the data is. String data, numeric data, binary data will all requires different methods. How long are you storing it for? Where does the data come from? Where does it go? Do you need insert capability? Do you need update capability? Do you need delete capability? Do you need search capability? Do you have performance criteria to meet? We can't guide you with any particular method because it would most likely be wrong for you unless we happen to be very lucky and strike the exact situation you are in.

Show us what you have so far and perhaps we can give some pointers on things to make it better/faster/stronger?
Post 22 Mar 2014, 15:11
View user's profile Send private message Visit poster's website Reply with quote
mikeb



Joined: 22 Feb 2014
Posts: 12
Location: london u.k.
mikeb
exactly .. there is no best strategy .. 1) i wouldnt have thought the type of data made any difference .. i dont treat it much differently in any program dumped in memory .. but the answer in the likely event that im wrong is string / and or numeric depending on how the programs run .. lets say string to start ...2) the duration of 1 analysis .. it would then be dumped to a list box .. 3) the data is the result of parsing a file against a string of parameters .. update capabilty not required ..just delete the memory at end of update once loaded to list box .. 4) search is a moot point as could index or linked list the data if was interested and did think about doing that .. but not for now .. get it running adequately first .. also the outputs are screened .. eg totals only .. or other parameter criteria applied .. the program i uploaded was an attempt to parameter drive big chunks of the o/p and is currently hard coded in the program ... 5) lets assume performance isnt relevant ..i could just limit the number of records o/p and thus running the program silent would make it much faster as the bulk of time is not in the processing but in loading and formatting the list box

thanks ...

_________________
zzzzz
Post 22 Mar 2014, 16:33
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17474
Location: In your JS exploiting you and your system
revolution
It is still not clear what you want us to help you with. Do you want ready made code? Links to sites describing array handling? Links to posts here with numeric formatting code? Help with I/O functions in Windows? Something else?
Post 22 Mar 2014, 16:56
View user's profile Send private message Visit poster's website Reply with quote
mikeb



Joined: 22 Feb 2014
Posts: 12
Location: london u.k.
mikeb
any general ideas or observations would be fine .. like i loaded up an array of 5000 words took the first 5 chars and stripped them as an index .. or the memory on my machine was limited so i used memory mapped files and loaded and dumped data .. or i used a temporary file system .. etc any thing which might give me a bit of an insight .. ive got plenty of ideas but its what other people did and WHY they did it that is important cos it gives you a handle on what would be a good set of strategies ..i realise that this isnt a discreet problem that has a single solution .. im not looking for one im just after whatn other epeople might do .. the prog i uploaded on the other hand is exactly the reverse in that i do want to know whether it can be done ( im sure that it can because so many programs run with multiple screens .. eg notepad ++ which i use as an editor ) .. im after ideas .. i named a few possibilities e.g listview (has anyone used that) .. has anyone written a user generated listbox rather than the std listbox class one and would that offer any advanrtages (doubt it as you can do most stuff iusing the listbox indices.. and could use it therefore like a memory area while o/p results ..) .. that sort of thing .. thanks anyway and i appreciate that you are trying to help
Post 22 Mar 2014, 17:56
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1413
Location: Toronto, Canada
AsmGuru62
So, what you need is a custom grid control.
Windows never had one -- because it is complicated.
There is, of course, a ListView control -- btw, try to make it and fill it with 100 columns per 100K rows. Maybe it will be ok... who knows.

The 1st thing you need is a vector of rows, an array of pointers to a row data (organizaton of cells).
Now how you can have that data?
You can allocate data for each cell. Then your row is a vector of pointers to cell data.
Or you can allocate all cells at once as 1 memory block per 1 row, where cell data separated somehow, say with 00h bytes.

Or you can do a hybrid of these solutions.
Allocate the full row (all 100 cells in one shot) - then scan that memory and find out where cells begin and store it as a vector of pointers.
This way, pointers are not allocated, they simply point inside a single block.

I had that hybrid solution once done (in 1999) - it worked well on ~40k rows.
We never tested more than that.
The issue was to change cells -- deleting text from cell was easy.
But inserting text forced the reallocation of whole row and re-scanning of all cell pointers, because everything shifted.

You can also allocate a row where all cells have same width, then editing text is ok, but prepare to waste memory.
If you have a column with 60 characters and you keep short text in that column for all 100k rows! A lot of memory to waste!

Tough one, but fun to code.

P.S. Windows controls do not like when scrolling position reaches beyond 0x7FFF - maximum value for Int16. So, maybe do not try the List View after all. I know for a fact that Tree View will stop scrolling properly when scroll position reaches beyond that limit.
Post 22 Mar 2014, 20:47
View user's profile Send private message Send e-mail 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.