1; 2; Ullrich von Bassewitz, 2012-06-03 3; 4; Based on C code by Groepaz 5; 6; long __fastcall__ telldir (DIR *dir); 7; 8 9 10 .include "dir.inc" 11 .include "zeropage.inc" 12 13 14.proc _telldir 15 16 sta ptr1 17 stx ptr1+1 18 19; Clear high word of returned value 20 21 lda #0 22 sta sreg 23 sta sreg+1 24 25; Return dir->off 26 27 ldy #DIR::off+1 28 lda (ptr1),y 29 tax 30 dey 31 lda (ptr1),y 32 rts 33 34.endproc 35 36