Code Templates for RadASM 3 by William McKeever (WillASM)
Based on the RadASM 2 Code Templates addin by drizz
Uses the hotkey CTRL+J to bring up the template selection
listbox.
To create/edit the templates, select 'Edit Code Templates'
from the 'Tools' menu. To set the inserted templates cursor
position, simply move the cursor to the desired location,
then save the template. Unlike the version for RadASM 2,
the ~ character is not required to set the cursor position.
You can also set a selected range of characters and when the
template is inserted to your code the the selection will also
be selected in your code. This alllows you to set a text
prompt for the desired input. This has the effect of being
able to start typing immediatly to overwrite the prompt text.
Eg. LOCAL buffer[nBytes]:B (With nBytes text selected)
Just typing 256 after inserting the template will result in..
LOCAL buffer[256]:B
Installation:
1. Copy CodeTemplates.dll to \RadASM3\addins
2. Copy CodeTemplates.Txt to \RadASM3\addins\help
3. Copy the contents of CT3 folder to \RadASM3\addins
(Just the contents - Not the folder itself!)
Step 3 Note: You can optionally just copy the *.ct3 files for the
programming languages you are planning to use or you
can skip this step and create the template data files
yourself. The template files contain the same default
text that was included in the RadASM 2 version with
the exception of the GoASM.ct3 which was empty in the
original but now contains templates I personally use.
Note: Based on Code Templates addin for RadASM 2 programmed by drizz.
Although this addin functions much like the addin by drizz,
there are many differences internally code wise as many of the
plugin interface methods used by drizz are not available in
RadASM 3. The template files used by the earlier version are
not compatible with this version as well as I chose to implement
a method to edit the templates from within RadASM rather than
having to edit them externally. The new *.ct3 template files are
binary data files and should not be edited manually.
One key note is that I chose to not have the listbox sorted
alphabetically. This allows you to move your most frequently
used templates to the top of the list for quicker access.
The template files do have limitations on the text lengths.
If you need to increase these you can by changing these 3 EQU's
and then rebuld the addins dll. The lengths include the strings
null terminator.
;--- Code Templates max counts
MAX_CT EQU 64 ; Maximum number of templates
MAX_CTDESC EQU 32 ; Maximum bytes for the template name
MAX_CTSIZE EQU 4096 ; Maximum bytes for template