TREX
User Guide
For Version 1.182.505
December 20
th
, 2006
Western Digital Corporation
Company Confidential
Page 2 of 332
TREX000630-A.doc
Western Digital Corporation
Company Confidential
Table of Contents
1 INTRODUCTION...................................................................................................................................... 5
4 GENERAL NOTES................................................................................................................................... 6
25 DRIVE COMMANDS............................................................................................................................ 18
35 VARIABLES....................................................................................................................................... 108
36 MISC COMMANDS............................................................................................................................ 148
6. INTRODUCTION TO KERNEL COMMANDS.....................................................................................163
7. ARITHMETIC OPERATIONS.............................................................................................................. 163
8. BIT-WISE OPERATIONS.................................................................................................................... 164
9. BOOLEAN OPERATIONS.................................................................................................................. 165
10. BUFFER MANAGEMENT................................................................................................................. 166
11. COMMA SEPARATED VALUE FILE SUPPORT..............................................................................188
12. DEBUG COMMANDS....................................................................................................................... 190
13. DELAYS............................................................................................................................................ 193
14. ELAPSED TIME................................................................................................................................ 194
15. EVENT HANDLERS.......................................................................................................................... 195
16. FLOATING POINT SUPPORT.......................................................................................................... 204
17. LINE REPEAT................................................................................................................................... 211
18. LITERAL VALUES............................................................................................................................ 211
19. LOG FILE SUPPORT........................................................................................................................ 213
20. LOW-LEVEL FILE SUPPORT........................................................................................................... 215
21. MESSAGE WINDOW & SCREEN OUTPUT.....................................................................................224
22. MISCELLANEOUS COMMANDS / SYMBOLS.................................................................................229
23. NETWORK FILE SUPPORT............................................................................................................. 249
24. POINTERS........................................................................................................................................ 249
25. PORT I/O........................................................................................................................................... 250
26. PROCEDURES & SCRIPT FILE MANAGEMENT............................................................................256
27. PRE-PROCESSOR STATEMENTS.................................................................................................. 266
28. PROGRAM FLOW CONTROL.......................................................................................................... 267
29. PROCESS CONTROL....................................................................................................................... 270
30. RANDOM NUMBERS........................................................................................................................ 270
31. PC-H/W BASED SERIAL COMMUNICATION CHANNEL...............................................................273
Page 3 of 332
TREX000630-A.doc
Western Digital Corporation
Company Confidential
32. PCI-CARD BASED SERIAL COMMUNICATION CHANNEL...........................................................280
33. TIME & DATE.................................................................................................................................... 281
34. TIMERS............................................................................................................................................. 284
35. USER STRINGS................................................................................................................................ 288
36. USER VARIABLES / LITERALS....................................................................................................... 293
37. USER INPUT..................................................................................................................................... 301
38. TRIPLE DES...................................................................................................................................... 307
IDE TASKFILE GENERAL INFORMATION............................................................................................310
APPENDIX.............................................................................................................................................. 312
INDEX...................................................................................................................................................... 320
Page 4 of 332
TREX000630-A.doc
Western Digital Corporation
Company Confidential
1 Introduction
2 Purpose
TREX, or Taskfile Register Exercizer, is a DOS based application used to test IDE disk drives. The
fundamental purpose of TREX is to help Western Digital Engineers and Technicians reliably test and
perform analysis on our hard drives. All of TREX’s features and supported commands are created to help
verify the functionality of Western Digital drives.
The method of talking to an IDE drive is through the taskfile registers. The name TREX was derived from
Taskfile Register Exerciser. TREX accepts user commands through the keyboard or via script files. It will
display the taskfile data and status through various interface screens.
TREX expects to be executed on a PC, executing DOS. There should be at least one IDE port to connect
to a disk drive.
3 System Requirements
TREX is a DOS based application, running on a Pentium based PC system with a PCI bus. It will not be
guaranteed to work in a Windows ‘DOS shell’. Below are the minimum system requirements to ensure
that TREX will be able to run properly:
Pentium PC with PCI bus
IDE interface
16 Meg of RAM
1.44 Meg floppy drive (or network support)
DOS 6.20 or higher
VGA monitor
Keyboard
Page 5 of 332
TREX000630-A.doc