mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +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:
parent
d60c627cb6
commit
bee54df029
@ -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 */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
; called before closeallfiles).
|
; called before closeallfiles).
|
||||||
|
|
||||||
.export _open, closedirect, freebuffer
|
.export _open, closedirect, freebuffer
|
||||||
|
.export __filetype, __auxtype
|
||||||
.destructor closeallfiles, 17
|
.destructor closeallfiles, 17
|
||||||
|
|
||||||
.import pushname, popname
|
.import pushname, popname
|
||||||
@ -221,10 +222,12 @@ closedirect:
|
|||||||
ldx #CLOSE_COUNT
|
ldx #CLOSE_COUNT
|
||||||
jmp callmli
|
jmp callmli
|
||||||
|
|
||||||
.rodata
|
.data
|
||||||
|
|
||||||
CREATE: .byte %11000011 ; ACCESS: Standard full access
|
CREATE: .byte %11000011 ; ACCESS: Standard full access
|
||||||
|
__filetype:
|
||||||
.byte $06 ; FILE_TYPE: Standard binary file
|
.byte $06 ; FILE_TYPE: Standard binary file
|
||||||
|
__auxtype:
|
||||||
.word $0000 ; AUX_TYPE: Load address N/A
|
.word $0000 ; AUX_TYPE: Load address N/A
|
||||||
.byte $01 ; STORAGE_TYPE: Standard seedling file
|
.byte $01 ; STORAGE_TYPE: Standard seedling file
|
||||||
.word $0000 ; CREATE_DATE: Current date
|
.word $0000 ; CREATE_DATE: Current date
|
||||||
|
Loading…
x
Reference in New Issue
Block a user