1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +00:00

Allow to set the ProDOS type and auxtype on creating new files in a similiar way done on the CBMs.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4902 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
ol.sc 2011-01-05 16:09:08 +00:00
parent d60c627cb6
commit bee54df029
2 changed files with 18 additions and 1 deletions

View File

@ -131,6 +131,20 @@ extern unsigned char _dos_type;
/*****************************************************************************/
/* Variables */
/*****************************************************************************/
/* The file stream implementation and the POSIX I/O functions will use the
* following variables to determine the file type and the aux type to use.
*/
extern unsigned char _filetype; /* Default 6 */
extern unsigned int _auxtype; /* Default 0 */
/*****************************************************************************/
/* Code */
/*****************************************************************************/

View File

@ -8,6 +8,7 @@
; called before closeallfiles).
.export _open, closedirect, freebuffer
.export __filetype, __auxtype
.destructor closeallfiles, 17
.import pushname, popname
@ -221,10 +222,12 @@ closedirect:
ldx #CLOSE_COUNT
jmp callmli
.rodata
.data
CREATE: .byte %11000011 ; ACCESS: Standard full access
__filetype:
.byte $06 ; FILE_TYPE: Standard binary file
__auxtype:
.word $0000 ; AUX_TYPE: Load address N/A
.byte $01 ; STORAGE_TYPE: Standard seedling file
.word $0000 ; CREATE_DATE: Current date