DriveMaster_Sample_Scripts3
DriveMaster_Sample_Scripts3
Please copy the content below and paste it in DriveMaster’s Script Window to run this sample script.
//Please make sure you have inserted a CD in the Drive and the drive is ready.
TUR
//"Cls" is used to clear the content in the log window.
CLS
//There is a set of print commands for user to display the information in the log
//window. PRNS[R], PRNL[R], PRNSL[R], PRNSX[R], PRNF
PRNS "=================================================="
//"Script" displays the name of current script; "VER" displays the version number
//of current DriveMaster; "DEVNAME" displays the information of current tested
//device including model number, serial number and firmware revision; "DATE"/"TIME"
//displays current date and time
SCRIPT; VER; DEVNAME; DATE; TIMEPRNS
"=================================================="
//"Echo On" or "Echo Off" is used to control the display of command issued to be
//echoed to the Log window. Default is "Echo On"
ECHO OFF
//"Log1"/"Log2"/"LogOff" is used to control how detail information will be displayed
//on the Log Window when command failed. Default is "Log2"
LOGOFF
//"HaltErr On" or "HaltErr Off" is used to control if script will be halted
//when command fails. Default is "HaltErr Off"
HALTERR OFF
//"UPD ON" or "UPD OFF" is used to control how frequent the screen display will be
//refreshed. When "Upd On", the screen will be refreshed by every second; When "Upd
//Off", the screen will be refreshed by each script line. Default is "UPD off"
UPD ON
//Issue "Read Capacity" command to get the maximum LBA
RDCAP
//ST, CDF, SEL are global variables for specific meaning in Read CD command
ST = 0 //Expected Sector Type
CDF = 0f8h //Flag Bits
SEL = 0 //SubCode Selection
//V0-V99, G0-G99, I-I10, J-J10, K-K10 are DWORD Global variables for general
//purpose. Also user can define the meaningful variables/arrays by "DIM"
k9 = 50h //Max. Transfer Len in Read CD
PRNS ": Random Read CD Test"
//"For...EndFor" let user control scripts in loop. Similar commands
//include "Do...Until", "While...EndWhile"
FOR (v1 = 0; v1 < 100; v1+= 1)
k1 = RAND%MAXLBA //Start LBA
k2 = RAND%k9 //Transfer Len
//"If...ElseIf...Else...EndIf" will let user control conditional execution
IF ((k1 + k2) > MAXLBA)
//Math/logical/conditional/assignment operators work similar as C language
k2 = MAXLBA - k1
ENDIF
//Print out current LBA and Transfer Len
PRNF "\r READ CD LBA %09ld ", k1
PRNF " LEN %04d ", k2
//Issue "Read CD" command with LBA k1, Length k2
//Besides ATA/ATAPI standard commands, user also can send Vendor specified
//ATA/ATAPI commands by using "WTF28", "WTF48", "PACKET"
RDCD k1, k2
ENDFOR
//Restore to the defaults Logging control parameters
ECHO ON
LOG2
HALTERR OFF
UPD OFF
PRNF "\n End"
End
//User also can use "Sub"/"Call" functions to generate more complex scripts
//as needed.