[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Dec 5 20:57:07 1992 
Subject:Does PRINTF *really* call SYS_SYSPR? 
From:Luc Beaudoin 
Volume-ID:921205.06 

Aaron Sloman answered my question:

> I.e. system procedures, like printf, that call pr will have their
> behaviour changed if you alter pr, because when they were compiled
> the calls to pr were made to go via the variable. However calls to
> sys_syspr go *direct* to the procedure because the identifier is not
> a variable but a constant. (compare REF sysCALL, sysCALLQ)

> However calls to
>  sys_syspr go *direct* to the procedure because the identifier is not
>  a variable but a constant. (compare REF sysCALL, sysCALLQ)
>
>  Thus even if you redefine sys_syspr that won't affect the behaviour
>  of previously compiled procedures.
>
>  In fact, if it did you would almost certainly end up with callstack
>  overflow, because in the end everything calls sys_syspr to do its
>  printing.


This accounts for the behaviour I have observed.
-- 
-------------------------------------- -----------------------------------
Luc Beaudoin                          |  School of Computer Science
E-mail: lpb@cs.bham.ac.uk             |  University of Birmingham
voice:  +44 (21) 414-4766 or 3743     |  Birmingham B15 2TT, UK