X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fcommon%2Fmemory.h;h=07cf5b3f4abbbd6ee13e9ea61d9ad4be9736bf5b;hb=8bfc53036ae2e040287a92c8a9e8f84571a19080;hp=9b3bae1cf9753711935c87204cb7f2ab9225ca4e;hpb=888cea8f85af92ccea5223d635eff1c6d44925a5;p=emu8051.git diff --git a/src/common/memory.h b/src/common/memory.h index 9b3bae1..07cf5b3 100644 --- a/src/common/memory.h +++ b/src/common/memory.h @@ -4,19 +4,7 @@ * Copyright (C) 1999 Jonathan St-André * Copyright (C) 1999 Hugo Villeneuve * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + * This file is released under the GPLv2 */ #ifndef MEMORY_H @@ -50,7 +38,12 @@ void memory_init(void); int -memory_check_address(enum mem_id_t id, unsigned long address, int display_error); +memory_check_address(enum mem_id_t id, unsigned long address, + int display_error); + +void +memory_convert_bit_address(uint8_t bit_address, uint8_t *byte_address, + uint8_t *bit_number); u_int8_t * memory_getbuf(enum mem_id_t id, unsigned long address); @@ -61,6 +54,15 @@ memory_clear(enum mem_id_t id); void memory_write8(enum mem_id_t id, unsigned long address, u_int8_t value); +void +memory_write_direct(unsigned int address, unsigned char value); + +void +memory_write_indirect(unsigned int address, unsigned char value); + +void +memory_write_bit(uint8_t bit_address, uint8_t value); + void memory_sfr_write8(unsigned long address, u_int8_t value); @@ -70,6 +72,15 @@ memory_sfr_write_dptr(u_int16_t value); u_int8_t memory_read8(enum mem_id_t id, unsigned long address); +unsigned char +memory_read_direct(unsigned int address); + +unsigned char +memory_read_indirect(unsigned int address); + +unsigned char +memory_read_bit(uint8_t bit_address); + u_int8_t memory_sfr_read8(unsigned long address); @@ -92,6 +103,6 @@ uint16_t pgm_read_addr16(uint16_t base); void -DumpMem(unsigned int address, int size, int memory_id); +memory_dump(unsigned int address, int size, int memory_id); #endif /* MEMORY_H */