/[gxemul]/trunk/src/devices/dev_cons.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_cons.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_cons.c,v 1.33 2006/02/09 20:02:59 debug Exp $   *  $Id: dev_cons.c,v 1.36 2006/05/06 08:42:49 debug Exp $
29   *     *  
30   *  A simple console device, useful for simple tests.   *  A simple console device, useful for simple tests.
31   *   *
# Line 47  Line 47 
47  #include "memory.h"  #include "memory.h"
48  #include "misc.h"  #include "misc.h"
49    
50    #include "testmachine/dev_cons.h"
51    
52    
53  #define CONS_TICK_SHIFT         14  #define CONS_TICK_SHIFT         14
54    
# Line 76  DEVICE_ACCESS(cons) Line 78  DEVICE_ACCESS(cons)
78    
79          /*  Exit the emulator:  */          /*  Exit the emulator:  */
80          if (relative_addr == DEV_CONS_HALT) {          if (relative_addr == DEV_CONS_HALT) {
81                  cpu->running = 0;                  /*  cpu->running = 0;
82                  cpu->machine->exit_without_entering_debugger = 1;                      cpu->machine->exit_without_entering_debugger = 1;
83                  return 1;                      return 1;  */
84                    /*  TODO: this doesn't work yet. for now, let's
85                        simply use exit()  */
86                    exit(1);
87          }          }
88    
89          if (writeflag == MEM_WRITE) {          if (writeflag == MEM_WRITE) {
# Line 145  DEVINIT(cons) Line 150  DEVINIT(cons)
150              devinit->addr, DEV_CONS_LENGTH, dev_cons_access, d,              devinit->addr, DEV_CONS_LENGTH, dev_cons_access, d,
151              DM_DEFAULT, NULL);              DM_DEFAULT, NULL);
152          machine_add_tickfunction(devinit->machine, dev_cons_tick,          machine_add_tickfunction(devinit->machine, dev_cons_tick,
153              d, CONS_TICK_SHIFT);              d, CONS_TICK_SHIFT, 0.0);
154    
155          /*  NOTE: Ugly cast into pointer  */          /*  NOTE: Ugly cast into pointer  */
156          devinit->return_ptr = (void *)(size_t)d->console_handle;          devinit->return_ptr = (void *)(size_t)d->console_handle;

Legend:
Removed from v.23  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26