Trivial Solutions
                    The LoseThos 64-bit PC Operating System
File:/LT/Demo/OldSchool/Demo2/Compatibility2.SPP
This, and all LoseThos files, are public domain.  Do whatever you like.
God is watching; God is just; God is never out-done in generosity.  He talks!

LoseThos code compiles with the 64-bit LoseThos compiler/assembler I wrote.
Boot the LoseThos CD and you can compile it.  Not in Kansas anymore!

Click here for preliminary compiler information you need.

/*
This file has a ".SPP" extension because
it is a "statically" compiled program
which you must compile ahead of time
as opposed to just-in-time.

To make it more standard, I chose not
to give it a file name extension
ending in "Z", so that it will not be
stored compressed.  (Use ".SPZ", if
you want a statically compiled,
compressed source file.)

Right-click the directory entry and
select "COMPILE" from the menu.  This
will produce a binary file with a
".BIZ" extension.  This is the
executable.  You can use
Cmp() in scripts or whatever.

To run this program, right-click the
directory entry for the binary and
select "LOAD".  Or, you can use Load()
in scripts or whatever.

If you place statements to start
execution, it will run them when loaded.
Otherwise, include a header after loading
and call them, as a library, if you like.

There still are no object files.

*/


#include "::/LT/OSMain/Static.HPZ"


//Syms not in the OSMain modules
//can be declared with import or LTimport.
//There are not currently header files
//for /LT/Adam or /LT/Adam routines.

//See Scoping and Linkages for details on
//extern, import, LTextern, LTimport, etc.


//Note: Externs2Imports() is use
//in ::/LT/OSMain/Static.HPZ.

import void LtfClear(Ltf *l=NULL);


#exe {OptOn(OPTf_STD_C);};

void main()
{
//Do not combine "short" or "long"
//with "int".

  char ch;
  unsigned short s; //example of unsigned
  int i;
  long q;
  double d;
  bool b;

  LtfClear();
  PrintF("char\t:%d\n",sizeof(ch));
  PrintF("bool\t:%d\n",sizeof(b));
  PrintF("short\t:%d\n",sizeof(s));
  PrintF("int\t:%d\n",sizeof(i));
  PrintF("long\t:%d\n",sizeof(q));
  PrintF("double\t:%d\n",sizeof(d));
}

main(); //run main() when Load()ed.
Historical capture: 2012-03-09. Home | Power on LoseThos | Sources and changes