TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: SCOTT LURNDAL
from: MICHAEL J. MAHON
date: 2018-03-12 14:58:00
subject: Re: Compile Assembly and

Scott Lurndal  wrote:
> Michael J. Mahon  writes:
>> Scott Lurndal  wrote:
>>> Jack Fearnley  writes:
>>>> On Fri, 09 Mar 2018 18:29:25 +0000, Scott Lurndal wrote:
>>>>
>>>>> Dennis Lee Bieber  writes:
>>>>>> On Fri, 09 Mar 2018 17:16:19 +0100, David Brown
>>>>>> 
>>>>>> declaimed the following:
>>>>>
>>>>>> 
>>>>>>
>>>>>> There is always the convention used by Xerox Sigma Fortran-IV.
>>>>>> Non-recursive, non-stack...
>>>>>>
>>>>>> Arguments were passed by putting them immediately after the CALL
>>>>>> (branch and link opcode, and referenced by return address (saved in a
>>>>>> register; I think 15 was the standard) + index.
>>>>>
>>>>> This was very common in the 1970s.   The PDP-8 had similar parameter
>>>>> passing as did the Burroughs B2500 and descendents until the early 80's
>>>>> when a re-entrant call (Virtual Enter (VEN)) was added to the
>>>>> architecture.
>>>>>
>>>>> Unix system calls (UnixV6 on the PDP-11) embedded the system call
>>>>> arguments in the instruction stream following the system call
>>>>> instruction.
>>>>>
>>>>> The B2500 system call instruction (BCT) had the following general form:
>>>>>
>>>>> BCT NNNN           # NNNN selects the system call BUN +Skip
>>>>> # Branch Unconditional to after the parameters ACON label         #
>>>>> first parameter (address constant)
>>>>> DATA 2 UN 01       # second parameter, two digit numeric, value 01
>>>>> .Skip
>>>>>
>>>>> The operating system would bump the return address by the size of the
>>>>> branch instruction (8 or 10 digits) to get the parameters.
>>>>
>>>> Even further back. This was the standard method in the IBM1401 which I
>>>> was programming in 1960.
>>>
>>> The B2500 dates back to 1965, and it did have a 1401 compability mode :-)
>>>
>>
>> Not a compatibility mode, but a software emulator (which was little used by
>> 1967).
>
> Hm...
>
>  B2500/B3500:
>   "The central processors incorporated extremely fast read-only storage. This
storage
>    device is wired with interpretive routines which are executed with a 50
>    nanosecond cycle time. These routines are called microprograms. The great
>    advantage of microprograms is that various different routines may be wired
in,
>    allowing the emulation of other systems. This same technique was used by
IBM
>    in achieving compatibility between System/360 and the 1400/7000 series
>    computers. Burroughs used this emulation technique to emulate its own 200
>    and 300 systems as well as the IBM 1401 series machines. "
>
> http://bitsavers.trailing-edge.com/pdf/computersAndAutomation/196604.pdf
>
> B4700 used the software emulator.
>

Sorry, that reference is incorrect as it relates to emulation on the B2500
et. al. line. The microcode of the B2500/B3500 was fixed, and distributed
throughout much of the logic of the machines. There was never any
“alternate” microcode for these machines.

Not all references are trustworthy. The short article seems to be the usual
result of a marketing rep talking with a tech writer. And the Burroughs ad
describes plans for a system still months from shipment. Plans change.

And my apologies for wandering far afield...  ;-)

Calling conventions have come a long way from the original “Clear and Add
the address of this instruction, Branch to subroutine”. As the value of
general purpose register files have become clear, and optimizing compilers
more common, calling conventions have had to deal with caller/callee saves
registers, “leaf” subroutines, and more—often constrained by
characteristics of older conventions.

If it were not for the need to support separate compilation, we could let
compilers do whatever made sense when calling a subroutine! ;-)

--
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.