home *** CD-ROM | disk | FTP | other *** search
- ;
- ; swap file de^, user/flags a, for the file presently attached
- ; to buffer hl^. Return de a pointer to the previous file, and
- ; a as the previous flags lo byte setting.
- ; This permits use of a single buffer for fast file transfers,
- ; using the .BDUMP and .BLOAD routines to control user access
- ; during file read/writes.
- ; a,f,d,e
- .bfswap::
- push b
- push h
- mov b,m; existing flags byte
- mov m,a; set revised flags byte
- inx h ! inx h; advance to size
- inx h ! inx h; advance to fcbptr
- mov a,m ! inx h ! mov c,m; existing fcb
- mov m,d ! dcx h ! mov m,e; revised fcb
- mov d,c ! mov e,a; de := previous fcb
- mov a,b; a := previous flags
- pop h
- pop b
- ret
- ñí