]> git.sur5r.net Git - cc65/commitdiff
lseek.o: new object file
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 7 Aug 2000 22:43:31 +0000 (22:43 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 7 Aug 2000 22:43:31 +0000 (22:43 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@266 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/Makefile
libsrc/atari/lseek.s [new file with mode: 0644]

index 121c4fce40a09f72e6a11e1e669841bb74dde25e..559ba3196db939346a00a75b0f8cb0f26f0e6e4a 100644 (file)
@@ -21,7 +21,7 @@ S_OBJS = crt0.o kbhit.o conio.o clrscr.o cputc.o ctype.o chline.o cvline.o \
         color.o gotoxy.o cclear.o revers.o readjoy.o break.o where.o write.o \
         gotox.o gotoy.o savevec.o rwcommon.o cgetc.o read.o getargs.o close.o \
         open.o oserror.o fdtable.o setcolor.o scroll.o mul40.o graphuse.o \
-        ostype.o clock.o
+        ostype.o clock.o lseek.o
 
 all:   $(C_OBJS) $(S_OBJS)
 
diff --git a/libsrc/atari/lseek.s b/libsrc/atari/lseek.s
new file mode 100644 (file)
index 0000000..f9609f2
--- /dev/null
@@ -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