Hm. Perhaps it would be possible to have *one* include file
that is able to generate both the "stub" calls
(call j_realimport, where j_realimport does "jmp ",
and the "direct-call" that does "call " right away. It would
require some more-or-less tricky macro code, but you should still
be able to generate the include files with an automated tool.
Perhaps bitrake can have a look at this :)
Posted on 2001-08-30 22:19:32 by f0dder
Hmm, it seems like Ansi functions are always assumed in masm32?
It should be possible to set a assemble-time flag to specify that
I want the unicode (W) apis instead of the Ansi apis... like it or not,
we're moving faster and faster towards NT kernels and unicode support,
and when doing driver development, it's hard to NOT use unicode :/
Posted on 2001-08-30 22:40:07 by f0dder
My macro HERE makes these includes absolete. ;)
Posted on 2001-09-07 22:52:30 by bitRAKE
BitRake,

please calm yourself down. Your macros work, but make error finding a lot harder. And they offer no real advantage. Dont confuse new asm programmers with it.

japheth
Posted on 2001-09-08 05:58:29 by japheth
japheth, I'm calm - it's the house that's jumping up and down. :)

Okay, I should put disclaimers on my work. :) I will say in general, that if you can't understand how a macro works then you might not want to use it - all macros have good and bad - they offer a feature, but only through loss of a feature somewhere else. If you don't know both sides to it - stick with what you know.
Posted on 2001-09-08 08:47:04 by bitRAKE
Hi hutch !

Is there a new version out ? I found another bug while I had tried to get the imps (Not those from Dungeon Keeper :grin: ) from the fmod3.4 dll. In the names the character-code 8 (=BS) is interpreted as a valid character of the name !

Greetings, CALEB
Posted on 2001-09-23 16:44:28 by Caleb
CALL label
.....
label: JMP

Actualy without a jump table, the total size of your code may not be smaller. The opcode for the 'call' is one byte, the opcode for the 'jmp' is two bytes.



004010F5 E88E010000 call fn_00401288
.............
00401288 fn_00401288:
00401288 FF2514204000 jmp dword ptr [ExitProcess]


This means if an API is referenced more than 6 times in your code, on the seventh time you will save yourself one byte of space :)
Posted on 2001-10-02 16:28:18 by huh
Hey Huh, I do not care about the one byte difference per call, but I am happy to save about 60 cycles the cpu needs if there is a cache-miss which can happen quite more often using jumptables !

Greetings, CALEB !
Posted on 2001-10-02 17:47:18 by Caleb
no only cache misses, but jump mispredictions :)

Which will add about 60 clocks if it's mispredicted...
Posted on 2001-10-03 13:06:24 by Kenny
Yeah, same here, but I was just pointing that out
Posted on 2001-10-03 13:23:36 by huh