|
|
|
| Hardware Setup |
Sample code to access IO Port 5Eh |
| |||
|
|
|
|
|
|
| IO Port 5Eh | High | Low |
|
| Bit 0/1 | POWER ON | POWER ON |
|
| Bit 2/3 | POWER OFF | POWER OFF |
Set Bit 0 and 1 to High |
| |||
mov | dx, 5Eh |
|
| |
in | al, dx | Read 5Eh's value to al |
| |
and | al, 0fch | Clear Bit 0 and 1 |
| |
or | al, 03h | Set Bit 0 and 1 to high |
| |
out | dx, al | Write to 5Eh |
| |
Set Bit 0 and 1 to Low |
| |||
mov | dx, 5Eh |
|
| |
in | al, dx | Read 5Eh's value to al |
| |
and | al, 0fch | Clear Bit 0 and 1 |
| |
out | dx, al | Write to 5Eh |
| |
Set Bit 2 and 3 to High |
| |||
mov | dx, 5Eh |
|
| |
in | al, dx | Read 5Eh's value to al |
| |
and | al, 0f3h | Clear Bit 2 and 3 |
| |
or | al, 0ch | Set Bit 2 and 3 to high |
| |
out | dx, al | Write to 5Eh |
| |
Set Bit 2 and 3 to Low |
| |||
mov | dx, 5Eh |
|
| |
in | al, dx | Read 5Eh's value to al |
| |
and | al, 0f3h | Clear Bit 2 and 3 |
| |
out | dx, al | Write to 5Eh |
|