OSI 300 ReplicaProgramming the kit requires OSI-300 manual, which is available here. However, I highly recommend the Rodnay Zacks book, Programming the 6502, as a reference. Powering the kit
Run to left RST to left Load to the right NMI to left ROM to left Now toggling an address will show the data at that address. To enter a program:Configure switches as stated above.Set the address and data switches to the desire values. Push the load switch to the left, then back to right Repeat this for each byte of the program. (listed below) To enter the Reset Vector:The processor loads the program's start address from an address called the Reset Vector. On the 6502, the reset vector is stored in bytes 0xFFFC and 0xFFFD. However, since we only have 12 address lines (switches), the start vector will be at the 0xFFC and 0xFFD.In the following two example, we need to set these bytes to 0, since that's where we're putting our program in memory. Load the following data to set the Reset Vector.
Running a programOnce the reset vector and program have been toggled in...push Reset right (to load the reset vector) push Run right (lights go nuts as the data lights show the op-code being run) push Reset switch back to left Halting the programpush Reset rightpush Run left Now you can look in memory to see if you have the results you expected. A simple programHere's a program that sticks the number 5 into hex address 0x0008LDX 5 (load immediate register x with 5) STX $0008 (write x to memory location 8) JMP $0000 (loop infinitely) That program written as binary
After running this program, there should be 5 in address 8 (as shown below) Another short programLDX #5 (load register x with the number 5)INX (increment x) INX (increment x) STX $0x000A (store x to memory location 0x000A) JMP $0007 (jump to self - the 6502 doesn't have a HALT or SYNC instruction) That program written as binary
If the program worked properly, there should be a decimal 7 (0000 0111) in address 10 (0000 0000 1010). You should now see this... (OK, I didn't get this far...the 9v battery died) |