z88dk forums

z80 Development Kit

You are not logged in.

#1 2019-06-05 07:38:41

stefano
Administrator
Registered: 2007-07-16
Posts: 1581

File redirection fixed

I finally spotted the main problem preventing the file redirection from working correctly.
I suspect there are still problems with operations on multiple files in parallel, but this is a bit step forward.

For those not being aware of it, the CP/M, MSX and OSCA programs are by default able to deal with stdin/stdout redirection, thus, in example, any program output will be appended to a file just by specifying an extra parameter like ">>file.txt".

Redirection can be disabled by altering the environment with a #pragma directive:
#pragma output noredir

More functions can be stripped in a similar way, e.g. for CP/M:
    #pragma output nostreams           - No stdio disc files
    #pragma output nofileio                - No fileio at all, use in conjunction to "-lndos"
    #pragma output noprotectmsdos   - strip the MS-DOS protection header
    #pragma output protect8080         - add a check to block the program when on an 8080 CPU (not compatible)
    #pragma output noredir                - do not insert the file redirection option while parsing the
                                                          command line arguments (useless if "nostreams" is set)
    #pragma output nogfxglobals        - No global variables for graphics (required for GFX on TIKI-100, Einstein, and Spectrum +3)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson