The text of a manual · part 10 of 16
M90 Series Portable Data Entry Unit Reference Manual, pages 91 to 100
Pages 91 to 100 of 156
The original document is the PDF (352 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec M90
Page 91
SECTION 4
DOS System Call
3C Create or Truncate a File When a file is opened, the file manager searches the file table for a match. If the manager finds a match, the correĆ sponding file handle is returned and the current pointer reĆ sets to the beginning of the file. The actual file is reset to zero. If the file does not exist in the file table, a file entry is allocated and memory is assigned. Entry Parameter: AH=0x3C DS:DX=Segment:offset of filename Return Value: 1) AX=Handle Clear carry flag if successful 2) AX=3 Set carry flag if failed 3D Open a File Entry Parameter: AH=0x3D AL=0 Open a file for read only AL=1 Open a file for write only AL=2 Open a file for read and write DS:DX=Segment:offset of filename Return Value: 1) AX=Handle Clear carry flag if successful 2) AX=2 Set carry flag if failed 3E Close a File Entry Parameter: AH=0x3E BX=File handle Return Value: If successful: Carry flag is cleared If not successful: Carry flag is set
M90 Series Portable Data Entry Unit Reference Manual
4-21
Page 92
DOS System Call
SECTION 4
3F Read a File Copy (CX) bytes from current address to DS:DX. Advance the current address (CX) number of bytes. Entry Parameter: AH=0x3F BX=File handle CX=Number of bytes to read DS:DX=Segment: offset of buffer area Return Value: 1) AX=Number of bytes read, 0 if EOF, Clear carry flag if successful 2) AX=6 Set carry flag if failed 40 Write a File Copy (CX) bytes from DS:DX to file (BX). Update BX current address and ending address. Entry Parameter: AH=0x40 BX=File handle CX=Number of bytes to write DS:DX=Segment: offset of buffer area Return Value: 1) AX=Number of bytes written, 0 if full, Clear carry flag if successful 2) AX=6 Set carry flag if failed 41 Delete a File Entry Parameter: AH=0x41 DS:DX=Segment: offset of filename Return Value: 1) Clear carry flag if successful 2) AX=2 Set carry flag if failed
4-22
M90 Series Portable Data Entry Unit Reference Manual
Page 93
SECTION 4
DOS System Call
42 Move File Pointer Entry Parameter: AH=0x42 AL=0 Offset from beginning position AL=1 Offset from current position AL=2 Offset from end position BX=File handle CX=Most significant half of offset DX=Least significant half of offset Return Value: 1) AX= Least significant half of new current position DX= Most significant half of new current position Clear carry flag if successful 2) AX=6 Set carry flag if failed 42
Search Character Beginning at the Current File Position Entry Parameter: AH=42H AL= 3 Search forward (to end of file) 4 Search backward (to top of file) BX=File handle CX=n Search nth matched character DL=Character Return Value: 1) If character is found: Carry flag=Clear DX:AX=Pointer to current file position (at position of matched character) 2) If character is not found: Carry flag=Set CX=Total matched times DX:AX=Pointer to current file position (not changed)
M90 Series Portable Data Entry Unit Reference Manual
4-23
Page 94
DOS System Call
SECTION 4
42
Search String in Formatted Data File Beginning at Current Position Entry Parameter: AH=42H AL= 5 Search forward (to end of file) 6 Search backward (to beginning of file) BX=File handle CH=n Total field number in data record CL=m Search mth field DS:DX=Pointer to parameter block Structure of parameter block for variableĆlength record: String length: 1 byte String without terminator: N bytes 0x00 1 byte Field separator character: 1 byte Structure of parameter block for fixedĆlength record: String length: 1 byte String without terminator: N bytes Field #1 length: 1 byte Field #2 length: 1 byte .. .. .. Field #n length: 1 byte Return Value:
4-24
1) If string is found: Carry flag=Clear DX:AX=Pointer to current file position (at beginning of the matched string) 2) If string is not found: Carry flag=Set DX:AX=Pointer to current file position (not changed)
M90 Series Portable Data Entry Unit Reference Manual
Page 95
SECTION 4
DOS System Call
42
Insert/Delete Data Block to/from File at Current Position Entry Parameter: AH=42H AL= 7 Insert 8 Delete BX=File handle CX=Block length in bytes Return Value: 1) If the function is successful: Carry flag=Clear DX:AX=Pointer to current file position (not changed) 2) If the function fails: Carry flag=Set DX:AX=Pointer to current file position (not changed) " NOTE:
For insertion, the content of the inserted data block is undefined.
43 Get File Attribute Entry Parameter: AH=0x43 AL=0 DS:DX=Segment: offset of filename Return Value: 1) CX=0 Clear carry flag if file found 2) AX=2 Set carry flag if file not found 44 Device-Driver Control IOCTL Entry Parameter: AH=0x44 AL=0 Getting device information AL=1 Setting device information BX=Handle DX=Device information Return Value: 1) DX=Device information Clear carry flag if successful 2) AX=6 Set carry flag if failed M90 Series Portable Data Entry Unit Reference Manual
4-25
Page 96
DOS System Call
SECTION 4
44 Device-Driver Control IOCTL Entry Parameter: AH=0x44 AL=2 Read to buffer AL=3 Write buffer to device BX=Handle CX=Number of bytes to read or write DS:DX=Segment: offset of buffer area Return Value: 1) AX=Number of bytes transferred Clear carry flag if successful 2) AX=6 Set carry flag if failed 44 Device-Driver Control IOCTL Entry Parameter: AH=0x44 AL=6 Get input status AL=7 Get output status BX=Handle Return Value: 1) AL=0 if not ready AL=0xFF if ready Clear carry flag if successful 2) AX=6 Set carry flag if failed 48
Allocate Specified Number of Paragraphs in Memory Entry Parameter: AH=0x48 BX=Number of segments Return Value: AX=Segment address of allocate blocks, Error code, if carry flag BX=Largest available block (on failure) 49 Free Allocated Memory Entry Parameter: AH=0x49 ES=Segment of block to free Return Value: AX=Error code if carry flag set
4-26
M90 Series Portable Data Entry Unit Reference Manual
Page 97
SECTION 4
DOS System Call
4A Modify Allocated Block Entry Parameter: AH=0x4A ES=Segment of the block modified BX=New number of segments wanted Return Value: AX=Error code, if carry flag is set BX=Largest available block (on failure), if carry flag is set 4B Call Application Program Entry Parameter: AH=0x4B AL=0 DS:DX=String of ASCIIZ Return Value: Carry flag = 0 (Success) 1 (Fail) 4B Run Application Program Entry Parameter: AH=0x4B AL=3 DS:DX=String of ASCIIZ Return Value: Carry flag = 0 (Success) 1 (Fail)
M90 Series Portable Data Entry Unit Reference Manual
4-27
Page 98
DOS System Call
SECTION 4
50 Get Bar Code Data from Scanner Port Entry Parameter: AH=0x50 DS:DX=Buffer pointer Return Value: 1) AL= 0 Data in buffer CH= 0 Scan from start to stop 1 Scan from stop to start CL= 1 Code 39 2 I 2 of 5 3 Codabar 4 EAN/UPC 5 Code 128 6 EAN 128 7 Code 93 BL= 1 Code 39 2 Interleaved 2 of 5 3 Codabar 5 Code 128 6 EAN 128 7 Code 93 11H UPC-A 12H UPC-E 13H EAN-13 14H EAN-8 2) AL=1 No data input CL=0 No failed decoding since last time function was called. CL=1 Failed decoding since last time function was called. 51 Enable or Disable Scanner Port Entry Parameter: AH=0x51 AL=0 Disable scanner port AL=1 Enable scanner port Return Value: None
4-28
M90 Series Portable Data Entry Unit Reference Manual
Page 99
SECTION 4
DOS System Call
56 Rename a File Entry Parameter: AH=0x56 DS:DX=Pointer to a filename ES:DI=Pointer to new filename Return Value: Clear carry flag if successful AH=2 if carry flag is set 5B Create New File Entry Parameter: AH=5BH DS:DX Pointer to file name string Return Value: If successful: Carry flag is cleared AX=File Handle If not successful: Carry flag is set AX= 04H Too many open files 50H File exists " NOTE:
If the specified file already exists, the Create New File function fails. Table 4-1 Implemented DOS Functions (INT 21h)
Function Description
Comment
00h
Terminate Program
01h
Read Stdin
02h
Write Stdout
03h
Read Stdaux
04h
Write Stdaux
06h
Write Stdout
07h
Read Stdin
08h
Read Stdin
09h
Write Character String
0Bh
Keyboard Hit
1Ah
Device Configuration
M90 special
M90 Series Portable Data Entry Unit Reference Manual
4-29
Page 100
DOS System Call
SECTION 4
Table 4-1 (Continued) Implemented DOS Functions (INT 21h) Function Description
Comment
1Ch
Communication Configuration
M90 special
1Dh
Terminal Configuration
M90 special
1Eh
Keyboard Configuration
M90 special
1Fh
Bar Code Control
M90 special
25h
Set Interrupt Vector
2Ah
Get System Date
2Bh
Set System Date
2Ch
Get System Time
2Dh
Set System Time
2Eh
Set Alarm Date
M90 special
2Fh
Set Alarm Time
M90 special
30h
Get M90 Version Number
35h
Get Interrupt Vector
36h
Get Free Disk Clusters
37h
Get/Set EXEC size
3Ch
Create File
3Dh
Open File
3Eh
Close File
3Fh
Read File
40h
Write File
41h
Delete File
42h
Move File Pointer
43h
Get File Attribute
44h
Device IOCTL
48h
Allocate Memory
4-30
M90 special
Only Console I/O supported
M90 Series Portable Data Entry Unit Reference Manual