Commit Graph

280 Commits

Author SHA1 Message Date
Irmen de Jong
3b9a114a5c Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/core/BuiltinFunctions.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/FunctionCallAsmGen.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/ProgramAndVarsGen.kt
#	codeOptimizers/src/prog8/optimizer/ConstantFoldingOptimizer.kt
#	codeOptimizers/src/prog8/optimizer/ConstantIdentifierReplacer.kt
#	codeOptimizers/src/prog8/optimizer/ExpressionSimplifier.kt
#	compiler/src/prog8/compiler/BuiltinFunctions.kt
#	compiler/src/prog8/compiler/astprocessing/AstChecker.kt
#	compiler/src/prog8/compiler/astprocessing/BeforeAsmTypecastCleaner.kt
#	compiler/src/prog8/compiler/astprocessing/IntermediateAstMaker.kt
#	compiler/test/TestBuiltinFunctions.kt
#	compiler/test/TestSubroutines.kt
#	compiler/test/TestTypecasts.kt
#	compilerAst/src/prog8/ast/expressions/AstExpressions.kt
2024-11-23 17:38:13 +01:00
Irmen de Jong
5c09dc10ae convert build.gradle to build.gradle.kts (kotlin DSL) 2024-11-20 23:23:26 +01:00
Irmen de Jong
c4a6bccec4 Merge branch 'master' into next_compositetypes 2024-11-20 02:20:39 +01:00
Irmen de Jong
d78ce77536 improve vm error message when referencing a block name 2024-11-19 20:57:58 +01:00
Irmen de Jong
b14012c9bc Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/AssignmentGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
#	compiler/src/prog8/compiler/astprocessing/AstPreprocessor.kt
#	compiler/test/TestZeropage.kt
#	compilerAst/src/prog8/ast/statements/AstStatements.kt
#	virtualmachine/src/prog8/vm/VirtualMachine.kt
2024-11-02 04:57:28 +01:00
Irmen de Jong
3b798097b9 added memtop to machine definition and asm source code check
added %memtop directive
2024-11-02 00:59:07 +01:00
Irmen de Jong
4a47e15b1c fix IR if expression sometimes lacking a cmpi after calculation of the condition value
VM/IR: add a returni immediate value return instruction to replace certain returnr's
2024-11-01 01:04:16 +01:00
Irmen de Jong
09cbdf410a added diskio.exists(), made f_close_w() idempotent like f_close() already was 2024-10-31 21:25:22 +01:00
Irmen de Jong
483d193ced vm: implemented reading/writing files in diskio 2024-10-29 02:34:53 +01:00
Irmen de Jong
ea3b30a8e8 Merge branch 'master' into next_compositetypes 2024-10-28 21:45:05 +01:00
Irmen de Jong
570b574b93 added sys.memcmp 2024-10-28 00:41:26 +01:00
Irmen de Jong
c218234efe Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/SymbolTable.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/ProgramAndVarsGen.kt
#	compiler/test/TestSymbolTable.kt
#	examples/test.p8
#	intermediate/src/prog8/intermediate/IRFileReader.kt
#	intermediate/src/prog8/intermediate/IRSymbolTable.kt
#	intermediate/src/prog8/intermediate/Utils.kt
#	virtualmachine/src/prog8/vm/VmProgramLoader.kt
2024-10-16 22:40:45 +02:00
Irmen de Jong
cbc4b75e50 IR now contains "bool" as a type instead of already erasing it into "ubyte". (boolean literals still are simply just 1 and 0 values) 2024-10-16 01:03:35 +02:00
Irmen de Jong
65ddcf91d0 remove unused syscalls 2024-10-15 18:24:55 +02:00
Irmen de Jong
0f72bdb4a2 Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/core/BuiltinFunctions.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/BuiltinFuncGen.kt
#	codeOptimizers/src/prog8/optimizer/ConstantIdentifierReplacer.kt
#	compiler/src/prog8/compiler/astprocessing/AstChecker.kt
#	compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt
#	compiler/test/ast/TestAstChecks.kt
2024-10-13 21:48:33 +02:00
Irmen de Jong
e9edffa9f0 remove support for array-to-array assignments (other than initialization of variable declaration)
Just use an explicit sys.memcopy(src, dest, sizeof(dest))  or assign array members individually.
2024-10-13 20:02:43 +02:00
Irmen de Jong
7afd716fab Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/core/BuiltinFunctions.kt
#	compiler/src/prog8/compiler/astprocessing/AstChecker.kt
#	examples/test.p8
2024-10-08 22:58:26 +02:00
Irmen de Jong
eaa22a9d13 added callfar2() builtin function that allows to set A,X,Y and Carry arguments. 2024-10-08 21:36:04 +02:00
Irmen de Jong
8f5d42dbc2 more tests and some cleanups/fixes 2024-09-08 23:01:49 +02:00
Irmen de Jong
759babb4c1 rename back to DataType 2024-09-08 22:59:08 +02:00
Irmen de Jong
5cbf1cd2b1 cleanup imports 2024-09-08 22:58:36 +02:00
Irmen de Jong
e80c22275d making datatype more capable (subtypes) 2024-09-08 22:58:35 +02:00
Irmen de Jong
74e305b90c making datatype more capable (subtypes) 2024-09-08 22:57:49 +02:00
Irmen de Jong
edc5a5a94f improve data driven unit tests to use kotest withData() 2024-09-08 16:55:08 +02:00
Irmen de Jong
2c2ae64194 replace java Stack by kotlin ArrayDeque 2024-09-02 00:15:28 +02:00
Irmen de Jong
d5adb85e5b IR: add SEC,CLC,SEI,CLI instructions for the sys function calls. 2024-07-14 21:01:19 +02:00
Irmen de Jong
484677b4b1 Get rid of any() and all() builtin functions.
Replaced by regular subroutines in the anyall module.
2024-07-06 18:49:03 +02:00
Irmen de Jong
4f8aaf9244 some tweaks and todos 2024-06-26 21:22:40 +02:00
Irmen de Jong
034f27a8dd added queens example, update kotest lib 2024-06-19 23:57:43 +02:00
Irmen de Jong
c719e274d5 java version tweaks 2024-05-18 20:25:44 +02:00
Irmen de Jong
4a710ecdfc cleanups 2024-05-17 18:48:04 +02:00
Irmen de Jong
7915dda35f update libraries 2024-05-12 03:02:54 +02:00
Irmen de Jong
2e37f5dee3 IR: support for multi-returnvalue function calls (asmsubs)
note: the VM can't execute these though as it has no CPU hardware registers
2024-03-23 00:30:17 +01:00
Irmen de Jong
66e7c51064 IR: fix some things related to asmsubs 2024-03-22 21:49:01 +01:00
Irmen de Jong
de3d0b40dc fixed vm problem with branching instructions in global init chunk 2024-03-17 13:22:17 +01:00
Irmen de Jong
4db4a5f1b2 vm: txt.width() and height() now return the actual console terminal width and height if possible. 2024-03-16 22:40:08 +01:00
Irmen de Jong
5a0524ff4d various fixes 2024-03-16 18:48:06 +01:00
Irmen de Jong
80f39e8097 Merge branch 'booleans'
# Conflicts:
#	compiler/res/prog8lib/cx16/monogfx.p8
#	compiler/res/prog8lib/virtual/monogfx.p8
#	compiler/src/prog8/compiler/astprocessing/BoolRemover.kt
#	compiler/test/TestTypecasts.kt
#	docs/source/todo.rst
#	examples/cx16/highresbitmap.p8
#	examples/test.p8
#	httpCompilerService/src/prog8/http/TestHttp.kt
2024-03-11 01:00:48 +01:00
Irmen de Jong
3a9919a377 implemented a couple more diskio routines for the VM target 2024-03-09 17:36:39 +01:00
Irmen de Jong
bdfb01f6a0 VM: implemented a few core routines in diskio (load/save)
textelite can now load and save your progress like it already could in the real version
2024-03-06 23:21:01 +01:00
Irmen de Jong
04f7b772a3 lib updates, removed unused and obsolete http and dbus modules 2024-03-05 23:42:35 +01:00
Irmen de Jong
32afcbfe42 compilerAst BOOL type changes 2024-03-02 23:19:20 +01:00
Irmen de Jong
040d75dafa VM now supports indirect jump instruction 2024-02-22 16:19:26 +01:00
Irmen de Jong
4e1686f6e3 fix warnings in gradle build scripts 2024-02-22 10:34:51 +01:00
Irmen de Jong
88458f5355 faster array copy and fix for length 256 2024-02-11 23:57:38 +01:00
Irmen de Jong
d7f72056fc rest of the array copying 2024-02-10 17:16:06 +01:00
Irmen de Jong
906d9d858c implementing the array copys 2024-02-10 01:40:36 +01:00
Irmen de Jong
6eacf1bddd added a few more IR syscalls for often used copy routines 2024-02-09 23:56:44 +01:00
Irmen de Jong
39d2194d8f IR: implemented inplace prefix op on split array
VM: NEG instructions also set N and Z flags
2024-01-28 22:33:13 +01:00
Irmen de Jong
504d1440cc fixed rol(),rol2(),ror(),ror2() 2024-01-17 21:02:17 +01:00