From 82e0877e6412c58eb911d8f25a94814a418d3acc Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Mon, 26 Feb 2024 01:17:25 +0100 Subject: [PATCH] readme --- README.md | 5 +++-- docs/source/index.rst | 8 ++++---- docs/source/todo.rst | 3 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e81821007..e0660fa7d 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ GNU GPL 3.0 (see file LICENSE), with exception for generated code: What does Prog8 provide? ------------------------ -- reduction of source code length over raw assembly -- fast execution speed due to compilation to native assembly code. It's possible to write certain raster interrupt 'demoscene' effects purely in Prog8. +- all advantages of a higher level language over having to write assembly code manually +- programs run very fast because compilation to native machine code. It's possible to write games purely in Prog8, and even certain raster interrupt 'demoscene' effects. - modularity, symbol scoping, subroutines - various data types other than just bytes (16-bit words, floats, strings) - floating point math is supported if the target system provides floating point library routines (C64 and Cx16 both do) @@ -60,6 +60,7 @@ What does Prog8 provide? - automatic static variable allocations, automatic string and array variables and string sharing - subroutines with input parameters and result values - high-level program optimizations +- no need for forward declarations - small program boilerplate/compilersupport overhead - programs can be run multiple times without reloading because of automatic variable (re)initializations. - conditional branches diff --git a/docs/source/index.rst b/docs/source/index.rst index fd6158ecd..26839b40c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -70,19 +70,19 @@ Language features ----------------- - It is a cross-compiler running on modern machines (Linux, MacOS, Windows, ...) - It generates a machine code program runnable on actual 8-bit 6502 hardware. -- Fast execution speed due to compilation to native assembly code. It's possible to write games purely in Prog8, and even certain raster interrupt 'demoscene' effects. +- Programs run very fast because compilation to native machine code. It's possible to write games purely in Prog8, and even certain raster interrupt 'demoscene' effects. - Provides a very convenient edit/compile/run cycle by being able to directly launch the compiled program in an emulator and provide debugging information to this emulator. - Based on simple and familiar imperative structured programming (it looks like a mix of C and Python) - Modular programming and scoping via modules, code blocks, and subroutines. +- No need for forward declarations. - Provide high level programming constructs but at the same time stay close to the metal; still able to directly use memory addresses and ROM subroutines, and inline assembly to have full control when every register, cycle or byte matters - Subroutines with parameters and return values - Complex nested expressions are possible - Variables are all allocated statically -- Conditional branches to map directly on processor branch instructions +- Conditional branches for status flags that map 1:1 to processor branch instructions - ``when`` statement to avoid if-else chains - ``in`` expression for concise and efficient multi-value/containment test - Several powerful built-in functions, such as ``lsb``, ``msb``, ``min``, ``max``, ``rol``, ``ror``, ``sort`` and ``reverse`` @@ -92,7 +92,7 @@ Language features - Identifiers can contain Unicode Letters, so ``knäckebröd``, ``приблизительно``, ``見せしめ`` and ``π`` are all valid identifiers. - Advanced code optimizations, such as const-folding (zero-allocation constants that are optimized away in expressions), expression and statement simplifications/rewriting. - Programs can be run multiple times without reloading because of automatic variable (re)initializations. -- Supports the sixteen 'virtual' 16-bit registers R0 .. R15 as defined on the Commander X16, also on the other machines. +- Supports the sixteen 'virtual' 16-bit registers R0 to R15 as defined on the Commander X16, also on the other machines. - Support for low level system features such as Vera Fx hardware word multiplication on the Commander X16 - If you only use standard Kernal and core prog8 library routines, it is sometimes possible to compile the *exact same program* for different machines (just change the compilation target flag) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index a21bd55e6..513c3bfc2 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -10,6 +10,7 @@ Future Things and Ideas ^^^^^^^^^^^^^^^^^^^^^^^ Compiler: +- IR: add TEST instruction to test memory content and set N/Z flags, without affecting any register. Replace all LOADM+CMPI #0 / LOAD #0+LOADM+CMP+BRANCH by this instruction - can we support signed % (remainder) somehow? - instead of copy-pasting inline asmsubs, make them into a 64tass macro and use that instead. that will allow them to be reused from custom user written assembly code as well. @@ -51,6 +52,7 @@ Compiler: Libraries: +- monogfx: add EOR mode support next to Stipple. See PAINT for inspiration. Can this also be added to gfx2? Self modifying code to keep it optimized? - conv: the routines could return the address of conv.string_out, and/or there could be versions that take the address of a different buffer and use it instead. - once kernal rom v47 is released, remove most of the workarounds in cx16 floats.parse_f() . Prototype parse routine in examples/cx16/floatparse.p8 - fix the problems in atari target, and flesh out its libraries. @@ -87,3 +89,4 @@ Other language/syntax features to think about - add (rom/ram)bank support to romsub. A call will then automatically switch banks, use callfar and something else when in banked ram. challenges: how to not make this too X16 specific? How does the compiler know what bank to switch (ram/rom)? How to make it performant when we want to (i.e. NOT have it use callfar/auto bank switching) ? +