Prev: 18C1 Up: Map Next: 190F
18E1: THE 'PRINT THE CURSOR' SUBROUTINE
Used by the routines at ED_COPY and OUT_LINE.
A return is made if it is not the correct place to print the cursor but if it is then 'C', 'E', 'G', 'K' or 'L' will be printed.
Input
DE Address of the current position in the edit line or INPUT line
OUT_CURS 18E1 LD HL,($5C5B) Fetch the address of the cursor (K-CUR) but return if the correct place is not being considered.
18E4 AND A
18E5 SBC HL,DE
18E7 RET NZ
18E8 LD A,($5C41) The current value of MODE is fetched and doubled.
18EB RLC A
18ED JR Z,OUT_C_1 Jump forward unless dealing with Extended mode or Graphics.
18EF ADD A,$43 Add the appropriate offset to give 'E' or 'G'.
18F1 JR OUT_C_2 Jump forward to print it.
OUT_C_1 18F3 LD HL,$5C3B This is FLAGS.
18F6 RES 3,(HL) Signal 'K-mode'.
18F8 LD A,"K" The character 'K'.
18FA BIT 2,(HL) Jump forward to print 'K' if 'the printing is to be in K-mode'.
18FC JR Z,OUT_C_2
18FE SET 3,(HL) The 'printing is to be in L-mode' so signal 'L-MODE'.
1900 INC A Form the character 'L'.
1901 BIT 3,(IY+$30) Jump forward if not in 'C-mode' (bit 3 of FLAGS2 reset).
1905 JR Z,OUT_C_2
1907 LD A,"C" The character 'C'.
OUT_C_2 1909 PUSH DE Save the DE register pair whilst the cursor is printed - FLASHing.
190A CALL OUT_FLASH
190D POP DE
190E RET Return once it has been done.
Note: it is the action of considering which cursor-letter is to be printed that determines the mode - 'K', 'L' or 'C'.
Prev: 18C1 Up: Map Next: 190F