Fixed some compiler warnings.

This commit is contained in:
waltje
2019-02-10 18:49:27 -05:00
parent 32e034d5fa
commit 3dcad9d146
3 changed files with 3288 additions and 14 deletions

View File

@@ -8,7 +8,7 @@
* *
* 808x CPU emulation. * 808x CPU emulation.
* *
* Version: @(#)808x.c 1.0.8 2019/02/08 * Version: @(#)808x.c 1.0.9 2019/02/10
* *
* Authors: Miran Grca, <mgrca8@gmail.com> * Authors: Miran Grca, <mgrca8@gmail.com>
* Andrew Jenner, <https://www.reenigne.org> * Andrew Jenner, <https://www.reenigne.org>
@@ -1426,7 +1426,7 @@ stos(int bits)
if (bits == 16) if (bits == 16)
writememw(es, DI, cpu_data); writememw(es, DI, cpu_data);
else else
writememb(es + DI, cpu_data); writememb(es + DI, (uint8_t)(cpu_data & 0xff));
if (flags & D_FLAG) if (flags & D_FLAG)
DI -= (bits >> 3); DI -= (bits >> 3);
else else
@@ -1563,14 +1563,14 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
seteaw(cpu_data); seteaw(cpu_data);
else else
seteab(cpu_data); seteab((uint8_t) (cpu_data & 0xff));
if (cpu_mod == 3) if (cpu_mod == 3)
wait(1, 0); wait(1, 0);
} else { } else {
if (opcode & 1) if (opcode & 1)
cpu_state.regs[cpu_reg].w = cpu_data; cpu_state.regs[cpu_reg].w = cpu_data;
else else
setr8(cpu_reg, cpu_data); setr8(cpu_reg, (uint8_t)(cpu_data & 0xff));
wait(1, 0); wait(1, 0);
} }
} else } else
@@ -1781,7 +1781,7 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
seteaw(cpu_data); seteaw(cpu_data);
else else
seteab(cpu_data); seteab((uint8_t)(cpu_data & 0xff));
} else { } else {
if (cpu_mod != 3) if (cpu_mod != 3)
wait(1, 0); wait(1, 0);
@@ -1816,14 +1816,14 @@ opcodestart:
} else { } else {
cpu_data = geteab(); cpu_data = geteab();
cpu_src = getr8(cpu_reg); cpu_src = getr8(cpu_reg);
setr8(cpu_reg, cpu_data); setr8(cpu_reg, (uint8_t)(cpu_data & 0xff));
} }
wait(3, 0); wait(3, 0);
access(12, bits); access(12, bits);
if (opcode & 1) if (opcode & 1)
seteaw(cpu_src); seteaw(cpu_src);
else else
seteab(cpu_src); seteab((uint8_t)(cpu_src & 0xff));
break; break;
case 0x88: case 0x89: case 0x88: case 0x89:
@@ -2028,7 +2028,7 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
AX = cpu_data; AX = cpu_data;
else else
AL = cpu_data; AL = (uint8_t)(cpu_data & 0xff);
if (in_rep != 0) if (in_rep != 0)
wait(2, 0); wait(2, 0);
} }
@@ -2203,7 +2203,7 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
seteaw(cpu_data); seteaw(cpu_data);
else else
seteab(cpu_data); seteab((uint8_t)(cpu_data & 0xff));
break; break;
case 0xCC: /*INT 3*/ case 0xCC: /*INT 3*/
@@ -2326,7 +2326,7 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
seteaw(cpu_data); seteaw(cpu_data);
else else
seteab(cpu_data); seteab((uint8_t)(cpu_data & 0xff));
break; break;
case 0xD4: /*AAM*/ case 0xD4: /*AAM*/
@@ -2518,7 +2518,7 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
seteaw(cpu_data); seteaw(cpu_data);
else else
seteab(cpu_data); seteab((uint8_t)(cpu_data & 0xff));
break; break;
case 0x20: /* MUL */ case 0x20: /* MUL */
case 0x28: /* IMUL */ case 0x28: /* IMUL */
@@ -2591,7 +2591,7 @@ opcodestart:
if (opcode & 1) if (opcode & 1)
seteaw(cpu_data); seteaw(cpu_data);
else else
seteab(cpu_data); seteab((uint8_t)(cpu_data & 0xff));
break; break;
case 0x10: /* CALL rm */ case 0x10: /* CALL rm */
if (!(opcode & 1)) { if (!(opcode & 1)) {

3273
src/cpu/808x.c.orig Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
* *
* Implementation of the Generic ESC/P Dot-Matrix printer. * Implementation of the Generic ESC/P Dot-Matrix printer.
* *
* Version: @(#)prt_escp.c 1.0.6 2019/01/11 * Version: @(#)prt_escp.c 1.0.7 2019/02/10
* *
* Authors: Michael Dr<44>ing, <michael@drueing.de> * Authors: Michael Dr<44>ing, <michael@drueing.de>
* Fred N. van Kempen, <decwiz@yahoo.com> * Fred N. van Kempen, <decwiz@yahoo.com>
@@ -607,7 +607,8 @@ printer_reset(escp_t *dev)
dev->dpi = PAGE_DPI; dev->dpi = PAGE_DPI;
dev->autofeed = 0; dev->autofeed = 0;
dev->esc_seen = dev->esc_pending = dev->fss_seen = 0; dev->esc_seen = dev->fss_seen = 0;
dev->esc_pending = 0;
dev->esc_parms_req = dev->esc_parms_curr = 0; dev->esc_parms_req = dev->esc_parms_curr = 0;
dev->hmi = -1; dev->hmi = -1;