delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/03/09:07:04

X-Apparently-To: clax86 AT yahoo DOT com via web1705.mail.yahoo.com
X-Track2: 2
X-Track: 1-1: 40
From: locke AT mcs DOT net (Peter Johnson)
Newsgroups: comp.os.msdos.djgpp,comp.lang.asm.x86,alt.lang.asm,comp.os.msdos.programmer
Subject: Re: Nasm / AS / Wrappers
References: <3898326e AT news DOT iglou DOT com>
X-Newsreader: MicroPlanet Gravity v2.12
Lines: 38
Organization: University of Illinois at Urbana-Champaign
X-Mozilla-Status: 0801
Approved: <camille AT bluegrass DOT net>
NNTP-Posting-Host: lou-ts2-30.iglou.com
X-Original-NNTP-Posting-Host: lou-ts2-30.iglou.com
Message-ID: <389975b6@news.iglou.com>
Date: 3 Feb 2000 07:33:58 -0500
X-Trace: 3 Feb 2000 07:33:58 -0500, lou-ts2-30.iglou.com
X-Original-NNTP-Posting-Host: news-incoming.iglou.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <3898326e AT news DOT iglou DOT com>, fjds AT rnl DOT ist DOT utl DOT pt says...
> Hi all,
> 
> 	I'm trying to build parameter-defined functions in NASM 0.97 to be
> included in Djgpp 2.02. I want to have a general assembly wrapper function
> that can be used to install various hardware interrupt handlers (keyboard,
> timer, etc...). But since a wrapper must be associated with one handler
> only, I want to write a "general" code and then NASM can spawn it
> according to a number code. This is hard to explain in words, so please
> take a look at this short example.  
> 
Use NASM's macro facilities:

%macro INTWRAP 1
        ALIGN 4
_Int_Wrap%{1}:

 ...(use .labels for local labels)

%endmacro

INTWRAP 0
INTWRAP 1
INTWRAP 2
INTWRAP 3
INTWRAP 4
INTWRAP 5
INTWRAP 6
INTWRAP 7

I've got a complete wrapper set (including install/deinstall) written.   
If you want to take a look at it, e-mail me.

-- 
Peter Johnson             locke AT mcs DOT net
:Windows: Where do you want to go today?
:Linux:   Where do you want to go tomorrow?
:FreeBSD: Are you guys coming or what?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019