Creating project

How to use it for new projects

The only thing you have to do, is to create a folder, put your source codes, and copy from the sample directory the three batch files:

	osdk_build.bat
	osdk_execute.bat
	osdk_showmap.bat
	osdk_config.bat

We are interested by the last one. Just edit this file, and look at those lines:

	SET OSDKADDR=$600
	SET OSDKNAME=demo
	SET OSDKFILE=main display sound packer
	SET OSDKLINK=
	SET OSDKCOMP=
	SET OSDKCPPFLAGS=

those parameters define how the program will be constructed:

  • the OSDKADDR variable contains the link adress. The default value is $600
  • the OSDKNAME variable contains the name of the TAP file to generate. The default value is OSDK.
  • the OSDKFILE variable contains the list of all files to build. In the example above, the DEMO.TAP program will be made from MAIN.C DISPLAY.S SOUND.S and PACKER.C. As you can see, the extensions are not given. It means that you cannot have two files having the same name but with a different extension.
  • the OSDKLINK variable contains the list of parameters the linker will receive. The value -B will tell the linker to not automaticaly happend 'header.s' and 'tail.s' thus giving you full control on how your program will fit in memory. Good for pure assembly code programs.
  • the OSDKCOMP variable contains the list of parameters the compiler will receive. If you don't fill it, it will be initialized by default to the options -O2. You can try -O3 if you wish more aggresive optimizations (beta test, could produce wrong code)
  • the OSDKCPPFLAGS variable can be used to pass additional data to the C preprocessor (like additional defines)

for disk projects using Tap2DSK, the following parameters are useful:

  • the OSDKINIST contains the initialization sequence for Sedoric
  • the OSDKDISK contains the name of the final DSK file (without the extension)

The OSDK also support some other variables, here they are for exaustivity:

  • the OSDKDOSBOX variable contains the location of DOSBOX if it is installed. You need that only if you are trying to use Euphoric on a recent machine.
  • the OSDKTAPNAME variable contains the name of the loaded program inside the TAP file (the one that appears in the Oric status bar). The default value is OSDK.
  • the OSDKBRIEF variable if empty automatically insert pauses on the build process and show verbosity messages (default), else it will quit without pausing and show less verbosity.
  • the OSDKHEAD variable content is passed to HEADER.EXE. The value -S1 will tell it to show the size of the final executable (practical when writing 256 bytes intros).

And internally during the Build time the OSDK defines some other variables from the existing ones:

  • the OSDKB variable contains the location of the executable folder (%OSDK%\BIN)
  • the OSDKT variable contains the location of the tempory folder (%OSDK%\TMP)

The only thing you have to made, is edit this file to make it reflect your needs.

For Visual Studios Users

If like me, you are used to use a modern IDE like Visual Studios, you can configure it in order to be able to edit, compile, and test directly from the VC IDE ! In order to do that, you have to create a NEW PROJECT, and choose MAKEFILE. In the menu "PROJECT/SETTING", choose "GENERAL" and enter the following line into the "Build command line" box:

	%OSDK%\Binc_make.bat

this way, you will be able to compile using the "F7" key, the error messages appear into the output window of visual studios. Clean, isn't it ?

If you wish to be able to debug the code, you can also launch Euphoric from visual studios. Instead of "GENERAL" go to "DEBUG", and in the "Executable for debug session" box, simply enter the following line:

	OSDK_EXECUTE.BAT


Known issues


No known problem - please signal any issue on the Cross development tools forum.

comments powered by Disqus
Coverity Scan Build Status