/[VRac]/ACME-6502/lib/Orao.pm
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 /ACME-6502/lib/Orao.pm

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

revision 20 by dpavlin, Sun Jul 29 21:56:40 2007 UTC revision 21 by dpavlin, Mon Jul 30 08:54:18 2007 UTC
# Line 74  sub load_oraoemu { Line 74  sub load_oraoemu {
74          printf "loading %s at %04x\n", $path, $addr;          printf "loading %s at %04x\n", $path, $addr;
75          my $buff = read_file( $path );          my $buff = read_file( $path );
76    
         $last = "+";  
   
77          return $self->write_chunk( $addr, $buff );          return $self->write_chunk( $addr, $buff );
78    
   
79          if ( $size == 65538 ) {          if ( $size == 65538 ) {
80                  warn "oraoemu full memory dump detected\n";                  warn "oraoemu full memory dump detected\n";
81                  $self->write_chunk( 0, substr($buff,2) );                  $self->write_chunk( 0, substr($buff,2) );
# Line 136  sub save_dump { Line 133  sub save_dump {
133  sub hexdump {  sub hexdump {
134          my $self = shift;          my $self = shift;
135          my $a = shift;          my $a = shift;
136          return sprintf(" %04x %s\n", $a, join(" ",          return sprintf(" %04x %s\n", $a,
137                  map {                  join(" ",
138                          sprintf("%02x",                          map {
139                                  $self->read_8( $a + $_ )                                  sprintf( "%02x", $_ )
140                          )                          } $self->ram( $a, $a+8 )
141                  } ( 0 .. 7 )                  )
142          ));          );
143  }  }
144    
145  =head2 prompt  =head2 prompt
146    
147    $orao->prompt( $address );    $orao->prompt( $address, $last_command );
148    
149  =cut  =cut
150    
151  sub prompt {  sub prompt {
152          my $self = shift;          my $self = shift;
153          my $a = shift;          my $a = shift;
154            my $last = shift;
155          print $self->hexdump( $a ),          print $self->hexdump( $a ),
156                  $last ? "[$last] " : '',                  $last ? "[$last] " : '',
157                  "> ";                  "> ";

Legend:
Removed from v.20  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26