We've got some tasks lined up for you. I've left an 8041 microprocessor on your desk. This thing is state of the art.
- Choose a task by typing its name into the left modem.
- Connect your 8041 to the modems by clicking on the ports
- Write a program to solve the task. Consult your x67 Assembly Programming Manual for this.
Assembly
Programming
Manual
Assembly
Programming
Manual
Contents
-
Concepts
- Values
- Instruction Set
Concepts
Features
The 8041 microprocessor features the following components:
- Two ports for input and output
- One register for holding intermediate values
- A display for editing code and observing its execution
Instruction Set
Basic
nop
This instruction does nothing.
mov <src> <dst>
Reads the value at <src> and writes it to <dst>.
Arithmetic
add <src> <dst>
Reads the value at <src> and adds it to the value at
<dst>. This both reads and writes <dst>,
so if <dst> is a port then this
instruction will require both a value to be written to the port and a value to then be read from the port.
The rest of the arithmetic instructions follow a similar pattern, using
<src> to update <dst>.
sub <src> <dst>
Subtracts <src> from <dst>.
simpel
SIMPEL CORPORATION, 3065 Bowers Avenue, Santa Clara, CA 95051 (617) 615-1613Tasks
cp
- Reward: 1¢
The materials research group just bought some new tapes and they need help copying over their data. You can read the old tape through the `req` port, and then just write it as is to the `res` port. Should be a nice easy task to help you calibrate your equipment.
add
- Reward: 10¢
The nuclear research group is running some simulations and they need help with compute. They'll write two numbers to `req` and they just need you to add them up and write the sum to `res`.
mul
- Reward: 1$
They need help with multiplication too. This one's a little harder because your 8041 doesn't have a built in instruction to multiply two numbers. You're gonna have to implement the arithmetic yourself. I hear rumours that Simpel is gonna have a `mul` instruction on their next chip...
cp
- Reward: 1¢
We need your help copying over some data. Just read the data from `req`, and then copy it as is into `res`. Should be a nice easy task to help you calibrate your equipment.
Microwave
Shed
Electronics Catalog – Fall 1972
The 8067 Microcomputer is going to blow. your. mind.
This bad boy is gonna knock your god damn socks off. Do you have any idea how many frickin transistors are in this thing? Yeah didn't think so. I'll tell you this much: it's a lot. And that's putting it nicely.
You know the 8041? Remember how you have to mash the step button to make it run? Didn't that suck? Well guess what. The 8067? Has a clock. 0.25 motherflipping hertz. You just leave the room and grab yourself a Coke, and by the time you get back your algorithm will be done*.
| Features | 8041 | 8067 | 8069 |
| Clock | n/a | 0.25 Hz | 1 Hz |
| Registers | 1 | 1 | 2 |
| Ports | 2 | 2 | 2 |
| Program memory | 8 lines | 8 lines | 10 lines |
8069
Features:- 1 Hz clock
- Two ports
- Ten lines of program memory
- Two registers
Appendix A
Consider the number ...999, an infinite string of 9's repeating to the left. Obviously, there is no point
considering useless rubish like this. It represents the sum
9 + 90 + 900 + ..., which is infinity, and you can't do
anything interesting with infinity. Right?
Wrong. While strings of digits are meaningful because of the numbers they represent, in practice we just work with the strings directly. You could add 123 to 234 by counting out 123 marbles and 234 marbles and putting them together, but in practice you would just add together the corresponding digits and carry a one to the left as needed. If you tried to add 1 to ...999 using marbles, it would take weeks for the shipment to arrive with all the marbles you would need, and even then you still wouldn't have enough marbles. In fact, there is no amount of marbles you could have that would ever be enough.
But if we just treat ...999 as a string of digits, then we find
something surprising. 1+9 is 10, so we get a 0 in the one's place and
carry the 1. 1+9 is 10 again, so we get get another 0 in the tens place
and carry the one again. This continues forever, so we get a 0 in every
place. So ...999 + 1 is ...000, which is just 0. So in this sense,
...999 = -1!