]> git.sur5r.net Git - cc65/commitdiff
assert parm count 140/head
authorpeterferrie <peter.ferrie@gmail.com>
Mon, 24 Nov 2014 18:07:16 +0000 (10:07 -0800)
committerpeterferrie <peter.ferrie@gmail.com>
Mon, 24 Nov 2014 18:07:16 +0000 (10:07 -0800)
libsrc/apple2/lseek.s

index 058e6f53db695fbaf99c39028cff8f8ef68b217a..73f4136be835dfadee2435489bb9f0b0a804c707 100644 (file)
@@ -41,7 +41,7 @@ _lseek:
         bcs     einval
 
         ; Set fd
-        sta     mliparam + MLI::RW::REF_NUM
+        sta     mliparam + MLI::MARK::REF_NUM
 
         txa
         beq     cur
@@ -61,7 +61,9 @@ cur:
 
 ; SEEK_END
 end:
-        ldx     #MARK_COUNT ; conveniently same as EOF_COUNT
+        ; MARK_COUNT must == EOF_COUNT, otherwise unexpected behaviour
+        .assert MARK_COUNT = EOF_COUNT, error
+        ldx     #MARK_COUNT
         jsr     callmli
         bcs     oserr
         lda     mliparam + MLI::MARK::POSITION