🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3833

Re: Accessing the hardware directly (Was: Pointers)

#3833
From: Tony Wen Hsun Lai
Date: Mon, 16 Nov 1992 03:09
20 lines
1847 bytes
In article <BxsCMz.Mu1@mentor.cc.purdue.edu> hrubin@mentor.cc.purdue.edu (Herman Rubin) writes:
>What is my notation other than calling the function by an indirect reference,
>and passing the argument similarly?  Now I can put the argument reference on
>the stack by first reading it into a register and then putting that register
>on the stack, but what is gained by that?  And if the machine does not have
>a reasonable way to call a function by indirect reference, the only way that
>it could be done is by placing the address in the code for the function call
>at run time, and this, or any other, modification of code at run time is,
>I believe, considered quite objectionable.

Just out of curiosity, what do you think a procedure type is?

In a language like Modula-3, conceptually, a procedure declaration is a
declaration of a constant of the appropriate procedure type, and one can
pass procedures as parameters, store procedures in variables, invoke
procedures stored in variables, and the like.  A compiler will probably
implement all this with pointers, but you don't have to explicitly
dereference pointers yourself, just as you don't have to explicitly
dereference pointers when passing arguments by reference in Pascal or
FORTRAN.  Do you really like typing so many "&"'s and "*"'s in C?
Technical Details
Message-ID: <92Nov15.220846est.47880@neat.cs.toronto.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!neat.cs.toronto.edu!tlai
References: <mwm.2n3n@contessa.palo-alto.ca.us> <BxrK6x.A04@mentor.cc.purdue.edu> <92Nov15.195430est.47880@neat.cs.toronto.edu> <BxsCMz.Mu1@mentor.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!neat.cs.toronto.edu!tlai
Newsgroups: comp.lang.misc
From: tlai@cs.toronto.edu (Tony Wen Hsun Lai)
Subject: Re: Accessing the hardware directly (Was: Pointers)
Message-ID: <92Nov15.220846est.47880@neat.cs.toronto.edu>
Organization: Department of Computer Science, University of Toronto
References: <mwm.2n3n@contessa.palo-alto.ca.us> <BxrK6x.A04@mentor.cc.purdue.edu> <92Nov15.195430est.47880@neat.cs.toronto.edu> <BxsCMz.Mu1@mentor.cc.purdue.edu>
Date: 16 Nov 92 03:09:02 GMT
Lines: 20