From cc81dd7d3edcd59dae5956a1ac3e1341ba0d398f Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 21 Oct 2023 22:25:38 +0200 Subject: [PATCH] remove useless close calls from diskio load --- compiler/res/prog8lib/cx16/diskio.p8 | 9 ++++----- compiler/res/prog8lib/diskio.p8 | 5 ----- compiler/src/prog8/buildversion/BuildVersion.kt | 12 ++++++------ docs/source/libraries.rst | 5 +++++ docs/source/todo.rst | 2 ++ gradle.properties | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/compiler/res/prog8lib/cx16/diskio.p8 b/compiler/res/prog8lib/cx16/diskio.p8 index e8a1d6d6d..1e6c4e90c 100644 --- a/compiler/res/prog8lib/cx16/diskio.p8 +++ b/compiler/res/prog8lib/cx16/diskio.p8 @@ -1,6 +1,10 @@ ; Commander X16 disk drive I/O routines. ; Largely compatible with the default C64 ones, but adds more stuff specific to the X16 as well. +; NOTE: If you experience weird behavior with these routines and you are using them +; in the X16 emulator using HostFs, please try again with an SD-card image instead first. +; It is possible that there are still small differences between HostFS and actual CBM DOS in the emulator. + %import textio %import string %import syslib @@ -516,9 +520,6 @@ io_error: if_cc cx16.r0L = cbm.READST()==0 - cbm.CLRCHN() - cbm.CLOSE(1) - return cx16.r0L } @@ -567,8 +568,6 @@ io_error: + }} - cbm.CLRCHN() - cbm.CLOSE(1) return cx16.r1 } diff --git a/compiler/res/prog8lib/diskio.p8 b/compiler/res/prog8lib/diskio.p8 index 94c6b8620..b5eefc043 100644 --- a/compiler/res/prog8lib/diskio.p8 +++ b/compiler/res/prog8lib/diskio.p8 @@ -476,9 +476,6 @@ io_error: if_cc cx16.r0L = cbm.READST()==0 - cbm.CLRCHN() - cbm.CLOSE(1) - return cx16.r0L } @@ -506,8 +503,6 @@ io_error: + }} - cbm.CLRCHN() - cbm.CLOSE(1) return cx16.r1 } diff --git a/compiler/src/prog8/buildversion/BuildVersion.kt b/compiler/src/prog8/buildversion/BuildVersion.kt index df2412404..16e49cc7d 100644 --- a/compiler/src/prog8/buildversion/BuildVersion.kt +++ b/compiler/src/prog8/buildversion/BuildVersion.kt @@ -5,11 +5,11 @@ package prog8.buildversion */ const val MAVEN_GROUP = "prog8" const val MAVEN_NAME = "compiler" -const val VERSION = "9.5.1" -const val GIT_REVISION = 4157 -const val GIT_SHA = "3dc5a0e7f8e5a94fdb4c13ff9199a4bf912268f2" -const val GIT_DATE = "2023-10-18T21:59:37Z" +const val VERSION = "9.6-SNAPSHOT" +const val GIT_REVISION = 4159 +const val GIT_SHA = "335213b55f971452a05c904216cb0fd72f5518a1" +const val GIT_DATE = "2023-10-21T00:16:58Z" const val GIT_BRANCH = "master" -const val BUILD_DATE = "2023-10-19T19:55:55Z" -const val BUILD_UNIX_TIME = 1697745355291L +const val BUILD_DATE = "2023-10-21T20:22:14Z" +const val BUILD_UNIX_TIME = 1697919734197L const val DIRTY = 1 diff --git a/docs/source/libraries.rst b/docs/source/libraries.rst index cb59bb839..70088e25a 100644 --- a/docs/source/libraries.rst +++ b/docs/source/libraries.rst @@ -181,6 +181,11 @@ Als contains routines for operating on subdirectories (chdir, mkdir, rmdir) and Read the `source code `_ to see what's in there. (Note: slight variations for different compiler targets) +.. note:: + If you are using the X16 emulator with HostFS, and are experiencing weird behavior with these + routines, please first try again with an SD-card image instead of HostFs. + It is possible that there are still small differences between HostFS and actual CBM DOS in the X16 emulator. + string ------ diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 588c7064a..90f7d49d1 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -1,6 +1,8 @@ TODO ==== +- don't add implicit type casts to function call arguments, so diskio.f_read(bytevar, 0) will become a compilation error + - [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 .... - [on branch: ir-less-branch-opcodes] IR: reduce the number of branch instructions such as BEQ, BEQR, etc (gradually), replace with CMP(I) + status branch instruction - IR: reduce amount of CMP/CMPI after instructions that set the status bits correctly (LOADs? INC? Bitwise operations, etc), but only after setting the status bits is verified! diff --git a/gradle.properties b/gradle.properties index 4a9e26d7b..3afd4299c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ org.gradle.daemon=true kotlin.code.style=official javaVersion=11 kotlinVersion=1.9.10 -version=9.5.1 +version=9.6-SNAPSHOT