#define TRUE 1 #define FALSE 0 //-------- Code address space constant ------------ #define AS_CODE 0 //-------- Address space constants: 8051 debuggers ------------ #ifdef __MCS_51 #define AS_IDATA 1 #define AS_DATA 2 #define AS_XDATA 3 #define AS_BIT 4 #define AS_XDATA_EXT 5 #define AS_EEPROM 6 #endif //-------- Address space constants: MCS-96 debuggers ------------ #ifdef __MCS_96 #define AS_DATA 1 #endif //-------- Address space constants: Microchip PIC debuggers ------------ #ifdef __PIC #define AS_DATA 1 #define AS_BIT 2 #define AS_EEPROM 3 #endif //-------- Address space constants: Atmel AVR debuggers ------------ #ifdef __AVR #define AS_SRAM 1 #define AS_REG 2 #define AS_IOREG 3 #define AS_EEPROM 4 #endif //-------- Address space constants: Xemics XE8000 debuggers ------------ #ifdef __816 #define AS_SRAM 1 #define AS_REG 2 #define AS_STACK 9 #endif //-------- Address space constants: Sensory debuggers ------------ #ifdef __SENSORY #define AS_SRAM 1 #define AS_REG 2 #define AS_YDATA 3 #define AS_ROM 4 #define AS_FLASH 5 #define AS_STACK 9 #endif //-------- Address space constants: TI MSP430 debuggers ------------ #ifdef __MSP430 #define AS_REG 1 #endif //-------- Address space constants: Maxim MAXq debuggers ------------ #ifdef __MAXQ #define AS_DATA 1 #define AS_REG 2 #define AS_STACK 3 #endif //-------- Address space constants: ARM debuggers ------------ #ifdef __ARM #define AS_MEMORY 0 #endif //-------- File formats for loading programs: 8051 debuggers ------------ #ifdef __MCS_51 #define LF_AVOCET 0 // Hi-Tech Software, Avocet Systems #define LF_UBROF 1 // IAR Systems UBROF #define LF_KEIL_4X 2 // Keil Software v. 4.x, Raisonance, Franklin Software #define LF_KEIL 3 // Keil Software v. 5.x, 6.x, Archimedes Software #define LF_TASKING 4 // Tasking .OUT #define LF_MCE 5 // Phyton/MicroCOSM MCE format #define LF_CROSSW 6 // Crossware Extended OMF-51 #define LF_SDCC 7 // SDCC C Compiler .cdb files #define LF_HEX 8 // Standard/Extended Intel HEX #define LF_AOMF 9 // Intel Absolute (AOMF-51) #define LF_BIN 10 // Binary image #define LF_DUNFIELD 11 // Dunfield .lst files #define LF_RAISONANCE 12 // Raisonance .aof files #define LF_SPJ 13 // SPJ SC51 C Compiler .aom files #endif //-------- File formats for loading programs: MCS-96 debuggers ------------ #ifdef __MCS_96 #define LF_MCE 0 // MicroCOSM-ST MCE format #define LF_UBROF 1 // IAR Systems UBROF #define LF_TASKING 2 // BSO/Tasking #define LF_PHASM 3 // Phyton PHASM-96 #define LF_HEX 4 // Standard/Extended Intel HEX #define LF_BIN 5 // Binary image #endif //-------- File formats for loading programs: Microchip PIC debuggers ------------ #ifdef __PIC #define LF_PICASM 0 // Phyton PASM-MC assembler #define LF_MPASM 1 // COD by Microchip MPLAB #define LF_HEX 2 // Standard/Extended Intel HEX #define LF_BIN 3 // Binary image #define LF_HTPIC 4 // Hi-Tech SYM #define LF_UBROF 5 // IAR Systems UBROF #define LF_CCS_COD 6 // COD with '.' by CCS #define LF_CCS_COFF 7 // COFF by Microchip, CCS #endif //-------- File formats for loading programs: Atmel AVR debuggers ------------ #ifdef __AVR #define LF_MCE 0 // MicroCOSM-ST MCE format #define LF_UBROF 1 // IAR Systems UBROF #define LF_COFF 2 // ImageCraft COFF #define LF_HEX 3 // Standard/Extended Intel HEX #define LF_BIN 4 // Binary image #endif //-------- File formats for loading programs: Xemics XE8000 debuggers ------------ #ifdef __816 #define LF_GCC 0 // GNU C-816 elf/stabs #define LF_HEX 1 // Standard/Extended Intel HEX #define LF_BIN 2 // Binary image #endif //-------- File formats for loading programs: Sensory debuggers ------------ #ifdef __SENSORY #define LF_MCE 0 // MicroCOSM-ST MCE format #define LF_HEX 1 // Standard/Extended Intel HEX #define LF_BIN 2 // Binary image #endif //-------- File formats for loading programs: MSP430 debuggers ------------ #ifdef __MSP430 #define LF_MCE 0 // MicroCOSM-ST MCE format #define LF_UBROF 1 // IAR Systems UBROF #define LF_HEX 2 // Standard/Extended Intel HEX #define LF_BIN 3 // Binary image #endif //-------- File formats for loading programs: Maxim MAXq debuggers ------------ #ifdef __MAXQ #define LF_MCE 0 // MicroCOSM-ST MCE format #define LF_HEX 1 // Standard/Extended Intel HEX #define LF_BIN 2 // Binary image #endif //-------- File formats for loading programs: ARM debuggers ------------ #ifdef __ARM #define LF_ELF 0 // ELF/DWARF format #define LF_UBROF 1 // IAR Systems UBROF #define LF_HEX 2 // Standard/Extended Intel HEX #define LF_BIN 3 // Binary image #define LF_MCE 4 // MicroCOSM-ST MCE format #endif //-------- File formats for saving data ------------ #define SF_HEX 0 // Standard Intel HEX #define SF_EXT_HEX 1 // Extended Intel HEX #define SF_BIN 2 // Binary image #define SF_DISASM 3 // Disassembled code #define SF_DUMP 4 // ASCII dump //-------- Math constants ------------------ #define _PI 3.14159265358979 #define _TWO_PI 6.28318530717958 #define _HALF_PI 1.570796326794895 #define _E 2.718281828459045 //-------- Directory constants ------------------ #define WILDCARDS 0x01 #define EXTENSION 0x02 #define FILENAME 0x04 #define DIRECTORY 0x08 #define DRIVE 0x10 #define MAXDRIVE 3 #define MAXPATH 260 #define MAXDIR 256 #define MAXFILE 256 #define MAXEXT 256 //-------- File attributes ---------------------- #define FA_NORMAL 0x00 // Normal file, no attributes #define FA_RDONLY 0x01 // Read only #define FA_HIDDEN 0x02 // Hidden file #define FA_SYSTEM 0x04 // System file #define FA_LABEL 0x08 // Volume label #define FA_DIREC 0x10 // Directory #define FA_ARCH 0x20 // Archive //-------- File control constants---------------- #define O_RDONLY 0 #define O_WRONLY 1 #define O_RDWR 2 // Flag values for open only #define O_CREAT 0x0100 // create and open file #define O_TRUNC 0x0200 // open with truncation #define O_EXCL 0x0400 // exclusive open #define O_APPEND 0x0800 // to end of file #define O_TEXT 0x4000 // CR-LF translation #define O_BINARY 0x8000 // no translation #define O_NOINHERIT 0x80 #define O_DENYALL 0x10 #define O_DENYWRITE 0x20 #define O_DENYREAD 0x30 #define O_DENYNONE 0x40 #define S_IREAD 0x0100 // owner may read #define S_IWRITE 0x0080 // owner may write #define SEEK_CUR 1 #define SEEK_END 2 #define SEEK_SET 0 // --------- Background Modes ----------- #define TRANSPARENT 1 #define OPAQUE 2 //-------- Error codes------------------- #define EZERO 0 // Error 0 #define EINVFNC 1 // Invalid function number #define ENOFILE 2 // File not found #define ENOPATH 3 // Path not found #define ECONTR 7 // Memory blocks destroyed #define EINVMEM 9 // Invalid memory block address #define EINVENV 10 // Invalid environment #define EINVFMT 11 // Invalid format #define EINVACC 12 // Invalid access code #define EINVDAT 13 // Invalid data #define EINVDRV 15 // Invalid drive specified #define ECURDIR 16 // Attempt to remove CurDir #define ENOTSAM 17 // Not same device #define ENMFILE 18 // No more files #define ENOENT 2 // No such file or directory #define EMFILE 4 // Too many open files #define EACCES 5 // Permission denied #define EBADF 6 // Bad file number #define ENOMEM 8 // Not enough core #define EFAULT 14 // Unknown error #define ENODEV 15 // No such device #define EINVAL 19 // Invalid argument #define E2BIG 20 // Arg list too long #define ENOEXEC 21 // Exec format error #define EXDEV 22 // Cross-device link #define ENFILE 23 // Too many open files #define ECHILD 24 // No child process #define ENOSPC 28 // No space left on device #define ESPIPE 29 // Illegal seek #define EROFS 30 // Read-only file system #define EPIPE 32 // Broken pipe #define EDOM 33 // Math argument #define ERANGE 34 // Result too large #define EEXIST 35 // File already exists #define EDEADLOCK 36 // Locking violation #define EPERM 37 // Operation not permitted #define EINTR 39 // Interrupted function call #define EIO 40 // Input/output error #define ENXIO 41 // No such device or address #define EAGAIN 42 // Resource temporarily unavailable #define EBUSY 44 // Resource busy //-------- Window display constants------ #define SW_HIDE 0 #define SW_SHOWNORMAL 1 #define SW_NORMAL 1 #define SW_SHOWMINIMIZED 2 #define SW_SHOWMAXIMIZED 3 #define SW_MAXIMIZE 3 #define SW_SHOWNOACTIVATE 4 #define SW_SHOW 5 #define SW_MINIMIZE 6 #define SW_SHOWMINNOACTIVE 7 #define SW_SHOWNA 8 #define SW_RESTORE 9 //-------- Window type constants ------------- #define WIN_TIME 1 // Execution time #define WIN_WATCHES 2 // Watches #define WIN_DISASM 3 // Disassembler #define WIN_PSW 4 // PSW (8051 only) #define WIN_PERIPHERAL 5 // Peripheral device #define WIN_CONSOLE 7 // Console #define WIN_DUMP 8 // Memory Dump #define WIN_AUTO_WATCHES 10 // AutoWatches #define WIN_CALLER_STACK 11 // Caller Stack #define WIN_PA 12 // Performance Analyzer #define WIN_INSPECT 13 // Inspector #define WIN_TIMINGS 14 // Timings #define WIN_TRACER 15 // Tracer (Emulators only) #define WIN_SF_SOURCE 16 // Script source #define WIN_HSTK 18 // Hardware Stack (PICs only) #define WIN_STREAM 19 // I/O stream #define WIN_USER 20 // User window #define WIN_MEMMAP 21 // Memory layout window #define WIN_EDIT 27 // Editor window //-------- Memory access constants---------- #define MA_READ 1 #define MA_WRITE 2 //-------- Display format constants--------- #define DF_BIN 0 #define DF_HEX 1 #define DF_DEC 2 #define DF_ASCII 3 //-------- Update mode constants #define UM_IMMEDIATE 0 #define UM_ONREQUEST 1 //-------- Window event constants #define WE_REDRAW 1 #define WE_MOUSEBUTTON 2 #define WE_USERBUTTON 3 #define WE_TOOLBARBUTTON 4 #define WE_CHAR 5 #define WE_CLOSE 6 // ------- Pen Styles -------------- #define PS_SOLID 0 #define PS_DASH 1 #define PS_DOT 2 #define PS_DASHDOT 3 #define PS_DASHDOTDOT 4 // ------- Colors -------- #define BLACK 0x000000 #define BLUE 0xFF0000 #define GREEN 0x00FF00 #define RED 0x0000FF #define CYAN 0xFFFF00 #define MAGENTA 0xFF00FF #define YELLOW 0x00FFFF #define WHITE 0xFFFFFF // ------- COM ports parity constants -------- #define P_ODD 0 #define P_EVEN 1 #define P_NONE 2 // ------- Editor block status constants -------- #define EB_NONE 0 #define EB_LINE 1 #define EB_VERT 2 #define EB_STREAM 3 // ------- ExecScript load_mode constants -------- #define ES_ERROR 0 #define ES_RELOAD 1 #define ES_NOACTION 2 #define ES_EXITONMCUSELECT 4 // Terminate script after a new MCU is selected. // Must be combined (ORed) with one of the ES_ constants. //-------- MessageBox flags -------- #define MB_OK 0x0000 // one push button: OK. #define MB_OKCANCEL 0x0001 // two push buttons: OK and Cancel. #define MB_ABORTRETRYIGNORE 0x0002 // three push buttons: Abort, Retry, and Ignore. #define MB_YESNOCANCEL 0x0003 // three push buttons: Yes, No, and Cancel. #define MB_YESNO 0x0004 // two push buttons: Yes and No. #define MB_RETRYCANCEL 0x0005 // two push buttons: Retry and Cancel. #define MB_ICONSTOP 0x0010 // a stop-sign icon. #define MB_ICONQUESTION 0x0020 // a question-mark icon. #define MB_ICONEXCLAMATION 0x0030 // an exclamation-point icon. #define MB_ICONINFORMATION 0x0040 // an icon consisting of a lowercase letter 'i' in a circle. #define MB_DEFBUTTON1 0x0000 // the first button is the default button. #define MB_DEFBUTTON2 0x0100 // the second button is the default button. #define MB_DEFBUTTON3 0x0200 // the third button is the default button. //-------- MessageBox return values -------- #define IDOK 1 // OK button was selected. #define IDCANCEL 2 // Cancel button was selected. #define IDABORT 3 // Abort button was selected. #define IDRETRY 4 // Retry button was selected. #define IDIGNORE 5 // Ignore button was selected. #define IDYES 6 // Yes button was selected. #define IDNO 7 // No button was selected. //----------------- System variables extern unsigned int WorkFieldWidth; extern unsigned int WorkFieldHeight; extern char ApplName[]; extern char DesktopName[]; extern char SystemDir[]; extern int errno; extern int _fmode; extern unsigned long MainWindowHandle; extern unsigned long WindowHandles[]; extern int NumWindows; extern char SelectedString[]; extern unsigned long LastMemAccAddr; extern unsigned int LastMemAccAddrSpace; extern int LastMemAccLen; extern int LastMemAccType; extern unsigned long Frequency; extern float TimeCounter; extern int Hardware; extern int Demo; extern unsigned int LastMessageInt; extern unsigned long LastMessageLong; extern int InsertMode; extern int CaseSensitive; extern int WholeWords; extern int RegularExpressions; extern int BlockCol1; extern int BlockCol2; extern int BlockLine1; extern int BlockLine2; extern int BlockStatus; extern int CurLine; extern int CurCol; extern char LastFoundString[]; extern char ProjectName[]; extern int MemoryAccessType; void Wait(unsigned long microseconds); void WaitExprTrue(char str[]); void WaitExprChange(char str[]); void WaitMemoryAccess(unsigned long addr, int addr_space, int num_bytes, int flags); void WaitStop(); void Debug(); void ExecScript(char file_name[], char include_dir[]="", char defines[]="", int debug=0, int load_mode=ES_ERROR); void GetScriptFileName(char script_name[], char file_name[]); void TerminateScript(char file_name[]); void TerminateAllScripts(); unsigned long OpenStreamWindow(char title[]); void wprintf(unsigned long handle, char format[], ... ); void wgetchar(unsigned long handle); int LastChar(unsigned long handle); void wgethex(unsigned long handle); void wgetstring(unsigned long handle); int LastString(unsigned long handle, char s[]); unsigned long OpenUserWindow(char title[]); void WaitWindowEvent(unsigned long handle); int LastEvent(unsigned long handle); int LastEventInt1(unsigned long handle); int LastEventInt2(unsigned long handle); int LastEventInt3(unsigned long handle); int LastEventInt4(unsigned long handle); void ClearWindow(unsigned long handle); void ActivateWindow(unsigned long handle); void UpdateWindow(unsigned long handle); void SetUpdateMode(unsigned long handle, int update); int AddButton(unsigned long handle, char button_text[], int x, int y, int width, int height); void RemoveButtons(unsigned long handle); void SelectPen(unsigned long handle, unsigned long color, int width=1, int style=PS_SOLID); void SelectBrush(unsigned long handle, unsigned long color); void SelectFont(unsigned long handle, char name[], int height); void MoveTo(unsigned long handle, int x, int y); void LineTo(unsigned long handle, int x, int y); void DisplayText(unsigned long handle, char text[], int x, int y); void DisplayTextF(unsigned long handle, char text[], int x, int y); void SetTextColor(unsigned long handle, unsigned long color); void SetBkColor(unsigned long handle, unsigned long color); void SetBkMode(unsigned long handle, int mode); void FillRect(unsigned long handle, int x1, int y1, int x2, int y2); void Rectangle(unsigned long handle, int x1, int y1, int x2, int y2); void FrameRect(unsigned long handle, int x1, int y1, int x2, int y2); void InvertRect(unsigned long handle, int x1, int y1, int x2, int y2); void Curcuit(unsigned long handle, int x1, int y1, int x2, int y2); void Ellipse(unsigned long handle, int x1, int y1, int x2, int y2); void Polyline(unsigned long handle, unsigned int points[], int n); void SetPixel(unsigned long handle, int x1, int y1, unsigned long color); unsigned long Expr(char str[]); float FloatExpr(char str[]); unsigned long AddrExpr(char str[]); void Step(); void HStep(); unsigned long CheckSum(unsigned long start_addr, unsigned long end_addr, int addr_space); void RedrawScreen(); void Origin(); int MessageBox(char format[], ... ); int MessageBoxEx(int flags, char title[], char format[], ... ); void LoadDesktop(char file_name[]); void LoadOptions(char file_name[]); void SaveDesktop(char file_name[]); void SaveOptions(char file_name[]); unsigned long OpenWindow(int type); void CloseWindow(unsigned long handle); unsigned long FindWindow(int type); void MoveWindow(unsigned long handle, int x, int y); void SetWindowSize(unsigned long handle, int w, int h); int GetWindowWidth(unsigned long handle); int GetWindowHeight(unsigned long handle); void SetWindowSizeT(unsigned long handle, int w, int h); void SetWindowFont(unsigned long handle, char font_name[], int height); void WindowHotkey(unsigned long handle, int key); void AddWatch(char name[], int format=DF_HEX); unsigned int Inspect(char name[]); void SetBreak(unsigned long addr); void ClearBreak(unsigned long addr); void SetBreaksRange(unsigned long start_addr, unsigned long end_addr); void ClearBreaksRange(unsigned long start_addr, unsigned long end_addr); void ClearAllBreaks(); void Reset(); void ResetTimeCounter(); void SelectChip(char name[]); void Run(); void RunTo(unsigned long addr); void Stop(); void LoadProject(char file_name[]); void SaveProject(); void CloseProject(); void LoadProgram(unsigned char file_name[], int format, int addr_space=AS_CODE, unsigned long start_addr=0); void ReloadProgram(); void SaveData(unsigned char file_name[], int format, int addr_space, unsigned long start_addr, unsigned long end_addr); unsigned long MinAddr(int addr_space); unsigned long MaxAddr(int addr_space); unsigned int GetByte(unsigned long addr, int addr_space); unsigned int GetWord(unsigned long addr, int addr_space); unsigned long GetDword(unsigned long addr, int addr_space); void SetByte(unsigned long addr, int addr_space, unsigned int value); void SetWord(unsigned long addr, int addr_space, unsigned int value); void SetDword(unsigned long addr, int addr_space, unsigned long value); void GetMemory(void dest[], int n, unsigned long addr, int addr_space); void SetMemory(void src[], int n, unsigned long addr, int addr_space); void InitCOM(int port_num, unsigned long baud_rate, int parity, int data_bits, int stop_bits, int rts_dtr=0); void SendCOM(int port_num, unsigned char byte, int wait=TRUE); unsigned char ReceiveCOM(int port_num, int timeout=5000); unsigned char StatusCOM(int port_num); unsigned long API(char func_name[], ... ); unsigned long LoadLibrary(char lib_name[]); void FreeLibrary(unsigned long inst); unsigned long CallLibraryFunction(unsigned long inst, char func_name[], ... ); int ExecMenu(char title[], char items[], int start_sel=0); void ExitProgram(); int SendMessage(unsigned int int_data, unsigned long long_data); void WaitMessage(); void GotoXY(int col, int line); void Up(int count=1); void Down(int count=1); void Left(int count=1); void Right(int count=1); void Tof(); void Eof(); void Eol(); void BackSpace(); void Cr(); void DelLine(int count=1); void DelChar(int count=1); char CurChar(); void GetLine(char dest[]); void ForwardTill(char delimits[]); void ForwardTillNot(char delimits[]); void _GetWord(char dest[]); void WordLeft(); void WordRight(); void FirstWord(); void SetMark(int number); void GetMark(int number); void Text(char text[]); void BlockBegin(int block_type); void BlockEnd(); void BlockOff(); void BlockCopy(); void BlockFastCopy(); void BlockDelete(); void BlockMove(); void BlockPaste(); int Search(char text[], int in_block=0); unsigned long SearchReplace(char text[], char new_text[], int in_block=0, int replace_all=0); void SetFileName(char name[]); void GetFileName(char dest[]); int SaveFile(); int FileChanged(); unsigned long OpenEditorWindow(char file_name[]); int FindSymbol(char name[]); void SetToolbar(unsigned long handle, int set); void SetCaption(unsigned long handle, int set); void AddSymbol(char name[], unsigned long addr, int addr_space, int size); void ResetSymbolTable(); void ShowExamples(); float sin(float x); float asin(float x); float cos(float x); float acos(float x); float tan(float x); float tanh(float x); float atan(float x); float log(float x); float log10(float x); float sqrt(float x); float ceil(float x); float floor(float x); float exp(float x); float fabs(float x); float fmod(float x, float y); float frexp(float x, int exponent[]); long abs(long x); float pow(float x, float y); float pow10(int x); int isalnum(unsigned char c); int isalpha(unsigned char c); int isascii(unsigned char c); int iscntrl(unsigned char c); int isdigit(unsigned char c); int isgraph(unsigned char c); int islower(unsigned char c); int isprint(unsigned char c); int ispunct(unsigned char c); int isspace(unsigned char c); int isupper(unsigned char c); int isxdigit(unsigned char c); int toascii(unsigned char c); int tolower(unsigned char c); int toupper(unsigned char c); int chdir(char path[]); int getcurdir(int drive, char directory[]); int findfirst(char path[], char ffblk[], int attrib); int findnext(char ffblk[]); char _ff_attrib(char ffblk[]); int _ff_time(char ffblk[]); int _ff_date(char ffblk[]); long _ff_size(char ffblk[]); void _ff_name(char ffblk[], char fname[]); int fnsplit(char path[], char drive[], char dir[], char name[], char ext[]); void fnmerge(char path[], char drive[], char dir[], char name[], char ext[]); void getcwd(char path[]); int getdisk(); int setdisk(int drive); int mkdir(char path[]); int rmdir(char path[]); int searchpath(char file_name[], char path[]); void delay(unsigned int milliseconds); unsigned long getdfree(int drive); unsigned int inport(unsigned int port_num); unsigned char inportb(unsigned int port_num); void outport(unsigned int port_num, unsigned int value); void outportb(unsigned int port_num, unsigned char value); int peek(unsigned int segment, unsigned int offset); unsigned char peekb(unsigned int segment, unsigned int offset); void poke(unsigned int segment, unsigned int offset, int value); void pokeb(unsigned int segment, unsigned int offset, unsigned char value); int unlink(char file_name[]); int chsize(long handle, long size); int close(long handle); int creat(char path[], int amode); int creatnew(char path[], int amode); int creattemp(char path[], int attrib); int dup(long handle); int dup2(long oldhandle, long newhandle); int eof(long handle); long filelength(long handle); unsigned long getftime(long handle); int setftime(long handle, unsigned long time); int isatty(long handle); int lock(long handle, long offset, long length); int unlock(long handle, long offset, long length); int locking(long handle, int cmd, long length); long lseek(long handle, long offset, int fromwhere); long open(char path[], int access); int read(long handle, void buf[], int len); int write(long handle, void buf[], int len); int rename(char oldname[], char newname[]); int setmode(long handle, int amode); long tell(long handle); void printf(char format[], ... ); void _printf(char format[], ... ); void sprintf(char dest[], unsigned char format[], ... ); void clearerr(unsigned long stream); int fclose(unsigned long stream); unsigned long fdopen(long handle, char type[]); int feof(unsigned long stream); int ferror(unsigned long stream); int fflush(unsigned long stream); int fgetc(unsigned long stream); int fgets(char dest[], int n, unsigned long stream); int fileno(unsigned long stream); unsigned long fopen(char file_name[], char mode[]); int fprintf(unsigned long stream, char format[], ... ); int fputc(char c, unsigned long stream); int fputs(char s[], unsigned long stream); int fread(void s[], int size, int n, unsigned long stream); unsigned long freopen(char file_name[], char mode[], unsigned long stream); int fscanf(unsigned long stream, char format[], ... ); int fseek(unsigned long stream, long offset, int fromwhere); long ftell(unsigned long stream); int fwrite(void buf[], int size, int n, unsigned long stream); int getc(unsigned long stream); int getw(unsigned long stream); int putc(int c, unsigned long stream); int putw(int c, unsigned long stream); void rewind(unsigned long stream); int scanf(char format[], ... ); int pscanf(char title[], char format[], ... ); int sscanf(char buf[], char format[], ... ); void gettime(int time[]); void getdate(int date[]); unsigned long difftime(int time1[], int time2[]); void exit(); int exec(char program[], char params[], char work_dir[], int show, int wait=0); float atof(char s[]); int atoi(char s[]); int _fullpath(char buf[], char path[]); int getenv(char name[], char dest[]); void itoa(int value, char string[], int radix); void ltoa(long value, char string[], int radix); int putenv(char name[]); int rand(); int random(int num); void randomize(); void srand(unsigned int seed); long strtol(char s[], int endptr[], int radix, int index=0); unsigned long strtoul(char s[], int endptr[], int radix, int index=0); void ultoa(unsigned long value, char string[], int radix); int memccpy(void dest[], void src[], int c, int n, int dest_index=0, int src_index=0); void memcpy(void dest[], void src[], int n, int dest_index=0, int src_index=0); void memmove(void dest[], void src[], int n, int dest_index=0, int src_index=0); void movmem(void dest[], void src[], unsigned int length, int dest_index=0, int src_index=0); int memchr(void s[], int c, int n, int index=0); void memset(void s[], int c, int n, int index=0); void setmem(void s[], unsigned int length, char value, int index=0); int memcmp(void s1[], void s2[], int n, int s1_index=0, int s2_index=0); int memicmp(void s1[], void s2[], int n, int s1_index=0, int s2_index=0); int stpcpy(char dest[], char src[], int dest_index=0, int src_index=0); void strcat(char dest[], char src[], int dest_index=0, int src_index=0); int strchr(char s[], int c, int index=0); int strcmp(char s1[], char s2[], int s1_index=0, int s2_index=0); int stricmp(char s1[], char s2[], int s1_index=0, int s2_index=0); int strcmpi(char s1[], char s2[], int s1_index=0, int s2_index=0); int strcspn(char s1[], char s2[], int s1_index=0, int s2_index=0); void strcpy(char dest[], char src[], int dest_index=0, int src_index=0); int strlen(char s[], int index=0); void strlwr(char s[], int index=0); void strupr(char s[], int index=0); void strncat(char dest[], char src[], int n, int dest_index=0, int src_index=0); int strncmp(char s1[], char s2[], int n, int dest_index=0, int src_index=0); int strncmpi(char s1[], char s2[], int n, int dest_index=0, int src_index=0); int strnicmp(char s1[], char s2[], int n, int dest_index=0, int src_index=0); void strncpy(char dest[], char src[], int n, int dest_index=0, int src_index=0); void strnset(char s[], int c, int n, int index=0); int strpbrk(char s1[], char s2[], int s1_index=0, int s2_index=0); int strspn(char s1[], char s2[], int s1_index=0, int s2_index=0); int strstr(char s1[], char s2[], int s1_index=0, int s2_index=0); int strrchr(char s[], int c, int index=0); void strrev(char s[], int index=0); void strset(char s[], int c, int index=0);