The Pep/7 Computer Simulation (also known as Pep7) is a virtual machine that is used by professors of schools and colleges to explain and simplify the lowest level of computing (machine language). True to its name, Pep/7 has seven registers and four status bits.
The Pep/7 is a direct descendant of the Pep/6 virtual machine, the only major difference is that it has been expanded from 4KiB to 32KiB of system RAM. The machine code format remains the same.
The Pep/7 uses a 16-bit address bus, capable of addressing 65,536 bytes
The CPU has two 16-bit general purpose registers, A and X, a base pointer register B, a stack pointer SP, and an instruction pointer PC. There is also a hidden register IR that is 8-bits wide and holds the currently executing opcode. It is not normally accessible by the programmer.
The Pep/7's instruction set is simplistic, with only 32 possible opcodes. The instruction specifier consists of the opcode of 5 bits, a register selector (A or X) of 1 bit, and a memory access mode of 2 bits, with the opcode occupying the top 5 bits of a byte, the register selector in bit 2 and the address mode in bits 1 and 0.
|Mnemonic||Opcode||Flags Affected||Addressing modes available|
Instruction Set Details
Four addressing modes are available. These are:
- i, immediate mode, where the operand is stored directly following the opcode in memory.
- d, direct mode, where the immediate operand is a pointer to data in memory.
- s, stack relative mode, where the immediate operand is added to the SP register to generate a memory address.
- x, indexed mode, where the B register is added to the X register to obtain a memory address.
These memory modes are specified by bits 0 and 1 of the opcode: 00=i, 01=d, 10=s, and 11=x.
|This software article is a stub. You can help EverybodyWiki by expanding it.|
This article "Pep/7" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Pep/7. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.