Advertisement
wallyweek

TR-DOS system functions

Nov 23rd, 2022 (edited)
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. +--------------------------+
  2. | TR-Dos system functions. |
  3. +--------------------------+
  4.  
  5. The system functions work with file and logical level of
  6. disk structure. The entry point for system functions call is
  7. 15635. If TR-Dos is not initialized, init. subroutine
  8. (15649) must be called before system calls. Function number
  9. is placed in C register.
  10.  
  11. +-----+------------------------------------------------------+
  12. | C |Function |
  13. +-----+------------------------------------------------------+
  14. | Start of work with disk |
  15. | #00 |Microcontroller reset |
  16. | #01 |Read drive parameters. A=drive No. (0-3) |
  17. | #18 |Read disk parameters. 9th sector is read into buffer |
  18. | |placed after TR-Dos variables |
  19. | Logical level |
  20. | #05 |Read sectors. HL=memory address, DE=start sector/track|
  21. | |B=number of sectors |
  22. | #06 |Write sectors. Parameters are the same |
  23. | File level |
  24. | #07 |Write current disk catalog into stream (number in A) |
  25. | #08 |Read catalogue entry (A=No.) into descriptor |
  26. | #09 |Write catalogue entry from descriptor |
  27. | #0A |Find entry, placed in descriptor, in disk catalog. |
  28. | |#23814-number of bytes to match. Returns:C=entry |
  29. | |found, #FF, if no |
  30. | #0B |Create file. HL=start address, DE=length, name and |
  31. | |type are in descriptor. |
  32. | #0C |Create BASIC-program (detailed previous function) |
  33. | #0E |Read/verify file. #23801:#00-read, #FF-verify. Also |
  34. | |can be given: HL-start, DE-length. If A=0, start and |
  35. | |length are taken from catalog, A=3 - only length is |
  36. | |taken from catalog, other cases - both HL and DE are |
  37. | |significant. |
  38. | #12 |Erase file. Name, type etc. are in descriptor. |
  39. | Service functions |
  40. | #13 |Copy 16b from HL to descriptor |
  41. | #14 |Copy 16b from descriptor to HL |
  42. | #17 |Choose bottom disk side |
  43. | #15 |Test physical track while formatting. Track is given |
  44. | |in D, side - with previous operation. 23766 - number |
  45. | |of bad sectors on track |
  46. +-----+------------------------------------------------------+
  47. Other functions are used by TR-Dos and are useless for
  48. programmer.
  49.  
  50. Other themes: TR-Dos system variables, BetaDisk
  51. microcontroller programming.
  52. Igor Yudincev (igor@karlson.kai.ksu.ras.ru)
  53. Text is written in IS-Editor v.1.1, 1.06.97
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement