mirror of
https://github.com/pnx/m16vm
synced 2026-06-16 03:44:55 +02:00
vm/mm: move MEM_SIZE to header file.
This commit is contained in:
parent
3f5bbdb604
commit
a005c8672c
2 changed files with 5 additions and 5 deletions
5
vm/mm.c
5
vm/mm.c
|
|
@ -21,11 +21,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "mm.h"
|
#include "mm.h"
|
||||||
|
|
||||||
#ifndef MEM_SIZE
|
|
||||||
/* Set a default memory size. (2^8) */
|
|
||||||
#define MEM_SIZE 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Get a WORD aligned (16-bit) address.
|
// Get a WORD aligned (16-bit) address.
|
||||||
// Casts the 8-bit pointer (mm_base_addr) to 16-bit (WORD) and add offset.
|
// Casts the 8-bit pointer (mm_base_addr) to 16-bit (WORD) and add offset.
|
||||||
#define addr_align_word(offset) \
|
#define addr_align_word(offset) \
|
||||||
|
|
|
||||||
5
vm/mm.h
5
vm/mm.h
|
|
@ -22,6 +22,11 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifndef MEM_SIZE
|
||||||
|
/* Set a default memory size. (2^8) */
|
||||||
|
#define MEM_SIZE 256
|
||||||
|
#endif
|
||||||
|
|
||||||
extern uint8_t *mm_base_addr;
|
extern uint8_t *mm_base_addr;
|
||||||
|
|
||||||
void mm_init();
|
void mm_init();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue