PDA

View Full Version : Sphinx C--



KrAzY CrAb
02-06-2003, 12:34 PM
http://download.com.com/3000-2212-860223.html?legacy=cnet
This is a good mix of C and x86 Assembly, helps make small TSR(Terminate and Stay Resident)'s and highly optomized programs, pretty good, C experience along with ASM experience helps A LOT!

Bye!

KrAzY CrAb
02-09-2003, 04:31 AM
Somthing I wrote in C--, it echos HEX digits only, beeps if its not hex all lower-case becomes capital(uppercase) backspace works and on ENTER (Dec char 13) it closes, simple..

HexEcho.C--


?include "WRITE.H--"
?include "KEYCODES.H--"
?include "DOS.H--"
main()
{
do{
BIOSEREADKEY();
IF ( AL == 65 )
WRITE(AL);
else IF ( AL == 66 )
WRITE(AL);
else IF ( AL == 67 )
WRITE(AL);
else IF ( AL == 68 )
WRITE(AL);
else IF ( AL == 69 )
WRITE(AL);
else IF ( AL == 70 )
WRITE(AL);
else IF ( AL == 48 )
WRITE(AL);
else IF ( AL == 49 )
WRITE(AL);
else IF ( AL == 50 )
WRITE(AL);
else IF ( AL == 51 )
WRITE(AL);
else IF ( AL == 52 )
WRITE(AL);
else IF ( AL == 53 )
WRITE(AL);
else IF ( AL == 54 )
WRITE(AL);
else IF ( AL == 55 )
WRITE(AL);
else IF ( AL == 56 )
WRITE(AL);
else IF ( AL == 57 )
WRITE(AL);
else IF ( AL == 13 )
ABORT();
else IF ( AL == 8 )
{
WRITE(AL);
WRITE(32);
WRITE(8);
}
else IF ( AL == 97 )
WRITE(65);
else IF ( AL == 98 )
WRITE(66);
else IF ( AL == 99 )
WRITE(67);
else IF ( AL == 100 )
WRITE(68);
else IF ( AL == 101 )
WRITE(69);
else IF ( AL == 102 )
WRITE(70);
ELSE
BEEP();
}while ( AL <> 13 );
}

Waldo2k2
02-09-2003, 09:01 AM
MY GOD!

What is wrong with you??;)
Switch! For the love of God use a switch statement!
LOL

Interesting language.

KrAzY CrAb
02-09-2003, 09:16 AM
No switch in C-- :-/ Otherwise I would have!

Waldo2k2
02-09-2003, 09:27 AM
oh wow, they really are going for that low level feel huh? yikes...i think that was a bad decision, i wouldn't use a programming language that didn't have a switch statement...they really should consider adding that.

KrAzY CrAb
02-09-2003, 09:33 AM
the language isnt under dev anymore, hasnt been for years, its not finished but it still works..

KrAzY CrAb
02-17-2003, 02:00 AM
Any ideas why AL is 0 everytime? the function DOSGETTIME is supposed to return 0 for sunday 1 for monday ect, it says 0 everytime SOooo it becomes Sunday, No idea why.


? include "write.h--"
? include "dos.h--"
main()
{
@ DOSGETDATE();
WRITESTR ("Today is ");
IF( AL == 0 )
WRITESTR("Sunday");
else IF( AL == 1 )
WRITESTR("Monday");
else IF( AL == 2 )
WRITESTR("Tuesday");
else IF( AL == 3 )
WRITESTR("Wednesday");
else IF( AL == 4 )
WRITESTR("Thursday");
else IF( AL == 5 )
WRITESTR("Friday");
else IF( AL == 6 )
WRITESTR("Saturday");
WRITESTR(", ");
IF( DH == 1 )
WRITESTR("January");
else IF( DH == 2 )
WRITESTR("February");
else IF( DH == 3 )
WRITESTR("March");
else IF( DH == 4 )
WRITESTR("April");
else IF( DH == 5 )
WRITESTR("May");
else IF( DH == 6 )
WRITESTR("June");
else IF( DH == 7 )
WRITESTR("July");
else IF( DH == 8 )
WRITESTR("August");
else IF( DH == 9 )
WRITESTR("September");
else IF( DH == 10 )
WRITESTR("October");
else IF( DH == 11 )
WRITESTR("November");
else IF( DH == 12 )
WRITESTR("December");
WRITESTR(" ");
WRITEINT( DL );
}

Waldo2k2
02-17-2003, 02:29 AM
the prob f-ed up the algorithm, like you said it's not finished...prob not even tested all the way

KrAzY CrAb
02-17-2003, 03:51 AM
Before, when it was oly days that showed (which is the part thats being messed up now) it worked completely then I added months ect and it shows sunday, and if anything its the interupt that f---ed up, the librarys are jsut functions (like you didnt know that :-P) its finished enough that it works, I know its not a compiler issue.

KrAzY CrAb
03-03-2003, 12:19 AM
I fixed the code! as I thought, it was my mistake not C--!


? include "write.h--"
? include "dos.h--"
main()
{
WRITESTR ("Today is ");
@ DOSGETDATE();
IF( AL == 0 )
WRITESTR("Sunday");
else IF( AL == 1 )
WRITESTR("Monday");
else IF( AL == 2 )
WRITESTR("Tuesday");
else IF( AL == 3 )
WRITESTR("Wednesday");
else IF( AL == 4 )
WRITESTR("Thursday");
else IF( AL == 5 )
WRITESTR("Friday");
else IF( AL == 6 )
WRITESTR("Saturday");
WRITESTR(", ");
IF( DH == 1 )
WRITESTR("January");
else IF( DH == 2 )
WRITESTR("February");
else IF( DH == 3 )
WRITESTR("March");
else IF( DH == 4 )
WRITESTR("April");
else IF( DH == 5 )
WRITESTR("May");
else IF( DH == 6 )
WRITESTR("June");
else IF( DH == 7 )
WRITESTR("July");
else IF( DH == 8 )
WRITESTR("August");
else IF( DH == 9 )
WRITESTR("September");
else IF( DH == 10 )
WRITESTR("October");
else IF( DH == 11 )
WRITESTR("November");
else IF( DH == 12 )
WRITESTR("December");
WRITESTR(" ");
WRITEINT( DL );
}

LouDu
03-03-2003, 06:44 PM
*looks at first line*

*Unplugs computer*

*huddles and looks at the screen scared*

:p :p :p :p :p :p :p :p :p :p

Nuke
03-30-2003, 12:57 AM
Jeeze, isn't it annoying having to use all those if statements? lol. I couldn't imagine programming like that. :)

When you say it's not finished, how far along was it?

KrAzY CrAb
03-30-2003, 10:12 PM
its not buggy at all from what I can tell, the external libraries arnt finished, some of the functions are in the "internal" libraries so i think they are included into all of your programs which may add some over head, not sure considering how small the exe's are.. you cant compile to exe's only com's and obj's, although you cant compile to a dll, the obj's are ms compatable so its pretty much just as good, and you cant call dll's... theres another distro (it was open sourced when the author stopped deving) it lets you compile to dll exe ect.. gui apps, everything.. its more than jsut finished by now, I dont use it tho.. I will but never got around to downloading it.. :-)

Nuke
04-01-2003, 07:19 PM
I see... So it is possible to work with?

I tried to download it but it said that the page doesn't exist anymore. :confused: