Toshiba 386SX Computer Hardware User Manual


 
AR-B1375/AR-B1376 User s Guide
5-6
5.3.1 Hardware Write Protect
To enable the hardware protect function for small page 5V FLASH disk, please refer to the “Switch Setting”.
5.3.2 Software Write Protect
If you need the write protect function and sometimes you have to write or update data on your FLASH/SRAM disk,
you can use the software write protect instead of hardware write protect. The software writes protect function is
enabled or disabled by writing a data to an I/O port.
5.3.3 Enable the Software Write Protect
Writes data 08h to the base port+0 address
Example 1: (in assembly language)
MOV DX, 210H ; If the base I/O address is 210H
MOV AL, 80H ; Enable byte = 80h
OUT DX, AL
Example 2: (in BASICA language)
OUT &H210, &H80; REM If the base I/O address is 210h
Example 3: (in Turbo C language)
Outportb (0x210, 0x80);/*If the base I/O address is 210h*/
5.3.4 Disable the Software Write Protect
Writes data 0 to the base port+0 address
Example 1: (in assembly language)
MOV DX, 210H ; If the base I/O address is 210h
MOV AL, 00H ; Disable byte=00h
OUT DX, AL
Example 2: (in BASICA language)
OUT &H210, &H00; REM If the base I/O address is 210h
Example 3: (in Turbo C language)
Outportb (0x210, 0x00);/*If the base I/O address is 210h*/