PDP11 auf dem Lilygo LoRa Pager
Posted by TomFlatterhand@reddit | vintagecomputing | View on Reddit | 10 comments
PDP-11/70 Pager – Quick Guide
This guide describes the current state of the PDP-11/70 Pager program.
Important: At the moment, the Pager is not a full PDP-11/70 emulator. It is a PDP-11-inspired 16-bit front-panel machine. You can enter memory words bit by bit using graphical toggle switches, inspect memory, write to memory, start and stop programs, and execute single instructions.
Display
At the top left, it says pdp11/70 PAGER.
The top area of the display also shows:
PROG: programming modeRUN: program is running- speed, for example
5Hz - in programming mode, the currently selected switch, for example
SW15 - in the menu, the selected function, for example
LOAD
At the top right are the status LEDs:
RUN: program is runningHLT: machine is stopped or in programming modeFET: instruction fetch; an instruction is being fetchedEXE: execute; an instruction is being executedEXM: memory was read with EXAMDEP: memory was written with DEPERR: error or illegal instruction
The ADDRESS LEDs show the current address or bus address.
The DATA LEDs show the last value that was read, written, or output. They are not automatically identical to the switch settings.
At the bottom there are 16 graphical toggle switches. Together they form the 16-bit switch register switchValue.
Control With the Scroll Wheel
The whole system can be operated with the scroll wheel.
PROG Mode
In PROG mode, switches are set and front-panel functions are executed.
- Turn scroll wheel: move the selected switch
- Short press: toggle the selected switch
- Long press: open the function menu
The white frame only shows which switch is selected. It does not change the switch value.
Menu
In the menu, you select a front-panel function.
- Turn scroll wheel: select function
- Short press: execute function
- Long press: leave the menu
Functions:
LOAD: load the current switch setting as the addressEXAM: examine memory at the current addressDEP: deposit the switch value into memorySTEP: execute exactly one instructionRUN: start the program at the current addressRESET: reload the demo program
RUN Mode
In RUN mode, the program is running.
- Turn scroll wheel: change speed
- Short press: halt and return to
PROG - Long press: also halt
Available speeds:
1Hz 2Hz 5Hz 10Hz 25Hz 50Hz 100Hz MAX
At slower speeds, the FET and EXE LEDs are easier to see.
Optional Keyboard Shortcuts
If the keyboard is active, these shortcuts are also available:
L: LOADE: EXAMD: DEPS: STEPR: RUNH: HALTC: RESET
The keyboard is optional. Everything important can also be done using only the scroll wheel.
Memory and Addresses
The Pager currently uses 256 memory words.
Each word has 16 bits.
The visible address counts in bytes, like on a PDP-11. That is why EXAM and DEP always increase the address by 2:
0000
0002
0004
0006
...
Internally, this is converted to a word index.
Front-Panel Functions in Detail
LOAD
LOAD takes the 16 switches and uses them as the new current address.
Example:
Switches = 0000000000010000
LOAD
Address = 0010
EXAM
EXAM reads memory at the current address.
After that:
- DATA shows the word that was read
- EXM flashes briefly
- the address is increased by 2
This allows you to inspect memory word by word.
DEP
DEP writes the current switch value into memory.
After that:
- DATA shows the word that was written
- DEP flashes briefly
- the address is increased by 2
This allows you to enter programs word by word.
STEP
STEP executes exactly one machine instruction and then stops again.
This is useful for checking a program slowly.
RUN
RUN starts the program at the current address.
The RUN LED stays on while the program is running.
RESET
RESET reloads the built-in demo program and puts the machine back into programming mode.
Current Instruction Set
The current mini instruction set is intentionally small:
0000 HALT
1aaa LOAD R0, [aaa]
2aaa STORE R0, [aaa]
3aaa ADD R0, [aaa]
4aaa SUB R0, [aaa]
5aaa JMP aaa
6aaa JZ aaa
7nnn LDI R0, nnn
8000 INC R0
9000 DEC R0
Aaaa OUT [aaa]
aaa is an address.
nnn is an immediate value.
At the moment, there is only one register: R0.
Example: Entering and Examining One Word
Goal: write the value 0005 to address 0020 and then read it back.
- In
PROG, set the switches to0020. - Long press to open the menu.
- Select
LOADand short press. - Set the switches to
0005. - Open the menu.
- Select
DEPand short press. - Set the switches back to
0020. - Open the menu.
- Select
LOAD. - Open the menu again.
- Select
EXAM.
DATA now shows the value 0005.
Example: Entering a Small Program
This program loads 5, adds the memory value at address 0014, stores the result at 0018, outputs the value, and halts.
Address Word Meaning
0000 7005 LDI R0, 0005
0002 3014 ADD R0, [0014]
0004 2018 STORE R0, [0018]
0006 A018 OUT [0018]
0008 0000 HALT
0014 0007 Data value 7
0018 0000 Result
Input sequence:
- Set switches to
0000. - Execute
LOAD. - Set switches to
7005. - Execute
DEP. - Set switches to
3014. - Execute
DEP. - Set switches to
2018. - Execute
DEP. - Set switches to
A018. - Execute
DEP. - Set switches to
0000. - Execute
DEP. - Set switches to
0014. - Execute
LOAD. - Set switches to
0007. - Execute
DEP. - Set switches to
0000. - Execute
LOAD. - Execute
RUN.
At the end, address 0018 contains the value 000C, which is decimal 12.
To check the result:
- Set switches to
0018. - Execute
LOAD. - Execute
EXAM.
DATA then shows the result.
Built-In Demo Program
When powered on, a demo program is loaded and started automatically.
It first calculates 5 + 7, writes the result to memory, and then visibly continues counting. This makes it easy to see that FETCH, EXEC, ADDRESS, and DATA are working.
A short press in RUN mode stops the demo program and returns to PROG mode.
RESET reloads the demo program.
What Is Not Complete Yet
The Pager is currently not a real PDP-11/70.
Not yet implemented:
- full PDP-11 instruction set
- real set of eight PDP-11 registers
- PSW with complete flag logic
- interrupts
- real PDP-11 peripherals
- persistent storage for user programs
- complete separate 16-bit DATA LED row
Even so, it can already be used like a small historical front-panel computer: set bits, store words, inspect memory, start and stop programs, and execute instructions step by step.PDP-11/70 Pager – Quick Guide
This guide describes the current state of the PDP-11/70 Pager program.
Important: At the moment, the Pager is not a full PDP-11/70 emulator. It is a PDP-11-inspired 16-bit front-panel machine. You can enter memory words bit by bit using graphical toggle switches, inspect memory, write to memory, start and stop programs, and execute single instructions.
Display
At the top left, it says pdp11/70 PAGER.
The top area of the display also shows:
PROG: programming mode
RUN: program is running
speed, for example 5Hz
in programming mode, the currently selected switch, for example SW15
in the menu, the selected function, for example LOAD
At the top right are the status LEDs:
RUN: program is running
HLT: machine is stopped or in programming mode
FET: instruction fetch; an instruction is being fetched
EXE: execute; an instruction is being executed
EXM: memory was read with EXAM
DEP: memory was written with DEP
ERR: error or illegal instruction
The ADDRESS LEDs show the current address or bus address.
The DATA LEDs show the last value that was read, written, or output. They are not automatically identical to the switch settings.
At the bottom there are 16 graphical toggle switches. Together they form the 16-bit switch register switchValue.
Control With the Scroll Wheel
The whole system can be operated with the scroll wheel.
PROG Mode
In PROG mode, switches are set and front-panel functions are executed.
Turn scroll wheel: move the selected switch
Short press: toggle the selected switch
Long press: open the function menu
The white frame only shows which switch is selected. It does not change the switch value.
Menu
In the menu, you select a front-panel function.
Turn scroll wheel: select function
Short press: execute function
Long press: leave the menu
Functions:
LOAD: load the current switch setting as the address
EXAM: examine memory at the current address
DEP: deposit the switch value into memory
STEP: execute exactly one instruction
RUN: start the program at the current address
RESET: reload the demo program
RUN Mode
In RUN mode, the program is running.
Turn scroll wheel: change speed
Short press: halt and return to PROG
Long press: also halt
Available speeds:
1Hz 2Hz 5Hz 10Hz 25Hz 50Hz 100Hz MAX
At slower speeds, the FET and EXE LEDs are easier to see.
Optional Keyboard Shortcuts
If the keyboard is active, these shortcuts are also available:
L: LOAD
E: EXAM
D: DEP
S: STEP
R: RUN
H: HALT
C: RESET
The keyboard is optional. Everything important can also be done using only the scroll wheel.
Memory and Addresses
The Pager currently uses 256 memory words.
Each word has 16 bits.
The visible address counts in bytes, like on a PDP-11. That is why EXAM and DEP always increase the address by 2:
0000
0002
0004
0006
...
Internally, this is converted to a word index.
Front-Panel Functions in Detail
LOAD
LOAD takes the 16 switches and uses them as the new current address.
Example:
Switches = 0000000000010000
LOAD
Address = 0010
EXAM
EXAM reads memory at the current address.
After that:
DATA shows the word that was read
EXM flashes briefly
the address is increased by 2
This allows you to inspect memory word by word.
DEP
DEP writes the current switch value into memory.
After that:
DATA shows the word that was written
DEP flashes briefly
the address is increased by 2
This allows you to enter programs word by word.
STEP
STEP executes exactly one machine instruction and then stops again.
This is useful for checking a program slowly.
RUN
RUN starts the program at the current address.
The RUN LED stays on while the program is running.
RESET
RESET reloads the built-in demo program and puts the machine back into programming mode.
Current Instruction Set
The current mini instruction set is intentionally small:
0000 HALT
1aaa LOAD R0, [aaa]
2aaa STORE R0, [aaa]
3aaa ADD R0, [aaa]
4aaa SUB R0, [aaa]
5aaa JMP aaa
6aaa JZ aaa
7nnn LDI R0, nnn
8000 INC R0
9000 DEC R0
Aaaa OUT [aaa]
aaa is an address.
nnn is an immediate value.
At the moment, there is only one register: R0.
Example: Entering and Examining One Word
Goal: write the value 0005 to address 0020 and then read it back.
In PROG, set the switches to 0020.
Long press to open the menu.
Select LOAD and short press.
Set the switches to 0005.
Open the menu.
Select DEP and short press.
Set the switches back to 0020.
Open the menu.
Select LOAD.
Open the menu again.
Select EXAM.
DATA now shows the value 0005.
Example: Entering a Small Program
This program loads 5, adds the memory value at address 0014, stores the result at 0018, outputs the value, and halts.
Address Word Meaning
0000 7005 LDI R0, 0005
0002 3014 ADD R0, [0014]
0004 2018 STORE R0, [0018]
0006 A018 OUT [0018]
0008 0000 HALT
0014 0007 Data value 7
0018 0000 Result
Input sequence:
Set switches to 0000.
Execute LOAD.
Set switches to 7005.
Execute DEP.
Set switches to 3014.
Execute DEP.
Set switches to 2018.
Execute DEP.
Set switches to A018.
Execute DEP.
Set switches to 0000.
Execute DEP.
Set switches to 0014.
Execute LOAD.
Set switches to 0007.
Execute DEP.
Set switches to 0000.
Execute LOAD.
Execute RUN.
At the end, address 0018 contains the value 000C, which is decimal 12.
To check the result:
Set switches to 0018.
Execute LOAD.
Execute EXAM.
DATA then shows the result.
Built-In Demo Program
When powered on, a demo program is loaded and started automatically.
It first calculates 5 + 7, writes the result to memory, and then visibly continues counting. This makes it easy to see that FETCH, EXEC, ADDRESS, and DATA are working.
A short press in RUN mode stops the demo program and returns to PROG mode.
RESET reloads the demo program.
What Is Not Complete Yet
The Pager is currently not a real PDP-11/70.
Not yet implemented:
full PDP-11 instruction set
real set of eight PDP-11 registers
PSW with complete flag logic
interrupts
real PDP-11 peripherals
persistent storage for user programs
complete separate 16-bit DATA LED row
Even so, it can already be used like a small historical front-panel computer: set bits, store words, inspect memory, start and stop programs, and execute instructions step by step.
Blah-Blah-Blah-2023@reddit
This rocks. I salute you! Is the hardware beefy enought to run SIMH?
TomFlatterhand@reddit (OP)
Unter Umständen. Aber das macht eigentlich keinen Sinn. Meine PDP11 Simulation und meine Z-Machine für Zork sind eine Hommage für diese alten Dinge, die PDP11 soll Freude beim Betrachten machen und alte Gefühle auslösen und Zork auf dem Lilygo Pager spielen ist einfach cool. 😄
TomFlatterhand@reddit (OP)
Ich hab leider keine PDP11. Aber ich liebe alte Computer. Sie können sehr gut aufzeigen was einen Computer wirklich ausmacht!
chuckop@reddit
Love it. But would really like a RCA1802 version instead of PDP11
TomFlatterhand@reddit (OP)
Bist Du Joyce Weisbecker?
chuckop@reddit
No, but I did meet her in April at VCF East.
TomFlatterhand@reddit (OP)
Wahnsinn! Konntest Du ein gutes Gespräch mir Ihr führen? Über die damalige Zeit und so?
chuckop@reddit
Yes. She gave a couple of talks.
TomFlatterhand@reddit (OP)
Ich finde es immer interessant mit Menschen aus dieser Zeit zu sprechen. Ich hätte gerne einmal Konrad Zuse getroffen.
Laser_Krypton7000@reddit
Cool work!
A just for fun project, or do you also have a real pdp?