Replace invalid characters with HTML entities
— with — ’ with ’ + with + × with x ç with ç “ with “ ” with ” ‘ with ‘ • with • – with - µ with µ † with † Fix C++ θ with θ Yen symbol instead of times Fix broken apos Bullet again E-circumflex
This commit is contained in:
parent
9e52de9586
commit
500e7f5654
353 changed files with 5091 additions and 5091 deletions
30
24-02.html
30
24-02.html
|
|
@ -39,14 +39,14 @@
|
|||
<P><B>LISTING 24.1 L24-1.ASM</B></P>
|
||||
<!-- CODE //-->
|
||||
<PRE>
|
||||
; Program to illustrate operation of ALUs and latches of the VGA’s
|
||||
; Program to illustrate operation of ALUs and latches of the VGA’s
|
||||
; Graphics Controller. Draws a variety of patterns against
|
||||
; a horizontally striped background, using each of the 4 available
|
||||
; logical functions (data unmodified, AND, OR, XOR) in turn to combine
|
||||
; the images with the background.
|
||||
; By Michael Abrash.
|
||||
;
|
||||
stack segment para stack ‘STACK’
|
||||
stack segment para stack ‘STACK’
|
||||
db 512 dup(?)
|
||||
stack ends
|
||||
;
|
||||
|
|
@ -69,23 +69,23 @@ GC_ROTATE equ 3 ;GC data rotate/logical function
|
|||
; register index
|
||||
GC_MODE equ 5 ;GC mode register index
|
||||
;
|
||||
dseg segment para common ‘DATA’
|
||||
dseg segment para common ‘DATA’
|
||||
;
|
||||
; String used to label logical functions.
|
||||
;
|
||||
LabelString label byte
|
||||
db ‘UNMODIFIED AND OR XOR ’
|
||||
db ‘UNMODIFIED AND OR XOR ’
|
||||
LABEL_STRING_LENGTH equ $-LabelString
|
||||
;
|
||||
; Strings used to label fill patterns.
|
||||
;
|
||||
FillPatternFF db ‘Fill Pattern: 0FFh’
|
||||
FillPatternFF db ‘Fill Pattern: 0FFh’
|
||||
FILL_PATTERN_FF_LENGTH equ $ - FillPatternFF
|
||||
FillPattern00 db ‘Fill Pattern: 000h’
|
||||
FillPattern00 db ‘Fill Pattern: 000h’
|
||||
FILL_PATTERN_00_LENGTH equ $ - FillPattern00
|
||||
FillPatternVert db ‘Fill Pattern: Vertical Bar’
|
||||
FillPatternVert db ‘Fill Pattern: Vertical Bar’
|
||||
FILL_PATTERN_VERT_LENGTH equ $ - FillPatternVert
|
||||
FillPatternHorz db ‘Fill Pattern: Horizontal Bar’
|
||||
FillPatternHorz db ‘Fill Pattern: Horizontal Bar’
|
||||
FILL_PATTERN_HORZ_LENGTH equ $ - FillPatternHorz
|
||||
;
|
||||
dseg ends
|
||||
|
|
@ -112,7 +112,7 @@ TEXT_UP macro TEXT_STRING, TEXT_LENGTH, ROW, COLUMN
|
|||
int 10h
|
||||
endm
|
||||
;
|
||||
cseg segment para public ‘CODE’
|
||||
cseg segment para public ‘CODE’
|
||||
assume cs:cseg, ds:dseg
|
||||
start proc near
|
||||
mov ax,dseg
|
||||
|
|
@ -174,15 +174,15 @@ BackgroundLoop:
|
|||
; Label the screen.
|
||||
;
|
||||
push ds
|
||||
pop es ;strings we’ll display are passed to BIOS
|
||||
pop es ;strings we’ll display are passed to BIOS
|
||||
; by pointing ES:BP to them
|
||||
;
|
||||
; Label the logical functions, using the VGA BIOS’s
|
||||
; Label the logical functions, using the VGA BIOS’s
|
||||
; write string function.
|
||||
;
|
||||
TEXT_UP LabelString, LABEL_STRING_LENGTH, 24, 0
|
||||
;
|
||||
; Label the fill patterns, using the VGA BIOS’s
|
||||
; Label the fill patterns, using the VGA BIOS’s
|
||||
; write string function.
|
||||
;
|
||||
TEXT_UP FillPatternFF, FILL_PATTERN_FF_LENGTH, 3, 42
|
||||
|
|
@ -190,7 +190,7 @@ BackgroundLoop:
|
|||
TEXT_UP FillPatternVert, FILL_PATTERN_VERT_LENGTH, 15, 42
|
||||
TEXT_UP FillPatternHorz, FILL_PATTERN_HORZ_LENGTH, 21, 42
|
||||
;
|
||||
; Wait until a key’s been hit to reset screen mode & exit.
|
||||
; Wait until a key’s been hit to reset screen mode & exit.
|
||||
;
|
||||
WaitForKey:
|
||||
mov ah,1
|
||||
|
|
@ -230,7 +230,7 @@ RowLoop:
|
|||
mov cx,WIDTH
|
||||
ColumnLoop:
|
||||
mov ah,es:[di] ;load display memory contents into
|
||||
; GC latches (we don’t actually care
|
||||
; GC latches (we don’t actually care
|
||||
; about value read into AH)
|
||||
stosb ;write pattern, which is logically
|
||||
; combined with latch contents for each
|
||||
|
|
@ -260,7 +260,7 @@ HorzBarLoop:
|
|||
dec ax ;0ffh fill (smaller to do word than byte DEC)
|
||||
mov cx,si ;width to fill
|
||||
HBLoop1:
|
||||
mov bl,es:[di] ;load latches (don’t care about value)
|
||||
mov bl,es:[di] ;load latches (don’t care about value)
|
||||
stosb ;write solid pattern, through ALUs
|
||||
loop HBLoop1
|
||||
add di,SCREEN_WIDTH_IN_BYTES - VERTICAL_BOX_WIDTH_IN_BYTES
|
||||
|
|
|
|||
Loading…
Reference in a new issue