From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: References: <11c3f7123799c7bb2fb4637fc62a10f8@coraid.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1--587690242 Message-Id: From: Pietro Gagliardi Subject: Re: [9fans] Non-stack-based calling conventions Date: Sat, 16 Feb 2008 18:41:32 -0500 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 5778f626-ead3-11e9-9d60-3106f5b1d025 --Apple-Mail-1--587690242 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Feb 16, 2008, at 6:32 PM, Eris Discordia wrote: > Using the stack there would create re-entry problems Under very specific conditions you can do PUSH Param1 PUSH Param2 PUSH Param3 INT 80h What are those conditions? - Pascal calling convention - You save the registers before PUSHing the first argument For now, my OS does this as a temporary method of avoiding the necessity of managing different numbers of registers. This will change in due time! --Apple-Mail-1--587690242 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Feb 16, 2008, at = 6:32 PM, Eris Discordia wrote:

Using the stack there would = create re-entry problems=A0

=

Under very specific conditions you can = do

PUSH = Param1
PUSH = Param2
PUSH = Param3
INT = 80h

What = are those conditions?

- Pascal = calling convention
- You = save the registers before PUSHing the first argument

For now, my OS does this = as a temporary method of avoiding the necessity of managing different = numbers of registers. This will change in due time!

= --Apple-Mail-1--587690242--