home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,209 of 131,241   
   MitchAlsup to All   
   Re: branch splitting   
   08 Nov 25 18:13:59   
   
   From: user5857@newsgrouper.org.invalid   
      
   EricP  posted:   
      
   > Anton Ertl wrote:   
   > > Stephen Fuld  writes:   
   > >> No, and I defer to you, or others here, on how these features are   
   > >> implemented, specifically whether code modification is required.  I was   
   > >> referring to features such as assigned goto in Fortran, and Alter goto   
   > >> in Cobol.   
   > >   
   > > On modern architectures higher-order functions are implemented with   
   > > indirect branches or indirect calls (depending on whether it's a   
   > > tail-call or not); likewise for method dispatch.   
   > >   
   > > I do not know how Lisp, FORTRAN, Algol 60 and other early languages   
   > > with higher-order functions were implemented on architectures that do   
   > > not have indirect branches; but if the assigned goto was implemented   
   > > with self-modifying code, the call to a function in a variable was   
   > > probably implemented like that, too.   
   >   
   > What architecture cannot do an indirect branch, which I assume   
   > means a branch/jump to a variable location in a register?   
      
   PDP-8, 4004, IBM 650, ... And any machine without "registers".   
      
   > And how would the operating system on such a machine get programs running?   
      
   Load them at a known location and branch to the known location.   
      
   > Even if an ISA did not have a JMP reg instruction one can create it   
   > using CALL to copy the IP to the stack where you modify it and   
   > RET to pop the new IP value.   
      
   Pure stack machines did a lot of this.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca