Convert notes into blockquotes
This commit is contained in:
parent
832fb15e54
commit
8ed9dea394
105 changed files with 884 additions and 411 deletions
56
23-02.md
56
23-02.md
|
|
@ -98,29 +98,33 @@ fixed. Moreover, a great deal of graphics software now uses word
|
|||
**OUT**s, so any computer or VGA that doesn't properly support word
|
||||
**OUT**s could scarcely be considered a clone at all.
|
||||
|
||||
------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
 *A speed tip: The setting of each chip's Index register remains the same until it is reprogrammed. This means that in cases where you are setting the same internal register repeatedly, you can set the Index register to point to that internal register once, then write to the Data register multiple times. For example, the Bit Mask register (GC register 8) is often set repeatedly inside a loop when drawing lines. The standard code for this is:*
|
||||
------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
MOV DX,03CEH ;point to GC Index register
|
||||
MOV AL,8 ;internal index of Bit Mask register
|
||||
OUT DX,AX ;AH contains Bit Mask register setting
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------------
|
||||
*Alternatively, the GC Index register could initially be set to point to the Bit Mask register with*
|
||||
-- ------------------------------------------------------------------------------------------------------
|
||||
|
||||
MOV DX,03CEH ;point to GC Index register
|
||||
MOV AL,8 ;internal index of Bit Mask register
|
||||
OUT DX,AL ;set GC Index register
|
||||
INC DX ;point to GC Data register
|
||||
|
||||
-- -------------------------------------------------------------------------------------------------
|
||||
*and then the Bit Mask register could be set repeatedly with the byte-size **OUT** instruction*
|
||||
-- -------------------------------------------------------------------------------------------------
|
||||
|
||||
OUT DX,AL ;AL contains Bit Mask register setting
|
||||
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
*which is generally faster (and never slower) than a word-sized **OUT**, and which does not require AH to be set, freeing up a register. Of course, this method only works if the GC Index register remains unchanged throughout the loop.*
|
||||
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
> 
|
||||
> A speed tip: The setting of each chip's Index register remains the same
|
||||
> until it is reprogrammed. This means that in cases where you are setting
|
||||
> the same internal register repeatedly, you can set the Index register to
|
||||
> point to that internal register once, then write to the Data register
|
||||
> multiple times. For example, the Bit Mask register (GC register 8) is
|
||||
> often set repeatedly inside a loop when drawing lines. The standard code
|
||||
> for this is:
|
||||
>
|
||||
> MOV DX,03CEH ;point to GC Index register
|
||||
> MOV AL,8 ;internal index of Bit Mask register
|
||||
> OUT DX,AX ;AH contains Bit Mask register setting
|
||||
>
|
||||
> Alternatively, the GC Index register could initially be set to point to
|
||||
> the Bit Mask register with
|
||||
>
|
||||
> MOV DX,03CEH ;point to GC Index register
|
||||
> MOV AL,8 ;internal index of Bit Mask register
|
||||
> OUT DX,AL ;set GC Index register
|
||||
> INC DX ;point to GC Data register>
|
||||
>
|
||||
> and then the Bit Mask register could be set repeatedly with the
|
||||
> byte-size **OUT** instruction
|
||||
>
|
||||
> OUT DX,AL ;AL contains Bit Mask register setting
|
||||
>
|
||||
> which is generally faster (and never slower) than a word-sized **OUT**,
|
||||
> and which does not require AH to be set, freeing up a register. Of
|
||||
> course, this method only works if the GC Index register remains
|
||||
> unchanged throughout the loop.
|
||||
Loading…
Reference in a new issue