From bbd419f365d4229094bd33a61dae66bcef0f4370 Mon Sep 17 00:00:00 2001 From: peterferrie Date: Mon, 24 Nov 2014 10:07:16 -0800 Subject: [PATCH] assert parm count --- libsrc/apple2/lseek.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.5