kaos/KaosSrc/ftest.cpp

25 lines
799 B
C++
Raw Normal View History

2024-10-12 20:32:30 -05:00
/************************************************************************
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
************************************************************************/
#include <io.h>
#include <dos.h>
void main() {
char *prima = "Prima",
*dopo = "Dopo";
int handle;
if ((handle = _creat("test.lsk",FA_ARCH)) >= 0) {
_write(handle,dopo,5);
_write(handle,dopo,4);
lseek(handle,0,SEEK_SET);
_write(handle,prima,5);
lseek(handle,0,SEEK_END);
_write(handle,dopo,4);
_close(handle);
}
}