Jump to content



Photo
- - - - -

Problem with C


  • Please log in to reply
10 replies to this topic

#1 quiqu

quiqu

    Newbie

  • Members
  • Pip
  • 3 posts
  • Location:Valencia (SPAIN)

  • Calculators:
    FX 2.0

Posted 16 June 2003 - 03:04 PM

I'm new in this world, and I've tried to run a simple program on C, I've sent it to my FX 2 and I've opened it with Linl, but it couldn't run and gave me this reason "This program cannot be run in DOS mode" . The program was:

#include < stdio.h >

main () {
printf("Hello ");
}

Wich is the error? I've compiled and created it with Dev-C using GCC.

Please help me... :unsure:

Quique

#2 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 16 June 2003 - 04:14 PM

You must use a program that can generate 16bit code (like TurboC by borland) for a 80286 processor
I advise you to use the version of TurboC you can download at the site of 2072:

www.2072productions.com

#3 Roeoender

Roeoender

    UCF ASM/C Programming Only Winner

  • [Legends]
  • PipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Gdynia, Poland
  • Interests:Technical University student (informatics)
    Interests:
    Sport climbing
    Orieenting (100km walk in 23h31min)
    C/Asm on calculators

    Dislike cars

  • Calculators:
    CASIO AFX 2.0 ROM 1.01, 10 countable fingers

Posted 16 June 2003 - 05:38 PM

This is right.
Always worth to remind that:
NEC VX30 (Algebra's processor) is compatible with 8086 and 80186 Intel processors which are rather 8/16 bit (depending on the definition). So it won't understand protected mode programs (some 286s and above).
Sadly this means also that no <{GNULINUX}> ports are possible (I know about some old 16bit ports but I don't know if they were successfull).
I am using BC3.1.

Anyway good to see a new programmer on the Casio "scene".

Till your first release :-),
Roeoender.

#4 quiqu

quiqu

    Newbie

  • Members
  • Pip
  • 3 posts
  • Location:Valencia (SPAIN)

  • Calculators:
    FX 2.0

Posted 16 June 2003 - 07:38 PM

Thank you very much!!! Now I've got my first program in C!! :D

But... why "EXE" button doesn't work with 'scanf', how can I insert numbers in a variable... ?? :(

thank u!!!!!!!


QUIQUE

#5 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 16 June 2003 - 07:53 PM

You might want to try one of the various librarys out there made specifically for the casio.

#6 X-thunder28

X-thunder28

    Casio Freak

  • Members
  • PipPipPipPip
  • 192 posts

  • Calculators:
    2 Graph100 (rom 1.02 and rom 1.03 (+) )

Posted 17 June 2003 - 05:31 AM

A lot of standart I/O functions don't work on afx because:
1- keyboard is differents
2- These functions can't write directly in flash
3- Clock is 2.7 quicker than the RTC ( who is accessible by port)

And a lot of reason ...

#7 Swifter

Swifter

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 17 June 2003 - 11:42 AM

and don't forget "return 0;" at the end of program

#8 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 17 June 2003 - 12:36 PM

but return 0 is not necesarry at all since there is no command line and other programs seldom check
the return code.
He could also use

void main(void) {
}

in the beginning instead.

#9 betoe

betoe

    UCF Spanish Translator

  • [Legends]
  • PipPipPipPipPipPipPip
  • 846 posts
  • Gender:Male
  • Location:Guadalajara/Mazatlan, Mexico.
  • Interests:Electronics, SW development, automotive. Swim->bike->run

  • Calculators:
    Algebra FX2.0 (R.I.P.), Classpad 300

Posted 26 June 2003 - 02:00 AM

Can someone tell me where do i can download casio libraries for C?
this topic is really good, makes more powerfull the calculator :rock:

#10 Bob Vila

Bob Vila

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 768 posts
  • Gender:Male
  • Location:USA

  • Calculators:
    FX 1.0+ : CFX-9850 GB Plus : TI-81

Posted 26 June 2003 - 04:14 PM

try these sites,

http://www.2072produ...prog_source.php

http://www.na-prod.com/

i believe that both these sites have the casio libraries.

Edited by Bob Vila, 26 June 2003 - 04:21 PM.


#11 X-thunder28

X-thunder28

    Casio Freak

  • Members
  • PipPipPipPip
  • 192 posts

  • Calculators:
    2 Graph100 (rom 1.02 and rom 1.03 (+) )

Posted 26 June 2003 - 05:09 PM

www.casioworld.fr.st expecially for Flash100 a great tools for dev, but this site is full of goodies
http://teamg100.free.fr Some program, but less than casioworld !




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users