Use backtick code blocks for syntax highlighting
This commit is contained in:
parent
8ed9dea394
commit
f658bfbb40
203 changed files with 26546 additions and 25801 deletions
18
29-06.md
18
29-06.md
|
|
@ -43,14 +43,16 @@ read the register, mask off the desired field, insert the desired
|
|||
setting, and write the result back to the register. In the case of
|
||||
setting the VGA to write mode 1, do this:
|
||||
|
||||
mov dx,3ceh ;Graphics controller index
|
||||
mov al,5 ;Graphics mode reg index
|
||||
out dx,al ;point GC index to G_MODE
|
||||
inc dx ;Graphics controller data
|
||||
in al,dx ;get current mode setting
|
||||
and al,not 3 ;mask off write mode field
|
||||
or al,1 ;set write mode field to 1
|
||||
out dx,al ;set write mode 1
|
||||
```nasm
|
||||
mov dx,3ceh ;Graphics controller index
|
||||
mov al,5 ;Graphics mode reg index
|
||||
out dx,al ;point GC index to G_MODE
|
||||
inc dx ;Graphics controller data
|
||||
in al,dx ;get current mode setting
|
||||
and al,not 3 ;mask off write mode field
|
||||
or al,1 ;set write mode field to 1
|
||||
out dx,al ;set write mode 1
|
||||
```
|
||||
|
||||
This approach is more of a nuisance than simply setting the whole
|
||||
register, but it's safer. It's also slower; for cases where you must set
|
||||
|
|
|
|||
Loading…
Reference in a new issue