Posts

Showing posts from April, 2016

Micro-KIM Tutorial: The Monitor Program

Image
A simplified memory map of the Micro-KIM is shown below. This tutorial explores the 2K EPROM,  leaving a more detailed exploration of the free RAM and 6532 RIOT for later.  Address space $1400   to   $173f  is unused i n the standard Micro-KIM kit configuration.    +-----------+   | 2K EPROM   |$1fff   | monitor   |   | program   |$1800   +-----------+   | 6532 RIOT |$17ff   | I/O, timer|   | and RAM   |$1740   +-----------+   | optional  |$173f   | I/O, timer|   | and RAM   |$1400   +-----------+   |           |$13ff   |  5K RAM   |   |           | $0000   +-----------+ Addresses  $1800 through  $1fff  are taken by the 2K EPROM, which is a read-only memory area that stores the 6530-003 and 6530-002 parts of the...

Micro-KIM Tutorial: A First Assembly Program

Image
At the lowest level, the 6502 executes numerical machine code. For example, the following bytes in hexadecimal format constitute a simple program that displays a single 8 on the LED display of the Micro-KIM.   a9 ff 8d 40 17 a9 09 8d 42 17 4c 0a 02 Let's enter this program into the memory of the Micro-KIM. Power on the kit with jumper JP2 off and press the RS key. Then enter 0200 to set the address and press DA to go into data mode. Next, enter the numbers above pressing the + key after each number pair (so, enter A9 + FF + etc.). Before running, I strongly recommend checking the values. Use AD to go back into address mode. Press 0200 again and use + repeatedly to check all entered values. Once satisfied, press 0200 and GO. If all goes well, you will see a very bright 8 as first digit on the LED display (in later tutorials I will explain why). Displaying a single digit on the Micro-KIM Obviously constructing and entering programs this way is tedious and er...

Micro-KIM Tutorial: Getting Started

Image
Perhaps reminiscing the past is a sign of getting older, but I cannot help but look back fondly at the times I learned programming machine code on the Commodore 64 in the eighties. Therefore, it is probably no surprise I still occasionally enjoy programming 6502 on the Micro-KIM, which is a modern replica of the seventies KIM1 microcomputer, made available by the well-known retro computer kits provider  Briel Computers . In fact, I am having so much fun with this board, I decided to write a series of tutorials on operating and programming the Micro-KIM. In this series, I assume you have already some experience with the Micro-KIM and 6502 machine code, and have read the basic documentation that is shipped with the kit. Other than that, I hope to give additional information on various topics, such as developing assembly programs, programming the display, using the RS232 port or keypad, setting up timer-based interrupts, using a cross-assembler to generate programs in paper tap...

Micro-KIM weekend

Image
A rainy weekend was a perfect excuse to play with my micro-KIM, which had been collecting dust in a drawer for too long. I had fun using my own cross-assembler to develop and generate programs in paper tape format, and upload these to the micro-KIM via the PuTTY client. I figured out how to use the 6532 RIOT to set up a timer-based interrupt service, which is an important step in separating actual computation from display and keypad handling. The following clip shows the difference between incrementing a three-byte memory counter at roughly 1000 times per second (timer delayed) and 100,000 times per second (full speed with about 10 cycles per iteration at 1MHz). Perhaps a nice illustration of how fast even those early computers were.