It's not that difficult.
Or could check result of `_OS$()` function. For an executable it doesn't matter because the three main operating systems use different formats: Linux uses ELF.
Code: (Select All)
DIM ff AS LONG
$IF WIN THEN
DIM CRLF AS STRING * 2
CRLF = CHR$(13) + CHR$(10)
$ELSEIF LINUX THEN
DIM CRLF AS STRING * 1
CRLF = CHR$(10)
$ELSE 'it's... grymmjack's computer! Isn't it? (scratch head)
DIM CRLF AS STRING * 1
CRLF = CHR$(13)
$END IF
ff = FREEFILE
OPEN "blah.bin" FOR BINARY AS ff
PUT #1, , CRLF
CLOSE ff
Or could check result of `_OS$()` function. For an executable it doesn't matter because the three main operating systems use different formats: Linux uses ELF.