Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SaveExample
- ld hl,FileDescriptor
- ld c,#13 ;copy the file descriptor to TR-DOS system variables
- call #3D13
- ld a,9 ;find a file with matching 9 first bytes in the descriptor, i.e. just the filename and type
- ld (#5D06),a
- ld c,#0A
- call #3D13
- inc c ;C will contain #FF if the file with this name wasn't found
- ld c,#12 ;if it was found, mark the file descriptor as deleted
- call nz,#3D13
- ld hl,Address ;save the file
- ld de,Length
- ld c,#0B
- call #3D13
- ret
- FileDescriptor
- DEFB "FILENAME" ;8 characters
- DEFB "C" ;file type: code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement