delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/08/12:07:46

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199706081605.AA244605950@typhoon.rose.hp.com>
Subject: Re: Interrupts with nasm
To: goretec3 AT aol DOT com (Goretec3)
Date: Sun, 08 Jun 1997 9:05:50 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <19970606225200.SAA09027@ladder02.news.aol.com>; from "Goretec3" at Jun 6, 97 10:52 pm

> 
> I need to write an interrupt in assembly using nasm. How can I calculate
> the size of the code for that procedure?

Just put a label at the end of your procedure, and subtract the entry
point from it.  Similar to the way allegro works, by putting a dummy
function at the end and then subtracting from that.


myProc : 
    lots of code here
endMyProc: ret 

You can probably store it in a static variable if you want to just reference
it at run time

Andrew

- Raw text -


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