Assembly Forum Index Assembly
A little text to describe your forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invoke Macro

 
Post new topic   Reply to topic    Assembly Forum Index -> Nasm
View previous topic :: View next topic  
Author Message
Klod



Joined: 05 Oct 2009
Posts: 5

PostPosted: Tue Oct 13, 2009 5:20 am    Post subject: Invoke Macro Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Assembly Forum Index -> Nasm All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com

Free Web Hosting | File Hosting | Photo Gallery | Matrimonial


Powered by PhpBB.BizHat.com, setup your forum now!
For Support, visit Forums.BizHat.com