fileseek for writing not right now

This commit is contained in:
Irmen de Jong 2022-11-27 21:52:18 +01:00
parent 2fad52d684
commit 3c698f1584
2 changed files with 7 additions and 6 deletions

View File

@ -3,10 +3,8 @@ TODO
For next release
^^^^^^^^^^^^^^^^
- duplicate diskio for cx16 (get rid of cx16diskio, just copy diskio and tweak everything) + documentation
- get f_seek_w working like in the BASIC program - this needs the changes to diskio.f_open to use suffixes ,p,m
- attempt to fix the expression codegen bug with reused temp vars (github #89)
- AstIdentifiersChecker: can a subroutine really not have the same name as its enclosing block? 64tass problem?
- attempt to fix the expression codegen bug with reused temp vars (github #89)
- 6502 codegen: make it possible to use cpu opcodes such as 'nop' as variable names by prefixing all asm vars with something such as ``p8v_``? Or not worth it (most 3 letter opcodes as variables are nonsensical anyway)
then we can get rid of the instruction lists in the machinedefinitions as well. This is already no problem at all in the IR codegen.
- create BSS section in output program and put StStaticVariables in there with bss=true. Don't forget to add init code to zero out everything that was put in bss. If array in bss->only zero ONCE! So requires self-modifying code
@ -49,6 +47,8 @@ Compiler:
Libraries:
- duplicate diskio for cx16 (get rid of cx16diskio, just copy diskio and tweak everything) + documentation
- get f_seek_w working like in the BASIC program - this needs the changes to diskio.f_open to use suffixes ,p,m
- fix the problems in c128 target, and flesh out its libraries.
- fix the problems in atari target, and flesh out its libraries.
- c64: make the graphics.BITMAP_ADDRESS configurable (VIC banking)

View File

@ -14,7 +14,7 @@ main {
txt.print("writing data file...\n")
uword total=0
if diskio.f_open_w(8, "@:seektestfile.bin,p,m") {
if diskio.f_open_w(8, "@:seektestfile.bin") {
repeat 100 {
str text = "hello world.\n"
void diskio.f_write(text, string.length(text))
@ -32,6 +32,7 @@ main {
read_last_bytes()
; NOTE: f_seek_w() doesn't work right now. It requires substantial changes to the diskio library that are not compatible with the C64/C128.
; txt.print("\nseeking to 1292 and writing a few bytes...\n")
; if diskio.f_open_w(8, "seektestfile.bin,p,m") {
; cx16diskio.f_seek_w(0, 1292)
@ -51,7 +52,7 @@ main {
uword total = 0
uword size
txt.print("\nreading...\n")
if diskio.f_open(8, "seektestfile.bin,p,r") {
if diskio.f_open(8, "seektestfile.bin") {
size = diskio.f_read_all(megabuffer)
diskio.f_close()
txt.print("size read:")
@ -63,7 +64,7 @@ main {
}
txt.print("\nseeking to 1290 and reading...\n")
if diskio.f_open(8, "seektestfile.bin,p,r") {
if diskio.f_open(8, "seektestfile.bin") {
cx16diskio.f_seek(0, 1290)
uword ptr = megabuffer
do {