4 ; This function is used to place the Lynx hardware to point to any byte in
7 ; This function supports all available block sizes (512, 1024 and 2048 bytes).
8 ; No other block sizes have been used afaik.
10 ; Only SEEK_SET operation mode is implemented.
12 ; off_t __fastcall__ lseek(int fd, off_t offset, int whence);
14 .importzp sp, sreg, regsave, regbank, tmp1, ptr1, ptr2
17 .import addysp, stax0sp, tosand0ax, pusheax, asreax2
18 .import ldeaxysp, decsp2, pushax, incsp8
19 .import tosandeax,decax1,tosdiveax,axlong,ldaxysp
20 .import lynxskip0, lynxblock,tosasreax
22 .importzp _FileCurrBlock
35 lda #<(__BLOCKSIZE__/1024 + 9)
42 lda #<(__BLOCKSIZE__-1)
43 ldx #>(__BLOCKSIZE__-1)