-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
ChangeLog
1334 lines (867 loc) · 46.5 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
L1VM (2.0.6)
NEW: compiler flag: "-wsetundef" warns if a variable has no value set!
NEW: compiler flag: "-wvarunused" warns if defined but unused variables are found!
NEW: fann module: train, save and train from data file functions added.
Examples in /lib: train_fann.l1com and train_fann_file.l1com.
FANN module code cleanup. Now uses pointers for the input/output vars.
NEW: string module demo update, string-tools.l1h now uses string_left and string_right in string replace function.
-- Stefan Pietzonke <jay-t@gmx.net> Thu 12 Jan 2022 20:33 +0100
L1VM (2.0.5)
Code cleanup.
NEW: Compiler now exits on first "code list full" error message.
BUGFIXES: vm/modules/file-tools.
BUGFIX: vm/file file_close now checks if file handle was open.
NEW: before JIT compile blocks you can now use (x load) to load a int64 or double number into a register.
So the code inside the JIT compiled block can do calcualtions without "unknown" opcodes in it!
NEW: "m=" assign to use the "move" opcode if both variables are in registers.
See "prog/hello-move.l1com" for more!
(xd id m=)
Moves variable "xd" to "id" var.
-- Stefan Pietzonke <jay-t@gmx.net> Thu 24 Nov 2022 23:01 +0100
L1VM (2.0.4)
NEW: lib/array.l1com, include/array.l1h functions to assign variable lists to arrays.
Added lib/json-l1com and include/json.l1h with functions for parsing json strings.
BUGFIXES: string module: string mem search function now sets string search start position right!
NEW: string module now has the "string_parse_json" function!
See lib/strin.l1com.
-- Stefan Pietzonke <jay-t@gmx.net> Tue 25 Oct 2022 18:20 +0200
L1VM (2.0.3)
NEW: interrupt 0: 31: pointer_type to get the pointer variable type.
NEW: added nested code to switch statement: switch.
-- Stefan Pietzonke <jay-t@gmx.net> Fri 14 Oct 2022 11:57 +0200
L1VM (2.0.2)
BUGFIX: compiler: nested-code-off added continue statement to fix operator not known error!
-- Stefan Pietzonke <jay-t@gmx.net> Mon 3 Oct 2022 23:30 +0200
L1VM (2.0.1)
NEW: mem library now has string_to_array and array_to_string functions.
NEW: filetools directory read now has index start and end flags to read a part of the filelist.
See "lib/file-tools-dir.l1com" example!
BUGFIXES: string module: array functions index overflow check fixed!
BUGFIX: string.c searchstr now gives the right position of the substring, if searched by a startpos greater than 0!
-- Stefan Pietzonke <jay-t@gmx.net> Thu 27 Oct 2022 17:11 +0200
L1VM (2.0.0)
NEW: check_pointer interrupt. See prog/people-object.l1com for more!
NEW: memory object function: get_obj_mem_type to return the type of a memory object index.
-- Stefan Pietzonke <jay-t@gmx.net> Wed 14 Sep 2022 20:30 +0200
L1VM (1.9.0)
NEW: module file-tools added: file_copy, directory_create, remove_all, file_rename, file_size_bytes, file_exists
NEW: directory file list read added.
-- Stefan Pietzonke <jay-t@gmx.net> Sun 11 Sep 2022 13:54 +0200
L1VM (1.8.0)
NEW: now nested code flag is set to 1 on function start.
init_registers () is then called at: if, else, endif, for, next, do, while, switch ? statements.
This removes the need for "reset-reg" call in the code.
Syntax highlighters updated: "nested-code-off" added.
-- Stefan Pietzonke <jay-t@gmx.net> Thu 1 Sep 2022 15:57 +0200
L1VM (1.7.2)
NEW: compiler now exits with error if no main function is defined.
-- Stefan Pietzonke <jay-t@gmx.net> Sat 20 Aug 2022 12:23 +0200
L1VM (1.7.1)
NEW: VM: main.c show -p flag infos.
NEW: scripts in distribution now use "bash" as the shell, this fixes some errors!
FIXES: compiler now gives error if label is defined twice. And if function name already used.
Compiler: update: now "stpop" opcode to loadreg code part set.
Added script to build and install latest Clang from GitHub.
NEW: prog/bool.l1com include/bool.l1h : define variable true/false.
Now boolean variable assign is checked by the "bool" command:
(bool true Bool =)
Only "true" or "false" are allowed in this expression!
Here the variable "Bool" will be set to "true".
Compiler:
NEW: new "bool" variable type in "set" variable setting.
The bool variable name must begin with a uppercase "B"!
// boolean variable name must beginn with upercase B!
(set bool 1 Bool 1)
The parser checks if the boolean variable is used in a normal math expression and returns an error if so!
This also includes the RPN parser and the infix expression parser.
NEW: more mono fonts added. Moved standard free mono font into /free.
NEW: now you just can do:
(true Bool =)
to set a boolean variable!
-- Stefan Pietzonke <jay-t@gmx.net> Fri 26 Aug 2022 21:40 +0200
L1VM (1.7.0)
NEW: compiler: "stpush" and "stpop" for use with multiple variables.
See example "prog/stack-new.l1com"
NEW: VM: run process priority flag on Linux:
$ l1vm fractalix-3.2 -p 19
The ranges go from -20 high priority to 19 lowest priority.
-- Stefan Pietzonke <jay-t@gmx.net> Thu 21 Jul 2022 19:27 +0200
L1VM - (1.6.0)
NEW: replaced all string constant sizes MAXLINELEN by MAXSTRLEN.
BUGFIX: VM: shell arguments length check added!
NEW: Doom Emacs syntax highlighter added.
VM: JIT-compiler reset to working version.
NEW: process handling flags in settings.h.
NEW "worker-hello" folder with experimental l1vmgodata data base client worker. See README there!
NEW: now download.sh script also installs .obj files!
VM/modules/endianess: aligning of function arguments removed to compile with gcc.
BUGFIXES: removed function args alignment on modules.
-- Stefan Pietzonke <jay-t@gmx.net> Sun 3 Jul 2022 20:19 +0200
L1VM - (1.5.9)
NEW: "ranges.l1h" and "prog/range-new.l1com" variable range checks macros.
NEW: now you can set a window title for the SDL windows:
(window_title_str :sdl_set_window_title call)
NEW: check if pointer variable source is constant: show error message if true.
NEW: syntax highlighters: "cast" command added.
NEW: process module now uses user "l1vm" which should "not" be in "sudoers" for making it safe!
NEW: Windows 11 WSL: updated build scripts to use "clang" and "clang++" compiler names!
-- Stefan Pietzonke <jay-t@gmx.net> Sun 05 Jun 2022 16:51 +0200
L1VM - (1.5.8)
NEW: added libsodium easy encrypt/decrypt function
NEW: "set" variable definition now with range sense check!
Added l1vmgodata library error checks for socket.
NEW: changed all build scripts to use "build.sh" script for building the Bracket programs.
Security fixes in process library. "sudo" and "su" not allowed anymore!
Test: macOS: install vm modules in to "~/bin".
BUGFIX: VM process module now has searchstr() prototype!
VM process module now needs: include/settings.h PROCESS_MODULE flag to be set for build!
As a default it is switched off:
NOTE: only set PROCESS_MODULE in 'include/settings.h' to 1 if you know:
that it can not avoided to run 'su' and 'sudo' in scripts!
This can be very dangerous!
-- Stefan Pietzonke <jay-t@gmx.net> Wed 18 May 2022 22:55 +0200
L1VM - (1.5.7)
include/global.h: MAXLINELEN set to 4096.
VM: show free module message on free_module.
Compiler: pointer function update.
-- Stefan Pietzonke <jay-t@gmx.net> Sat 12 Apr 2022 00:57 +0200
L1VM - (1.5.6)
NEW: VM: shows if file sandbox root is set or not.
BUGFIX: VM SDL module: event_gadget_string_multiline wait event fix!!
NEW: install-wsl-debian.sh and install-wsl-debian-jit.sh: preprocessor copy to ~/bin
like vm and compiler.
NEW: SDL GUI string multiline text input string overflow BUG fix.
NEW: SDL GUI string multiline cursor up/down edit fixes.
NEW: updated example: people-struct.l1com. Now uses new load_obj_array_memobj function.
NEW: VM: file module: file_read_array and file_write_array to read/write arrays.
NEW: VM: BUGFIX: network module added string return buffer overflow check!
NEW: string function strlen_safe fix.
-- Stefan Pietzonke <jay-t@gmx.net> Mon 11 Apr 2022 20:07 +0200
L1VM - (1.5.5)
NEW: added math library degree to rad and rad to degree functions.
Added sin () math test to math library demo.
Renamed math-const.l1h constants without the @ char, because some compile trouble!
NEW: math modules: missing tandouble function added.
NEW: Brackets: pointer bugfixes on double array variables.
-- Stefan Pietzonke <jay-t@gmx.net> Fri 18 Mar 2022 16:43 +0100
L1VM - (1.5.4)
NEW: VM: string module added: "get_env" and "set_env" functions for working on ENV variables.
VM: string module: get_env function BUGFIX!
Compiler: error message if using undefined variable on "stpop" opcode.
NEW: compiler: "pointer" command for getting the real address of a variable.
See program "prog/hello-pointer.l1com"!
NEW pointer variables begin with uppercase 'P'. They can be used in the array variable assigns.
-- Stefan Pietzonke <jay-t@gmx.net> Sun 27 Feb 2022 22:00 +0100
L1VM - (1.5.3)
NEW: Compiler: BUGFIXES in parse-rpolish.c.
And new math expressions:
{i = (xd < yd) && (xd > zerod)}
Compiler: added in rpolish: shiftleft: <| and shift right: >|.
Updated the "egypt-callgraph.sh" scripts to generate *.ps files of the function call graphs.
VM: network module added mimetypes for L1VM files.
-- Stefan Pietzonke <jay-t@gmx.net> Sun 20 Feb 2022 21:44 +0100
L1VM - (1.5.2)
BUGFIX: load/pulld now frees variable in register on pulld!
Fixed comp/parse-rpolish too!
So registers can be saved!
NEW: compiler: (no-var-pull-on) and (no-var-pull-off) to speedup the {} calculation expressions.
If the flag is set to be switched on, then no "pull" opcodes are used. This gives a huge speedup!
See "prog/double-test-optimzed.l1com"!!
-- Stefan Pietzonke <jay-t@gmx.net> Sun 13 Feb 2022 15:44 +0100
L1VM - (1.5.1)
NEW: VM: math-vect module now uses memory bounds check!
NEW: assembler "." exp ression input line checks.
NEW: Moved data info define to include/settings.h and increased it!
NEW: settings.h: WINDOWS_10_WSL setting. If turned on the SDL module switches off audio, not supported by the WSL!
NEW: asmjit library now can be build with latest release.
NEW: the Brackets compiler now parses assign expressions like:
{ret = foo}
now right! No need for: {ret = foo } anymore!
Removed "-lcrypto" libary from JIT-compiler build zerobuild make file.
-- Stefan Pietzonke <jay-t@gmx.net> Thu 10 Feb 2022 15:56 +0100
L1VM - (1.5)
NEW: STACK_CHECK flag in settings.h to switch stack check on/off!
With stack check enabled bugs on the stack data types can be found.
So you cant pop of a byte if there is a int64 on top!
NEW: macOS now has string bounds check in string module!
Now the other modules use bounds check on macOS too.
Stack check errors was coming from too old memobj library.
Now stack check is set to 1 in settings.h!
Build scripts on Linux and macOS now build missing modules.
-- Stefan Pietzonke <jay-t@gmx.net> Sat 29 Jan 2021 22:14 +0100
L1vM - (1.4.4)
VM: mem-obj-lib: now sets EMPTY as empty variable.
-- Stefan Pietzonke <jay-t@gmx.net> Sat 15 Jan 2022 17:31 +0100
L1VM - (1.4.3)
VM: main function now uses wait loop thread 1 on macOS only.
On macOS the main program will run in thread 0. This is needed to run the SDL module.
It can only be run from main program!
The other OS will run the VM bytecode in thread 1.
VM: mem-obj-lib: now sets EMPTY as empty variable.
-- Stefan Pietzonke <jay-t@gmx.net> Tue 11 Jan 2022 18:28 +0100
L1VM - (1.4.2)
JIT-compiler now sets a return code for run function and exits the program on error!
NEW: intr.l1h: global pthread mutexes lock/unlock: globallock/globalunlock.
It can be up to 255 mutexes set!
See example hello-thread-4.l1com.
Compiler: BUGFIX: now if espression with double numbers don't results in cast error.
Compiler: BUGFIX: updated if expression error message with double numbers.
-- Stefan Pietzonke <jay-t@gmx.net> Fri 07 Jan 2022 15:07 +0100
L1VM - (1.4.1)
NEW: compiler now gives errors if array variable assign gives loose in precision.
For example assign int64 to an int32 array!
NEW: compiler now gives an error if array variable is to small at definition.
NEW: compiler now has: "-werror" flag to handle all warnings as errors!
This is used for variable type safety checking warnings!
NEW: type cast:
(set int64 1 y 42)
(set int32 1 a 0)
(cast y a =)
Will cast from int64 to int32 without errors! As set by the programmer.
JIT-compiler now sets a return code for run function and exits the program on error!
-- Stefan Pietzonke <jay-t@gmx.net> Thu 30 Dec 2021 21:08 +0100
L1VM - (1.4)
NEW: macOS support: now with the sdl-2.0 module!
All modules build now!
sdl-2.0: prog/lines.l1com now works! I had to call a SDL event function in the delay loop!
(:sdl_get_mouse_state !)
This is needed to avoid errors on macOS.
NEW: char casting warning fixes.
-- Stefan Pietzonke <jay-t@gmx.net> Sat 25 Dec 2021 17:55 +0100
L1VM - (1.3.1)
NEW: now the l1com compiler compiles code with blank lines in it!
You will still get an error message if the brackets don't match in a not blank line!
NEW: VM main.c load_module now sets OS specific .so dynamic library extension.
In the modules includes now the name is set without ".so" ending: "libl1vmsdl".
FIXES: SDL module now stays in event poll loop if no event can be read.
BUGFIX: I found out that a "switch" can not be in the first code line of a program!
The compiler creates a wrong "loada" line! NOW FIXED!
NEW: the compiler now checks if RPN or bracket expression assigns a high precision to a lower precision var.
For example:
{ret = x y z + *} Where x is int64 and ret = int32, this will get an error!
code in comp/parse-rpolish.c
NOW variable assign looks like this:
{ret = foo }
-- Stefan Pietzonke <jay-t@gmx.net> Sat 18 Dec 2021 22:43 +0100
L1VM - (1.3.0)
NEW: compiler now checks size of string and shows an error message if the set size is too small!!
(set string 5 hellostr "Hello world!")
This will get an error message!
REMOVED SDL library linking in VM build scripts and zerobuild files.
NEW: comiler now has "jsra" opcode. See "prog/hello-jsra.l1com".
NEW: added __MACH__ in global.h to set the Linux flag automatically.
Use "DIVISIONCHECK 0" and "CPU_SET_AFFINITY 0" on macOS!
NEW: experimental GitHub actions build script added.
Math module now uses libsodium for random numbers.
NEW: added libserialport installation to build scripts
-- Stefan Pietzonke <jay-t@gmx.net> Fri 03 Dec 2021 13:03 +0100
L1VM - (1.2.0)
NEW: CODE CLEANUP all stack check code removed.
It did not work right because the modules couldn't access the local threads stack type data!
BUGFIXES: now (optimize-if) works without errors!
FIXES: did a gcc/g++ compile run and removed all "ALIGN" macros out of function arguments!!!
File module: get_string function BUIGFIX: set read error code.
Added file module: "file-def.l1h": definitions for file_fseek function.
NEW: distribution/get-koder77-key.sh script to add my gpg key to your keyring.
ADDED: now module mem-obj can store strings too. See lib/mem-obj-lib.l1com.
-- Stefan Pietzonke <jay-t@gmx.net> Wed 27 Oct 2021 09:17 +0200
L1VM - (1.1.6)
NEW: include/settings.h with all user settings.
NEW: compiler: "loadl" opcode added for loading labels into variables.
See "prog/hello-thread-2.l1com".
NEW: example "prog/hello-thread-3.l1com": it uses the new interrupt macros.
-- Stefan Pietzonke <jay-t@gmx.net> Fri 08 Oct 2021 12:14 +0200
L1VM - (1.1.5)
VM: JIT-compiler: removed init code.
NEW: include-lib/mem-obj-lib.l1h, lib/mem-obj-lib.l1com:
In this module a memory object can save both int64 and double variables into one array.
See the examples noted above!
I got "false" memory bounds errors running my "pov-edit" program.
Now I changed the string module to use memory_bounds not if the "BOUNDSCHECK" in global.h is not set.
So "BOUNDSCHECK" is now turned of as default!!
NEW: string module: "string_regex" for searching regex string patterns in a string.
VM: SDL module: get_gadget_x2y2: string multiline added.
VM_SDL module: "free_all_gadgets" function added. And code to free the multiline string gadget.
VM SDL module: "sdl_get_key" added to read raw keycodes. See "lib/sdl-lib-key.l1com" example!
VM/file module: "fput_c" stack BUGFIXES.
-- Stefan Pietzonke <jay-t@gmx.net> Thu 23 Sep 2021 17:09 +0200
L1VM - (1.1.4)
NEW: I added the fp16 fixed floating point library as a module.
See prog/math-circle-nofp.l1com. The range goes from -32767 to 32767.
It is for CPUs without floating point opcodes.
I did this for use on Kludged Linux on my Psion 5MX.
As there is no floating point numbers support there!
UPDATE: I did update the sign and download scripts for L1VM packages on my repository.
BUGFIX: endianess library n_to_hostw function now set.
NEW: messages-lib: "include-lib/messages-lib.l1h" for sending and receiving messages codes.
See example "lib/messages-lib.l1com"
NEW: SDL module:
set_gadget_string_multiline, change_gadget_string_multiline and get_gadget_string_multiline.
See lib/sdl-lib-test.l1com for an example.
This is the multiline string edit gadget.
NEW: the JIT-compiler is now added as open source.
-- Stefan Pietzonke <jay-t@gmx.net> Tue 7 Sep 2021 18:49 +0200
L1VM - (1.1.3)
BUGFIXES: VM: math module serious stack type BUGFIXES!
prog/build-all.sh: wrong suffixes BUGFIX!
Now no filenames like foobar.l1com.l1db are there!
NEW: ranges interrupts: 28/29 to check if a variable is in a defined range.
See "include/intr.l1h"
NEW: "prog/shell.l1com": a simple L1VM shell. You can run L1VM programs by
the commands: "run" or simple by "!":
l1vm-sh $ run hello-2
l1vm-sh ! hello-2
All other commands are executed as normal.
NEW: there is a new shell: "shell-2.l1com" with a "<" command to list
the command history. You have to enter the number before the command to
execute it.
-- Stefan Pietzonke <jay-t@gmx.net> Sat 21 Aug 2021 15:26 +0200
L1VM - (1.1.2)
NEW: I updated the distribution scripts to download and install programs from my own repo.
Now readme files can be installed via download script too, if there!
The installation path is ~/l1vm/man.
Added a Raspberry Pi build script. And did some changes to the other build scripts too!
So there is no ERROR exit if a module fails to build.
NEW: build script: "build.sh" now must be called without ".l1com" filename extension:
$ ./build.sh prog/hello
This will build the "hello.l1com" program.
NEW: Stack check setting in include/global.h: STACK_CHECK.
If set to 1 then you will get run time errors if something went wrong on stack.
Some programs do not work if it is switched on!
-- Stefan Pietzonke <jay-t@gmx.net> Sat 14 Aug 2021 05:00 +0200
L1VM - (1.1.1)
Updated the osv examples.
BUGFIXES: compiler and assembler now do ERROR exit if the line length in programs
is too long!
NEW: VM: string input now uses memory bounds check to find string length overflow!
NEW: added missing Raspberry Pi GPIO wrapper functions for all functions.
Removed asmjit library from linking to VM binary. It will be linked to JIT-compiler module.
NEW: VM mem module now sets the size for a vector array dynamically.
BUGFIX: Added VM math module: double_rounded_string function return string length check.
NEW: added distribution folder: there is a script to sign .l1obj files and one to download them from a server and run them.
NEW: modified build.sh script, now flags can be set:
$ ./build.sh prog/hello.l1com -pack -lines 100000
Builds a packed .l1obj.bz2 file and sets the max linenumber to 100000.
NEW: the webserver program now searches for files in the ~/l1vm/web directory.
-- Stefan Pietzonke <jay-t@gmx.net> Mon 9 Aug 2021 11:42 +0200
L1VM - (1.1.0)
NEW: math module: more functions added from C math library
NEW: mpfr math library:
I included a patched version of "mpreal.h"
I did replace all places with "srcptr()"" to "xsrcptr()".
This makes it possible to use "mpreal.h" with recent versions of mpfr library, which
defined "xsrcptr" to something else!
NEW: "clang-toolchain" directory added with "build-toolchain-12.0.sh" script to
build Clang 12.0.0 C compilers.
NEW: VM: interrupt 0: 27 print out DEBUG marking text and current epos.
BUGFIXES: VM: set missing "eoffs = 5" on interrupts.
BUGFIXES: VM: string module bugfixes "string_mid" function.
NEW: VM math module now uses libcrypt (openssl) function for generating random number seeds.
NEW: "intr.l1h" now has "debug" interrupt "intr0" 27 to show current execution position.
-- Stefan Pietzonke <jay-t@gmx.net> Fri Jul 16 2021 19:29 +0200
L1VM - (1.0.15)
NEW: sdl sdl_toggle_mouse_pointer:
// hide mouse pointer
(zero :sdl_toggle_mouse_pointer call)
// show mouse pointer
(one :sdl_toggle_mouse_pointer call)
Compiler: removed not needed protos. Added main.h header file.
Assembler: cleanup and added main.h header file.
VM: cleanup and added main.h header file.
SDL module: "set_gadget_string_passwd" function to hide input by showing just stars!
See "lib/sdl-lib.l1com" example for more!
NEW: experimental VM module math-lib-vect for array vector math.
This makes it possible for example add a number to all array indexes.
Or add two arrays and store the results in a third array.
See the "lib/math-lib-vect.l1com" example!
NEW: compiler now sets "loadreg" automatically if not set after stpop opcodes!
NEW: compiler RPN math code bugfixes.
Infix math to RPN conversion code seems to work now!
-- Stefan Pietzonke <jay-t@gmx.net> Sat Jun 5 2021 06:17 +0200
L1VM - (1.0.14)
Infix math expression to RPN converter now prints error message if brackets "()" don't match.
NEW: compiler - array variable assign in multi lines:
See prog/array-test.l1com
(set int64 5 arr_0 10 5 /)
@, 1234567890, 4, 3, ;
NEW: prog/start.l1com, prog/sdl-4.l1com, prog/sdl-5.l1com
and prog/webserver.l1com now use includes for the libraries!
NEW: prog/hello-for-2.l1com and prog/hello-while-2.l1com examples added.
NEW: BUGFIXES in the compiler by Andreas Weber (Andy1978).
And more help from him: the "run_ccpcheck.sh" script to find coding BUGS.
Thank you!
NEW: zerobuild and make scripts now use "-Wall -Wextra" compile flags!
And I added "vm/zerobuild-debug.txt" make script to use libasan fsanitize debug library.
NEW: sdl open screen:
(zero width height bit fullscreen :sdl_open_screen call)
If fullscreen is set to "1" then full screen mode is set!
-- Stefan Pietzonke <jay-t@gmx.net> Sat May 01 2021 23:38 +0200
L1VM - (1.0.13)
NEW: added network library "socket_get_file" function, to download a file via TCP/IP. (WIP)
net-lib-get-file.l1com
BUGFIX: network library: "socket_send_file", filename get first char fix!
NEW: math expressions in { }, are parsed as reverse polish notation:
{a = x y + z x * *}
is the same as: "a = x + y * z * x"
This needs no brackets for complex math expressions!
See "prog/hello-4.l1com" example!
NEW: function to convert infix to RPN if brackets are found in expression:
{ret = (y + z) * ((z + y) * foo)}
converts to RPN:
{ret = y z + z y + foo * *}
global.h: pragma messages for ALIGNMENT and MATH are moved to vm/main.c.
-- Stefan Pietzonke <jay-t@gmx.net> Fri Apr 09 2021 13:30 +0200
L1VM - (1.0.12)
Added include-lib/math-const.l1h: with math constants like Pi, etc.
-- Stefan Pietzonke <jay-t@gmx.net> Sun Mar 14 2021 16:51 +0100
L1VM - (1.0.11)
Updated "clean.sh" script to clean assemb/, comp/ and vm/ directories too!
Did a includes cleanup. Updated the version number to 1.0.11.
Update: now the Fedora, Debian and Windows 10 WSL Debian install scripts install the needed git client too!
VM: removed not needed debugging comments and code.
NEW: SDL2 library now with play wave sound function at bottom of sdl.c library file.
Now with "sdl_play_sound" function WAV files can be played.
NEW: SDL2 library get mouse state function added, see lib/sdl-lib-mouse.l1com example!
NEW: SDL2 library: joystick handling code added: get x and y axis and button presses can be read out from joystick!
See lib/sdl-lib-joystick.l1com example.
NEW: BUGFIXES!!!
I found some serious BUG in the compiler, valgrind did show errors on running some example code.
Now I fixed the BUG.
Complex math expressions like:
((((x y +)(y z +) +)((z z +)(x x +) +) +) ret =)
don't work at the moment! The compiler puts the output in one single line!??
Only this is working right now:
(((x y +)(x y *) +) z =)
or:
((x y +) z =)
I have to find out what happened in the l1com compiler!
UPDATE: I found the BUG! I had to remove the asymetrical math handling code!!
So everything should work now again!
-- Stefan Pietzonke <jay-t@gmx.net> Sun Mar 07 2021 18:49 +0100
L1VM - (1.0.10)
Include/global.h cleanup.
Now "LOW_RAM" define can be set for machines with little RAM.
Like I do on my Psion 5MX Linux L1VM port!
Updated the syntax highlighters to support the new ".l1h" header files too!
Updated the prog/math-circle example to use the latest "intr.l1h" interrupt call include!
NEW: prog/test-11.l1com for asymetric math expressions with three variables.
NEW now a function variable can be written as "varname~" :
(func foo)
#var ~ @foo
(set int64 1 x_start~ 10)
(set int64 1 y_start~ 10)
The automatic variable end tackon is done by the preprocessor.
The variables are named like "x_start@foo" in the output file.
NEW: SDL GUI: set_gadget_box_grid() to draw a grid of gadgets which can be read out via GUI event function.
NEW: Now the preprocessor can parse the normal comment: "//" too!
-- Stefan Pietzonke <jay-t@gmx.net> Mon Jan 18 2021 17:22 +0100
L1VM - (1.0.9)
NEW removed the experimental stack type check code. It didn't work right
because the modules stack actions couldn't be tracked right. I had to change the
module call API on all modules! :( So I just removed the stack check code!
NEW VM: interrupt 0: 26 for an error message if something is on the stack while it should be empty!
BUGFIX: compiler: fixed bug on for: for_pos not set on for fumction!
NEW: prepro/l1pre L1VM preprocessor for include header files.
BUIGFIX: lib-func/string.c: searchstr function now uses strstr() for searching of substr!
NEW: l1pre, now macros can be defined!
-- Stefan Pietzonke <jay-t@gmx.net> Sun Dec 27 2020 15:37 +0100
L1VM - (1.0.8)
Library cleanup: now string constants are defined by the "s" string len statement.
This fixes some serious bugs for example in the SDL library!
The syntax highlighters are updated: now witch "switchend" and "switch-end" statements.
The install scripts now create a ~/l1vm directory in the users home directory.
There are the following directories created:
~/l1vm
fonts/
lib/
prog/
After a successfull installation you can try the new "start.l1com" SDL demo launcher:
$ l1vm start
The start menu should be shown in a small window.
Have some fun!
NEW: VM now prints execution pos on errors. The assembler generates now a *.l1dbg text file
with the epos and assembly line number for easy error finding.
Now a stack check flag in "global.h" can be set for stack variable type checking on runtime.
Note: some programs may fail with an error!
NEW: home directory name now is get by HOME env variable (getenv).
So the L1VM root definition looks like:
#define SANDBOX_ROOT "/l1vm/"
-- Stefan Pietzonke <jay-t@gmx.net> Sun Dec 13 2020 17:58 +0100
L1VM - (1.0.7)
VM: process module: code for Windows added.
New: lib/ranges-l1b.l1com added: functions to check if a variable is inside a set range.
Compiler: new operator: "!" as a short form for "call" to call functions!
See: prog/hello-5.l1com
New: build script for Windows Cygwin added! See README!
New: build scripts for JIT-compiler build now build the "libl1vm-jit.so" library too!
New: now programs are searched by the VM in: "SANDBOX_ROOT/prog/" folder too!
For example in my SANDBOX_ROOT: "/home/stefan/l1vm/prog".
So you can launch programs from any directory with for example:
l1vm hello-2
lib/math-lib.l1com: added "math_not" function to return the "not" result number:
For example:
(zero not_num =)
(not_num :math_not call)
(not_ret stpopi)
The "not_ret" value would be: "1".
Program arguments for the program must be set by '-args'
$ l1vm programname -args foo bar
Compiler: fixed crash on brackets don't match in parser bug!
Compilerr: now "switch-end" and "switchend" used for switch end statement!
NEW: vm/net, lib/net-lib: functions for accessing "l1vm-data" server!
NEW: data_get_info in lib/net-lib:
GET INFO
3n1-.*
3n1-0
INT64
OK
This returns the full data element name matched by pattern search.
OR:
GET INFO
3n1-100
3n1-100
INT64
OK
VM: net library, read/write string bugfixes.
-- Stefan Pietzonke <jay-t@gmx.net> Sun Nov 15 2020 10:51 +0100
L1VM - (1.0.6)
Memory library size of calloc() variable types fixed!
New: lib/mem-lib-vect.l1com: C++ vector library.
Automatically expand, insert and erase vector elements!
Now the install script clones and installs zerobuild at start
if not already in ~/bin!
Build scripts now install clang compiler during build run, if not
already installed.
include/global.h: low RAM settings in comments
NEW: prog/switch.l1com switch statement added into compiler!!
-- Stefan Pietzonke <jay-t@gmx.net> Wed Sep 23 2020 21:35 +0200
L1VM - (1.0.5)
New: now the programs are build by "zerobuild" build tool.
New: sdl module: lib/sdl-lib.l1com: horizontal and vertical slider added.
Removed "-SDL" flag from VM.
New: Brackets compiler now supports constant variables:
const-byte, const-int16, const-int32, const-int64, const-double
See lib/math-lib.l1com for more!
VM JIT-compiler:
// JitRuntime jit; // Create a runtime specialized for JIT.
CodeHolder jcode; // Create a CodeHolder.
jcode.init(rt.environment ()); // use environment for latest asmjit
x86::Assembler a(&jcode);
used for latest lib asmjit.
-- Stefan Pietzonke <jay-t@gmx.net> Fri Jul 10 2020 18:08 +0200
L1VM - (1.0.4)
NEW: lib/int-wrapper.l1com: showing how to use the interrupt wrapper functions
in a print date/time demo. Now it is a bit easier to use them with the readable
function names.
NEW: global.h: TIMER_USE to set timer interrupt for time measurement
see vm/main.c: interrupt0
NEW: now assembler command line args can be set by compiler call, for
example:
comp/l1com prog/primes-4-long -sizes 100000 1000000000
NEW: assembler now shows code-, data- and filesize in KB, MB, etc. also.
BUGFIX install.sh and install-wsl-debian.sh installer scripts!
Now library installation installs SDL2 libraries.
JIT-compiler cleanup: double floating point opcodes BUGFIXES!
Compiler: removed "I" from stpushi/stpopi code output
New: JIT-compiler PRO: andi, ori added.
New: SDL_UpdateWindowSurface (window); in SDL module to update window surface!
Updated makefiles *.sh and for zerobuild, did cleanup them.
-- Stefan Pietzonke <jay-t@gmx.net> Sat Jun 13 2020 20:38 +0200
L1VM - (1.0.2)
New: net module: get_mimetype_from_filename function.
Returns the mimetype of a filename with *.* form.
See net module C source code for more info!
New: prog/webserver.l1com a simple webserver demo using net module
special functions. See website/ folder for more info!
Bugfix: gui.c/get_gadget_x2y2() gadget_index not taken from stack.
New checkmarks print on OK compiling and assembling.
Bugfix: assembler load byte file.
New: compiler runs the assembler to mke a full build of .l1com files.
New: compiler arguments for assembler are passed to the assembler!
Compiler: show_info () update.
NEW: syntax for opcode continous math:
{x + y * z * x a =} calculates the math expression and stores the result in "a".
NEW: compiler/main.c and parse-cont.c both using:
S4 load_variable_int (S4 level, S4 arg, S4 j);
S4 load_variable_double (S4 level, S4 arg, S4 j);
to load variables
Compiler: NEW: (reset-reg) to force variables are loaded into registers by
resetting the variable to register mapping.
Added Atom text editor syntax highlighting files.
-- Stefan Pietzonke <jay-t@gmx.net> Sun May 24 2020 22:00 +0200
L1VM - (1.0.1)
SDL module: sdl_open_screen stack error checks added.
NEW: Memory library lib/mem-lib.l1com for allocating and accessing dynamic memory.
File lib and net lib: now maximum handles are set by opening/init call.
See lib/file-lib and lib/net-lib.
Library fann: max number of fanns now can be set by program. Was set as 32.
Module genann changed to support more than one gennann ANN loaded.
-- Stefan Pietzonke <jay-t@gmx.net> Sun Apr 19 2020 19:24 +0200
L1VM - (1.0.0)
Finally I think it is time for 1.0 version number step!
File access SANDBOX on all file I/O in libraries.
See file/file-sandbox.c.
Math library text output fixes!
Removed AOT code parts from compiler.
Compiler: removed DEBUG printf lines, code cleanup.
-- Stefan Pietzonke <jay-t@gmx.net> Sat Apr 11 2020 22:15 +0200
L1VM - (0.9.15)
NEW: only one function to show call arguments for assembler and compiler.
NEW: Multi variable assign fixed:
(((x y +) a =) b =)
Is now allowed again!
SDL 2.0
-------
NEW: In this release I included an experimental version of the SDL library for SDL 2.0.
At the moment only the gfx primitives work: pixels lines etc...
NEW: GUI: all buttons and the string text input are working.
I replaced the string gadget event function by some older code of "flow 2"!
You can run the: "install-vm-sdl2.sh" script to try to install the VM and the SDL 2.0 modules.
German Umlauts now supported: ae, oe, ue.
Text input gadget now leaves the cursor inside the text entry box if maximum of visible chars is there.
Picture load and save functions: see sdl-lib-2.l1com library!
Compiler l1com: pullb opcode on "stpopi" on byte variable.
SDL 1.2 library code removed. From now on the SDL 2.0 libraries are needed to build
my L1VM SDL library!
-- Stefan Pietzonke <jay-t@gmx.net> Sun Apr 5 2020 14:14 +0200
L1VM - (0.9.14)
Return value checks for Cells: fann_read_ann () fixed!
VM: version number fixed.
Compiler l1com now shows not copyright message on start.
To get infos run it with:
$ l1com --help
$ l1com -?
The same changes made to the assembler l1asm too!
I did update the zerobuild makefile for l1com.
BUGFIX: VM: double_state() call return values fixed: addd, subd, muld, divd.
NEW: Ported L1VM to run on DragonFly BSD. I had to change something in vm/modules/rs232.
I added the DragonFly BSD /dev/tty* device names for RS232.
BUGFIX: compiler l1com: "call" function variable push bugfix.
Program "sdl-4" is working now again as black/grey pattern!
New: prog/test-10.l1com program, showing more then one function call in one line!
BUGFIX:
(:print_ret * call)
The "*" operator now works right and is used instead of "(loadreg)" function call to load
the callers registers context.
New: l1com: only one variable assign per line allowed!
-- Stefan Pietzonke <jay-t@gmx.net> Sun Mar 15 2020 22:00 +0100
L1VM - (0.9.13)
NEW: the install.sh script now installs to "~/bin" in the "/home" directory of the user!
So no root access is needed to install. You need the "bin" directory in your /home directory!
New: assemb/ comp/ vm/ egypt callgraph script added!
The scripts generate a .ps file with the graphicall call graph.
New: vm/modules/mpfr-c++/mpfr-head.cpp compiler warning on unused variable fix.
New: the "install.sh" script now checks if the needed libraries are installed, if not