[Coco] Question on MINTED internals
CoCo Demus
retrocanada76 at gmail.com
Thu Dec 24 02:21:56 EST 2015
Hi,
Why ? Well, this code clears line 24 and 25 and displays at line 25 the
message: Rename/Save as: so If I did like you said I would still need to
incb after the last _clrlin because I want a clear line separating the text
and the message. This is more a code style, I wasn't trying to do a extreme
optimization in the code. If you think your way is better, than go for it.
cheers
On Wed, Dec 23, 2015 at 3:32 PM, Neal Crook <foofoobedoo at gmail.com> wrote:
> Here's my contribution towards raising the technical tone of the
> conversation...
>
> I am working on a port of Luis Antoniosi's MINTED editor to produce a
> version that uses ANSI control sequences. The idea is that it would work
> across an rs232 link from a terminal emulator to a real Coco or (and more
> importantly for me) work on a virtual terminal on my NitrOS9 multicomp
> system.
>
> Here's a fragment of the original source code (I added the line numbers for
> reference):
>
> 1: _rename pshs a,b,x,y
> 2: @repeat clra
> 3: ldb <height+1
> 4: decb
> 5: lbsr _gotoxy
> 6: lbsr _clrlin
> 7: ldb <height+1
> 8: lbsr _gotoxy
> 9: lbsr _clrlin
>
> Assume that the output device is 80 col by 25 row and the height is stored
> as a 16-bit value, so
> that line 3 loads "25" into B.
>
> The call in line 5 has A=0, B=24
> The call in line 8 has A=0 (assuming A is preserved), B=25
>
> Questions:
>
> 1/ why not do this:
>
> 1: _rename pshs a,b,x,y
> 2: @repeat clra
> 3: ldb <height+1
> 4:
> 5: lbsr _gotoxy
> 6: lbsr _clrlin
> 7: decb
> 8: lbsr _gotoxy
> 9: lbsr _clrlin
>
> 2/ is the corner of the screen 0,0 or 1,1 (or something else? I'm puzzled
> by the A=0, B=25 which seems contradictory)
>
> 3/ is the corner (0,0 or whatever) the top-left corner or some other
> corner?
>
> (For reference, an ANSI screen has the top-left corner as 1,1)
>
> Thanks in advance for any enlightenment
>
> Neal.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list