Hi all,
Kind of a newbie question, but here goes...
I'm going through a programming tutorial in BASIC for the C64 and came across an item that I could not quite figure out.
The tutorial was speaking of Poking/Peeking at memory and some do's and don'ts when doing this.
Two examples of POKES not to do were:
- POKE 56325, 12
- POKE 788,5
Here is what I think I found in the C64 Reference Manual:
- POKE 56325, 12 ---> "TimerA High Byte"
- POKE 788, 5 ---> "Vectors: Hardware IRQ"
My question: Why? If you do this, what will happen? Will the OS just lock up? If that is true, then my guess would be that there are LOTS of areas that if you POKE in the wrong place/data, you will get system lock-ups.
Thanks in advance for your help!!!
JR
Help with a Poke Command.
-
- Member
- Posts: 5
- Joined: Thu Apr 21, 2016 9:05 pm
- Contact:
Re: Help with a Poke Command.
Poke and Peek are basically just 'Basic' operations that Write and Read memory locations or in some cases registers..
Poking a value to a memory location ..writes that value to that location..
Peeking that same loction allows you to read back a value .
The number before the comma is the location ..the number after the comma is the value.
Poking to a register can directly affect the commodores system achitecture ...wheras ..a value poked to a memory location may have no effect and will just sit there until peeked or read back ...OR ..used by a program already executing .
You really need to just go for it and try for yourself.
..and if you do lock up the computer ..you can always reset.
Hope this helps.
Poking a value to a memory location ..writes that value to that location..
Peeking that same loction allows you to read back a value .
The number before the comma is the location ..the number after the comma is the value.
Poking to a register can directly affect the commodores system achitecture ...wheras ..a value poked to a memory location may have no effect and will just sit there until peeked or read back ...OR ..used by a program already executing .
You really need to just go for it and try for yourself.
..and if you do lock up the computer ..you can always reset.
Hope this helps.
Re: Help with a Poke Command.
@JohnnyRockets
AFAIK, there is one POKE you shouldn't do on some PET computers because it can damage the CRT.
However, on the C64 and the VIC-20, the worst that can happen is that you need to turn off and on the computer.
What the specific POKEs you mention do exactly, I have no idea.
AFAIK, there is one POKE you shouldn't do on some PET computers because it can damage the CRT.
However, on the C64 and the VIC-20, the worst that can happen is that you need to turn off and on the computer.
What the specific POKEs you mention do exactly, I have no idea.
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders
Re: Help with a Poke Command.
The Programmers Reference Guide is a must if you're wanting to understand what to poke and where.
Who is online
Users browsing this forum: No registered users and 4 guests