• No se han encontrado resultados

6. ALCANCE DE LOS SERVICIOS

7.3. RÉGIMEN ECONÓMICO

7.3.1. Ingresos 24

This location holds the offset from the start of the RS-232 out- put buffer to the position of the next character awaiting trans- mission. The output buffer normally begins at 3328/$0D00. The value here is incremented after each character is removed from the buffer for transmission. When the value here equals the value in location 2587/$0AlB, all characters awaiting transmission have been sent and the buffer is empty.

2587 $OA1B RODBE

Index to last character in RS-232 output buffer

This location holds the offset from the start of the RS-232 out- put buffer to the position where the next character will be added to await transmission. The output buffer normally be- gins at 3328/S0D00. The value here is incremented before each character is added to the buffer, unless the incrementing would make the value here equal the value in 2586/$0AlA.

S0A1D-60A1F 2589-2591

In that case, the buffer is already full, and some characters must be transmitted before any more can be added to the buffer.

2588 $OA1C SERIAL

Fast serial mode flag

This location is used to indicate whether the currently speci- fied serial bus device, such as the 1571 disk drive, is capable of fast serial communications. The location is initialized to 0/$00, the value for standard (slow) communications, during the IOINIT routine [$E109]. The routines that handle the serial bus TALK and LISTEN commands attempt a fast serial hand- shake. If the external device responds properly, bits 6 and 7 of this location will be set to % 1 . Bit 7 indicates that the external device is capable of fast transmission and reception of individ- ual bytes. The bit is reset to %0 during the Kernal routines that handle the serial bus UNTALK and UNLISTEN routines. Bit 6 indicates that the system is capable of high-speed burst mode loading.

2589-2591 $OA1D-$OA1F TIMER

Software jiffy timer

The three-byte value in these locations is decremented 60 times per second by the Kernal UDTIM routine [$F5F8], part of the IRQ sequence. Thus, these locations function in a man- ner opposite that of the jiffy clock at 160-l62/$A0-$A2, which is incremented 60 times per second by UDTIM. The or- der of bytes here is the opposite of the order of bytes in the jiffy clock: $OA1D is the low byte and $OA1F is the high byte.

Since the countdown for this timer is handled automati- cally during the IRQ, it is useful for many timing applications. The way to use this timer is to load the locations with the value in jiffies (1/60-second intervals) for the desired delay period, then test for a value of $FF in location 2591/$OA1F. That location will contain $FF after the three-byte value rolls over from $000000 to $FFFFFF at the end of the countdown. The highest allowable initial value when using this scheme is $FF0000, which corresponds to 16,711,680 jiffies—a little over three days.

There is one caution in using this location from BASIC. The SLEEP statement routine [$6BD7] uses this timer for its delay countdown, so any use of the SLEEP statement will overwrite any values you may have stored in these locations.

2584 $0A18

2584 S0A18 RIDBE

Index to first character in RS-232 input buffer

This location holds the offset from the start of the RS-232 in- put buffer to the position where the next character received will be stored. The input buffer normally begins at location 3072/$0C00. The value here is incremented before each re- ceived character is added to the buffer, unless incrementing would make the value here equal to the value in location 2585/$0A19. In that case, a buffer overflow has occurred {more characters have been received than the buffer can hold), so bit 2 of the status location (2580/S0A14) is set to % 1 .

2585 $0A19 RIDBS

Index to last character in RS-232 input buffer

This location holds the offset from the start of the RS-232 in- put buffer to the position of the next character waiting to be removed from the buffer. The buffer normally begins at 3072/ $0C00. The value here is incremented after each character is retrieved from the buffer. When the value here equals the value in location 2584/$0A18, all characters have been re- moved and the buffer is empty. In this case, bit 3 of the status location (2580/$0A14) will be set to % 1 .

2586 S0A1A RODBS Index to first character in RS-232 output buffer

This location holds the offset from the start of the RS-232 out- put buffer to the position of the next character awaiting trans- mission. The output buffer normally begins at 3328/$0D00. The value here is incremented after each character is removed from the buffer for transmission. When the value here equals the value in location 2587/$0AlB, all characters awaiting transmission have been sent and the buffer is empty.

2587 $OA1B RODBE

Index to last character in RS-232 output buffer

This location holds the offset from the start of the RS-232 out- put buffer to the position where the next character will be added to await transmission. The output buffer normally be- gins at 3328/S0D00. The value here is incremented before each character is added to the buffer, unless the incrementing would make the value here equal the value in 2586/$0AlA.

132

S0A1D-60A1F 2589-2591

In that case, the buffer is already full, and some characters must be transmitted before any more can be added to the buffer.

2588 $OA1C SERIAL

Fast serial mode flag

This location is used to indicate whether the currently speci- fied serial bus device, such as the 1571 disk drive, is capable of fast serial communications. The location is initialized to 0/$00, the value for standard (slow) communications, during the IOINIT routine [$E109]. The routines that handle the serial bus TALK and LISTEN commands attempt a fast serial hand- shake. If the external device responds properly, bits 6 and 7 of this location will be set to % 1 . Bit 7 indicates that the external device is capable of fast transmission and reception of individ- ual bytes. The bit is reset to %0 during the Kernal routines that handle the serial bus UNTALK and UNLISTEN routines. Bit 6 indicates that the system is capable of high-speed burst mode loading.

2589-2591 $OA1D-$OA1F TIMER

Software jiffy timer

The three-byte value in these locations is decremented 60 times per second by the Kernal UDTIM routine [$F5F8], part of the IRQ sequence. Thus, these locations function in a man- ner opposite that of the jiffy clock at 160-l62/$A0-$A2, which is incremented 60 times per second by UDTIM. The or- der of bytes here is the opposite of the order of bytes in the jiffy clock: $OA1D is the low byte and $OA1F is the high byte.

Since the countdown for this timer is handled automati- cally during the IRQ, it is useful for many timing applications. The way to use this timer is to load the locations with the value in jiffies (1/60-second intervals) for the desired delay period, then test for a value of $FF in location 2591/$OA1F. That location will contain $FF after the three-byte value rolls over from $000000 to $FFFFFF at the end of the countdown. The highest allowable initial value when using this scheme is $FF0000, which corresponds to 16,711,680 jiffies—a little over three days.

There is one caution in using this location from BASIC. The SLEEP statement routine [$6BD7] uses this timer for its delay countdown, so any use of the SLEEP statement will overwrite any values you may have stored in these locations.

2592 $0A20

2592 $0A20 XMAX

Maximum number of keys in the keyboard buffer

The value in these locations determines the maximum number of characters that can be held in the keyboard buffer pending processing. The value is initialized to 10/$OA—the full length of the standard keyboard buffer at 842-851/$034A-$0353— by the CINT screen editor initialization routine [$C07B], part of the reset sequence. During the SCNKEY routine [$C55D], the value here is compared against the value in location 208/$D0, the count of characters currently in the buffer, to determine if there is room in the buffer to record another keypress.

You can reduce the value here to decrease the number of unprocessed keypresses that can accumulate in the buffer. However, you should not increase the value above 10, as this will cause overflow from the buffer to overwrite the tab stop table at 852-861/$0354-$035D.

$OA21

PAUSE

2593

Scroll pause flag

This location is used to pause printing. During the screen BSOUT routine [$C72D], the value here is tested. If it is non- zero, the routine will wait indefinitely for the location to be reset to zero. The value is initialized to 0/$00 by the CINT routine [$C07B]. To implement the pause feature, the SCNKEY routine [$C55D], part of the system IRQ sequence, sets this lo- cation to 13/$0D when either the NO SCROLL or CONTROL-S keys are pressed, and resets the location to 0/$00 when the next key is pressed.

$OA22

RPTFLG

2594

Key repeat flag

The value here determines which keys, if any, will repeat if held down. If bit 7 of this location is %1 (value 128/S80), all keys repeat. If bit 6 is %1 (value 64/$40), no keys repeat. Otherwise, only the cursor, space, and INST/DEL keys repeat. This location is initialized to 128/S80—all keys repeat—by the screen editor CINT routine [$C07B], This is different from the Commodore 64, where the default value is 0/$00—only cursor, space, and INST/DEL repeating.

$0A25

2597

2595 $0A23 KOUNT

Countdown between key repeats

This location is used as a counter to establish the delay be- tween repeats when a key is held down. Once repeating has begun, indicated by a value of 0/S00 in location 2596/$0A24, the value here will be decremented on each pass through the SCNKEY routine [$C55D] as long as the same key is held down. Each time the count reaches zero, the key is repeated and this location is reinitialized to 4/$04. This results in a key-repeat rate of 15 times per second. The starting value of 4 for this countdown is loaded from ROM in the SCNKEY rou- tine, and thus cannot be changed, so the delay period between repeats is not programmable.

2596 $0A24 DELAY

Countdown until key repeating begins

This location is used as a counter to establish the delay before repeating begins when a key is held down. (Location 2594/ $0A22 controls which keys, if any, will repeat if held down.) If the scan code of the current key is the same as the scan code detected on the last pass through the SCNKEY routine [$C55D], the value here will be decremented. When the count reaches zero, repeating can begin at the rate determined by lo- cation 2595/$0A23. When the key is released, this location is reinitialized to 16/$10. This results in a delay before repeating of about 1/4 second. The starting value of 16 is loaded from ROM in the SCNKEY routine, and thus cannot be changed, so the delay before repeating begins is not programmable.

2597 $0A25

Delay between case-switching repeats

This location is used to provide a delay between character case switches when the SHIFT-Commodore key combination is held down. This location isn't a countdown. Rather, it is ini- tialized to 128/$80; then the value is shifted one bit to the right on each pass through the SCNKEY routine until it be- comes zero. This provides a delay of about 1/8 second.

2592 $0A20

2592 $0A20 XMAX

Maximum number of keys in the keyboard buffer

The value in these locations determines the maximum number of characters that can be held in the keyboard buffer pending processing. The value is initialized to 10/$OA—the full length of the standard keyboard buffer at 842-851/$034A-$0353— by the CINT screen editor initialization routine [$C07B], part of the reset sequence. During the SCNKEY routine [$C55D], the value here is compared against the value in location 208/$D0, the count of characters currently in the buffer, to determine if there is room in the buffer to record another keypress.

You can reduce the value here to decrease the number of unprocessed keypresses that can accumulate in the buffer. However, you should not increase the value above 10, as this will cause overflow from the buffer to overwrite the tab stop table at 852-861/$0354-$035D.

$OA21

PAUSE

2593

Scroll pause flag

This location is used to pause printing. During the screen BSOUT routine [$C72D], the value here is tested. If it is non- zero, the routine will wait indefinitely for the location to be reset to zero. The value is initialized to 0/$00 by the CINT routine [$C07B]. To implement the pause feature, the SCNKEY routine [$C55D], part of the system IRQ sequence, sets this lo- cation to 13/$0D when either the NO SCROLL or CONTROL-S keys are pressed, and resets the location to 0/$00 when the next key is pressed.

$OA22

RPTFLG

2594

Key repeat flag

The value here determines which keys, if any, will repeat if held down. If bit 7 of this location is %1 (value 128/S80), all keys repeat. If bit 6 is %1 (value 64/$40), no keys repeat. Otherwise, only the cursor, space, and INST/DEL keys repeat. This location is initialized to 128/S80—all keys repeat—by the screen editor CINT routine [$C07B], This is different from the Commodore 64, where the default value is 0/$00—only cursor, space, and INST/DEL repeating.

134

$0A25

2597

2595 $0A23 KOUNT

Countdown between key repeats

This location is used as a counter to establish the delay be- tween repeats when a key is held down. Once repeating has begun, indicated by a value of 0/S00 in location 2596/$0A24, the value here will be decremented on each pass through the SCNKEY routine [$C55D] as long as the same key is held down. Each time the count reaches zero, the key is repeated and this location is reinitialized to 4/$04. This results in a key-repeat rate of 15 times per second. The starting value of 4 for this countdown is loaded from ROM in the SCNKEY rou- tine, and thus cannot be changed, so the delay period between repeats is not programmable.

2596 $0A24 DELAY

Countdown until key repeating begins

This location is used as a counter to establish the delay before repeating begins when a key is held down. (Location 2594/ $0A22 controls which keys, if any, will repeat if held down.) If the scan code of the current key is the same as the scan code detected on the last pass through the SCNKEY routine [$C55D], the value here will be decremented. When the count reaches zero, repeating can begin at the rate determined by lo- cation 2595/$0A23. When the key is released, this location is reinitialized to 16/$10. This results in a delay before repeating of about 1/4 second. The starting value of 16 is loaded from ROM in the SCNKEY routine, and thus cannot be changed, so the delay before repeating begins is not programmable.

2597 $0A25

Delay between case-switching repeats

This location is used to provide a delay between character case switches when the SHIFT-Commodore key combination is held down. This location isn't a countdown. Rather, it is ini- tialized to 128/$80; then the value is shifted one bit to the right on each pass through the SCNKEY routine until it be- comes zero. This provides a delay of about 1/8 second.

2598

$0A26

2598 $0A26 BLNON

Documento similar