1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 22:29:31 +00:00
Commit Graph

120 Commits

Author SHA1 Message Date
ol.sc
6618e08bc3 Minimal formatting adjustment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5856 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-16 21:29:14 +00:00
ol.sc
3ca0ddb1b0 Better stick to the "high level" errno helpers as done everywhere else.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5845 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-10 20:51:10 +00:00
ol.sc
300817702f initcwd will be called from the upcoming __syschdir so it has to be moved out of the INIT segment - and so it doesn't make sense anymore to keep devicestr as separate module anymore as the integration with initcwd allows to omit the jmp from the latter to the former.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5844 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-10 19:32:30 +00:00
ol.sc
9ff0085f14 Removed TAB.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5842 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-10 19:12:29 +00:00
ol.sc
5d4a441dd8 Clear _oserror on success.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5841 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-07 20:20:54 +00:00
ol.sc
987c3066a3 Introduced getdevicedir() - with implementation for the CBMs.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5840 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-07 19:18:56 +00:00
ol.sc
59e96ef740 Turned the 'ST' status byte into a symbol resolved by the linker in order to allow to use it from code living in the 'cbm' directory.
Moved getdevice.s from 'c64'/'c128' to 'cbm' making use of the new 'ST' setup.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5834 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-09-30 18:20:15 +00:00
ol.sc
093e83835d Have the internal function 'isdisk' set the carry for device 31. As the device id 31 doesn't really exist it is for sure no disk.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5818 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-09-05 19:07:34 +00:00
uz
942c0b6b2f Choose another way to fix the issue from r5804: When parsing the directory
name, add a file mask, so the result is "$0:*" or similar. When specified like
this, the drive accepts the r/o specifier ",R" so we don't have to complicate
the code in open().


git-svn-id: svn://svn.cc65.org/cc65/trunk@5805 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-08-06 18:45:26 +00:00
uz
55b56b2475 Fixed a bug: The floppies do not like ,R (for read mode) when opening the
directory.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5804 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-08-05 21:32:40 +00:00
uz
537b18d765 Fix invalid header offset (has been changed in opendir.c but checkin of
readdir.c was missing).
                     


git-svn-id: svn://svn.cc65.org/cc65/trunk@5800 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-08-01 08:49:09 +00:00
uz
fbdd6faff6 Fixed a comment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5798 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-30 19:02:07 +00:00
uz
470a4abcf2 Include the CBM disk label in the returned directory entries.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5797 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-30 19:01:45 +00:00
uz
a62958764d Move the _filetype variable into its own module, so people who want to change
the default can replace exactly this module without interfering with other
stuff.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5785 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-15 12:34:35 +00:00
uz
f7f4d01e52 Do not add the file type to the name when using append mode. It causes more
problems than it helps.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5784 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-15 12:30:43 +00:00
uz
511b826dfd Use 's' as default file type instead of 'u'.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5756 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-01 18:24:01 +00:00
uz
e03feeefae Unified names of CBM kernal level functions and completed the list of
functions in the cbm.h header file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5750 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-01 12:36:44 +00:00
uz
af799c922f Fixed wrong filename for module c_getin.s
git-svn-id: svn://svn.cc65.org/cc65/trunk@5748 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-01 11:32:59 +00:00
uz
49542644df Added missing function cbm_k_getin, which was in cbm.h but an implementation
was missing.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5747 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-07-01 11:30:41 +00:00
uz
5bc67cdaee Move definitions for CBM file types into its own header file, since these
definitions are needed for file type macros in dirent.h. Unify names for the
include files.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5735 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-24 13:52:06 +00:00
uz
4e0cbcf33f Reorder variables to take advangate of improved code generation.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5694 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-07 13:31:32 +00:00
uz
2f87dbc27e Allow a third, optional filename argument for cbm_opendir.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5683 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-04 18:32:38 +00:00
uz
95413d0350 Small optimization for shorter code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5681 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 16:49:23 +00:00
uz
ea51c5a4e2 Parse the name passed to opendir().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5678 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 15:48:32 +00:00
uz
2a53124b15 Don't set errno when the regular end of directory is reached. Plus minor code
cleanup.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5677 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 15:31:19 +00:00
uz
c40b54ee6c Implemented rewinddir/seekdir.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5676 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 15:11:32 +00:00
uz
5f43589885 Fix two place where the directory offset wasn't tracked correctly.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5675 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 15:01:32 +00:00
uz
55463bbf91 Removed unnecessary include files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5674 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 14:32:15 +00:00
uz
3a8365c445 Added the telldir() function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5673 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 14:03:22 +00:00
uz
a83bf3dc04 Implement special read function that sets errno in case of a short read. Drop
_dirskip in favour of the new function.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5672 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-03 13:59:31 +00:00
uz
ebca2991a3 Moved most of the file type detection from cbm_dir.c into a new function
called _cbm_filetype().
Added an assembler include file with the file type definitions from cbm.h.
Added a first implementation of readdir() for the CBMs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5669 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-02 22:56:14 +00:00
uz
eab5f250ad New function _dirskip that allows to skip an amount of bytes from the
directory with error check.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5668 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-06-01 19:23:34 +00:00
uz
08b4ed1035 Added the POSIX functions opendir() and closedir().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5666 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-30 19:37:57 +00:00
uz
6952703d69 Added a header file for the internal representation of DIR.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5665 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-29 21:39:40 +00:00
uz
64d3d9e41f Add provisions to open a disk directory using open().
git-svn-id: svn://svn.cc65.org/cc65/trunk@5663 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-29 20:52:18 +00:00
uz
33926dee54 Fixed an error: The write routine didn't detect write errors correctly.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5653 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-04-25 20:00:09 +00:00
uz
285aaf8933 Patch by Stefan Haubenthal: Remove __fastcall__ in comments and/or the
function description for functions that don't take any parameters.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5573 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 13:08:54 +00:00
uz
4127923ad1 Code optimization contributed by Kajtar Zsolt, soci@c64.rulez.org
git-svn-id: svn://svn.cc65.org/cc65/trunk@5356 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-01 20:03:33 +00:00
uz
49cdfcf5b0 The BASIC stub does encode the start address with only 4 digits. Add a check
so the linker will not generate an invalid header for program files with
larger start addresses.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5074 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-08 08:58:41 +00:00
uz
ba2a945417 Changes by Greg King:
Made cbm_readdir() report a disk's format-code and more file-access modes.
Added more definitions to <cbm.h> for cbm_readdir().  And, improved the
header's comments.  Added some ASCII-to-PetSCII character-mappings.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4986 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-16 12:28:06 +00:00
uz
c7528d6e3e Patch by groepaz to fix the problem that DEL files would appear as type DIR.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4983 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-04-07 20:58:03 +00:00
uz
a9990fbcf3 Changed priorities of destructors so atexit will be called before open files
are closed on exit, so atexit handlers may close the files themselves or
whatever is necessary for a clean shutdown.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4939 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-28 10:55:03 +00:00
uz
85c157f8fa Removed the code that checks for valid/invalid chars in a filename. Actually
most characters are valid, and even the remaining ones do something more or
less useful.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4867 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-15 21:50:58 +00:00
uz
62e39780bc Added a module that contains a small basic stub (SYS header) that starts
machine language code following it. Using this header, machine language
programs linked to this stub can be started using RUN.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4861 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-14 11:50:38 +00:00
uz
ae922930a1 New module that contains the load address expected by the Commodore machines
in the first two bytes of a file loaded with LOAD.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4855 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-11-13 16:56:42 +00:00
uz
ae98a6db40 Fixed sources to use the new __mappederrno and __directerrno functions, and
made handling of _oserror and errno consistent.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4731 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-06-26 11:28:44 +00:00
uz
8806c31e4a No need to import __oserror.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4719 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-06-10 19:14:42 +00:00
uz
131a5cad09 Renamed oserrcheck to __mappederrno. Added an additional function named
__directerrno and moved both to errno.s. Changed several sources to use these
functions. Needs testing.
                         


git-svn-id: svn://svn.cc65.org/cc65/trunk@4718 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-06-10 18:10:53 +00:00
uz
e0c00d2054 Fix errno/oserror handling.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4711 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-06-04 10:50:58 +00:00
uz
a86d23a63c Change calling convention of cbm_save() to __fastcall__.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4709 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-06-04 10:25:53 +00:00