Payton Turnage
c80d6974cb
Substitute defines with their strings.
...
Before allocating space for a token, the lexer will first check to see
if that token is a defined name. If it is, it will allocate space for
the defined string instead.
A test file is included in programs/tinyvm/preprocessor to demonstrate
the behavior. When functioning, the program will print the fibonacci
sequence.
2014-01-12 21:43:57 -05:00
Joseph Kogut
6ca1ec8b05
Added prime sieve example program
2013-03-13 17:59:06 -07:00
Joseph Kogut
9be63e849d
* Updated SYNTAX to include preprocessor directives
...
* Added a preprocessor example program
2013-02-08 14:15:36 -07:00
Joseph Kogut
451ff4df8e
Moved example tvm programs to programs/tinyvm.
2013-01-25 11:40:26 -07:00
Joseph Kogut
2f328be48c
Merge branch 'master' of https://github.com/GenTiradentes/tinyvm
2013-01-24 10:34:56 -07:00
Joseph Kogut
885ddc1ff4
Added example program euler1_nodiv.c
2013-01-24 10:34:25 -07:00
Joseph Kogut
4d0fc4b0df
Fixed link to attribution for the algorithm used in example euler1_nodiv.vm
2013-01-24 00:28:56 -07:00
bl0ckeduser
5f669a78ce
Add recursive factorial
2011-10-07 17:55:18 -04:00
Joseph Kogut
ea610836cd
Added solution to Project Euler problem number 7
2011-10-02 18:06:47 -07:00
Bl0ckeduser
ba1f6ce765
Add simple prime-listing program
2011-09-28 21:25:11 -04:00
Bl0ckeduser
a90f98cee3
Fix euler2.vm optimization
2011-08-20 12:45:13 -04:00
Bl0ckeduser
b466c146a1
Small optimization for fib.vm
2011-08-20 12:42:18 -04:00
Bl0ckeduser
7dfca61336
Small optimization for euler2.vm
2011-08-20 12:35:23 -04:00
Joseph Kogut
52cf391e9d
* Added directory programs/asm/ for counterparts to the VM programs written in assembly
...
* Added programs/asm/euler1_nodiv.asm
2011-08-20 02:49:48 -07:00
Joseph Kogut
6c0d3cbf80
Moved all Euler solutions to programs/euler/ directory
2011-08-20 02:11:33 -07:00
Joseph Kogut
34340e2bb2
Added programs/euler2.vm
2011-08-20 02:10:03 -07:00
Joseph Kogut
99562eefa9
* Modified fib.vm to use registers, instead of absolute addresses (It should be rewritten to use relative addresses that don't interfere with stack memory)
...
* Added directory programs/c/ for counterparts to the VM programs written in C
* Added fib.c
2011-08-20 01:55:09 -07:00
Bl0ckeduser
de55db2ade
Add nifty Fibonnaci numbers program
2011-08-17 13:17:09 -04: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
bb321cc163
Rewrote programs/euler1.vm to use forward jumps
2011-08-13 02:53:06 -07:00
Joseph Kogut
c15c04d74f
Fixed attribution of algorithm used in programs/euler1_nodiv.vm
2011-08-09 17:03:36 -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
7f85dabe83
Upped default memory size to 64 MB, and stack size to 2 MB
2011-08-02 23:05:58 -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
6a31670115
Rewrote euler1.vm to utilize vm registers
2011-07-21 11:37:20 -07: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
971eb1c2e6
* Fixed segfault when attempting to pop an empty stack
...
* Added stack benchmark (programs/stack_bench.vm)
2011-07-02 00:15:47 -07:00
Joseph Kogut
213112f31e
Added commenting
2011-06-25 03:57:21 -07:00
Joseph Kogut
454a80d122
Fixed crash when running euler1_nodiv, presumably caused by unacceptable characters in a comment.
2011-01-17 03:19:54 -07:00
Joseph Kogut
cb14016d49
Clarified euler1.vm
2011-01-16 18:20:07 -07:00
Joseph Kogut
01425f5630
Clarified euler1_nodiv, and added a URL for the source of the algorithm.
2011-01-16 18:13:00 -07:00
Joseph Kogut
40a36cfa98
Further modified program "euler1_nodiv.vm" to give credit, and demonstrate features.
2011-01-16 18:05:58 -07:00
Joseph Kogut
70f9de0481
Modified example program to demonstrate commenting
2011-01-16 18:00:11 -07:00
Joseph Kogut
a14b8ef436
Fixed crash when blank lines were inserted in an otherwise valid program.
2011-01-16 17:50:12 -07:00
Joseph Kogut
e881a795c9
* Removed instruction table, and replaced it with a switch.
2011-01-16 09:34:27 -07:00
Joseph Kogut
e74bed3bf0
* Added shift left (shl) and shift right (shr) instructions
2011-01-14 05:20:27 -07:00
Joseph Kogut
3d78a8e5c8
* Added ability to specify values in decimal, hexadecimal, or binary
...
* Now able to parse values without the '#' prefix
* Refactored redundant code
* Modified included programs to function with new syntax
2011-01-14 05:05:34 -07:00
Joseph Kogut
e2148aa965
* Added faster version of Project Euler Problem 1 solution.
2011-01-11 01:55:41 -07:00
Joseph Kogut
74b6664a77
* Added mod instruction, which means the virtual machine can calculate division and modulous separately, improving performance.
2011-01-11 01:22:18 -07:00
Joseph Kogut
75a425f488
Moved from Subversion to Git, and added makefile
2011-01-07 12:52:24 -07:00