Advertisement
wallyweek

TR-DOS load example

Nov 23rd, 2022
1,649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. LoadExample
  2.     ld hl,FileDescriptor
  3.     ld c,#13        ;#3D13 C=#13: copy the file descriptor to TR-DOS system variables
  4.     call #3D13
  5.     xor a
  6.     ld (#5CF9),a        ;#00: load, #FF: verify
  7.     dec a           ;load the file to an address in HL
  8.     ld hl,MyAddress
  9.     ld c,#0E
  10.     call #3D13      ;#3D13 C=#0E: load/save file
  11.     ret
  12.  
  13. FileDescriptor
  14.     DEFB "FILENAME"     ;8 characters
  15.     DEFB "C"        ;file type: code
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement