Jump to content



Photo
- - - - -

Turbo C


  • Please log in to reply
13 replies to this topic

#1 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 14 July 2003 - 12:51 AM

I download TC 3.0 and the library Memzones.h from 2072 website, but i dont know how to use it. I include the libraries, etc... but the compilator indicates errors:

1) "unable to open include file Memzones.h"
2) "Unable to create output file FILENAME.obj"

What I must write on the Option menu, Directories (in directories, library directories, etc...)?

#2 TomL_12953

TomL_12953

    Casio Addict

  • Members
  • PipPipPip
  • 57 posts
  • Gender:Male
  • Location:Malone, NY USA
  • Interests:Programmable calculators, BASIC computer language, Computers in general, Old movies and TV shows

  • Calculators:
    TI-59, TI-85, TI-86, TI-89, TI-89 Titanium, Radio Shack EC-4026, Algebra FX 2.0 Plus, HP-35s, Compucorp 326 Scientist, Durabrand 828, fx-9860G II SD

Posted 14 July 2003 - 01:26 AM

What's the exact URL of the Website?

TIA
Tom Lake

#3 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 14 July 2003 - 01:53 AM

Below is an example of what you should write in the directory section
Include Directories
  E:\TC\INCLUDE

 Library Directories
  E:\TC\LIB

 Output Directory
  E:\TC\OUTPUT\TOUCHE

 Source Directories
  E:\TC\PROGS\TOUCHE

in compiler->Code Generation
Model           Options
 (?) Tiny        [X] Treat enums as ints
 ( ) Small       [X] Word alignment
 ( ) Medium      [X] Duplicate strings merged
 ( ) Compact     [ ] Unsigned characters
 ( ) Large       [ ] Pre-compiled headers
 ( ) Huge

Assume SS Equals DS
 (?) Default for memory model
 ( ) Never
 ( ) Always

in compiler->Advanced Code Generation
Floating Point    Options
 (?) None          [X] Generate underbars
 ( ) Emulation     [ ] Line numbers debug info
 ( ) 8087          [ ] Debug info in OBJs
 ( ) 80287         [ ] Fast floating point
                   [ ] Fast huge pointers
Instruction Set    [ ] Generate COMDEFs
 ( ) 8088/8086     [ ] Automatic far data
 (?) 80186
 ( ) 80286        Far Data Threshold   32767

in compiler->Optimization Options
Optimizations
 [X] Suppress Redundant Loads
 [X] Jump optimization

Register Variables
 ( ) None
 ( ) Register keyword
 (?) Automatic

Optimize For
 ( ) Size
 (?) Speed

in Compiler->Messages-> Display... (this will display all warning - this is important to make bugless programs)
Display warnings
  (?)  All             Errors:   Stop After  25
  ( )  Selected        Warnings: Stop After  100
  ( )  None

in Debugger... (these settings help to make small programs)
Source Debugging   Inspectors
 ( ) On             [ ] Show inherited
 ( ) Standalone     [ ] Show methods
 (?) None
                    ( ) Show decimal
Display Swapping    ( ) Show hex
 (?) None           (?) Show both
 ( ) Smart
 ( ) Always        Program Heap Size
                    64     K bytes

I hope it'll help you :)

TomL_12953: Just look in my profile.

#4 superna

superna

    Casio Addict

  • Members
  • PipPipPip
  • 88 posts

Posted 14 July 2003 - 10:45 AM

Sorry 2072 but you must compile for 80286 !
Floating Point    Options
(?) None          [X] Generate underbars
( ) Emulation     [ ] Line numbers debug info
( ) 8087          [ ] Debug info in OBJs
( ) 80287         [ ] Fast floating point
                  [ ] Fast huge pointers
Instruction Set    [ ] Generate COMDEFs
( ) 8088/8086     [ ] Automatic far data
( ) 80186
(? ) 80286        Far Data Threshold   32767


#5 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 14 July 2003 - 04:34 PM

As far as I know the NEC V30Mx isn't like a 80286, it doesn't have all its instructions, but have all the instruction of 80186...

I use these settings to compile TOUCHE.

#6 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 14 July 2003 - 05:12 PM

The NEC does neither have the protected mode instuctions nor the flags of the 80286 in its flag registers
so it's more safe to compile with 80186

BUT :) Since you can't write protected mode programs in C (except you do inline assembley and if
you do so you'll know what to do and what not) you can keep the 80286 settings.

My assembley manual names the folowing instructions that were first available on 80286:

ARPL (only for OS software)-------Changes selectors of an app in protected mode
CLTS (Only for OS software)-------Switches Task-Switched-Flag off in protected mode
LGDT (Only for OS Software)-------Load Global Descriptor-Table-Register in Protected mode
LIDT (Only for OS software)-------Load Interrupt Descriptor-Table-Register in protected mode
LLDT (Only for OS software)------Load Local Desctiptor-Table-Register in protected mode
LMSW (only for OS Software)-----Load Machine Status word in protected mode
LSL (only for os software) ----Load Segment Boundarrys in protected mode

... and on ... they are all only for protected mode and only for os'ses.

The only thing you shouldn't do is compile in 80386 mode. there are a lot of new instructions (32 bit etc ...)

#7 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 15 July 2003 - 01:21 AM

I download the TC 3.0 from:
http://www.2072produ....exe&download=1

Thaks by your help 2072, that settings allow me to make programs in the C compilator! :D

#8 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 16 July 2003 - 01:29 AM

I made this program only for see how work the library casio.h:

#include
void main();
{
locate(1,1,"Betoe");
}

When i compile it, I have no errors, but when i run the program (Ctrl+F9), it seems that i have bad settings on the option menu, ->linker->libraries:
The error is:
"Linker error: unable to open file 'TV.LIB'"


But i have a great confusion with the libraries commands, a lot of errors etc...
I've read websites in french few days ago about C programmation and i fall on a terrible cunfusion
:unsure:

#9 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 16 July 2003 - 02:12 PM

Well that's strange, in ->linker->libraries you must have:

Libraries
 [ ] Container Class
 [ ] Turbo Vision
 [ ] Graphics library
 [X] Standard Run Time

By the way you should add the tc\bin directory to your PATH it will help TC to find its executables.

#10 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 17 July 2003 - 06:24 PM

Problem solved!!!

Thanks guys, other error that I had is that I save the files in *.CPP, not in *.C :profanity:

Sorry guys, i modify about 4 times this reply, but i find my errors :iws:
Excuse me if you receive a mail every time that i modify this reply.

But i have more questions:
How can I clean the screen? i use cls();, but an error appear. The libraries that i use are: graphics.h, casio2.h, stdio.h.

[COLOR=red]
Other question: the C libraries casio2.h have new and the sames commands that casio.h? I read the casio2.html but is in french, is there an english version of the casio2 help?

#11 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 19 July 2003 - 06:34 PM

well casio2.h is the second version of casio.h. There is no English version of this library, I don't use it so I cannot help you :( but I saw in casio2.h that there is a function "clearpage" or something like that...

#12 C@siomax

C@siomax

    Casio Freak

  • Members
  • PipPipPipPip
  • 229 posts
  • Location:Grenoble, FRANCE

  • Calculators:
    Graph 100 v1.0 and Graph 100+ v1.03

Posted 20 July 2003 - 10:11 AM

Here is a pretty good routine to clear scree:

void clearseg(unsigned int seg)
{
asm {
    mov ax,seg   //seg is the adress to clear
    mov es,ax  //es=seg
    xor ax,ax //ax=0
    xor di,di //di=0
    mov cx,512  //512 words to clear
    cld  //init di and si
    rep stosw //copy in es:di the contain of ax
}
}


#13 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 20 July 2003 - 03:55 PM

I'm not familiarized with TC. I'm customary to use the help (right click on the text) to see the functions characteristics, its difficult to me use the casio libraries.

Does memzones.h have commands like casio2.h? The help file give me a lot of doubts. I dont understand very well the memzones.h :blush:

#14 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 20 July 2003 - 09:53 PM

no memzones.c and memzones.h let you manage basic files and other memory zones only.

If you don't want to use libs right now you can just make some little programs in text mode only, it would be a good begining.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users