News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Sphinx C--Builder

Started by Emil_halim, October 17, 2015, 01:28:20 AM

Previous topic - Next topic

Emil_halim

Hi All,

It has been awhile since i have posted here , anyway , i came back with my new project "Sphinx C--Builder"

as all of you know that , Sphinx C-- is and always will be my best programming language. So i combined it with c++Builder 2009.

this ammazing mix borns "Sphinx C--Builder" , ofcourse jwasm included with that mix.

of course there is no VCL of C++Builder , just like bc5.5 with delphi compiler.

it is under testing now.

here is a Entry point Example
=====================

simple.asm file ,will compiled automatically with jwasm

.386
.MODEL FLAT , c

GetModuleHandle equ GetModuleHandleA
extrn GetModuleHandle:near

.code

assume es:nothing, ss:nothing, ds:nothing, fs:nothing, gs:nothing

public start
start:
           push  0         
           call  GetModuleHandle     
           ret
end start


Entrypoint.c-- file     

/*************************************
*        Sphinx C--Builder           * 
*                                    *
*       Entry point Example          *
*                                    *
*          by Emil_halim             *         
*                                    *
*          16 - 10 - 2015            *
*************************************/
//
//     this demo will show you that
// how to code sturtup code for c--Builder.
//
#pragma option w32c       //create Windows console EXE.
#pragma option OS         //speed optimization
#jumptomain NONE          //just jump to main function

#CleanFiles of

#includepath "$\winlib" 

#include <windows.h>
 
//
// tell c--Builder to use simple.asm
// code as a startup code. 
// later you can call it from main function.
// c--Builder will use that startup code found in
// startUp folder so you do not have to put it's path
//
#startupcode "simple.asm"

#pragma linker  kernel32.lib user32.lib gdi32.lib

// tell c--Builder the declaration of startup procedure
extern long cdecl start();

long hInstance;

main()
{
    // call the Init code from simple.asm
    // that in startUp folder
    hInstance = start();

   MessageBox(0,"main function is the entry point \n\n for console mode ","Entry point",0);
}


I will post beta version sooner.

Enjoy.

anta40

Hi Emil,
Many years ago, I tried C--. Looks like an interesting alternative for C for doing system programming.

1. Is the compiler still under development?
2. The 'official' link: http://c--sphinx.narod.ru/indexe.htm seems to be dead. Where can I find the compiler now?

Emil_halim

Hi anta40,

Quote
1. Is the compiler still under development?

No , there is no activity since 2007 , so that i am tring to bring life to it by mixing it with strong c++builder2009.

Quote
2. The 'official' link: http://c--sphinx.narod.ru/indexe.htm seems to be dead. Where can I find the compiler now?

try this link http://www.sheker.chat.ru/index_e.htm

my project still under construction, hope i can post a soild thing sooner.

georg24

Hi Emil,

The source code for Sphinx C-- has been released. You can find it here:

https://github.com/jossk/c--sphinx

Maybe you can make a fork and continue development.

The mirror of the original site is still availble. You can find it here:

http://www.dev0.de/cmm/indexe.htm

Georg

Emil_halim

thank you Georg for that great information , i will check it out.

georg24

Hi Emil,

Sphinx-C-- is used by the Kolibri OS development team since it can output Menuet executables. See their code in the cmm directory here:
http://websvn.kolibrios.org/listing.php?repname=Kolibri+OS&path=%2Fprograms%2Fcmm%2F&#abf1c4e809912c8e0dc9c47ab4528b257

However, this code will run with the Kolibri OS only.

Georg

Vortex

The Ziron compiler looks similar to Sphinx C-- :

http://www.codeziron.com/

Emil_halim

thanks again Georg.

thanks Vortex for that notifcation, there was version Ziron1 and now not completed Ziron2.

in my C--Builder , it allow's  use  to include jasm & asm files , pas files , c++Builder files , omf obj files , omf lib files , bpi files ,ofcourse c-- files .

C--Builder will compile asm file extension with tasm.exe , .jasm with JWasm , .pas  with dcc32.exe , .c & .cpp with bcc32.exe , .cmm with pure SphinxC-- , .c-- will included as usual , obj lib & bpi files will pass to ilink32.exe.

for Mr. Vortex  i was thinking to add Ziron1 files to C--Builder so that .zir extesion will compile with Ziron.exe then linked later.

for Mr. Georg , Although SphinxC-- is open source now i will go on my project , so i think there will no change with c-- , may be later C--Builder version.
 

Emil_halim

Hi all

here is my first development of SphinxC-- it self.

with the include path dirctive you can put the '$' in the first char of pathstring then SphinxC-- will automatically replace it with the main current directury.

here is example showing you the  idea



/*************************************
*        Sphinx C--Builder           * 
*                                    *
*      includepath  Example          *
*                                    *
*          by Emil_halim             *         
*                                    *
*************************************/

#pragma option w32c       //create Windows console EXE.
#pragma option OS         //speed optimization
#jumptomain NONE          //just jump to main function

// $ will replaced with SphinxC-- main path
#includepath "$\winlib" 

#include <windows.h> 

main()
{

   MessageBox(0,"SphinxC-- Extension is so good","",0);
   
}

georg24

Hi Emil,

please sign in into Github and click on the fork button on Sphinx C-- to make your changes public so one could try them out.

Georg

Emil_halim

Hi all

after many tries to modefing SphinxC source code , i gave up.

any way i found  smallerC code that is a simple & small C compiler , so i have started to add some features of SphinxC.

to make it easier to keep track of my changes , i begin my code with the term "Emil Stuff" and end it with term "end Emil stuff".

it is no completed yet , but if you want to contribute you can do it with me.

i will post it with source code in new topic.

thanks
   

Vortex

Hi Emil,

What are the new features planned for Sphinx C?

EDIT : Sorry, I missed your other thread. It's OK.

Emil_halim


Hi Vortex,

never mind , you are welcome.