[Oberon] PO2013 - CopyBlock

Tomas Kral thomas.kral at email.cz
Fri Jul 10 20:25:30 CEST 2020


> 2) your code overwrites the horizontal line with length „w“ starting
> at (dx, dy-1)

This seems silly, but works, horizontal line is cached to line 0 (silly as it overwrites `w' viewer 1px border at the bottom), then
restored. If line just below 0 could be somehow specified instead, as there are
some 128 bytes unused by the system?

    IF dy = sy THEN (*horizontal scroll*)
      CopyBlock(dx, dy-1, w, 1, dx, 0, mode); (*cache dy-1*)
      CopyBlock(sx, sy, w, h, dx, dy-1, mode); CopyBlock(dx, dy-1, w, h, dx, dy, mode);
      CopyBlock(dx, 0, w, 1, dx, dy-1, mode) (*restore*)
    ELSE
      IF dx = sx THEN (*vertical scroll w/ SYSTEM.COPY*)
      ELSIF n <= 0 THEN (*diagonal right*)
      ELSE (*diagonal left*)
      END
    END

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list