Changeset 432327d in buchla-68k for rom


Ignore:
Timestamp:
09/17/2017 09:27:29 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
6099cac
Parents:
8c8b4e5
Message:

Fix conversion warnings.

Location:
rom
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rom/romp.c

    r8c8b4e5 r432327d  
    501501*/
    502502
    503 uint16_t exp_c(uint16_t c)
    504 {
    505         c &= 0x000F;
    506         c |= c << 4;
    507         c |= c << 8;
    508 
    509         return(c);
     503uint16_t exp_c(int16_t c)
     504{
     505        uint16_t r;
     506
     507        r = (uint16_t)c & 0x000F;
     508        r |= r << 4;
     509        r |= r << 8;
     510
     511        return(r);
    510512}
    511513
  • rom/romp.x

    r8c8b4e5 r432327d  
    153153extern  void            dosw(int16_t nb, int16_t sv);
    154154extern  int16_t         dtext(int8_t *loc, int8_t *lastloc, int16_t nwide, int16_t unit);
    155 extern  uint16_t        exp_c(uint16_t c);
     155extern  uint16_t        exp_c(int16_t c);
    156156extern  int16_t         getarg(void);
    157157extern  int16_t         getcmd(void);
Note: See TracChangeset for help on using the changeset viewer.