Re: [cc65] Apple II No-Slot-Clock

From: Oliver Schmidt <ol.sc1web.de>
Date: 2006-06-14 13:29:29
Hi Ben,

> I have a no-slot-clock on the way for my Apple II and was wondering if
> anyone has some sample code or pointers on how to use it from cc65. It
> apparently emulates the Thunderclock.

According to the Tunderclock users guide
(http://www.apple-iigs.info/doc/fichiers/thunderclock.pdf)
you access the clock on three levels:

- BASIC: Doesn't work (at least well) from cc65 programs.

- Firmware: See the code below that I hacked up for you based on the first
sample in chapter 4 of the users guide.

- Hardware: Necessary for interrupt based access. cc65 has quite nice
interrupt support for the Apple2 under ProDOS 8. You need to do some
assembler coding to use it. Check out the cc65 source on how to do it
and/or ask me if you've got problems.

Best, Oliver

#include "stdio.h"

void (*rdtcp)(void) = (void (*)(void))0xC208;
void __fastcall__ (*wttcp)(char) = (void __fastcall__(*)(char))0xC20B;

void main(void)
{
  char *c = (char*)0x200;

  wttcp('>' | 0x80);
  rdtcp();

  putchar('\n');
    while (*c)
  putchar(*++c & 0x7F);
  putchar('\n');
}
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jun 14 13:29:37 2006

This archive was generated by hypermail 2.1.8 : 2006-06-14 13:29:40 CEST