[Coco] Question on MINTED internals
Dave Philipsen
dave at davebiz.com
Thu Dec 24 00:54:28 EST 2015
It doesn't seem like enough code to really understand what's going on
but suppose that line 25 of a terminal is the very last (bottom) line.
On some terminals if you write a character to the very last character of
the bottom line (far right) the firmware scrolls the screen in advance
in preparation of the next character coming in. So, if you cleared line
24 first and then cleared line 25 (the last line) the result would be
different than if you cleared line 25 first (thus scrolling the screen)
and then cleared line 24 (which would really just be the 'old' line 25
which was already cleared.
So the result of the first operation would be three cleared lines at the
bottom of the screen and the result of the second operation would be
only two cleared lines at the bottom of the screen.
This is just a guess with what little information you have given us.
Dave
On 12/23/2015 5:32 PM, Neal Crook 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.
>
More information about the Coco
mailing list