From fe92bc9c68b1b88c07f6c4dd3f8f847ea8ac02bb Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 6 Feb 2011 14:34:02 +0000 Subject: [PATCH] Bug correction by Karri Kaksonen. git-svn-id: svn://svn.cc65.org/cc65/trunk@4964 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/lynx/open.s | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libsrc/lynx/open.s b/libsrc/lynx/open.s index 3ef56cd03..88c8b8c8f 100644 --- a/libsrc/lynx/open.s +++ b/libsrc/lynx/open.s @@ -23,6 +23,7 @@ .import addysp,popax,pushax,decsp6,pusha0,pusheax,ldaxysp .import aslax3,axlong,tosaddeax,steaxysp,stax0sp,incsp8 .import ldax0sp + .import lynxskip0, lynxblock .importzp _FileEntry .importzp _FileStartBlock .importzp _FileCurrBlock @@ -118,6 +119,24 @@ flagsok: ldx #$00 lda #$08 jsr _read + lda _FileStartBlock + sta _FileCurrBlock + jsr lynxblock + lda _FileBlockOffset + ldx _FileBlockOffset+1 + phx ; The BLL kit uses negative offsets + plx ; while tha basic Lynx uses positive + bmi @1 ; Make all offsets negative + eor #$FF + pha + txa + eor #$FF + bra @2 +@1: pha + txa +@2: tay + plx + jsr lynxskip0 jsr stax0sp jmp incsp8 -- 2.39.5