Skip to content

Commit

Permalink
Merge pull request #489 from sneakywumpus/dev
Browse files Browse the repository at this point in the history
make this less cryptic for the casual reader & core name typo
  • Loading branch information
udo-munk authored Dec 19, 2024
2 parents 5a060fe + da9b5fc commit c31677e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion picosim/srcsim/picosim.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main(void)
printf("%s release %s\n", USR_COM, USR_REL);
#if PICO_RP2350
#if PICO_RISCV
puts("running on Hazard RISC-V cores");
puts("running on Hazard3 RISC-V cores");
#else
puts("running on ARM Cortex-M33 cores");
#endif
Expand Down
4 changes: 2 additions & 2 deletions z80asm/z80alst.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static void lst_byte(BYTE b)
register char c;

c = b >> 4;
fputc(c + (c < 10 ? '0' : 'W'), lstfp);
fputc(c + (c < 10 ? '0' : 'a' - 10), lstfp);
c = b & 0xf;
fputc(c + (c < 10 ? '0' : 'W'), lstfp);
fputc(c + (c < 10 ? '0' : 'a' - 10), lstfp);
}
10 changes: 5 additions & 5 deletions z80asm/z80amfun.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@ static void expn_add_loc(struct expn *e, char *name)
asmerr(E_OUTLCL);
} else {
c = mac_loc_cnt >> 12;
*s++ = c + (c < 10 ? '0' : 'W');
*s++ = c + (c < 10 ? '0' : 'a' - 10);
c = (mac_loc_cnt >> 8) & 0xf;
*s++ = c + (c < 10 ? '0' : 'W');
*s++ = c + (c < 10 ? '0' : 'a' - 10);
c = (mac_loc_cnt >> 4) & 0xf;
*s++ = c + (c < 10 ? '0' : 'W');
*s++ = c + (c < 10 ? '0' : 'a' - 10);
c = mac_loc_cnt++ & 0xf;
*s++ = c + (c < 10 ? '0' : 'W');
*s++ = c + (c < 10 ? '0' : 'a' - 10);
}
*s = '\0';
l->loc_next = NULL;
Expand Down Expand Up @@ -791,7 +791,7 @@ static char *mac_next_parm(char *s)
/* generate digits backwards in current radix */
for (t = t1; m > 0; m--) {
v = w % r;
*--t = v + (v < 10 ? '0' : 'W');
*--t = v + (v < 10 ? '0' : 'a' - 10);
w /= r;
}
break;
Expand Down
5 changes: 3 additions & 2 deletions z80asm/z80anum.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int get_token(void)
n = 0;
while (IS_XDIG(*s)) {
n *= 16;
n += TO_UPP(*s) - ((*s <= '9') ? '0' : '7');
n += TO_UPP(*s) - ((*s <= '9') ? '0' : 'A' - 10);
s++;
}
if (*s == STRDEL) {
Expand Down Expand Up @@ -218,7 +218,8 @@ static int get_token(void)
continue;
}
if (IS_XDIG(*p1)) {
m = *p1 - ((*p1 <= '9') ? '0' : '7');
m = *p1 - ((*p1 <= '9') ? '0'
: 'A' - 10);
if (m < base) {
n *= base;
n += m;
Expand Down
4 changes: 2 additions & 2 deletions z80asm/z80aobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,9 @@ static char *btoh(BYTE b, char *p)
register char c;

c = b >> 4;
*p++ = c + (c < 10 ? '0' : '7');
*p++ = c + (c < 10 ? '0' : 'A' - 10);
c = b & 0xf;
*p++ = c + (c < 10 ? '0' : '7');
*p++ = c + (c < 10 ? '0' : 'A' - 10);
return p;
}

Expand Down
6 changes: 3 additions & 3 deletions z80core/simdis.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ static char *btoh(BYTE b, char *p)
register char c;

c = b >> 4;
*p++ = c + (c < 10 ? '0' : '7');
*p++ = c + (c < 10 ? '0' : 'A' - 10);
c = b & 0xf;
*p++ = c + (c < 10 ? '0' : '7');
*p++ = c + (c < 10 ? '0' : 'A' - 10);
return p;
}

Expand All @@ -467,7 +467,7 @@ static char *wtoa(WORD w, char *p)
if (onlyz && c > 9)
*p++ = '0';
if (!onlyz || c) {
*p++ = c + (c < 10 ? '0' : '7');
*p++ = c + (c < 10 ? '0' : 'A' - 10);
onlyz = 0;
}
}
Expand Down

0 comments on commit c31677e

Please sign in to comment.