/* emulos.c -- Small OS emulation
- Copyright 1999-2021 Free Software Foundation, Inc.
+ Copyright 1999-2023 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@worldnet.fr)
This file is part of GDB, GAS, and the GNU binutils.
#include "defs.h"
#include "sim-main.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
+
+#include "m68hc11-sim.h"
#ifndef WIN32
#include <errno.h>
if (addr + size > 0x0FFFF) {
size = 0x0FFFF - addr;
}
- cpu->cpu_running = 0;
+ M68HC11_SIM_CPU (cpu)->cpu_running = 0;
while (size)
{
- uint8 val = memory_read8 (cpu, addr);
+ uint8_t val = memory_read8 (cpu, addr);
if (write (0, &val, 1) != 1)
printf ("write failed: %s\n", strerror (errno));
void
emul_os (int code, sim_cpu *cpu)
{
- cpu->cpu_current_cycle = 8;
+ M68HC11_SIM_CPU (cpu)->cpu_current_cycle = 8;
switch (code)
{
case 0x0: