From 7c889f17b9a7e2ca508393f8e62eada65e5cc4bb Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Thu, 30 Dec 2021 18:33:26 +0100 Subject: [PATCH] c128 fixes --- .../src/prog8/codegen/target/c128/C128MachineDefinition.kt | 5 +++-- docs/source/index.rst | 5 +++-- docs/source/targetsystem.rst | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/codeGeneration/src/prog8/codegen/target/c128/C128MachineDefinition.kt b/codeGeneration/src/prog8/codegen/target/c128/C128MachineDefinition.kt index 7b69fb7c4..8302e0b81 100644 --- a/codeGeneration/src/prog8/codegen/target/c128/C128MachineDefinition.kt +++ b/codeGeneration/src/prog8/codegen/target/c128/C128MachineDefinition.kt @@ -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 diff --git a/docs/source/index.rst b/docs/source/index.rst index 0b6bbfbf6..f08a118df 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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 `_. 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 diff --git a/docs/source/targetsystem.rst b/docs/source/targetsystem.rst index 2c1f3f8a7..5f928be3c 100644 --- a/docs/source/targetsystem.rst +++ b/docs/source/targetsystem.rst @@ -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 `_ -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,