|
|
04689fc69a
|
move program/ and asm/ directories to examples/
|
2018-12-18 13:31:07 +01:00 |
|
|
|
d73e2ab710
|
move /src/as to /as and /src to /vm
|
2018-12-18 13:29:18 +01:00 |
|
|
|
8ef4c7edcd
|
move lib/src/vector.c to lib/vector.c
|
2018-12-18 13:25:56 +01:00 |
|
|
|
f385a4c47e
|
Merge branch 'asm'
|
2018-12-18 12:24:47 +01:00 |
|
|
|
993a1cbd74
|
src/as/parser.c: fix typos.
|
2018-12-18 09:17:18 +01:00 |
|
|
|
960d6f2e0d
|
src/as/lexer.c: use error.c
|
2018-12-17 23:27:13 +01:00 |
|
|
|
2e66ffb9a5
|
src/as/parser.c: check that numbers are in the allowed range.
|
2018-12-17 23:19:52 +01:00 |
|
|
|
74ecdfc2ab
|
src/as/lexer.c: guard against integer overflow (emitting a warning)
|
2018-12-17 21:34:57 +01:00 |
|
|
|
e75349e7f9
|
src/as/lexer.h: in struct token: integer value can max be 8 bits wide.
|
2018-12-17 07:27:52 +01:00 |
|
|
|
1ac58df67a
|
Makefile: adding M16_DEBUG_REGS documentation
|
2018-12-14 14:13:15 +01:00 |
|
|
|
47a6922d50
|
src/vm.c: in print_regs() registers are signed 16 bits.
|
2018-12-14 14:08:50 +01:00 |
|
|
|
2c1c832493
|
adding asm/mov_test.as
|
2018-12-14 14:04:52 +01:00 |
|
|
|
dbd32efbc5
|
Makefile: adding some comments.
|
2018-12-14 11:57:02 +01:00 |
|
|
|
2c734dc300
|
asm/hello_world.as: use some hex!
|
2018-12-14 00:35:33 +01:00 |
|
|
|
de29a981bd
|
src/as/lexer.c: implement hexadecimal numbers.
|
2018-12-14 00:35:09 +01:00 |
|
|
|
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 |
|
|
|
0a91644879
|
Makefile: call "as" "m16as"
|
2018-12-10 23:21:58 +01:00 |
|
|
|
ad74f2d476
|
asm/hello_world.as: we can now use labels!
|
2018-12-10 23:13:39 +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 |
|
|
|
f2d54204ca
|
Makefile: add rule for building libm16
|
2018-12-10 23:13:37 +01:00 |
|
|
|
aca8d7937e
|
asm: adding AST
|
2018-12-10 23:13:37 +01:00 |
|
|
|
3122da08c9
|
move include/ to lib/include
|
2018-12-10 10:10:50 +01:00 |
|
|
|
a305c34b39
|
lib: adding vector module
|
2018-12-10 10:10:50 +01:00 |
|
|
|
adbe0006f5
|
asm: adding symbol table datastructure.
|
2018-12-09 19:52:29 +01:00 |
|
|
|
0f41fc0870
|
asm: adding example files
|
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 |
|
|
|
d530dfda63
|
include/instr.h: adding a special OP_NONE opcode.
|
2018-11-27 10:52:39 +01:00 |
|
|
|
377c008ebe
|
asm: lexer implementation.
|
2018-11-27 10:52:39 +01:00 |
|
|
|
5bf70ad664
|
Makefile: print memory per default.
|
2018-11-25 11:39:20 +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 |
|
|
|
fea81c37e2
|
README.md: addr of Type-J is unsigned.
|
2018-11-25 11:23:11 +01:00 |
|
|
|
8e6ce776dc
|
README.md: Correct the LW/SW instructions, they are type RI
|
2018-11-25 11:22:39 +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 |
|
|
|
0fcfa253c1
|
Update .gitlab-ci.yml
|
2018-11-07 12:42:07 +00:00 |
|
|
|
3d753e8b09
|
Add .gitlab-ci.yml
|
2018-11-06 13:36:58 +00: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 |
|