Re: [cc65] C64 drive direct access question

From: MagerValp <MagerValp1cling.gu.se>
Date: 2005-10-11 09:49:30
>>>>> "RW" == Raj Wurttemberg <rajw@c64.us> writes:

RW> How to I do the chr$(x) with cbm_write? Is this correct?

RW> cbm_write(15, "m-w\x06\x00\x02\x18\x00", 8);

Yep. I used a struct in my code:

  struct mwcmd {
    char mw[3];
    void *addr;
    unsigned char len;
    char data[34];
  };

  struct mwcmd mw;

  memcpy(mw.mw, "M-W", 3);
  mw.addr = (void *)0x0006;
  mw.len = 2;
  memcpy(mw.data, "\x18\x00", 2);

  cbm_write(15, &mw, 8);

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Oct 11 09:49:37 2005

This archive was generated by hypermail 2.1.8 : 2005-10-11 09:49:39 CEST