diff --git a/asminc/stat.inc b/asminc/stat.inc deleted file mode 100644 index d9c74aeaa..000000000 --- a/asminc/stat.inc +++ /dev/null @@ -1,3 +0,0 @@ -; File mode constants, must match the values in the C headers -S_IREAD = $0100 ; octal 0400 -S_IWRITE = $0080 ; octal 0200 diff --git a/include/sys/stat.h b/include/sys/stat.h index e49c370f9..ece324f0b 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -48,7 +48,7 @@ ** https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation ** (S_IREAD and S_IWRITE are aliases for S_IRUSR and S_IWUSR) ** -** Must match the values in asminc/stat.inc and src/sim65/paravirt.c +** Must match the values in src/sim65/paravirt.c */ #define S_IREAD 0400 diff --git a/libsrc/common/_fopen.s b/libsrc/common/_fopen.s index 0154858dd..29f1c4cd9 100644 --- a/libsrc/common/_fopen.s +++ b/libsrc/common/_fopen.s @@ -15,7 +15,6 @@ .include "errno.inc" .include "fcntl.inc" .include "_file.inc" - .include "stat.inc" ; ------------------------------------------------------------------------ @@ -83,10 +82,7 @@ modeok: ldy #$00 tya iny sta (sp),y - lda #<(S_IREAD|S_IWRITE) - ldx #>(S_IREAD|S_IWRITE) - jsr pushax ; Push the "mode" argument onto the stack - ldy #6 ; Size of arguments in bytes + ldy #4 ; Size of arguments in bytes jsr _open ; Will cleanup the stack ; Check the result of the open() call