flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > For the Fresh team: conference |
Author |
|
Tommy 16 Sep 2003, 19:45
Hi John,
I understand what you mean, and in my opinion, we should use the last method - to use source code only (not any other formats). G2G to bed and sleep now. School again tomorrow... So long! Regard, Tommy |
|||
16 Sep 2003, 19:45 |
|
pelaillo 17 Sep 2003, 07:29
Hi JohnFound,
I am not "still" in the team, but I want to contribute to it soon. At the moment I am scrambling arround with fasm to assemble and run to/from memory (my goal is the source level debugger, I have tons of patience ) Regarding the thread, IMHO the second alternative is better. Abandon all binary data. This is the hardest way but is the cleaner and I will appreciate it a lot (as a future happy user) Best Regards, pelaillo |
|||
17 Sep 2003, 07:29 |
|
JohnFound 17 Sep 2003, 10:25
Hi, pelaillo.
pelaillo wrote: Hi JohnFound, Hey, I wonder, why you don't make this in the sources of Fresh? We need exactly this. And Fresh will have source level debugger at any price. I made some work, but there is too many problems to solve, but the day is still 24 hours. pelaillo wrote: Regarding the thread, IMHO the second alternative is better. Abandon all binary data. This is the hardest way but is the cleaner and I will appreciate it a lot (as a future happy user) I tend to this too, it's cleaner solution, but harder, because of tons of string manipulations and parsing. But let wait for more opinions. Maybe someone will suggest some better idea. |
|||
17 Sep 2003, 10:25 |
|
JohnFound 17 Sep 2003, 15:42
Well, I write some draft example, trying to realize how the files will look at the end and what kind of processing we must make. I merged several files in one to try to illustrate the problem more clearly. But don't forget that these are diferent files. There are comments, what part in what file resides. Please read it and post your notes.
Code: ;-------------------------------------------------------------------------------- ; This is part of form.inc standard library. ;-------------------------------------------------------------------------------- MODAL_ID = $6000 MR_NONE = 0 MR_CANCEL = 1 MR_OK = 2 MR_YES = 3 MR_NO = 4 struc CTRL flags, walign, class, text, style, styleEx, ID, left, top, width, height, userdata { .flags db flags ; .Align db walign .ptrClass dd class ; pointer to the classname. .ptrText dd text .style dd style .styleEx dd styleEx .ID dw ID .left dw left .top dw top .width dw width .height dw height .UserData dd userdata } virtual at 0 CTRL CTRL ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? sizeof.CTRL = $ end virtual wtChild = 0 wtParent = 1 ; The current window is the parent for next windows until the window with wtEnd flag. wtEnd = 2 ; The current window is the last child of the current parent window. The next ; window becomes child of the previous parent. ;------------------------------- ; This is in winalign.inc ;------------------------------- waNone = 0 waLeft = 1 waRight = 2 waTop = 3 waBottom = 4 waClient = 5 ;------------------------------- ; This is in User32.inc ;------------------------------- WS_EX_DLGMODALFRAME = 00001h WS_EX_DRAGOBJECT = 00002h WS_EX_NOPARENTNOTIFY = 00004h WS_EX_TOPMOST = 00008h WS_EX_ACCEPTFILES = 00010h WS_EX_TRANSPARENT = 00020h WS_EX_MDICHILD = 00040h WS_EX_TOOLWINDOW = 00080h WS_EX_WINDOWEDGE = 00100h WS_EX_CLIENTEDGE = 00200h WS_EX_CONTEXTHELP = 00400h WS_EX_RIGHT = 01000h WS_EX_LEFT = 00000h WS_EX_RTLREADING = 02000h WS_EX_LTRREADING = 00000h WS_EX_LEFTSCROLLBAR = 04000h WS_EX_RIGHTSCROLLBAR = 00000h WS_EX_CONTROLPARENT = 10000h WS_EX_STATICEDGE = 20000h WS_EX_APPWINDOW = 40000h WS_EX_LAYERED = 80000h WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST WS_VISIBLE or WS_CHILD or WS_BORDER WS_VISIBLE or WS_CHILD or SS_BITMAP or SS_CENTERIMAGE or WS_BORDER WS_VISIBLE or WS_CHILD or SS_LEFT or WS_BORDER 010000000h 040000000h 000800000h 050800000h WS_OVERLAPPED = 000000000h WS_ICONICPOPUP = 0C0000000h WS_POPUP = 080000000h WS_CHILD = 040000000h WS_MINIMIZE = 020000000h WS_VISIBLE = 010000000h WS_DISABLED = 008000000h WS_CLIPSIBLINGS = 004000000h WS_CLIPCHILDREN = 002000000h WS_MAXIMIZE = 001000000h WS_CAPTION = 000C00000h WS_BORDER = 000800000h WS_DLGFRAME = 000400000h WS_VSCROLL = 000200000h WS_HSCROLL = 000100000h WS_SYSMENU = 000080000h WS_THICKFRAME = 000040000h WS_HREDRAW = 000020000h WS_VREDRAW = 000010000h WS_GROUP = 000020000h WS_TABSTOP = 000010000h WS_MINIMIZEBOX = 000020000h WS_MAXIMIZEBOX = 000010000h SS_LEFT = 0000h SS_CENTER = 0001h SS_RIGHT = 0002h SS_ICON = 0003h SS_BLACKRECT = 0004h SS_GRAYRECT = 0005h SS_WHITERECT = 0006h SS_BLACKFRAME = 0007h SS_GRAYFRAME = 0008h SS_WHITEFRAME = 0009h SS_USERITEM = 000Ah SS_SIMPLE = 000Bh SS_LEFTNOWORDWRAP = 000Ch SS_BITMAP = 000Eh SS_OWNERDRAW = 000Dh SS_ENHMETAFILE = 000Fh SS_ETCHEDHORZ = 0010h SS_ETCHEDVERT = 0011h SS_ETCHEDFRAME = 0012h SS_TYPEMASK = 001Fh SS_NOPREFIX = 0080h SS_NOTIFY = 0100h SS_CENTERIMAGE = 0200h SS_RIGHTJUST = 0400h SS_REALSIZEIMAGE = 0800h SS_SUNKEN = 1000h ;---------------------------------------------- ; This is defined in ??? (I don't know where ; and I don't care.) ;---------------------------------------------- NULL = 0 ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ABOVE SOURCE IS PART OF THE STANDARD LIBRARY FILES. ; THERE ARE ONLY DEFINITIONS, NOT CODE OR DATA. ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ; BELOW SOURCE IS PART OF THE USER PROJECT. ;VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ;---------------------------------------------- ; The folowing part is in separate file with ; classnames used in the project. ; this will avoid doubling of the class names. ; Also, this data may be included in code ; section, because it is read only. ;---------------------------------------------- cFormClassName db 'Form',0 cButtonClassName db 'Button',0 cStaticClassName db 'Static',0 ;-------------------------------------------------- ; This is part of project data section. ;-------------------------------------------------- cAboutCaption db 'About Fresh...',0 cAboutClose db 'Close',0 cAboutText db 'This is some about box text, bla bla bla',0 ;--------------------------------------------- ; .FRM file is a file that contains the form ; creating data for every form. ; there is another file .ASM for every form, ; that will contain the message handler proce- ; dure for the form. ; ; The .FRM file contains following data. ;--------------------------------------------- frmAbout CTRL wtParent or wtEnd, waNone, cFormClassName, cAboutCaption, \ WS_CAPTION or WS_CLIPCHILDREN or WS_SYSMENU or WS_DLGFRAME, 0, \ NULL, 0, 0, 400, 300, NULL btnOK CTRL wtChild, waBottom, cButtonClassName, cAboutClose, WS_VISIBLE or WS_CHILD or WS_BORDER, 0, \ MODAL_ID + MR_OK, 10, 50, 64, 25, NULL imgTurtle CTRL wtChild, waLeft, cStaticClassName, 0, \ WS_VISIBLE or WS_CHILD or SS_BITMAP or SS_CENTERIMAGE or WS_BORDER, 0, \ 1, 0, 10, 165, 19, NULL txtAbout CTRL wtChild or wtEnd, waClient, cStaticClassName, cAboutText, \ WS_VISIBLE or WS_CHILD or SS_LEFT or WS_BORDER, WS_EX_CLIENTEDGE, \ 2, 0, 10, 180, 19, NULL ;--------------------------------------------- ; Here is the same .FRM file, but not using ; symbol constants. ; ; As you can see, the only symbol names are ; in files from the project, not in external ; library files. This format is more easy for ; parsing, but more hard for human reading, ; and if the programmer changes something, ; he must use only numbers not symbol names. ;--------------------------------------------- ;frmAbout CTRL 3, 0, cFormClassName, cAboutCaption, $002c80000, 0, 0, 0, 0, 400, 300, 0 ; btnOK CTRL 0, 4, cButtonClassName, cAboutClose, $050800000, 0, $6002, 10, 50, 64, 25, NULL ; imgTurtle CTRL 0, 1, cStaticClassName, 0, $05080020e, 0, 1, 0, 10, 165, 19, 0 ; txtAbout CTRL 2, 5, cStaticClassName, cAboutText, $050800000, $00200, 2, 0, 10, 180, 19 |
|||
17 Sep 2003, 15:42 |
|
scientica 17 Sep 2003, 16:10
JohnFound wrote: ;--------------------------------------------- Why not solve it like this, the developer can do it three ways. 1) Use the properties panel/dialog/window (setting flags, etc using it). Output is numeral 2) Do it all by hand (or'ing the flags in the head) 3) Use equates (..., EQUA|EGUB, ...) and "pre parse" the file using some external util (accessible via some menu like "Utils"->"Parse .frm" (which also could test the .frm file for it's correctness) ). _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
17 Sep 2003, 16:10 |
|
pelaillo 18 Sep 2003, 08:03
JohnFound wrote: Hey, I wonder, why you don't make this in the sources of Fresh? We need exactly this. Yes I am going to do this when I have something useful. At this moment I am studying object code formats and debuggers and breaking fasm apart to understand it well. |
|||
18 Sep 2003, 08:03 |
|
Tomasz Grysztar 18 Sep 2003, 10:57
pelaillo: you might find the thread about the listing feature useful - the version of fasm's source that is posted there shows how you can get the source lines corresponding to offset in file (for debugging to will need also to convert file offsets into memory addresses). If you need any help with it, feel free to ask.
|
|||
18 Sep 2003, 10:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.