• No results found

Screen Editor Variable Table

In document Compute's Mapping the Commodore 128 (Page 75-77)

Locations 224-249/$E0-$F9 comprise the screen editor vari- able table for the active display. All locations in the table are initialized during the CINT screen editor initialization routine [$C07B]. An equivalent table for whichever display is currently inactive is maintained at 2624-2649/$0A40-$0A59, Whenever the SWAPPER routine [$CD2Ej is called to switch active screen displays, the contents of this table are exchanged with the values from the inactive screen table. Thus, the table settings here are retained even when the screen is not active.

224-225 $EO-$E1 PNT

Pointer to first screen memory location for current line Whenever the cursor is moved onto a new line, the screen memory address corresponding to the leftmost column of that line is calculated and stored in these locations. These locations can then be used as a pointer to screen memory locations for the current line. The value 236/$EC serves as an offset to the current cursor column. The low byte of the address comes from the value in the table at 49203/$C033 corresponding to the current row (multiplied by 2 if the 80-column display is active). The high byte comes from the value in the table at 49228/$C04C corresponding to the current row, adjusted for the starting screen memory page value in 2619/$0A3B in the case of the 40-column (VIC) display, or for the starting screen memory page value in 2606/$0A2E in the case of the 80-col- umn (VDC) display. Since the tables have only 25 valid en- tries, the screen editor cannot support an output window with more than 25 rows.

226-227 $E2-$E3 USER

Pointer to first attribute memory location for current line Whenever the cursor is moved onto a new line, the color memory address corresponding to the leftmost column of that line is calculated and stored in these locations. These locations can then be used as a pointer to attribute memory locations for the current line. The value 236/$EC serves as an offset to the current cursor column. The low byte of the address comes from the value in the table at 49203/$C033 corresponding to the current row (multiplied by 2 if the 80-column display is active). The high byte comes from the value in the table at 49228/$C04C corresponding to the current row, adjusted for a

217

$D9

217 $D9 CHAREN

CHAREN bit shadow

Bit 2 of this location serves as a shadow for the CHAREN bit bit 2 of the processor I/O port at location l/$01. The value of the bit in this location is copied to the port bit during each pass through the text screen-setup portion of the screen editor IRQ routine [$C194]. Thus, the setting of the port bit cannot be changed directly while the standard interrupt routine is in use. Instead, you must set the bit here to the desired value and let the interrupt routine set the port bit accordingly.

The setting of the CHAREN bit determines whether the VIC chip sees the ROM character sets at offsets of 4096/$1000 and 6144/$1800 in the current video bank. When the bit is %0, the standard ROM character set is visible to the VIC. When the bit is set to % 1 , the VIC instead sees the true con- tents of memory in the video bank.

218-223 $DA-$DF SEDSAL

Screen editor zero-page work area

Assorted screen editor routines use these locations for various functions. Location 218/SDA is used as temporary storage by the routines that calculate bit positions in the line link map [$CB9F] or tab stop table [$C961, $C96C]. During a number of routines, location 222/$DE is used as temporary storage for the current cursor column, and 223/$DF is used as storage for the current cursor row.

For the PFKEY routine [$CCA2], location 218/$DA holds the length of the current key definition string. Location 219/$DB holds the total length of all programmable key defi- nitions. Location 220/$DC holds the current key number (0-9). Location 221/$DD holds the index to the next key defi- nition beyond the current one. Location 222/$DE holds the MMU setting for the bank where the definition string is found. 223/$DF is used as temporary storage for the index in the X register.

For the INIT80 routine [$CE0C], locations 218-219/ $DA-$DB are used as a pointer to the character ROM at 53248/$D000. The screen-scrolling routine [$C40D] uses loca- tions 218-219/SDA-DB as a pointer to the start of screen memory for the current line. Locations 220-221/$DC-$DD are used as pointers to the start of attribute memory for the current screen line.

70

$E2-$E3

226-227

Screen Editor Variable Table

Locations 224-249/$E0-$F9 comprise the screen editor vari- able table for the active display. All locations in the table are initialized during the CINT screen editor initialization routine [$C07B]. An equivalent table for whichever display is currently inactive is maintained at 2624-2649/$0A40-$0A59, Whenever the SWAPPER routine [$CD2Ej is called to switch active screen displays, the contents of this table are exchanged with the values from the inactive screen table. Thus, the table settings here are retained even when the screen is not active.

224-225 $EO-$E1 PNT

Pointer to first screen memory location for current line Whenever the cursor is moved onto a new line, the screen memory address corresponding to the leftmost column of that line is calculated and stored in these locations. These locations can then be used as a pointer to screen memory locations for the current line. The value 236/$EC serves as an offset to the current cursor column. The low byte of the address comes from the value in the table at 49203/$C033 corresponding to the current row (multiplied by 2 if the 80-column display is active). The high byte comes from the value in the table at 49228/$C04C corresponding to the current row, adjusted for the starting screen memory page value in 2619/$0A3B in the case of the 40-column (VIC) display, or for the starting screen memory page value in 2606/$0A2E in the case of the 80-col- umn (VDC) display. Since the tables have only 25 valid en- tries, the screen editor cannot support an output window with more than 25 rows.

226-227 $E2-$E3 USER

Pointer to first attribute memory location for current line Whenever the cursor is moved onto a new line, the color memory address corresponding to the leftmost column of that line is calculated and stored in these locations. These locations can then be used as a pointer to attribute memory locations for the current line. The value 236/$EC serves as an offset to the current cursor column. The low byte of the address comes from the value in the table at 49203/$C033 corresponding to the current row (multiplied by 2 if the 80-column display is active). The high byte comes from the value in the table at 49228/$C04C corresponding to the current row, adjusted for a

228 $E4 $EA 234

starting page of 216/$D8 in the case of the 40-column (VIC) display, or for the starting color memory page value in 2607/$0A2F in the case of the 80-column (VDC) display. Since the tables have only 25 valid entries, the screen editor cannot support an output window with more than 25 rows.

228 $E4 SCBOT

In document Compute's Mapping the Commodore 128 (Page 75-77)