RE: [cc65] Simple PEEK & POKE question.

Date view Thread view Subject view

From: Mike McCarty (jmccarty_at_ssd.usa.alcatel.com)
Date: 2001-03-06 00:06:49


On Mon, 5 Mar 2001, Raj Wurttemberg wrote:

> Mike,
> 
> I only used that poke statement as an example. I just wanted to know how to
> peek and poke values with cc65. While I understand and agree with your
> statement, "I recommend that people NOT implement PEEK and POKE at all."
> Unfortunately with the Commodore series or computers many values *have* to
> be peeked and poked because the functions I am trying to do are not machine
> portable. For example if I wanted to create my own character set or create
> sprites on a Commodore 64 I know that code would not be portable to an Apple
> //e.

Perhaps I haven't made myself clear. What you want to do can be done, but
does not require "PEEK" and "POKE" to be implemented. I understand that 
the early machines used a direct video access, and have done it myself
In fact, in order to get the speed you want, you normally can't afford
a subroutine call.

> I do thank you for your input and your stressing of "direct C" makes a lot
> of *good* sense to a PC programmer where sprites, sound, etc. all have well
> documented API calls... but the Commodore never had that luxury. :(

Well, if you need an API, then do one. It can be implemented by direct
memory reads and writes. My point was that direct memory reads and
writes do not require PEEK and POKE in C.

Mike

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:39 CET