::description
modified version of FASMW with has a template feature.

::why?
'coz i'm *too* lazy to type the same thing when i want something quick

::usage
CTRL+SPACE or from Edit menu to add content of template.txt from current dir

::future
maybe Privalov will add in future FASMW version an extended template system
(template dir in fasmw.ini, possibility to select from multiple template files - maybe a
popup system)

big thanks to Privalov for FASM package (just love how fast compiles everything)


updated fasmw_tbd.zip
- fixed wrong arguments to CloseClipboard
- minor cosmetic on Edit menu
- add in template.txt example of argument checking
Posted on 2003-01-23 02:55:23 by TBD
Hi TBD,

It crashes on my win98 box on click on the template menu entry.

FASMW_TBD a caus? une d?faillance de protection g?n?rale
dans le module KERNEL32.DLL ? 0177:bff73641.
Registres :
EAX=0051fdba CS=0177 EIP=bff73641 EFLGS=00010246
EBX=00008d68 SS=017f ESP=00000000 EBP=0054fd10
ECX=00000000 DS=017f ESI=0054fcf8 FS=3b07
EDX=00520000 ES=017f EDI=00000000 GS=0000
Octets ? CS : EIP :
5f 5e c9 c2 0c 00 52 51 33 c0 48 50 50 65 ff 32
?tat de la pile :
00ca0f9e 00700465 09cd0016 00700465 00700465 f000ff54 f0009673 f000ff53 d0000000 0aa508d2 09cd003a 09cd0052 00000108 09cd0082 09cd009a 00700465
Posted on 2003-01-23 09:15:16 by JCP
Radiosys: it sounds like a stack problem ... i will try to find it.
i assume it GPF at the same location when you use the keyboard shortcut - CTRL+SPACE ?
Posted on 2003-01-23 09:24:00 by TBD
Yeah.
Posted on 2003-01-23 09:25:12 by JCP
Radiosys: can you trace it from 0x40AD53 -> 0x40ADE1 ?
i didnt put checks on memory allocation (oops) and maybe it screws up on
GlobalAlloc/Lock/Unlock/Free combo.
Posted on 2003-01-23 09:29:17 by TBD
I don't have debugger here, sorry.
Posted on 2003-01-23 09:53:47 by JCP
Radiosys:found the problem.

invoke CloseClipboard, 0


should be


invoke CloseClipboard


i will update the zip tomorrow or you could do it yourself :)
Posted on 2003-01-23 10:50:48 by TBD
Some people mocked me when I said function arg counts in FASM was useful... ;)
There is macros posted somewhere on the board...
Posted on 2003-01-23 15:40:40 by JCP
Latest FASMW includes this macro, it's in the win32axp.inc/win32wxp.inc files (the largest and slowest includes).
Posted on 2003-01-23 15:53:00 by Tomasz Grysztar
Privalov: will you include templates feature in future fasmw versions ?

it is possible to have an option to disable the display of the progress bar ?
it is possible to compile to memory and run from memory directly ? (as in old turbo pascal)
Posted on 2003-01-24 00:59:29 by TBD


it is possible to compile to memory and run from memory directly ? (as in old turbo pascal)


I think it would require to write a PE loader to execute a program from memory...

PS: I am sorry but it still crashes when I call the templates :


FASMW_TBD a caus? une d?faillance de protection g?n?rale
dans le module KERNEL32.DLL ? 0177:bff73641.
Registres :
EAX=0051f8ca CS=0177 EIP=bff73641 EFLGS=00010246
EBX=00008d68 SS=017f ESP=00000000 EBP=0054fd10
ECX=00000000 DS=017f ESI=0054fcf8 FS=1287
EDX=00520000 ES=017f EDI=00000000 GS=0000
Octets ? CS : EIP :
5f 5e c9 c2 0c 00 52 51 33 c0 48 50 50 65 ff 32
?tat de la pile :
00ca0f9e 00700465 09cd0016 00700465 00700465 f000ff54 f0009673 f000ff53 d0000000 0aa508d2 09cd003a 09cd0052 00000108 09cd0082 09cd009a 00700465


Maybe the zip file is not updated ?
Posted on 2003-01-24 01:01:16 by JCP
Radiosys: have you downloaded the latest .zip ? because on the board
said no downloads of the new .zip.

it is your .exe as below ?
Fasmw_TBD.exe 93,184 bytes 24-01-03 08:47a
Posted on 2003-01-24 01:53:05 by TBD
I agree with the Templates System implementation. That would be really useful!
And some kind of a bookmarking feature should also be implemented.
Privalov, I am counting on you! :alright: :)
Posted on 2003-01-24 16:30:03 by president
My proposal is: a submenu New in menu File, containing Empty file and From template... options, the second would show Choose template dialog or something like this.

And some kind of a bookmarking feature should also be implemented.

Maybe you mean a kind of feature that was implemented in my good old flat editor (anybody remember it? it was the DOS precursor of ASMEDIT control that is used in FASMW, had been available to download from fasm zone for some time), right Alt with any number marked a bookmark and left Alt with the same number returned to that bookmark (or maybe it was reversed, I don't remeber exactly).
Posted on 2003-01-25 08:53:02 by Tomasz Grysztar
I would like a Code Snippets dialog, where I can choose a desired snippet and put it into clipboard. Then paste it somewhere in my source. (See SpAsm's one).

And about bookmarking... I have an idea. A good idea:
On the left, there is a panel. If I want to set a bookmark on a line, I just press the left mouse button on the panel and a red dot appears there. To clear a bookmark, I click on the red dot to make it disappear.
There is a combo box somewhere (maybe on the menu bar). So, if I set new bookmarks, new items are added into the combo box. An item name is the same as written on the bookmarked line. So, it is easy to jump to a specific bookmark.
If the bookmarked line starts with a semicolon, then only the comment text is added to the combo box. (without the semicolon and without the preceding spaces, if any).

Like that idea?
Posted on 2003-01-25 11:00:33 by president