Commit Graph

59 Commits

Author SHA1 Message Date
Irmen de Jong
8acb37b6c2 use bool type in examples and libraries 2022-07-08 21:50:32 +02:00
Irmen de Jong
0fcd57192b cx16diskio.f_read() now correctly deals with banked ram boundary 2022-06-26 21:42:56 +02:00
Irmen de Jong
0349d1d57c diskio: moved cx16 optimized f_read() to cx16diskio instead
so unfortunately you have to select the faster version yourself when on cx16
2022-06-04 00:33:27 +02:00
Irmen de Jong
c7eafd7c79 cx16: fix macptr() signature and use it in diskio.f_read() for big increase in load speed 2022-06-02 00:37:18 +02:00
Irmen de Jong
10b5fb5d72 fix for total size returnvalue of diskio.f_read_all() 2022-06-01 01:13:19 +02:00
Irmen de Jong
a735939d1e removed confusing GPL software license reference and copyright header from library files. (because of exclusion in output files)
Reworded software license and exclusion clause somewhat again in attempt to make it even clearer.
2022-05-30 20:12:20 +02:00
Irmen de Jong
3e62ffed0a x16 r39: optimize diskio.load_raw() to use kernal's headerless load support 2022-04-02 03:26:48 +02:00
Irmen de Jong
fd581ffc37 moved pattern_match() from prog8_lib to string module 2022-03-21 21:32:10 +01:00
Irmen de Jong
343f01d5e1 re-enabled unused variable removal from library modules (+fixed some @shared vars in libraries) 2022-02-10 03:10:47 +01:00
Irmen de Jong
fa48746ba9 increase internal buffer for diskio.list_files to be able to list larger directories 2022-01-26 03:17:33 +01:00
Irmen de Jong
b7d06f2c0a API change: added alignment parameter to memory() function 2022-01-24 18:58:57 +01:00
Irmen de Jong
d916027e75 labels no longer start with '_' fixes #62 2022-01-17 22:03:53 +01:00
Irmen de Jong
96225efd96 library doc tweaks 2022-01-03 23:15:34 +01:00
Irmen de Jong
890327b381 the returnvalue of the diskio.load() function family now is just the last load address+1 (like kernal's LOAD routine).
This fixes the inconsistent attempt to calculate a size, just let the caller do this if required.
Added a small helper function in cx16diskio to do this for loads that span multiple banks.
2021-12-14 23:54:42 +01:00
Irmen de Jong
5df623bd2e doc 2021-12-14 22:40:03 +01:00
Irmen de Jong
900cdd3fa1 added cx16diskio with load() and load_raw() that are HIMEM bank-aware 2021-12-05 02:20:48 +01:00
Irmen de Jong
72d7178762 added diskio.load_raw() to load headerless files 2021-12-04 00:07:21 +01:00
Irmen de Jong
e2f5752d9a add f_open_w, f_write, f_close_w to diskio to be able to save parts of memory sequentially 2021-05-01 19:13:56 +02:00
Irmen de Jong
1a59019fc8 add generic error in diskio.status() if drive status can't be read 2021-05-01 15:39:39 +02:00
Irmen de Jong
d116eb7655 paranoid, be sure to not kill carry 2021-04-06 23:55:20 +02:00
Irmen de Jong
975af4764d remove no longer needed strlen() calls from diskio routines 2021-01-23 22:46:46 +01:00
Irmen de Jong
4a81406262 fix diskio rename() and delete() 2021-01-23 17:57:30 +01:00
Irmen de Jong
c328e9018c cx16 assembler was moved into its own github repo 2021-01-18 01:38:33 +01:00
Irmen de Jong
7277c08fa6 added textio.spc(). assem tweaks. 2021-01-14 22:51:09 +01:00
Irmen de Jong
79e6d4b8dd better check for EOF status 2021-01-13 22:11:51 +01:00
Irmen de Jong
506ac8014c fix diskio.f_readline() that skipped first char. It also doesn't leave the end of line char in the string now. 2021-01-10 16:21:25 +01:00
Irmen de Jong
9fc0c3f849 removed diskio.f_read_exact() - wasn't worth it over f_read() 2021-01-10 14:29:51 +01:00
Irmen de Jong
db314ed903 added diskio.f_readline() 2021-01-10 05:04:56 +01:00
Irmen de Jong
b4d1d545a8 introduced txt.nl() 2021-01-08 16:56:17 +01:00
Irmen de Jong
3d09d605e1 moved memcopy, memset, memsetw builtin functions to sys.* 2021-01-08 01:09:37 +01:00
Irmen de Jong
58f37513e7 removed all string related builtin functions and moved them to separate routines in new 'string' library module 2021-01-07 20:01:11 +01:00
Irmen de Jong
ee7f9d457d text editor configs 2021-01-07 01:56:31 +01:00
Irmen de Jong
8e3e996f4a diskio.f_open() now also checks if file exists 2020-12-31 19:27:34 +01:00
Irmen de Jong
b6fa361bcc exit() now also resets the io channels. Optimized diskio data read subroutines. added diskio.f_read_all() 2020-12-31 19:09:29 +01:00
Irmen de Jong
89230ade7a change in pattern arguments of diskio.list_files() and lf_start_list(): you can now use a simple pattern with ? and * wildcards 2020-12-30 23:34:00 +01:00
Irmen de Jong
e17c18b653 fix issues with memory() function, rewrite examples to use it 2020-12-27 03:35:56 +01:00
Irmen de Jong
3b8e18004c fixed callgraph issue that allocated ALL variables in a (library) module even though some clearly weren't used at all. Variables declared in block level scope in a library are still all allocated / defined due to the nature of a library module with lists of definitions 2020-12-27 01:02:36 +01:00
Irmen de Jong
e0d2b60d8b added diskio.f_read_exact() 2020-12-24 06:24:52 +01:00
Irmen de Jong
684e081399 optimized register save/restore on Cx16 cpu target 2020-12-22 05:59:01 +01:00
Irmen de Jong
928611eb20 Got rid of problematic attempts to save status register after function calls. If you really need it (for instance for if_XX instructions) it's probably better to use a short asmsub wrapper.
For function calls, register saves go via stack (to allow nested saves) for simpler cases, registers are saved in a local variable.
Fixed too agressive removal of sta-lda sequence if the lda is followed by a branching instruction.
Insert missing cmp #0 after functioncall if the value of the A register is needed in a comparison expression (could otherwise test wrong status flag)
2020-12-22 03:35:00 +01:00
Irmen de Jong
3b7a92f1b4 adding strcopy() 2020-12-14 17:26:17 +01:00
Irmen de Jong
8b75ceb412 diskio.list_files now has a bigger buffer to store more filenames (around 30-40 max) 2020-12-14 14:29:42 +01:00
Irmen de Jong
34babfb5de added diskio.list_files(). ci-viewer now loads all *.ci files it finds. 2020-12-11 22:36:14 +01:00
Irmen de Jong
b5dc5fc615 added iterative file loading to diskio 2020-12-10 00:58:59 +01:00
Irmen de Jong
08f0303178 diskio status() now returns the status string instead of printing it 2020-12-10 00:02:21 +01:00
Irmen de Jong
ddf1be2a13 status condition couldn't properly be tested because restoring the X register clobbers the status flag 2020-12-08 22:15:07 +01:00
Irmen de Jong
b7694686c2 optimized code for branches containing just a goto or break statement 2020-12-08 22:00:52 +01:00
Irmen de Jong
106fc5daa4 tweak 2020-12-08 03:39:45 +01:00
Irmen de Jong
7accb73993 iterative file listing instead 2020-12-08 03:34:45 +01:00
Irmen de Jong
e9aa6a0956 TODOs 2020-12-08 02:20:24 +01:00