1
0
Fork 0
mirror of https://github.com/pnx/m16vm synced 2026-06-16 03:44:55 +02:00

move src/instr.h to include/instr.h because it will be needed by assembler for code generation.

This commit is contained in:
Henrik Hautakoski 2018-11-01 14:57:10 +01:00
parent 817642b7e4
commit cf752ab682
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA
5 changed files with 32 additions and 7 deletions

View file

@ -1,11 +1,11 @@
CC = gcc
CFLAGS = -DMEM_SIZE=32
CFLAGS = -Iinclude -DMEM_SIZE=32
LD = $(CC)
VM = m16vm
$(VM) : src/vm.o src/cpu.o src/mm.o src/instr.o src/syscall.o src/program.o
$(VM) : src/vm.o src/cpu.o src/mm.o src/instr_decode.o src/syscall.o src/program.o
$(LD) $(LDFLAGS)-o $@ $^
clean :

View file

@ -66,6 +66,4 @@ struct instr {
};
};
void instr_decode(unsigned char *nibble, struct instr *instr);
#endif /* INSTR_H */

View file

@ -29,7 +29,7 @@
#include "cpu.h"
#include "mm.h"
#include "syscall.h"
#include "instr.h"
#include "instr_decode.h"
/* Program */
unsigned char *instr_mem = NULL;

View file

@ -1,4 +1,4 @@
/* instr.c
/* instr_decode.c
*
* Copyright (C) 2012,2014 Henrik Hautakoski <henrik.hautakoski@gmail.com>
*
@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include "instr.h"
#include "instr_decode.h"
void instr_decode(unsigned char *instr, struct instr *out) {

27
src/instr_decode.h Normal file
View file

@ -0,0 +1,27 @@
/* instr_decode.h
*
* Copyright (C) 2012,2014 Henrik Hautakoski <henrik.hautakoski@gmail.com>
*
* 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 Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef INSTR_DECODE_H
#define INSTR_DECODE_H
#include <instr.h>
void instr_decode(unsigned char *nibble, struct instr *instr);
#endif /* INSTR_DECODE_H */