Convert notes into blockquotes

This commit is contained in:
James Gregory 2013-12-31 11:06:31 +11:00
commit 8ed9dea394
105 changed files with 884 additions and 411 deletions

View file

@ -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.
------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
![](images/i.jpg) *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.*
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ![](images/i.jpg)
> 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.