Irmen de Jong
50343a18af
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/IfElseAsmGen.kt
2024-11-08 19:06:44 +01:00
Irmen de Jong
9864abd393
romsub keyword is now extsub
2024-11-06 22:14:53 +01:00
Irmen de Jong
c702c4a6df
internal rename of romsub to extsub
2024-11-06 21:42:16 +01:00
Irmen de Jong
4152f7e88c
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/IfElseAsmGen.kt
# compilerAst/src/prog8/ast/expressions/AstExpressions.kt
2024-11-06 01:43:57 +01:00
Irmen de Jong
77e376f6bf
romsub @bank now also accepts a variable so the bank can be dynamic
2024-11-06 00:02:36 +01:00
Irmen de Jong
fddd390d31
on the C64, if not using floats, disable basic ROM in startup to gain another 8Kb of RAM
...
MEMTOP is adjusted to $d000. This gives us 50 Kb of contiguous program RAM space. ($0801-$CFFF)
2024-11-04 22:11:44 +01:00
Irmen de Jong
e514eeba17
added c64.banks() and c64.getbanks() and c64 banking example
2024-11-04 20:14:30 +01:00
Irmen de Jong
85e87dfe2e
consolidate @rombank and @rambank into just @bank
2024-11-03 21:15:11 +01:00
Irmen de Jong
155896c4c7
added @rombank and @rambank bank number tags on romsubs
...
on cx16 and c128 targets the compiler then automatically inserts a CALLFAR instead of a regular JSR to automatically do the bank switching.
2024-11-03 18:19:31 +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
c8b090a98b
Merge branch 'master' into next_compositetypes
2024-10-27 13:52:17 +01:00
Irmen de Jong
4b4af9b527
no longer silently add RTS to asmsubs that don't have one
2024-10-27 13:49:00 +01:00
Irmen de Jong
a7a5dda378
merge master
2024-10-26 22:01:56 +02:00
Irmen de Jong
1f2d46628e
remove %option align_xxx (block level alignment, as we now have better alternatives)
2024-10-26 21:18:34 +02:00
Irmen de Jong
c9535049c8
%align directive and @align64
2024-10-26 20:58:35 +02:00
Irmen de Jong
1cd754f05d
adding @alignword/page on individual variables
2024-10-26 17:00:38 +02:00
Irmen de Jong
4ea31515cf
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/optimize/Optimizer.kt
2024-10-25 23:05:07 +02:00
Irmen de Jong
84d9040b57
make BIT test also work on signed byte variables. Fixed an address-of optimization error.
2024-10-23 22:34:18 +02:00
Irmen de Jong
6bc1fc4464
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/optimize/Optimizer.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
2024-10-23 21:53:21 +02:00
Irmen de Jong
fdd18c615c
more ifexpresssion codegen tweaks
2024-10-23 21:04:55 +02:00
Irmen de Jong
47c1bba41d
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# compiler/src/prog8/compiler/astprocessing/IntermediateAstPostprocess.kt
# compiler/test/ast/TestVariousCompilerAst.kt
2024-10-23 00:29:38 +02:00
Irmen de Jong
9927af1095
about var inits
2024-10-22 01:08:42 +02:00
Irmen de Jong
b23f1f4b72
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# compiler/src/prog8/compiler/astprocessing/IntermediateAstPostprocess.kt
# compiler/test/ast/TestIntermediateAst.kt
2024-10-21 01:08:11 +02:00
Irmen de Jong
a6159702da
defers are now only registered/called when flow of control actually reached the defer statement
...
a defer statement sets its corresponding bit in a bitmask that is shifted in the defer handler routine to see what defer blocks to call.
2024-10-21 00:55:51 +02:00
Irmen de Jong
0247fb0d84
some ast2 var tweaks
2024-10-21 00:20:54 +02:00
Irmen de Jong
db0c77c09e
rename
2024-10-19 23:01:41 +02:00
Irmen de Jong
af7cc9c761
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/ast/AstExpressions.kt
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# compiler/test/ast/TestIntermediateAst.kt
2024-10-19 22:45:39 +02:00
Irmen de Jong
9851d14fb9
added if expression: ubyte a = if b>0 44 else 55
...
it doesn't generate the best code yet, like regular ifs do.
2024-10-19 15:34:04 +02:00
Irmen de Jong
d8f1822c12
fixes
2024-10-18 20:32:46 +02:00
Irmen de Jong
ce7d094adb
Zig-like "defer" to clean up stuff when leaving the scope of the current routine.
2024-10-18 01:30:20 +02: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
38ef394e15
IR codegen: global vars with numeric initialization value are now also put into the VARIABLESWITHINIT section rather than requiring explicit code instructions to initialize them in INITGLOBALS.
...
Note that something similar, such as putting those variables inline in the program initialized with their value and all, cannot be done for the 6502 codegen: the program needs a mechanism to reset ALL variables when it runs a second time.
2024-10-16 22:15:51 +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
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
aef211e5f3
stricter array literal element type handling (number,bool,address-of).
...
More consistent implicit address-of handling if array literals contain by-ref identifiers (such as subroutine names)
2024-10-13 17:46:41 +02:00
Irmen de Jong
fa5479ee5f
fix ast printing of arrays with duplicate elements
2024-10-13 04:30:46 +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
5890a1ca1e
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# examples/test.p8
2024-09-14 23:18:38 +02:00
Irmen de Jong
c7b1e8d772
fixed a variable scopedname issue where it took the fully scoped name instead of just the local name
...
this made 64tass not strip out that code if it was unused
2024-09-14 23:17:26 +02:00
Irmen de Jong
f45fd517ac
fix merge
2024-09-12 23:53:36 +02:00
Irmen de Jong
a737547fe9
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/ast/AstExpressions.kt
# codeCore/src/prog8/code/optimize/Optimizer.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/ForLoopsAsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/ExpressionGen.kt
# codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
# codeOptimizers/src/prog8/optimizer/StatementOptimizer.kt
# compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt
# compiler/src/prog8/compiler/astprocessing/VariousCleanups.kt
# docs/source/todo.rst
# examples/test.p8
2024-09-12 23:32:23 +02:00
Irmen de Jong
255c5bfaca
improve containment check for few values
2024-09-11 03:24:30 +02:00
Irmen de Jong
01c6754928
get rid of problematic common-subexpression optimization
2024-09-11 01:10:42 +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
a1dfcd07a8
fixing things
2024-09-08 22:58:40 +02:00
Irmen de Jong
5cbf1cd2b1
cleanup imports
2024-09-08 22:58:36 +02:00