View Full Version: Simple C for DEX

dex >>DexOS >>Simple C for DEX


princeharrry- 03-07-2008
Simple C for DEX
Hi, the old/new forum is down :cry: :cry: But under the Link http://freenet-homepage.de/puppylinux/index.html you can download scc. There will be more info about small c. (first in german later in english.) For now scc is able to compile this : myfile.ccc into myfile.dex where myfile.dex is excutable. On disk is also an myfile.asm in FASM-format. I have to do some work on the input inteface!!, Notice small c could only handle 16bit Integer(this is the next TO DO) I would be pleased about each suggestion! or criticism! :) :D

Dex- 03-07-2008

Cool thank, i will give you a full report late :)

Dex- 03-08-2008

@princeharrry, i have test your scc program and it work great, but theres just one problem, it seam to write to address bellow 4MB, most likly 0x100000. As it works fine from the root dir of the floppy, but if you put all the files in a folder, plus fasm and change to that dir, then try and run your program, it seem to over write the address of where the folder info is stored. Can you try and find the part that writes to below 4mb and change it ?. As you program should only use from load address (eg: 0x400000 for cli progs) to top of ram. Thanks regards Dex.

princeharrry- 03-08-2008

@Dex Adr below 4MB, yes, until now the static vars,are stored in this area (0x100000),I newer put the files in an other dir :roll: I will fix this, so that all will be abov 40000h . I am not contently with my command line input function!! :? In the basic scc.asm i took th call and passed ist to cc1.asm, but it is not the correct way C expects the argc,argv params!!! Thats all for now Thanks!!

Dex- 03-08-2008

Thanks princeharrry, you are doing a great job and its a much needed part of DexOS, I am only sorry i can not help you much with C. Because you have added to DexOS, you are now a member of "Team DexOS", that means you are a part owner in the copy right and you can get the source for DexOS just by asking eg: PM me, if you want it, i will also add your name to the source. Thanks again, regards Dex. Ps: If you do not want to be a "Team DexOS" member let me know .

princeharrry- 03-15-2008

Does it make sense, to spend time developing scc in an more powerfull tool ? =>(like add some missing things : struc,typedef,enum... long double ..????) Whit out these, only few C prog. are portable to DEX. :( Or they have to be rewriten!!. The new ver. that clould handle cli input is ready; only a few testing; and the osfunc.c has now malloc,calloc,free... AND above 0x400000. Some examples added; perhaps I port conio.h/conio.c which some games use ....... :roll: Bye PS . After the old/new forum is down there is low traffic??? on this :shock:

Dex- 03-15-2008

Sure it does and good to hear it's above 0x400000 :). Yes the traffic is down, most people may think we have disappeared :( . Regards Dex.

roboman- 03-15-2008

If you don't count java and a few of the web programming languages, it seems like 99.9% of all programmers want to use C. Basic seems to have dropped off to scripts and some quick and dirty or hobby use on controllers. Pascal and all the others seem to be in a slow death with a small core of hangers on. C does seem to be the choice of people, asm seems an exception in that it's just required to do some stuff and gives such a speed boost. Oddly though, even life long programmers bad mouth it. So having a C is probably a requirement to having an os that gets used

princeharrry- 03-16-2008
Next version ready
OK , I proudly present for all hardworking programmers, who are sad of all the boring IDE's, HLL CPP++###,JAVAS and soon... :lol: :lol: :lol: :lol: TATA: SCC : 8) Hard to use , small bugy :? but for DEX :wink: I put it on www.mydrive.ch !! see other post!! In this Zip file is only the scc.dex , no src! and the files scc needs to work (intrins.asm,libstd.asm,osfunc.asm,stdio.h) And 5 example files: fcount >> counts bytes in saved ascii-file syntax>> only need to change a few line and it is working ported in 10 min!!!! :D ar>> an archivar but still not working,only to show what happens with big files! prog>> only test neu>>testing 16 bit int Variables neu1> test Now i will turn to conio.h, so some games could be ported 8) 8) . after that struc and soon. There is some trouble on my Webspace at freenet. Hope it will be fixed soon :cry: :cry: As it will be online I will put the src. NOTE !! I put the complete scc in an dir. /scc and in bochs ther were NO problems compiling and running the programs :D :D :) BUT as i put it on disk and on real PC ,try to compile on /scc I got no result :? :?: :? The monitor turnt blue and all was death.On no dir. only compiling ar.ccc crashed??? So there is much work!! On the other hand the compiled *.dex progs.(in bochs) worked fine :)

jas2o- 03-16-2008

Offtopic Post ----------------------- Wow, I have never seen so many emoticons in once DexOS forum post in my life. I guess only a very special occasion/event would cause this behavior.

princeharrry- 03-16-2008

19 :oops:

Rohan- 03-20-2008

What about D compiler? :) Simple D or some thing like this, I don't like GDC because it's only addon for GCC.

princeharrry- 03-20-2008
D ?
D ? Why not ?? unfortunately i am about to learn C , the D language is not on my focus. Then you have to work out lexer,phraser etc... learn gentle or antlrworks ( I saw an grammer of D in antlworks but an output in JAVA or C is possible AND then you could compile it for WIN or LINUX ....) the point is an HLL-lib is needed for DEXOS, in C or asm,doesn't matter; the Clib of Solidius is an beginning but far away, for quick use ! Display on screen and keyinput is ok and some other calls!! but >>> there is an urgent need of memory management (good malloc) and an file management .An poor begin is the osfunc.c of my scc (the biggest missing thing is an advanced var. management >> struc or union(long would be nice but its ok)((( On the crashed forum was an post with memory management example but its lost ))). @jas2o no emoticons .You see i can control myself!

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.