?login_element?

Subversion Repositories NedoOS

Rev

Rev 50 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

  1. #include <stdio.h>
  2.  
  3. #include "../_sdk/nedodefs.h" //C only
  4.  
  5. #define USE_HINTS
  6. #define USE_COMMENTS
  7.  
  8. #include "../_sdk/emit.c" //эєцэю фы  compile ш asm (шэрўх эх т√тхёЄш ю°шсъш)
  9.  
  10. #include "../_sdk/read.c" //эєцэю фы  compile ш token
  11.  
  12. //#include "codetg.c"
  13. //#include "regs.c"
  14. #include "commands.c"
  15. #include "compile.c"
  16.  
  17. #include "lbltype.c"
  18.  
  19. //#include "fmttg.h" //эєцэю фы  token, asm, export
  20. /**
  21. struct zzz{
  22.   BYTE ba;
  23.   LONG lb;
  24.   STRUCT zzz* pc;
  25. };
  26.  
  27. CONST struct zzz zuzu={
  28.   0x03,
  29.   5L,
  30.   &zuzu
  31. };
  32. */
  33. PROC writearray(PBYTE parray, UINT size, PCHAR filename)
  34. {
  35. VAR PBYTE file;
  36.   file = fopen(filename, "wb");
  37.   fwrite(parray, size, 1, file);
  38.   fclose(file);
  39. }
  40.  
  41. int main(int argc,char* argv[])
  42. {
  43.   int i;
  44.   char *filename;
  45. //VAR STRUCT zzz* pzz1 = &zuzu;
  46. //VAR PBYTE pp = &(pzz1->ba);
  47.  
  48.   _ferr = openwrite("err.f");
  49.   _errs = +TRUE;
  50.  
  51.   //filename = "_test.c";
  52.   //_asms = +TRUE;
  53.   _cmts = +FALSE;
  54.   _hints = +FALSE;
  55.  
  56.   for (i=1; i<argc; i++) {
  57.     if      ((argv[i][0]=='-')&&(argv[i][1]=='C')) {_cmts = +TRUE;
  58.     }else if((argv[i][0]=='-')&&(argv[i][1]=='H')) {_hints = +TRUE;
  59.     }else {
  60.       filename = argv[i];
  61.       compile(filename);
  62.       writearray((PBYTE)/**_lblbuf*/_lbls, /**_lblbufindex*//**_lblbuflen+0x200*/_LBLBUFSZ, "label.f");
  63.   /**
  64.       system("del asm.f");
  65.       system("copy _test.asm asm.f");
  66.  
  67.       _fout = openwrite("tok.f"); //setfout( "ftok" ); //AssignFile(fout,'fout'); Rewrite(fout);
  68.       _curline = 1;
  69.       tokenize("asm.f");
  70.       tokenize_end();
  71.       closewrite(_fout); //closefout(); //CloseFile(fout);
  72.  
  73.       asmcompile();
  74.     writearray((PBYTE)_labels0, _LABELPAGESIZE, "label0.f");
  75.   */
  76.     };
  77.   }; //for
  78.  
  79.   fclose(_ferr);//closewrite(_ferr);
  80.  
  81.   return 0;
  82. }
  83.