lseek.o: new object file
git-svn-id: svn://svn.cc65.org/cc65/trunk@266 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
32
libsrc/atari/lseek.s
Normal file
32
libsrc/atari/lseek.s
Normal file
@@ -0,0 +1,32 @@
|
||||
;
|
||||
; Christian Groessler, August 2000
|
||||
;
|
||||
; this file provides the lseek() function
|
||||
;
|
||||
; off_t __fastcall__ lseek(int fd, off_t offset, int whence);
|
||||
;
|
||||
|
||||
|
||||
.export _lseek
|
||||
.import incsp6,__errno,__oserror
|
||||
.importzp sreg
|
||||
.include "atari.inc"
|
||||
.include "../common/errno.inc"
|
||||
|
||||
.proc _lseek
|
||||
|
||||
; dummy implementation, return -1 and ENOSYS errno value
|
||||
jsr incsp6
|
||||
lda #<ENOSYS
|
||||
sta __errno
|
||||
lda #>ENOSYS
|
||||
sta __errno
|
||||
ldx #0
|
||||
stx __oserror
|
||||
dex
|
||||
txa
|
||||
sta sreg
|
||||
sta sreg+1
|
||||
rts
|
||||
|
||||
.endproc
|
||||
Reference in New Issue
Block a user