# 84PCSE:BCALLs:4D47

From WikiTI

Revision as of 10:20, 20 October 2013 by FloppusMaximus (Talk | contribs)

## Synopsis

**Hypothesized Official Name:** InvertRect

**BCALL Address:** 4D47h

Invert a rectangular area of the LCD.

### Inputs

- HL = X coordinate of left edge
- DE = X coordinate of right edge (must be greater than or equal to HL and at most 319)
- B = Y coordinate of top edge (from top of screen)
- C = Y coordinate of bottom edge (must be greater than or equal to B and at most 239)

### Outputs

**None**

### Destroys

- AF

## Comments

The rectangle is drawn only to the LCD, never to the graph buffer.

Each pixel in the rectangle will be replaced with its bitwise complement, so the resulting colors will be inverted component-wise (e.g., red will be replaced with cyan and vice versa.) Inverting the same rectangle twice will restore the original colors.

The dimensions of the inverted area are (HL-DE+1) × (C-B+1). The routine doesn't check that the provided coordinates are valid.

The interrupt state (IFF) is preserved.