flat assembler
Message board for the users of flat assembler.
Index
> Main > The examples section Goto page Previous 1, 2, 3, 4 Next |
Author |
|
kohlrak 16 Dec 2006, 03:20
No more giving back...
Last edited by kohlrak on 07 Aug 2008, 15:03; edited 1 time in total |
|||
16 Dec 2006, 03:20 |
|
shoorick 20 Dec 2006, 13:22
personally i do not check examples each time i download next fasmw package, but they are changed.
as i do remember, long ago local labels there were used in window procedure there, i mean labels starting with one dot. now they have no dots, thus they are global. yes, it compiled without errors and work, but shows wrong way. modificated example in attach looks correct as it parent example, but it is not correct, and it fails compilation. Code: d:\projects\dialog_temp\DIALOG.ASM [103]: wminitdialog: error: symbol already defined. ERRORLEVEL: 2
_________________ UNICODE forever! |
|||||||||||
20 Dec 2006, 13:22 |
|
vid 20 Dec 2006, 15:10
shoorick: see this
|
|||
20 Dec 2006, 15:10 |
|
vid 20 Dec 2006, 16:37
shoorick: hey, you are right!
tomasz: that's terrible, fix it please. And also add the error checking to examples (testing return value of APIs) |
|||
20 Dec 2006, 16:37 |
|
Tomasz Grysztar 20 Dec 2006, 16:47
shoorick: my point of using global labels everywhere is that it forces you to use unique names for them, which is something I consider a good practice. But you're right that in this example this doesn't make much sense.
|
|||
20 Dec 2006, 16:47 |
|
shoorick 20 Dec 2006, 18:35
there is nothing terrible and no bug in real. it is just wrong strategy. i do not mind meaningful names. wm_initdialog enough good for WM_INITDIALOG processing. but if application has, say, more then one window procedure, such labels will interference if they are global.
i just think local type of labels has to be preffered inside procedure. and there is need some tips about usage of global labels between local labels and in the macros. thanks. |
|||
20 Dec 2006, 18:35 |
|
coconut 20 Dec 2006, 19:17
update of my old example. there's so little code to set window transparency, that this can be more of an example on using a scrollbar control
|
|||||||||||
20 Dec 2006, 19:17 |
|
RedGhost 21 Dec 2006, 03:22
coconut wrote: update of my old example. there's so little code to set window transparency, that this can be more of an example on using a scrollbar control I am not too crazy about the TCHAR thing but SetLayeredWindowAttributes can do some nice tricks, I often use it to fade in/fade out. _________________ redghost.ca |
|||
21 Dec 2006, 03:22 |
|
coconut 21 Dec 2006, 13:27
i always use template example to start my projects. i dont remember when i noticed the TCHAR thing, i just figured it was the 'new' way to do things
|
|||
21 Dec 2006, 13:27 |
|
DOS386 01 Jan 2007, 02:24
Some suggestions for FASM examples (rather include into packages
than for separate download): http://board.flatassembler.net/topic.php?t=6735 What I'd like to see are more DPMI examples of course ... _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug Last edited by DOS386 on 22 Feb 2007, 05:04; edited 2 times in total |
|||
01 Jan 2007, 02:24 |
|
IceStudent 14 Jan 2007, 22:32
I wrote a simple mySQL example: see attach here.
|
|||
14 Jan 2007, 22:32 |
|
FrozenKnight 15 Jan 2007, 22:14
RedGhost wrote: Here is a Windows hooking (detouring) example with FASM. This example is very heavily commented, I also kept the source nice and aligned. It writes a detour to MessageBoxA with an insert_detour function I wrote. It shows maybe opcode modification during run-time and hooking an API for whatever reason. I remember looking for this way back in the day on the MASM forums and couldn't find any examples so I had to teach myself. I am very excited to be able to contribute to FASM. RedGhost while your idea is nice and all it poses a few problems. especially in older versions of windows (EG: win9x) if you were to run your program on those versions you would have to restart windows after your program crashed because. all calls to MessageBoxA after your program was run would cause a crash. (even if the call eas made by the system). instead you could change the address of the call in the imports section of your program and everything would be fine allowing full computability with all versions of windows. Example: first create a dword size varable called TempMessageBoxA in your data section. then execute the following code. Code: push [MessageBoxA] pop [TempMessageBoxA] mov [MessageBoxA], oMessageBoxA And just add a call to TempMessageBoxA at the end of oMessageBoxA. this is a much safer method of using api hooks and it works for all versions of windows. Note: if you get a memory access error with the above code. then use VirtualProtect to give your self write access to MessageBoxA, or alternatively you could just add writeable privileges to your imports table. |
|||
15 Jan 2007, 22:14 |
|
RedGhost 27 Jan 2007, 12:07
FrozenKnight wrote:
Hi, "detours" and "IAT patches" are two separate forms of hooking. I wanted to show an example of a detour, something like MS detours style, IAT patching is another example, one Matt Pietrek was kind enough to make for us years ago _________________ redghost.ca |
|||
27 Jan 2007, 12:07 |
|
Tomasz Grysztar 14 Mar 2007, 16:52
Thanks for all posted so far, I added some of the examples to the website today - at least the ones that were correctly prepared or which I was able to correct myself.
|
|||
14 Mar 2007, 16:52 |
|
Mac2004 14 Mar 2007, 17:55
Quote: Thanks for all posted so far, I added some of the examples to the website today - at least the ones that were correctly prepared or which I was able to correct myself. Great! The examples section has improved quite a bit |
|||
14 Mar 2007, 17:55 |
|
white_wight 14 Mar 2007, 18:49
Last edited by white_wight on 03 Dec 2007, 21:01; edited 4 times in total |
|||||||||||||||||||||||||||||||
14 Mar 2007, 18:49 |
|
Xorpd! 15 Mar 2007, 16:21
Quote:
Would it be possible to also improve the examples that are included with the FASM download? One example is the MANDEL program: the executable just draws a few diagonal dotted lines and then exits after a while. The DDRAW64.INC file that comes with that example clearly has mistakes. At least the Mandelbrot program on my website is tested and works. Comparison with that program should lead to fixing at least some of the errors in DDRAW64.INC. |
|||
15 Mar 2007, 16:21 |
|
SoLo2 16 Mar 2007, 03:34
Hello!
There is the man pages and the ioctl_list (very important, too! ) for Linux. For Windows I saw a 12MB Win32 system functions file... Is this enough? Is here documented how to call Windows functions from assembler? Which registers or stack space is used? Nothing alike the ioctl list? Has someone converted this file to be readable from .html or plain ASCII... I think this could be interesting in this discussion... as it is probably a "pattern-a-list". Saludos, SoLo2 |
|||
16 Mar 2007, 03:34 |
|
karl 20 Mar 2007, 10:33
Hi. This is an example of writing a Portable Executable out byte-for-byte using Fasm. It was made using other examples found in the fasm message board as references. It's well commented and clean. Settings are presented as equates at the beginning of the source and are currently set to work with all versions of windows.
-karl penzhorn
|
|||||||||||
20 Mar 2007, 10:33 |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.