|
Assembly A little text to describe your forum
|
Important Notice:
We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024.
If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
View previous topic :: View next topic |
Author |
Message |
Klod
Joined: 05 Oct 2009 Posts: 5
|
Posted: Tue Oct 13, 2009 5:20 am Post subject: Invoke Macro |
|
|
I'm reworking my invk and Proc macros. Basically what I'm trying to is to distinguish between local proc and external proc. Procs are defined as strcat:(example). I devised the macro below,part of the invk macro to do this:
[/code]%ifid %1
;%warning proc _proc%+@ %+(repcount) defined LOCAL
call _proc
%elifndef _proc_%1_defined_Local
;%warning _proc %+@ %+(repcount) external
EXTERN _proc
call _proc
%endif Code: |
When turning warnings on produces, my test program turns out:
TestDefine.inc:2: warning: (invk:32) GetStdHandle@(0) external
TestDefine.inc:4: warning: (invk:32) GetStdHandle@(0) external
TestDefine.inc:23: warning: (invk:29) proc strlen@(1) defined LOCAL
TestDefine.asm:31: warning: (invk:29) proc InitializeConsole@(0) defined LOCAL
TestDefine.asm:32: warning: (invk:29) proc strcpy@(2) defined LOCAL
TestDefine.asm:33: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:35: warning: (invk:29) proc StdOut@(1) defined LOCAL
TestDefine.asm:36: warning: (invk:29) proc StdOut@(1) defined LOCAL
TestDefine.asm:37: warning: (invk:32) StdOut@(1) external
TestDefine.asm:38: warning: (invk:29) proc StdOut@(1) defined LOCAL
TestDefine.asm:39: warning: (invk:29) proc strcpy@(2) defined LOCAL
TestDefine.asm:40: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:41: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:42: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:43: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:44: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:45: warning: (invk:29) proc catstr@(2) defined LOCAL
TestDefine.asm:46: warning: (invk:29) proc StdOut@(1) defined LOCAL
TestDefine.asm:47: warning: (invk:29) proc InKey@(0) defined LOCAL
TestDefine.asm:47: error: symbol `InKey' undefined
TestDefine.asm:48: warning: (invk:32) ExitProcess@(0) external
This is Ok except InKey is called as a local proc and error: symbol `InKey' undefined. StdOut gets called as both local and external, but works.
I made sure ther is no symbol defined as either InKey or Stdout.
Is there a better way to do this?
Klod
[/list] |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|