?login_element?

Subversion Repositories NedoOS

Rev

Rev 653 | 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.   _jplbl = 0; //ёсЁрё√трхь эєьхЁрЎш■ ртЄюьхЄюъ яхЁхїюфют (схч яЁхЇшъёр) чфхё№, Є.ъ. ьюцхЄ с√Є№ эхёъюы№ъю Їрщыют
  48.  
  49.   _ferr = openwrite("err.f");
  50.   _errs = +TRUE;
  51.  
  52.   //filename = "_test.c";
  53.   //_asms = +TRUE;
  54.   _cmts = +FALSE;
  55.   _hints = +FALSE;
  56.  
  57.   for (i=1; i<argc; i++) {
  58.     if      ((argv[i][0]=='-')&&(argv[i][1]=='C')) {_cmts = +TRUE;
  59.     }else if((argv[i][0]=='-')&&(argv[i][1]=='H')) {_hints = +TRUE;
  60.     }else {
  61.       filename = argv[i];
  62.       compile(filename);
  63.       writearray((PBYTE)/**_lblbuf*/_lbls, /**_lblbufindex*//**_lblbuflen+0x200*/_LBLBUFSZ, "label.f");
  64.   /**
  65.       system("del asm.f");
  66.       system("copy _test.asm asm.f");
  67.  
  68.       _fout = openwrite("tok.f"); //setfout( "ftok" ); //AssignFile(fout,'fout'); Rewrite(fout);
  69.       _curline = 1;
  70.       tokenize("asm.f");
  71.       tokenize_end();
  72.       closewrite(_fout); //closefout(); //CloseFile(fout);
  73.  
  74.       asmcompile();
  75.     writearray((PBYTE)_labels0, _LABELPAGESIZE, "label0.f");
  76.   */
  77.     };
  78.   }; //for
  79.  
  80.   fclose(_ferr);//closewrite(_ferr);
  81.  
  82.   return 0;
  83. }
  84.