c128 fixes

This commit is contained in:
Irmen de Jong 2021-12-30 18:33:26 +01:00
parent c15a75556d
commit 7c889f17b9
3 changed files with 9 additions and 7 deletions

View File

@ -3,7 +3,7 @@ package prog8.codegen.target.c128
import prog8.ast.base.DataType
import prog8.codegen.target.c64.normal6502instructions
import prog8.codegen.target.cbm.Mflpt5
import prog8.codegen.target.cbm.viceMonListPostfix
import prog8.codegen.target.cbm.viceMonListName
import prog8.compilerinterface.*
import java.io.IOException
import java.nio.file.Path
@ -43,7 +43,8 @@ class C128MachineDefinition: IMachineDefinition {
for(emulator in listOf("x128")) {
println("\nStarting C-128 emulator $emulator...")
val cmdline = listOf(emulator, "-silent", "-moncommands", "${programNameWithPath}.$viceMonListPostfix",
val viceMonlist = viceMonListName(programNameWithPath.toString())
val cmdline = listOf(emulator, "-silent", "-moncommands", viceMonlist,
"-autostartprgmode", "1", "-autostart-warp", "-autostart", "${programNameWithPath}.prg")
val processb = ProcessBuilder(cmdline).inheritIO()
val process: Process

View File

@ -18,6 +18,7 @@ This CPU is from the late 1970's and early 1980's and was used in many home comp
such as the `Commodore-64 <https://en.wikipedia.org/wiki/Commodore_64>`_.
The language aims to provide many conveniences over raw assembly code (even when using a macro assembler),
while still being low level enough to create high performance programs.
You can compile programs for various machines with this CPU such as the Commodore-64 and Commodore-128, and the Commander X16.
Prog8 is copyright © Irmen de Jong (irmen@razorvine.net | http://www.razorvine.net).
@ -64,8 +65,8 @@ Language features
- High-level code optimizations, such as const-folding, expression and statement simplifications/rewriting.
- Many built-in functions, such as ``sin``, ``cos``, ``rnd``, ``abs``, ``min``, ``max``, ``sqrt``, ``msb``, ``rol``, ``ror``, ``swap``, ``sort`` and ``reverse``
- Programs can be run multiple times without reloading because of automatic variable (re)initializations.
- Supports the sixteen 'virtual' 16-bit registers R0 .. R15 from the Commander X16, also on the C64.
- If you only use standard kernal and prog8 library routines, it is possible to compile the *exact same program* for both machines (just change the compiler target flag)!
- Supports the sixteen 'virtual' 16-bit registers R0 .. R15 from the Commander X16, also on the other machines.
- If you only use standard kernal and core prog8 library routines, it is possible to compile the *exact same program* for different machines (just change the compiler target flag)!
Code example

View File

@ -9,13 +9,13 @@ Prog8 targets the following hardware:
- optional use of memory mapped I/O registers
- optional use of system ROM routines
Currently there are two machines that are supported as compiler target (selectable via the ``-target`` compiler argument):
Currently these machines can be selected as a compiler target (via the ``-target`` compiler argument):
- 'c64': the Commodore 64
- 'c128': the Commodore 128
- 'c128': the Commodore 128 (*limited support only for now*)
- 'cx16': the `Commander X16 <https://www.commanderx16.com/>`_
This chapter explains the relevant system details of these machines.
This chapter explains some relevant system details of the c64 and cx16 machines.
.. hint::
If you only use standard kernal and prog8 library routines,