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

105 Commits

Author SHA1 Message Date
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
uz
d7aaac7e71 Return EUNKNOWN instead of EINVAL if the error code cannot be mapped.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4695 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-06-03 21:10:22 +00:00
ol.sc
d1aad57b98 Initialize _curunit from the zeropage value DEVNUM (aka First Address) in a constructor with a very high priority to be called before DEVNUM gets overwritten by other constructors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4588 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-02-14 23:12:54 +00:00
uz
c6831e936a Added --forget-inc-paths to the assembler command line to avoid problems if
more than one version of ca65 is installed on the machine (Spiro Trikaliotis).


git-svn-id: svn://svn.cc65.org/cc65/trunk@4530 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-18 11:58:50 +00:00
uz
1518a4813c The X register must be zero on return.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4426 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-02 16:24:26 +00:00
uz
3b06aaaf85 Added the new toascii function for the CBMs.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4425 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-02 16:23:32 +00:00
uz
30586e95e8 Cosmetic change. Formatting was lost because of cut&paste.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4357 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-10 20:50:15 +00:00
uz
a3529cd048 Ignore start address in cbm_opendir. Rearrange the code somewhat to make it
shorter.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4319 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-03 18:38:39 +00:00
uz
d54a1ba3d2 Improved cbm_dir routines by Thomas Giesel.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4264 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-28 22:01:58 +00:00
uz
23dae5a04b Fixed two more function that didn't clear the high byte of the function result.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4049 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-23 21:40:36 +00:00
uz
4c4071b34a Fixed an error in cbm_k_save (on which cbm_save is based): The X register was
not cleared on return.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4048 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-23 21:38:11 +00:00
uz
931add050e Added a systime implementation by Stefan Haubenthal with a few changes. The
routine reads the TOD clock of CIA1 on the C64 and C128. Since systime was a
dummy routine common for all CBMs before, this change adds an individual dummy
routine for all other CBM systems. CBM510/610 do also have a TOD clock, so a
similar function as in the C64 could be used ...


git-svn-id: svn://svn.cc65.org/cc65/trunk@3974 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-27 18:44:37 +00:00
uz
087ae8173a Be sure to read disk errors after sending the command on the command channel.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3973 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-27 18:42:37 +00:00
uz
37e08cac59 Re-added cbm_dir which was acidently removed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3964 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-05-07 18:31:57 +00:00
uz
89951068dd writefndiskcmd gets its arguments in ptr1 and Y.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3945 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 15:40:06 +00:00
uz
a0cd736adb Must open the command channel before writing to it.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3943 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 14:43:02 +00:00