Classic Computer Magazine Archive COMPUTE! ISSUE 43 / DECEMBER 1983 / PAGE 10

POKE Dangers

I'm concerned about the admonitions from the Commodore 64 Programmer's Reference Guide. On page 215: ".. .without an assembler you will have to POKE the machine language program into memory which is totally inadvisable." Even more ominous is the note on page 417: "Commodore Semiconductor Group cannot assume liability for the use of undefined opcodes."

What's the worst thing a wrong number could do? Erase magnetic files? System crash? Could an undefined opcode cause permanent hardware damage?

David Paulsen

Feel free to POKE around anywhere in your computer without worrying about causing trouble. The two warnings that you quote refer to two different things.

It would be "inadvisable" to POKE a machine language program into the computer without using an assembler because it would prove extraordinarily frustrating. Creating a machine language program by POKEing in the codes wouldn't disturb your computer, but it would take so long and would be so error prone that it might well drive you up the wall.

The other issue is rather technical. The 6502 chip, the little "brain" within Commodore and other computers, has a theoretical capacity to understand 256 different commands (opcodes) in machine language.

However, the designers only created 56 commands which, even when multiplied by their several addressing modes, still don't use up all 256 possible opcodes. However, some of these unassigned numbers will nevertheless have effects if you use them in your ML programming. For a complete description of these hidden commands, see "Extra Instructions," an article in the October 1983 issue of COMPUTE!.