flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Label, structure bugs?? |
Author |
|
revolution 17 Nov 2004, 08:16
I think the limit is the memory in your system, but if it is a limit you are reaching then your should get out of memory errors not what you have above.
If what you say is indeed correct, then problems like this could be caused by use of a variable that is not properly initialised. To track down problems like this usually requires a little more information like the full source code, operating system you are using, list of other programs you may be running at the same time and exact steps of how to reproduce the problem. |
|||
17 Nov 2004, 08:16 |
|
vid 17 Nov 2004, 11:02
is this problem repeatable? If yes then post the source and show where the bug happens
|
|||
17 Nov 2004, 11:02 |
|
Mac2004 17 Nov 2004, 16:53
The project which I'am referring to is my own OS. I'am using fasm under DOS and write my results to floppy disk with John Fine's partcopy. I will submit those parts in question of source for others to test whether they get same results.
regards, Mac2004 |
|||
17 Nov 2004, 16:53 |
|
Mac2004 18 Nov 2004, 06:18
Here is the source which I'am referring to. It must be tested under protected mode because it's 32bit code. I think the main point is to test whether you guys encounter same problems with many labels /structures defined and used.
You may need to add more window structures to test it properly. (just copy&paste and change winXX values) The actual source is enclosed as zip packet. regards Mac2004
Last edited by Mac2004 on 19 Nov 2004, 06:11; edited 1 time in total |
|||||||||||
18 Nov 2004, 06:18 |
|
revolution 18 Nov 2004, 08:43
Does not assemble:
Code: flat assembler version 1.56 label_code.asm [1342]: cmp dword[Grp_screen_dimen.BitPlaneNumber], 16 error: undefined symbol. |
|||
18 Nov 2004, 08:43 |
|
Mac2004 18 Nov 2004, 09:43
Oh, there's one structure definition missing from my source . I will update the source and notify you guys!
Mac2004 |
|||
18 Nov 2004, 09:43 |
|
Mac2004 19 Nov 2004, 06:13
The source is updated and tested to compile as stand alone file.
Mac2004 |
|||
19 Nov 2004, 06:13 |
|
revolution 22 Nov 2004, 04:13
If you want you can test for yourself with this batch file. It compares the generate code after each assembly and stops if a difference is found.
Code: @echo off \assemble\fasm\fasm label_code.asm label_code_ref.exe if errorlevel 1 goto end :try \assemble\fasm\fasm label_code.asm label_code.exe if errorlevel 1 goto end fc /b label_code.exe label_code_ref.exe if not errorlevel 1 goto try :end I ran it for a while and found no differences using the win32 console version. |
|||
22 Nov 2004, 04:13 |
|
Mac2004 22 Nov 2004, 08:45
I need to explain a little bit more of the problem. The problem is that after having initialized 10 or more window structures it appears that values are not set properly. First 9 window structures work fine and the values are set correctly. I can verify that by printing the results onto screen.
Problems start when I'am adding more window structures and those values are faulty. The code is the very same code for each window except that winXX labels are set to correspond current window number. I think it might have something to do with the fasm label handling mechanism. You need to print those values to see what's really inside. I think comparing compile results will not show the actual problem because it's the contents which is not correct. And the problem will arise after having initialised plenty of variables. Mac2004 Last edited by Mac2004 on 22 Nov 2004, 17:07; edited 1 time in total |
|||
22 Nov 2004, 08:45 |
|
revolution 22 Nov 2004, 10:02
Do you think the compiler is generating the wrong code?
If that is true then with a debugger you should be able to pinpoint the place where the error is located. Try to use the 'display' directive if that can hep you. Also, try dissassembling the assembled code and compare to your original. |
|||
22 Nov 2004, 10:02 |
|
Mac2004 22 Nov 2004, 14:35
That might be possible. It's strange to have working code for 9 first window structures and after adding more identical structures and their initialiazation procedures have someway faulty results.
Mac2004 |
|||
22 Nov 2004, 14:35 |
|
halyavin 24 Nov 2004, 07:52
Do you use OWN_DC flag in definition of window class? If not you can't create more than 8-9 device contest simultaniously. You must either use OWN_DC flag or allocate only 1 device contest at every moment (in painting procedure i think).
(It is common problem when you write MDI applications |
|||
24 Nov 2004, 07:52 |
|
Mac2004 24 Nov 2004, 08:41
I'am writing my own OS by using DOS version of fasm. So no Windows stuff is used. These structures are completely of my own and all results are compiled to plain binary form. This project avoids windows because it's impossible to compile and write own OS to disk under windows. Thanx for help anyway
Mac2004 |
|||
24 Nov 2004, 08:41 |
|
Mac2004 29 Jan 2005, 14:41
I think I have found the problem. It's probably not caused by Fasm at all, but some not so easily visible bugs in my source. Those bugs didn't show any signs just after executing rhe code. After writing a little bit more new code previous bugs started show their existance. I managed to remove those and variables are working ok!
Debugging isn't allways so easy!!! Thanx foe helping me out! regards, Mac2004 |
|||
29 Jan 2005, 14:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.