Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.folklore.computers > #235610

Re: position-independent code (was Re: CMS, Self-hosting and the 6502)

From Kragen Javier Sitaker <kragen@canonical.org>
Newsgroups alt.folklore.computers, alt.sys.pdp8
Subject Re: position-independent code (was Re: CMS, Self-hosting and the 6502)
Date 2026-09-13 14:53 -0300
Organization Primarily biological and memetic
Message-ID <87y0d5ox6r.fsf@debian> (permalink)
References <10qehuo$2nu4m$1@dont-email.me> <10r0g2r$25l0l$1@dont-email.me> <875x64ugxl.fsf@localhost> <87ld98c634.fsf_-_@debian> <1184vo0$pfs$1@gal.iecc.com>

Cross-posted to 2 groups.

Show all headers | View raw


John Levine <johnl@taugh.com> writes:
> According to Kragen Javier Sitaker  <kragen@canonical.org>:
>>[...]  (Later PDP-8s extended the address bus to the left and needed
>>additional registers to select which 12-bit memory space you were
>>running in.)
>
> Actually, the original PDP-8 had the extended addressing as an option,
> adding a pair of three-bit bank registers.

I appreciate the correction.  So it wasn’t so much “later PDP-8s” as it
was “higher-end PDP-8s”?

>>It occurred to me that a subroutine or set of related subroutines that
>>fit into a single 128-word page could be “position-independent” merely
>>by containing no absolute 12-bit addresses when loaded. ...
>
> That's true, but I never heard of anyone doing that.  PDP-8 software was
> pretty simple and something that swapped 128 word chunks of code could
> have worked but would be way more complicated than anything I saw.  TSS/8
> swapped full 4K memory banks.

Yes, I think it would be hard to justify such a thing when you had 4096
instructions for your whole program.  I think there’s probably some
middle ground of CPU sizes, maybe something roughly Nova-sized, where
such a semi-position-independent scheme would have been a good tradeoff,
where you had room for tens or hundreds of thousands of instructions
rather than single-digit thousands like the -8.  That would have allowed
you to avoid *both* a slow load-time relocation pass *and* the adder
necessary to offset all memory accesses by a base register, like most
PDP-11s ended up having.

And, once you have room for millions of instructions, you can probably
afford the adder.

The 8086 did achieve such a sort of semi-position-independence with its
4-bit-shifted “segment” registers, which weren’t really segments in the
usual sense, like the PDP-11 had, but it had to pay for a 16-bit wide
add on every memory access to get it.  The result was that a 64-kibibyte
segment could be located anywhere in RAM, down to 16-byte granularity,
and MS-DOS took advantage of this in practice.  I suspect that a larger
shift, like 8 bits, would have been more advantageous by the mid-80s,
but you don’t avoid the adder unless you’re swapping full 64-kibibyte
memory banks, TSS/8-style.

kragen

Back to alt.folklore.computers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Self-hosting and the 6502 Lev <thresh3@fastmail.com> - 2026-03-30 19:12 +0000
  Re: Self-hosting and the 6502 David Wade <g4ugm@dave.invalid> - 2026-03-30 21:01 +0100
    Re: Self-hosting and the 6502 Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-03-30 21:02 +0000
    Re: Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-31 00:44 +0000
      Re: Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-03-31 19:46 +0000
        Re: TSS, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-31 20:48 +0000
          Re: TSS, Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-04-01 23:23 +0000
            Re: TSS, Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-02 10:53 +0000
              Re: TSS, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-02 07:29 -0700
                Re: TSS, Self-hosting and the 6502 Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-04-02 16:58 +0000
                Re: TSS, Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-02 20:34 +0000
                Re: TSS, Self-hosting and the 6502 Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-04-02 20:53 +0000
        Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-31 21:01 +0000
        Re: Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-03 16:53 -1000
          Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-04 03:57 +0000
            Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-04 07:37 -0700
              Re: Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-04 21:55 +0000
                Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-04 15:48 -0700
                Re: ancient time sharingSelf-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-05 02:27 +0000
              Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-04 22:03 +0000
                Re: Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-04 12:31 -1000
            Re: Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-04 07:40 -1000
            Re: Self-hosting and the 6502 Lars Poulsen <lars@beagle-ears.com> - 2026-04-04 13:44 -0700
              Re: Self-hosting and the 6502 (VSCP) ted@loft.tnolan.com (Ted Nolan <tednolan>) - 2026-04-05 20:23 +0000
        Re: Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-04 12:53 -1000
          Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-04 23:44 +0000
            Re: Self-hosting and the 6502 David Wade <g4ugm@dave.invalid> - 2026-04-05 09:29 +0100
              Re: CMS, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-05 19:22 +0000
                Re: CMS, Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-05 14:30 -1000
                Re: CMS, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-05 20:02 -0700
                history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-11 09:05 -0300
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Jeroen Belleman <jeroen@nospam.please> - 2026-09-11 16:49 +0200
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Andy Burns <usenet@andyburns.uk> - 2026-09-11 15:58 +0100
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-11 13:38 -0300
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Jeroen Belleman <jeroen@nospam.please> - 2026-09-11 19:41 +0200
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Andy Burns <usenet@andyburns.uk> - 2026-09-11 19:18 +0100
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Jeroen Belleman <jeroen@nospam.please> - 2026-09-11 21:27 +0200
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) scott@slp53.sl.home (Scott Lurndal) - 2026-09-11 21:13 +0000
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-12 14:47 -1000
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lars Poulsen <lars@beagle-ears.com> - 2026-09-13 15:02 -0700
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-13 16:27 -0700
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-14 15:11 -1000
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-15 04:19 +0000
                Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Lars Poulsen <lars@beagle-ears.com> - 2026-09-13 14:56 -0700
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-15 04:10 +0000
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Lars Poulsen <lars@beagle-ears.com> - 2026-09-15 05:46 -0700
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Peter Flass <Peter@Iron-Spring.com> - 2026-09-15 07:51 -0700
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-15 23:22 +0000
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-15 23:13 +0000
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) Jeroen Belleman <jeroen@nospam.please> - 2026-09-15 16:48 +0200
                Re: Computes at CERN (Re: history of ASCII and IBM ratfucking, and the VAX ) John Ames <commodorejohn@gmail.com> - 2026-09-15 08:19 -0700
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-12 14:13 -1000
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-12 14:12 -1000
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-13 14:02 -0300
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Andy Burns <usenet@andyburns.uk> - 2026-09-13 18:55 +0100
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Andy Burns <usenet@andyburns.uk> - 2026-09-13 19:03 +0100
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Andy Burns <usenet@andyburns.uk> - 2026-09-13 19:07 +0100
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-13 16:21 -0700
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Nuno Silva <nunojsilva@invalid.invalid> - 2026-09-14 00:37 +0100
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-13 20:56 -0700
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-09-14 04:12 +0000
                Re: history of ASCII and IBM ratfucking, and the VAX (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-14 15:06 -1000
                Re: CMS, Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-04-06 01:42 +0000
                Re: CMS, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-05 20:05 -0700
                Re: CMS, Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-06 07:03 +0000
                Re: CMS, Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-05 22:19 -1000
                Re: CMS, Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-06 08:20 +0000
                Re: CMS, Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-06 12:03 +0000
                Re: CMS, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-06 07:30 -0700
                Re: CMS, Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-06 07:39 -1000
                Re: CMS, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-06 12:05 -0700
                Re: CMS, Self-hosting and the 6502 Lynn Wheeler <lynn@garlic.com> - 2026-04-06 17:41 -1000
                position-independent code (was Re: CMS, Self-hosting and the 6502) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-11 09:42 -0300
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-12 15:12 -1000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) John Levine <johnl@taugh.com> - 2026-09-13 01:57 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-12 21:14 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) legalize+jeeves@mail.xmission.com (Richard) - 2026-09-17 17:06 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) scott@slp53.sl.home (Scott Lurndal) - 2026-09-17 17:56 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) legalize+jeeves@mail.xmission.com (Richard) - 2026-09-18 14:08 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Nuno Silva <nunojsilva@invalid.invalid> - 2026-09-18 19:29 +0100
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) John Ames <commodorejohn@gmail.com> - 2026-09-18 12:00 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-09-18 20:35 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Andy Valencia <vandys@vsta.org> - 2026-09-17 11:32 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) James Dow Allen <user4353@newsgrouper.org.invalid> - 2026-09-13 07:31 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-13 07:45 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) John Levine <johnl@taugh.com> - 2026-09-13 16:50 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-13 16:18 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-15 04:21 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) scott@slp53.sl.home (Scott Lurndal) - 2026-09-15 14:33 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-15 07:37 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-15 23:35 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Lynn Wheeler <lynn@garlic.com> - 2026-09-14 14:41 -1000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) John Levine <johnl@taugh.com> - 2026-09-13 01:54 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-13 14:53 -0300
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) John Levine <johnl@taugh.com> - 2026-09-13 22:18 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Peter Flass <Peter@Iron-Spring.com> - 2026-09-13 16:24 -0700
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-14 01:51 +0000
                Re: position-independent code (was Re: CMS, Self-hosting and the 6502) scott@slp53.sl.home (Scott Lurndal) - 2026-09-14 14:53 +0000
                Re: CMS, Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-04-06 19:21 +0000
                Re: CMS, Self-hosting and the 6502 David Wade <g4ugm@dave.invalid> - 2026-04-06 21:25 +0100
    Re: Self-hosting and the 6502 antispam@fricas.org (Waldek Hebisch) - 2026-03-31 02:32 +0000
      Re: Self-hosting and the 6502 Bill Findlay <findlaybill@blueyonder.co.uk> - 2026-03-31 04:06 +0100
      Re: Self-hosting and the 6502 David Wade <g4ugm@dave.invalid> - 2026-03-31 08:52 +0100
        Re: Self-hosting and the 6502 Bill Findlay <findlaybill@blueyonder.co.uk> - 2026-03-31 18:07 +0100
  Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-30 13:51 -0700
    Re: TSS arcana, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-31 00:58 +0000
      Re: TSS arcana, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-31 07:35 -0700
        Re: TSS arcana, Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-03-31 14:54 +0000
          Re: TSS arcana, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-31 13:01 -0700
      Re: TSS arcana, Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 22:14 +0000
        Re: TSS arcana, Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-03-31 22:32 +0000
        Re: linkers, TSS arcana, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-01 02:06 +0000
          Re: linkers, TSS arcana, Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-04-01 09:53 +0000
            Re: linkers, TSS arcana, Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-01 16:07 +0000
              Re: linkers, TSS arcana, Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-04-01 16:27 +0000
            Re: linkers, TSS arcana, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-01 16:10 +0000
            Re: linkers, TSS arcana, Self-hosting and the 6502 Andy Walker <anw@cuboid.co.uk> - 2026-04-01 17:15 +0100
              Re: linkers, TSS arcana, Self-hosting and the 6502 Bob Eager <news0009@eager.cx> - 2026-04-01 16:28 +0000
                Re: linkers, TSS arcana, Self-hosting and the 6502 scott@slp53.sl.home (Scott Lurndal) - 2026-04-01 16:48 +0000
                Re: linkers, TSS arcana, Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-04-01 17:44 +0000
                Re: linkers, TSS arcana, Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-04-01 14:21 -0700
              Re: linkers, TSS arcana, Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-01 20:40 +0000
                Re: linkers, TSS arcana, Self-hosting and the 6502 scott@slp53.sl.home (Scott Lurndal) - 2026-04-01 22:02 +0000
              Re: linkers, TSS arcana, Self-hosting and the 6502 Andy Walker <anw@cuboid.co.uk> - 2026-04-02 15:28 +0100
                Re: linkers, TSS arcana, Self-hosting and the 6502 scott@slp53.sl.home (Scott Lurndal) - 2026-04-02 15:36 +0000
                Re: linkers, TSS arcana, Self-hosting and the 6502 Andy Walker <anw@cuboid.co.uk> - 2026-04-02 17:15 +0100
                Re: linkers, TSS arcana, Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-02 16:44 +0000
  Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-30 21:30 +0000
    Re: Self-hosting and the 6502 David Wade <g4ugm@dave.invalid> - 2026-03-30 23:28 +0100
      Re: Self-hosting and the 6502 Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-30 23:36 +0000
        Re: Self-hosting and the 6502 John Ames <commodorejohn@gmail.com> - 2026-03-31 07:46 -0700
          Re: Self-hosting and the 6502 snipeco.2@gmail.com (Sn!pe) - 2026-03-31 15:54 +0100
          Re: Self-hosting and the 6502 Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-03-31 19:03 +0000
      Re: VM history, was Self-hosting and the 6502 John Levine <johnl@taugh.com> - 2026-03-31 01:04 +0000
        Re: VM history, was Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 22:17 +0000
    Re: Self-hosting and the 6502 Peter Flass <Peter@Iron-Spring.com> - 2026-03-30 15:36 -0700
      Re: Self-hosting and the 6502 cross@spitfire.i.gajendra.net (Dan Cross) - 2026-03-31 22:19 +0000

csiph-web