remove useless close calls from diskio load

This commit is contained in:
Irmen de Jong 2023-10-21 22:25:38 +02:00
parent 335213b55f
commit cc81dd7d3e
6 changed files with 18 additions and 17 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -181,6 +181,11 @@ Als contains routines for operating on subdirectories (chdir, mkdir, rmdir) and
Read the `source code <https://github.com/irmen/prog8/tree/master/compiler/res/prog8lib/cx16/diskio.p8>`_
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
------

View File

@ -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!

View File

@ -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