Re: [cc65] cc65 version 2.13.0 released

From: Oliver Schmidt <ol.sc1web.de>
Date: 2009-10-11 13:28:53
Hi,

> This version has many improvement over version 2.12. To name a few:
>
>  - Support for bit-fields.

On mentally closing the 2.13. project yesterday evening I suddenly
noticed that there's the archetypic usecase for bit-fields right in
the cc65 distribution. I just changed the dirent struct for the Apple2
machines from...


struct dirent {
    ...
    unsigned      d_cdate;
    ...
    unsigned      d_mdate;
    ...
};


...to...


struct dirent {
    ...
    struct {
        unsigned day  :5;
        unsigned mon  :4;
        unsigned year :7;
    }             d_cdate;
    ...
    struct {
        unsigned day  :5;
        unsigned mon  :4;
        unsigned year :7;
    }             d_mdate;
    ...
};


... thus now exactly representing the fields in the ProDOS 8 date format:
http://apple2.info/wiki/index.php?title=P8_Tech_Ref_Inline#The_creation_and_last_mod_Fields

Nice, isn't it? The small test program I wrote yields the expected
results and the produced code (with -Ois) looks quite cool :-)

Best, Oliver

P.S.: Not in time for 2.13.0 but better late than never...
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Oct 11 13:29:00 2009

This archive was generated by hypermail 2.1.8 : 2009-10-11 13:29:04 CEST