Hi all
I have created a word list for use with RadASM 2.0.1.5
It contains most of the windows api's with parameters.
KetilO
I have created a word list for use with RadASM 2.0.1.5
It contains most of the windows api's with parameters.
KetilO
HLA syntax does not allow support for auto api list or api constants.
Are your sure there is no way to implement this? I really miss this and the show struct items
feature.
Another thing. Is there is way to have error messages displayed in the output window instead of the command window?
Hi Odyssey
HLA syntax does not allow support for auto api list or api constants. The best solution is to add the api's to the word list.
KetilO
Hi Ketil,
I've been busy the past few days working on the release CD for
AoA so I haven't had much time to play with RadASM. But I do
have a few questions and comments.
First, I'll extract a list of HLA reserved words from the Flex file
sometime this week and email you an HLA.INI file that has
all the HLA reserved words present. I'll probably play around
with some of the macro expansions, too. Depends on what I
can figure out.
I noticed that you're running compiles via an HLA.BAT file.
I don't know if RadASM can handle an extra step before
assembly, but if so, it might be more convenient to run
the HLAPARSE.EXE program (which is the actual HLA compiler)
rather than HLA.EXE (which is just a shell that runs HLAPARSE,
MASM, RC, and LINK). After all, RadASM is, in a sense, the
same thing as HLA.EXE - a shell that runs all the other programs
that are needed to produce an executable. I took a brief look
at the HLA.INI file and noticed there were a couple of sections
where one could put in program names and command line parameters.
However, I haven't spent enough time to figure out what the syntax
is (I suspect I can figure this out by reading the FASM and MASM
INI files, but expect some questions before too much longer).
One other issue that is a fundamental problem is the API expansion.
I remember reading last week that RadASM uses a trigger word
like "INVOKE" to activate the search for an API name. HLA's syntax,
of course, doesn't have anything like this. While we *could* create
an empty macro like this:
#macro invoke;
#endmacro;
so you could "invoke" the APIs as
invoke ExitProcess( 0 );
That's too digusting to think about :-)
One suggestion I would make is to use a DLL (that is replaceable)
to check for API names. That is, when RadASM encounters an
identifier that it doesn't immediately recognize (as a reserve word
or some other well-known token), it passes the ID as a string to
an assembler-specific DLL that does whatever checks the DLL
wants to do (e.g., checking for a Win32 API identifier) and returns
a string specifying the syntax of the parameters for that call
(sorta like the current INI files, but without the trigger word).
This would not only allow support for the Win32 API, but for
*any* API you want to use; e.g., the HLA Standard Library and
the functions in the HLA Compile-time language. By putting the code
in a DLL, you could relieve yourself of having to write that code.
Whomever supplies the assembler (e.g., me) or a library/API could
then write the DLL.
I'm current rushing to finish the CD for AoA and then finish off the
last two chapters of my "Write Great Code" book. I figure in about
a week or two I will jump in and dedicate a lot of time on the
RadASM/HLA combination. First, I'll write a "quickstart" manual
to explain what I've figured out, and then I'll start putting a
more complete discussion of the environment in the "Windows
Programming in Assembly" book I've started.
Cheers, and expect lots of questions,
Randy Hyde
#macro invoke;
#endmacro;
so you could "invoke" the APIs as
invoke ExitProcess( 0 );
That's too digusting to think about :-)
Yes it is :mad:
Hi Odyssey
To auto show api list box RadASM needs a trigger word. I think always showing the listbox would be horrible.
For HLA api calls I think the word list is better as you can type a few characters and then press Ctrl+Space.
I will look into api tooltip, api constants and struct items when I know HLA syntax a little better.
KetilO
To auto show api list box RadASM needs a trigger word. I think always showing the listbox would be horrible.
For HLA api calls I think the word list is better as you can type a few characters and then press Ctrl+Space.
I will look into api tooltip, api constants and struct items when I know HLA syntax a little better.
KetilO
Hi Randy
First, I'll extract a list of HLA reserved words from the Flex file
sometime this week and email you an HLA.INI file that has
all the HLA reserved words present.
Great.
I noticed that you're running compiles via an HLA.BAT file.
I don't know if RadASM can handle an extra step before
assembly, but if so, it might be more convenient to run
the HLAPARSE.EXE program (which is the actual HLA compiler)
rather than HLA.EXE (which is just a shell that runs HLAPARSE,
MASM, RC, and LINK). After all, RadASM is, in a sense, the
same thing as HLA.EXE - a shell that runs all the other programs
that are needed to produce an executable. I took a brief look
at the HLA.INI file and noticed there were a couple of sections
where one could put in program names and command line parameters.
However, I haven't spent enough time to figure out what the syntax
is (I suspect I can figure this out by reading the FASM and MASM
INI files, but expect some questions before too much longer).
Yes, but there is also the enviroment variables that HLA needs.
Using a batch file is not a good solution on Win95/98/ME as they needs to be run in a console.
KetilO
First, I'll extract a list of HLA reserved words from the Flex file
sometime this week and email you an HLA.INI file that has
all the HLA reserved words present.
Great.
I noticed that you're running compiles via an HLA.BAT file.
I don't know if RadASM can handle an extra step before
assembly, but if so, it might be more convenient to run
the HLAPARSE.EXE program (which is the actual HLA compiler)
rather than HLA.EXE (which is just a shell that runs HLAPARSE,
MASM, RC, and LINK). After all, RadASM is, in a sense, the
same thing as HLA.EXE - a shell that runs all the other programs
that are needed to produce an executable. I took a brief look
at the HLA.INI file and noticed there were a couple of sections
where one could put in program names and command line parameters.
However, I haven't spent enough time to figure out what the syntax
is (I suspect I can figure this out by reading the FASM and MASM
INI files, but expect some questions before too much longer).
Yes, but there is also the enviroment variables that HLA needs.
Using a batch file is not a good solution on Win95/98/ME as they needs to be run in a console.
KetilO
To auto show api list box RadASM needs a trigger word. I think always showing the listbox would be horrible.
For HLA api calls I think the word list is better as you can type a few characters and then press Ctrl+Space.
I have been saying Show Api list all the time. What I really meant was the api tooltip.
I don't miss the Show Api list because I already know the function I want to use and its not much work to type it myself.
I will look into api tooltip, api constants and struct items when I know HLA syntax a little better
That would be nice.
Hi all
New upload.
Whats new:
- Giving .hla files file type 2 (.asm) in projects was a big mistake. The .hla files has now file type 11 and filetype 2 is .asm
- Included modified PthExpl++ addin. Gives a simple solution to deleting temporary files produced by hla.
- Included modified ReallyRad addin. Double clicking on a dialog control jumps to code.
- Included hlaWord.api file. It contains most of yhe windows api's with parameters as comment.
- Included hlaCommand.api file. You can now easily find commands in a windows / dialogs callback.
KetilO
New upload.
Whats new:
- Giving .hla files file type 2 (.asm) in projects was a big mistake. The .hla files has now file type 11 and filetype 2 is .asm
- Included modified PthExpl++ addin. Gives a simple solution to deleting temporary files produced by hla.
- Included modified ReallyRad addin. Double clicking on a dialog control jumps to code.
- Included hlaWord.api file. It contains most of yhe windows api's with parameters as comment.
- Included hlaCommand.api file. You can now easily find commands in a windows / dialogs callback.
KetilO
Where is the Upload?
First post in this thread.
KetilO
KetilO
It looks like I am having the same problem I had when downloading Donkey's res2dlg
update. I think I am getting the original file you uploaded not the updated one. The date on most of the files is march 21 and there is no hlacommand.api file.
update. I think I am getting the original file you uploaded not the updated one. The date on most of the files is march 21 and there is no hlacommand.api file.
Hi Randy
Great.
Yes, but there is also the enviroment variables that HLA needs.
Using a batch file is not a good solution on Win95/98/ME as they needs to be run in a console.
KetilO
I will be posting a "quickie" patch to HLA tonight (it's not up yet, but it will be within a few hours after I post this message).
HLA v1.44 (which consists only of the HLA.EXE file, as an adjunct to HLA v1.42) will solve a fair number of your problems.
HLA v1.44 adds a new command line parameter "-i:<path>" that lets you specify the path to the HLA include directory. This overrides the hlainc environment variable. Therefore, if you set up the path to hla\include in RadASM, you can easily pass this path on through to HLA v1.44 (I got this to successfully work today at work, so I know it works reasonably well). As for the HLALIB environment variable, there was no need to add a new command line parameter since HLA already supported a command line parameter for this:
-LLIBPATH:<path to hla\hlalib>
E.g.,
hla -i:c:\hla\include -llibpath:c:\hla\hlalib ...
I've attached an HLA.INI file to which I've added several HLA reserved words, a bunch of "auto-completion macros" and a few other goodies. Note that the code that actually runs HLA assumes the presence of HLA v1.44, so be aware of that (you'll probably need to change that stuff anyway, since it has paths to my working directories on my D: drive).
I do have a couple of comments about features you might want to think about.
In the section, I'd love to see the following features added:
1. Rather than having "before" and "after" text, it would be nice to have some special
symbol to say "Place the cursor here". I realize you can *mostly* do this with the
current arrangement, but things would be simpler if I could just specify where the
cursor goes after the macro expansion.
2. Have an option that pauses, displays a dialog box with a user supplied message, accepts some input from the user, and then inserts that text in place of the item, e.g.,
{PEnter Procedure Name} would "prompt" the user in a dialog box with the message
"Enter Procedure Name", allowing them to enter some text in a TEbox, and then insert that text in place of the {P...}
3. Have an option that accepts user input from the keyboard until a specific string arrives,
e.g., {M<somestring>} would accept all input from the keyboard up to (and including) <somestring> and then the macro would continue expansion.
4. Have an option that would capture the text input by (2) or (3) above into a temporary variable for later playback (e.g., a procedure name). For case (3), the saved string should not include the text specified by <somestring>.
You could go crazy and add simple conditions to the macros, but I believe the four items above would add considerable capability to the macro "auto-play" expansion.
I have been unable to get RadASM's lexer/parser to recognize HLA structs (records).
They take the following form:
<id> : record
fields
endrecord;
The problem is the colon. RadASM can't accept any tokens between the id and the "struct" keyword (record in this case). Also note that (like MASM and TASM) HLA supports UNIONs, this is probably a feature you want to add. Also (like TASM), HLA supports CLASSes, so you should add support for classes, too.
Because declarations in HLA are fundamentally different than other assemblers (indeed, this is where the "High Level" in HLA originally came from), the simple parsing techniques that work for other assemblers doesn't stand a chance with HLA. However, almost all HLA constant, type, and variable declarations take one of the following two forms:
<id> : <type>
<id> := <expression>
I *was* able to get RadASM to recognize constants by treating ":=" as though it were "EQU". This, however, does report a few things that aren't constants (but also use
the := operator) as constants.
HLA constants (equates) always appear in a CONST section, a VAL section, or between
a "?" and a ";", e.g.,
const
pi := 3.141;
i := 2;
c := 'a';
val
v := 5.5;
w := $1234;
?x := 0;
(Note that, for the purposes of RadASM, CONST and VAL sections are identical.
The stuff appearing between the "?" and ";" is a VAL object that may appear anywhere in the source code.)
Types always begin with the TYPE keyword, and type declarations always take the following form:
<ID>:<type definition>
Local variables (auto variables on the stack) always begin with the VAR keyword
and the declarations take the form:
<ID>:<type definition>
STATIC, READONLY, and STORAGE objects (basically these are DATA, TEXT, and BSS objects) begin with their respective keywords and the declarations take the same form as the VAR objects.
Note that VAR and VAL may also appear in procedure, method, and iterator parameter lists, a slight complication.
I haven't thought through how to come up with a string that lets you specify all these things (and is fully compatible with existing assembler syntax). But once I come up with something, I'll let you know.
It would be nice if the quotes or apostrophes that surround a string constant took on the same color as the string constant (rather than the operator color).
It would be nice if you could specify a regular expression for numeric constants and give them their own color, too.
Is there some way to tell RadASM that a project consists of multiple source files and that it needs to call HLA for each of the files (and then link them together)? I haven't figured this one out yet; for larger projects (where an IDE really shines), I would suspect that this is possible.
In the make menu, you need to add an option to run an external debugger (e.g., OllyDbg).
And as I mentioned in a previous post, it would be really nice to support the use of an external DLL to do API processing. For example, in one of the INI files where you specify the "words" file, you could provide an option to specify a DLL name instead. To that DLL you'd pass an identifier and it could return a string containing a template to fill in for that word as well as a pointer to a (NULL-terminated) open-ended array of string pointers that provide the parameters for that API call.
Cheers,
Randy Hyde
Hi all
New upload at the top of this thread.
Whats new:
- Activated api tooltip
- Activated api constants code complete
- New hlaWord.api file
- Several changes to hla.ini (thanks Randy)
KetilO
New upload at the top of this thread.
Whats new:
- Activated api tooltip
- Activated api constants code complete
- New hlaWord.api file
- Several changes to hla.ini (thanks Randy)
KetilO
ketilo,
I am still having problems downloading the updated version of the file. Could you upload here again?
I am still having problems downloading the updated version of the file. Could you upload here again?
Here it is.
Edit:
Attachment deleted.
Edit:
Attachment deleted.
thanks Ketilo for uploading the file again.
I am having trouble getting the api tooltip to work. I have set the options in the code editor options to activate it but I am not seeing the tooltip when I type an api call.
I am having trouble getting the api tooltip to work. I have set the options in the code editor options to activate it but I am not seeing the tooltip when I type an api call.
Hi Odyssey
My fault.
Check Options / Code Editor Options / Show Api Tooltip and Show Api Constants
It has been fixed in the download at the top of this thread.
KetilO
My fault.
Check Options / Code Editor Options / Show Api Tooltip and Show Api Constants
It has been fixed in the download at the top of this thread.
KetilO
I had checked those items before. I am using windows 98. Have you tested it on windows 98.
Yes, it was made on win98.
Check hla.ini
Trig=
Call=Hla\hlaCall.api
Const=Hla\hlaConst.api
Word=Hla\hlaWord.api
Message=Hla\hlaMessage.api
KetilO
Check hla.ini
Trig=
Call=Hla\hlaCall.api
Const=Hla\hlaConst.api
Word=Hla\hlaWord.api
Message=Hla\hlaMessage.api
KetilO
My hla.ini is the same as yours.
Trig=
Call=Hla\hlaCall.api
Const=Hla\hlaConst.api
Word=Hla\hlaWord.api
Message=Hla\hlaMessage.api
Trig=
Call=Hla\hlaCall.api
Const=Hla\hlaConst.api
Word=Hla\hlaWord.api
Message=Hla\hlaMessage.api