[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: programming enigma
- Subject: Re: programming enigma
- From: cld@xxxxxxxx (Carl Distefano)
- Date: Mon, 3 Feb 2003 23:34:54 -0500
Reply to note from "Morris Krok" Tue, 4 Feb
2003 01:42:11 -0800
Morris:
> Can anyone explain why this program works when you ldpm it, but
> not when it is included in the U2 file
The issue isn't LDPM vs. U2. It's whether the cursor is in text or
on the CMline when the program is launched. More precisely, it's
whether the func LB in your code succeeds in moving the cursor to
the beginning of the current line *of text*.
If the cursor is on the CMline at launch time, func LB moves the
cursor to the leftmost position *on the CMline*, but the cursor
position in text (and the value of recorded in Save/Get 01)
remains unchanged. As a result, the values of and
never match up, and the program falls into an endless loop. (The
sole exception is where the cursor is already at Line Beginning in
text, in which case func LB would have caused no cursor movement in
text anyway. In that special case, the program works even if the
cursor starts out on the CMline.)
The bottom line is that the cursor has to be in text when that func
LB is executed. The solution, as Chris suggests, is to add a func
GT -- at the very beginning of the program or, at a minimum, just
before func LB.
By the way, see Jumbo U2 frame MOVEHM for a pithier version of this
procedure.
--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/