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

33 commits

Author SHA1 Message Date
1a29b39663
src/as/ast.c: bug in ast_free(). we should advance i by sizeof(char**). 2018-12-14 00:17:42 +01:00
3513662ad8
asm: lexer.c: read_string() move all strings into a table 2018-12-11 17:53:55 +01:00
1146b925f5
src/as/codegen.c: use symtab to get the address for J-Type instruction. 2018-12-10 23:13:39 +01:00
0f10c9fd38
src/as/parser.c: on parsing error. skip doing semantics checks and code gen. 2018-12-10 23:13:38 +01:00
0916f8bcdc
src/as/parser.c: do semantics checks. 2018-12-10 23:13:38 +01:00
aa171ac46c
src/as/parser.c: in match_operand() store strings in the AST. 2018-12-10 23:13:38 +01:00
7ec84ad2a1
src/as/parser.c: J-Type should now accept a label as argument. 2018-12-10 23:13:38 +01:00
2b80662967
src/as/parser.c: store address for label declaration in the symbol table. 2018-12-10 23:13:38 +01:00
86293537eb
src/as/lexer.c: make sure we store the string if it's a label. 2018-12-10 23:13:38 +01:00
7646d63736
asm: build AST in parser. 2018-12-10 23:13:38 +01:00
96220537de
asm: rename instr_encode to codegen and do code generation from AST. 2018-12-10 23:13:37 +01:00
aca8d7937e
asm: adding AST 2018-12-10 23:13:37 +01:00
adbe0006f5 asm: adding symbol table datastructure. 2018-12-09 19:52:29 +01:00
3528c467ac asm: adding the parser 2018-12-09 19:52:29 +01:00
16501e40be asm: adding instr_encode module 2018-12-09 19:52:29 +01:00
95f2e38c2d
asm: adding error module 2018-11-27 10:52:40 +01:00
377c008ebe
asm: lexer implementation. 2018-11-27 10:52:39 +01:00
61263f65c8
src/vm.c: add preprocessor macro for reg/mem debug output. 2018-11-25 11:38:40 +01:00
66ea2b3b49
src/cpu.c: add M16_DEBUG_INSTR preprocessor macro to toggle debug output. 2018-11-25 11:38:11 +01:00
6d2ad112af
src/cpu.c: LW/SW are Type-RI. 2018-11-25 11:21:40 +01:00
6256fa7512
src/cpu.c: remove the old static variables that exists in struct cpu_state from now on. 2018-11-24 20:05:27 +01:00
cf752ab682
move src/instr.h to include/instr.h because it will be needed by assembler for code generation. 2018-11-01 18:34:35 +01:00
817642b7e4
src/vm.c: use program.h 2018-10-31 17:53:07 +01:00
fe8804c8d8
add program module 2018-10-31 17:53:07 +01:00
6f60b1a74a
src/cpu.c: alot of refactoring, store state in a struct. and make vm.c "own" the state. 2018-10-28 14:53:41 +01:00
bae062cbf9
src/cpu.c: implement OP_INT instead of OP_SYSC_WR 2018-10-28 14:23:35 +01:00
fa30f39d55
src/syscall: define write system call 2018-10-28 14:23:01 +01:00
837bd8f892
src/instr: remove OP_SYSC_WR,OP_SYSC_RD in favor for OP_INT. 2018-10-28 14:22:31 +01:00
dca453457d
src/cpu: add the define "CPU_NUM_REGS" 2018-10-28 14:21:00 +01:00
900e1d87c4
src/cpu.c: implement JR instruction 2018-10-28 13:27:21 +01:00
1eef46cc5e
src/cpu.c: adding print_reg() 2018-10-28 13:27:01 +01:00
8c7ebdb232 src/vm.c: include unistd.h 2018-10-26 14:43:17 +02:00
2ba17c52bd Initial commit 2018-10-26 12:35:17 +02:00