Commit graph

32 commits

Author SHA1 Message Date
Joseph Kogut
7dd5a0c45e Fixed unititialized value in struct "tvm_program_s" 2011-08-13 03:17:50 -07:00
Joseph Kogut
d1f9840393 * Added jump to subroutine functionality
* Added NOP instruction

* Added program demonstrating the usage of the "call" and "ret" instructions

* Added program demonstrating the usafe of the "nop" instruction
2011-08-13 03:13:49 -07:00
Joseph Kogut
96c98986ce Cleaned up tvm_program.c 2011-08-12 03:11:20 -07:00
Joseph Kogut
f2c6edf393 Fixed forward jump bug 2011-08-12 03:00:13 -07:00
Joseph Kogut
59f356993b * Nothing left can be taken away.
* Added print instruction (PRN)
2011-08-06 16:06:51 -07:00
Joseph Kogut
cc99ecf054 Fixed crash when attempting to run tvm without a program specified 2011-08-06 14:20:47 -07:00
Joseph Kogut
2937e438fe Added comments 2011-08-04 09:44:07 -07:00
Joseph Kogut
d3bd4b4594 Cleaned up some unnecessary code 2011-08-04 09:39:35 -07:00
Joseph Kogut
c3ebac4e3e Fixed all memory errors and leaks 2011-08-04 09:11:04 -07:00
Joseph Kogut
70794419df * Changed base specifier delimiter to resolve conflict with label delimiter
* Updated TVM programs to reflect recent syntax changes
2011-08-02 23:00:09 -07:00
Joseph Kogut
4f742bd658 Added commands PUSHF and POPF 2011-07-28 15:29:47 -07:00
Joseph Kogut
f8ad6e3ad8 Removed code redirecting TVM to stdin when unable to open a file 2011-07-28 13:24:18 -07:00
Joseph Kogut
5d06dcc917 Fixed mixed declarations and code 2011-07-28 13:21:30 -07:00
Joseph Kogut
69f9c32ff6 Fixed warnings 2011-07-24 15:32:47 -07:00
Joseph Kogut
189bb42923 Added lexer 2011-07-23 21:36:51 -07:00
Joseph
1f185712c2 Merge pull request #5 from bl0ckeduser/master
Fix for file input segfaults
2011-07-21 11:51:32 -07:00
bl0ckeduser
0d93227ac3 Better file handling 2011-07-21 14:38:11 -04:00
Joseph Kogut
985e8008c5 * Added support for registers in programs
* Rewrote euler1_nodiv.vm to use registers
2011-07-21 11:29:03 -07:00
Joseph Kogut
cf80ad5de7 Made TVM compatible with pure ANSI C 2011-07-21 10:55:03 -07:00
Joseph Kogut
c0cd47b069 Replaced large if-then-else block in tvm_program.c, parse_instructions() with an opcode array and loop 2011-07-21 10:18:44 -07:00
Joseph Kogut
92b17d9d74 * Renamed TVM types to avoid potential conflicts with other common types
* Initialized some TVM types with calloc
2011-07-21 09:57:51 -07:00
Joseph Kogut
6bc0ad51a6 Added tvm file i/o methods for finding the length of a source file, and for copying a source file to a char array 2011-07-17 14:35:37 -07:00
Joseph Kogut
6eb5d3cae3 Split tvm_program.c, create_program() into separate creation and interpretation methods 2011-07-17 14:03:30 -07:00
Joseph Kogut
673cdb3c4d Added registers 2011-07-10 10:42:47 -07:00
Joseph Kogut
c2c446c949 Cleaned up tvm_program.c, create_program() 2011-07-02 00:34:38 -07:00
Joseph Kogut
ada0551a63 Fixed some unititialized values 2011-06-26 13:13:49 -07:00
Joseph Kogut
67f53ad976 Replaced constants with a preprocessor define 2011-06-25 23:18:08 -07:00
Joseph Kogut
78836253f4 Moved instruction parsing to its own function 2011-06-25 23:13:36 -07:00
Joseph Kogut
10bf109ff0 * Moved token allocation to the heap
* Moved line tokenization and label parsing to their own functions
2011-06-25 20:57:16 -07:00
Joseph Kogut
ad01726403 Modified commenting to allow comments to begin after the start of a line 2011-06-24 21:13:20 -07:00
Joseph Kogut
213112f31e Added commenting 2011-06-25 03:57:21 -07:00
Joseph Kogut
35c2fdbdab Renamed some shit. 2011-06-21 23:17:10 -07:00
Renamed from program.c (Browse further)