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


Groups > alt.folklore.computers > #235597

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

From John Levine <johnl@taugh.com>
Newsgroups alt.folklore.computers, alt.sys.pdp8
Subject Re: position-independent code (was Re: CMS, Self-hosting and the 6502)
Date 2026-09-13 01:54 +0000
Organization Taughannock Networks
Message-ID <1184vo0$pfs$1@gal.iecc.com> (permalink)
References <10qehuo$2nu4m$1@dont-email.me> <10r0g2r$25l0l$1@dont-email.me> <875x64ugxl.fsf@localhost> <87ld98c634.fsf_-_@debian>

Cross-posted to 2 groups.

Show all headers | View raw


According to Kragen Javier Sitaker  <kragen@canonical.org>:
>I’ve never programmed the PDP-8, but, as I understand it, its 7-bit
>address field in the 12-bit instruction format effectively divides the
>4096-word address space into 128-word “pages”.  An 8th bit specifies
>which page the address field is interpreted relative to: either a
>6502-like zero page, or the current page.  So, in effect, you have two
>5-bit “base registers”: one hardwired to 00000, and the other one that’s
>the high 5 bits of the program counter.  (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.

>To reference words in other pages (again, as I understand it), you would
>store their absolute 12-bit address in a word in either the zero page or
>your current page, and set the indirection bit in your instructions to
>use that address as a pointer.  But often you would receive that pointer
>at run time, for example as a return address or an argument.

Yup.

>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.

-- 
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

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