From 3c698f1584265f6f5a8f770f3475711629ace939 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 27 Nov 2022 21:52:18 +0100 Subject: [PATCH] fileseek for writing not right now --- docs/source/todo.rst | 6 +++--- examples/cx16/fileseek.p8 | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 9ae55f58a..d6f084c5e 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -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) diff --git a/examples/cx16/fileseek.p8 b/examples/cx16/fileseek.p8 index 7cd99d2fc..0282e4aeb 100644 --- a/examples/cx16/fileseek.p8 +++ b/examples/cx16/fileseek.p8 @@ -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 {