From: peterferrie Date: Mon, 24 Nov 2014 18:07:16 +0000 (-0800) Subject: assert parm count X-Git-Tag: V2.15~30^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bbd419f365d4229094bd33a61dae66bcef0f4370;p=cc65 assert parm count --- diff --git a/libsrc/apple2/lseek.s b/libsrc/apple2/lseek.s index 058e6f53d..73f4136be 100644 --- a/libsrc/apple2/lseek.s +++ b/libsrc/apple2/lseek.s @@ -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