comparison simtool/writecmd.c @ 78:702c2c40e51a

fc-simtool update-rec-prev command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 17 Feb 2021 05:07:54 +0000
parents 2071b28cd0c7
children a1aa8ee2da85
comparison
equal deleted inserted replaced
77:4558048fce10 78:702c2c40e51a
61 fprintf(stderr, "error: hex data length != EF record length\n"); 61 fprintf(stderr, "error: hex data length != EF record length\n");
62 return(-1); 62 return(-1);
63 } 63 }
64 return update_rec_op(recno, 0x04, data, curfile_record_len); 64 return update_rec_op(recno, 0x04, data, curfile_record_len);
65 } 65 }
66
67 cmd_update_rec_prev(argc, argv)
68 char **argv;
69 {
70 u_char data[255];
71 int rc;
72
73 rc = read_hex_data_file(argv[1], data);
74 if (rc < 0)
75 return(rc);
76 if (rc != curfile_record_len) {
77 fprintf(stderr, "error: hex data length != EF record length\n");
78 return(-1);
79 }
80 return update_rec_op(0, 0x03, data, curfile_record_len);
81 }