2 * Simulator of microcontrollers (uid.cc)
4 * Copyright (C) 2017 Drotos Daniel
6 * To contact author send email to dr.dkdb@gmail.com
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
31 cl_uid::cl_uid(class cl_uc
*auc
, t_addr abase
):
32 cl_hw(auc
, HW_DUMMY
, 0, "uid")
37 static u8_t uid
[12]= {
57 for (i
= 0; i
< 12; i
++)
59 //regs[i]= register_cell(uc->rom, base+i);
60 uc
->rom
->download(base
+i
, uid
[i
]);
61 uc
->rom
->set_cell_flag(base
+i
, true, CELL_READ_ONLY
);
67 cl_uid::read(class cl_memory_cell
*cell
)
78 cl_uid::write(class cl_memory_cell
*cell
, t_mem
*val
)
85 cl_uid::print_info(class cl_console_base
*con
)
87 for (t_addr i
= 0; i
< 12; i
++)
88 con
->dd_cprintf("dump_number", "%02x ", uc
->rom
->get(base
+i
));
91 //print_cfg_info(con);
95 /* End of stm8.src/uid.cc */