Main

Contents
DOS Calls

TRS-80 Models 1 and 3 DOS Calls

The following keys for DOSes apply:

     T1 - Model 1 TRSDOS          T3 - Model 3 TRSDOS
     N1 - Model 1 NEWDOS          N3 - Model 3 NEWDOS
     L1 - Model 1 LDOS            L3 - Model 3 LDOS
     M1 - Model 1 MULTIDOS        M3 - Model 3 MULTIDOS
     D1 - Model 1 DOSPLUS         D3 - Model 3 DOSPLUS
     All - All DOSes, Model I and Model III.

---------------------------------------------------------------
HEX   DEC           COMMENTS
---------------------------------------------------------------
4225 16933 T3, L3, D3. Dos command buffer.
4288 17032 L3. 33.33 ms heartbeat counter.
428A 17034 L3. Send message to Job Log and CRT.
428D 17037 T3, D3. Find drive and file number for open file.
           L3, send message to Job Log.
4290 17040 T3, L3, D3. Copy directory to RAM buffer.
4293 17043 Get file name from directory.
4296 17046 L3. Execute Dos command and return to DOS ready.
4299 17049 T3. Do DOS command and return to DOS ready.
           L3: returns to caller is @EXIT and @ABORT vectors
           change to jump to return address.
429C 17052 T3. Do DOS command and return to caller.
42AD 17069 D3. Contains address of break key routine.
4312 17170 D1. Contains address of break key routine.
4318 17176 T1, L1, D1. DOS command buffer.
4396 17302 L1. Read directory into memory.
4400 17408 L1, D1, D3, N1, N3, M1, M3. Same as 402D.
4402 17410 Send text to file or device.
4405 17413 L1, D1, D3, N1, N3, M1, M3. Do DOS command and
           return to DOS ready.
4409 17417 Display error message on CRT.
440D 17421 L1, L3, D1, D3, N1, N3, M1, M3. Enter Debug.
4410 17424 L1, D1, N1, M1. Add task to interrupt chain.
4411 17425 Address of highest available memory location (Mod 3
           disk only - Mod 1 disk = 4049H)
4413 17427 L1, D1, N1, N3, M1. Remove task from interrupt
           chain.
           D3, add task to interrup chain.
4415 17429 T3 (undocumented) Second copy of high memory
           address. Copied to 4411H in case of I/O error during
           DO processing.
4416 17430 L1, M1. Change entry address of task in interrupt
           chain.
           D3: Remove task from interrupt chain.
           N1, N3: Keep rotating and reselect current drive.
4417 17431 L3. Contains current day in coded format.
4419 17433 T3, L3. Write disk directory to screen or buffer.
           N1, N3: Execute DOS command and return to caller.
441C 17436 T3, L1, L3, D1, D3, N1, N3, M1, M3. Move filespec to
           FCB.
4420 17440 All. Open or create a file.
4424 17444 All. Open existing file.
4428 17448 All. Close a file.
442C 17452 All. Remove file from directory.
4430 17456 All. (undocumented in T1) Load file (m.l. program)
           into memory.
4433 17459 All. (undocumented in T1) Load and run m.l. program.
4436 17462 All. Read logical record into memory.
4439 17465 All. Write logical record to disk.
443C 17468 All. Write record and verify.
443F 17471 T3, L1, L3, D1, D3, N1, N3, M1, M3. Point to first
           record in file.
4442 17474 All. Position file to specified record.
4445 17477 T3, L1, L3, D1, D3, N1, N3, M1, M3. Backspace file
           one record.
4448 17480 T3, L1, L3, D1, D3, N1, N3, M1, M3. Position to EOF.
444B 17483 T3, L3, D3, M3. Add extension to filespec in FCB
           (see also 4473).
           L1: Check for end of file.
           D1: Multiply 16 bit by 8 bit integer.
           N1, N3: Allocate disk space to file.
444E 17486 T3, L3, D3. Multiply 16 bit by 8 bit integer.
           L1: Update directory with current record as EOF.
           D1: Divide 16 bit by 8 bit integer.
           N1, N3: Position file to specified byte record.
4451 17489 T3, L3, D3. Divide 16 bit by 8 bit integer.
           D1: Check for end of  file.
           N1, N3: Update directory with record as end of file.
4454 17492 L1 Read current sector.
           L3, D3, M3: Parse parameters in command line.
           D1: Find drive and file number of a file.
4457 17495 L1 Rewrite current sector.
           D3: Check for end of file.
           D1: Read directory to user buffer.
4458 17496 L3. Check for end of file.
445A 17498 L1. Calculate current logical record number.
           D1, D3: Display directory on CRT.
445B 17499 L3. Update directory with current record as EOF.
           N1, N3: Select and power up specified drive.
445D 17501 L1. Calculate EOF record number.
445E 17502 L3. Reread current sector.
           N1, N3: Test drive and disk.
4460 17504 L1. Skip next logical record.
4461 17505 L3. Rewrite current sector. N1, N3: Add user routine
           to DOS library chain.
4462 17506 D1, D3. Send text to printer.
4463 17507 L1. Read directory to buffer or CRT.
4464 17508 L3. Skip next logical record. N1, N3: Remove user
           routine from DOS library chain.
4467 17511 L1, L3, D1, D3, N1, N3, M1, M3. Display text on CRT.
446A 17514 L1, L3, N1, N3, M1, M3. Send text to printer.
446D 17517 T1, L1, D1, D3, N1, N3, M1. Get time in ASCII
           format. L3: Calculate current logical record number.
4470 17520 L3. Calculate end of file record number.
4473 17523 L3. Holds image of interrupt latch. T1, L1, D1, D3,
           N1, N3, M1, M3: Add default extension to filespec in
           FCB. (See also 444BH)
4476 17526 L1, D1, M1, M3: Parse parameters in command line.
4779 17529 L1. Send text to file or device. D1, D3: Scan and
           evaluate command line.
447B 17531 L1. Send text to job log and CRT. N3: Add task
           interrupt chain.
447C 17532 D1, D3. Compare filespec to wildcard mask.
447E 17534 L1. Send text to joblog.
447F 17535 D1, D3. Get device number for file or I/O device.
4482 17538 D1, D3. Sort block of memory.
4485 17541 D1. 10 disk I/O functions depending on value in A.
4488 17544 D3. 10 disk I/O functions depending on value in A.
           D1: Locate device control block for any device.
448B 17547 D1. Locate drive control table for any drive.
44A0 17568 D3. Locate device control block for any device.
44A3 17571 D3. Locate drive control table for any drive.
44B8 17592 L1. Check drive and disk.
44BB 17595 L1. Get file name from directory.
44C1 17601 L1. Multiply 16 bit by 8 bit integer.
44C4 17604 L1. Divide 16 bit by 8 bit integer.
44D2 17618 M3. Add task to interrupt chain.
44D5 17621 M3. Remove task from interrupt chain.
44D8 17624 M3. Change execution address of task in interrupt
           chain.
44DB 17627 M3. Set task pointer to default of RET.
44DE 17630 M1, M3. Verify a sector without reading to RAM.
44E1 17633 M1, M3. Read sector.
44E4 17636 M1, M3. Write sector.
44E8 17640 M1, M3. Read directory sector.
44EB 17643 M1, M3. Write directory sector.
44EE 17646 M1, M3. Read director.
44F1 17649 M1, M3. Write directory.
44F4 17652 M1, M3. User function.
44F7 17655 M1, M3. Get directory track number.
46DD 18141 RDSECT. On Model I, allows reading a disk sector.
           Register C contains the drive selcted; D, the track;
           E, the sector number; HL points at data buffer. On
           return, Z is set if successful; else A= error code.
46E6 18150 WTSECT. On Model I, allows you to write a disk
           sector. Same conditions as RDSECT at 46DDH.
4754 18260 L1, L3. Select drive.
4759 18265 L1, L3. Continually reselect drive until it's ready.
475E 18270 L1, L3. Seek specified cylinder (track).
4763 18275 L1, L3. Write sector to disk.
4768 18280 L1, L3. Write system (directory) sector.
476D 18285 L1, L3. Write track to disk (used for formatting).
4772 18290 L1, L3. Verify sector without transfering data to
           memory.
4777 18295 L1, L3. Read sector to buffer.
478F 18319 L1, L3. Get address of DCT for specifed drive.
479C 18332 L1, L3. Get byte field from drive code table.
4B10 19216 L1, L3. Read DIR sector with specified entry code.
4B1F 19231 L1, L3. Write system buffer to specified DIR sector.
4B45 19269 L1, L3. Read directory sector to user buffer.
4B64 19300 L3. Get cylinder (track) number of directory.
4B65 19301 L1. Get cylinder (track) number of directory.
4B6B 19307 L3. Multiply 8 bit by 8 bit integers.
4B6C 19308 L1. Multiply 8 bit by 8 bit integers.
4B7A 19322 L3. Divide 8 bit by 8 bit integers.
4B7B 19323 L1. Divide 8 bit by 8 bit integers.



Top

The TRS-80 Home Page created and maintained by Pete Cervasio
cervasio@airmail.net

Copyright © 1998 Pete Cervasio