Close

Testing functionality

A project log for PZ1 6502 laptop

I am building a laptop with a W65C02, lots of memory, SID-sound, decent graphics and a filesystem.

adamklotblixtadam.klotblixt 05/08/2020 at 06:364 Comments

I've hinted that I use basic as an easy way to test the system functions as I code them. Here is an example:
10 PRINT DEEK($FE42), DEEK($FE44) : GOTO 10

DEEK is the equivalent of PEEK, but on a 16-bit word. So the line of code prints two 16-bit values, from I/O-ports $FE42 and $FE44, which are the touch-screen X- and Y-coordinate. It also loops forever. A very simple and informative way to test the implementation.

Discussions

adam.klotblixt wrote 05/09/2020 at 05:51 point

32-bit access is not planned, but very possible to add. Though I'd probably rename it to PEEK16/POKE16 & PEEK32/POKE32 in that case, a bit easier to understand.

  Are you sure? yes | no

Ken Yap wrote 05/08/2020 at 07:37 point

DEEK, hmm. Is there a DOKE too?

  Are you sure? yes | no

adam.klotblixt wrote 05/08/2020 at 07:40 point

Yes indeed there is. ehBasic is a very nice piece of code to use, even if the source is a bit messy.

  Are you sure? yes | no

MS-BOSS wrote 05/08/2020 at 17:56 point

Will there later be QEEK and QOKE for 32b?

  Are you sure? yes | no