Jump to content



Photo
- - - - -

Learning ASM/C


  • Please log in to reply
47 replies to this topic

#1 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking & Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool & Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 09 September 2003 - 06:00 PM

does anyone know a good place with a guide like Crimsons basic but for ASM or C?

as my AFX2.0 will be here in under a week and i want to program it in C or ASM, C is preferable

#2 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 09 September 2003 - 06:36 PM

Well i think that for learn assembler programmation, first you need to know the hardware of the calculator, maybe you can download the Mohamed's english traduction of an AFX document (made by Olivier COUPELON), see the topic in the main forum, also there is an introduction of how to use the C compiler in that document.

#3 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 09 September 2003 - 08:30 PM

thats what I'm using

#4 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 10 September 2003 - 05:21 AM

Well i think that  for learn assembler programmation, first you need to know the hardware of the calculator, maybe you can download the Mohamed's english traduction of an AFX document (made by Olivier COUPELON), see the topic in the main forum, also there is an introduction of how to use the C compiler in that document.

What's the name of the topic ? :huh:

#5 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 10 September 2003 - 05:26 AM

I did it the hard way - I wrote all my C/ASM code by myself, but this is rather long and discouraging task.
So my advice is - look at all casio sites in search for games and programs that come with the source code (even I released some of it) and learn from it (eventhough some of them may be in terrible style).
As I remember: Mysterious island, older Touche, Highway, Cube3D, Scorch (not sure) and probably some more from the french.
If you don't know anything about C or ASM then first of all start programming in it on PC, when you will know how pointers, etc. work then switch to the calc.
BTW don't bother with C++ for the calc.

As usual I am a busy man so do not PM me, ask here at the forum.
Roeoender.

#6 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 10 September 2003 - 05:40 AM

If you don't know anything about C or ASM then first of all start programming in it on PC, when you will know how pointers, etc. work then switch to the calc.

What's the program ? :huh:

#7 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking & Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool & Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 10 September 2003 - 07:18 AM

for C on the PC u will need visual C or Borland C, for a C compiler i have chosen Pacific C and Turbo C

#8 C@siomax

C@siomax

    Casio Freak

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

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

Posted 10 September 2003 - 10:30 AM

I made a huge tutorial concerning C/Asm on graph100 but you need some basic knoweldge if you want to understand something !!
Anyway, yo can find it right out there

of course it is fully in english :D

#9 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking & Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool & Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 10 September 2003 - 10:53 AM

thanks c@siomax, now i have two guides, which i can cross refernece between :D

#10 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 11 September 2003 - 04:57 AM

I made a huge tutorial concerning C/Asm on graph100 but you need some basic knoweldge if you want to understand something !!
Anyway, yo can find it right out there

of course it is fully in english :D

But I can't download it ! :(

#11 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking & Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool & Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 11 September 2003 - 06:42 AM

hmmm, i managed to download it perfectly, and straight awy :)

#12 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 11 September 2003 - 01:59 PM

hmmm, i managed to download it perfectly, and straight awy  :)

Yes, My ISP had a problem that it solve quite !
Thanks. :)

thanks c@siomax, now i have two guides, which i can cross refernece between  :D

But at first where I input ASM/C Code ? :huh:

#13 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 11 September 2003 - 08:30 PM

Hey P.J. please reduce your question-per-week ratio. We aren't here to answer your short,general questions. You have to investigate it by yourself (look at the net/ read books) and then if you really have a question (specific one!) then ask it.
You know programming is a creative art, you cannot only ask how to do this and that, you have to think, and try to solve problems by yourself.

You can treat this message as a warning.
Roeoender.

#14 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 16 September 2003 - 03:14 PM

for C on the PC u will need visual C or Borland C, for a C compiler i have chosen Pacific C and Turbo C

What about Visual C++ ? :hammer:

#15 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 September 2003 - 04:41 PM

And how about reading carefully other posts?
R.

#16 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 17 September 2003 - 09:44 AM

BTW don't bother with C++ for the calc.

Roeoender.

Only C ! ;)

#17 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 17 September 2003 - 01:31 PM

for C on the PC u will need visual C or Borland C, for a C compiler i have chosen Pacific C and Turbo C

In http://www.microsoft...?displaylang=en I only find "Visual C# .net" :hammer: not Visual C :(

#18 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking & Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool & Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 17 September 2003 - 05:10 PM

sorry, but i dont know where to get it. just use note pad and turbo C or pacific C, to find those, just goto google, and type in their names.

#19 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 September 2003 - 06:27 AM

I'm sorry for replying so late, but C++ code works perfectly on afx2 .... look at mx3d or shadow world ... fully made in c++ !!
Note that you can compile using another gui !! like context or vc++ 6, but you need turbo c to compile, and configure correctly your gui to launch tcc.exe using the correct arguments to build an exe file compatible with the calc :)

#20 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 20 September 2003 - 11:52 AM

whoa, really? vc++? could you go into a little more detail, this is very interesting to me. (since I already know C++)

could you please send me the source code?

#21 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 20 September 2003 - 12:36 PM

He simply uses VC++ 6.0 as a IDE (editing and launching the compilation) but actual compation is done by tcc.exe so it doesn't give you much (personally I use BC3.1's IDE) - it is more less like using emacs and it's external compilation feature.
BTW C@asiomax probably didn't read all those threads about C++ here, I said that you can use C++ but it is simply unpractical.
Roe.

#22 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 20 September 2003 - 01:02 PM

can somebody tell me whats wrong with this function, Its strait from the code of scorch, but the TC gives me an error every time:

void clrScreen(unsigned int seg)
{asm push es;
asm push ds;
asm push si;
asm push di;

asm mov ax,seg; //error: Expression sentax
asm mov es,ax;
asm mov di,0;
asm mov al,0;
asm cld;
asm mov cx,1024;
asm rep stosb;

asm pop di;
asm pop si;
asm pop ds;
asm pop es;}

I'm just trying to compile it and see if it works. :profanity:

-----EDIT-----
ok, i figgured out its giving me an error every time ax is used, why?

#23 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking & Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool & Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 20 September 2003 - 01:07 PM

yeay, i know C++ already, could u send me some instructions on how to setup VC++ to use turbo C or Pacific C ?

#24 PJay

PJay

    Casio Freak

  • Members
  • PipPipPipPip
  • 260 posts
  • Gender:Male

  • Calculators:
    Casio fx-991ES Plus

Posted 20 September 2003 - 02:21 PM

But you said :

BTW don't bother with C++ for the calc.
Roeoender.

:P :D :angry:

I'm sorry for replying so late, but C++ code works perfectly on afx2 .... look at mx3d or shadow world ... fully made in c++ !!
Note that you can compile using another gui !! like context or vc++ 6, but you need turbo c to compile, and configure correctly your gui to launch tcc.exe using the correct arguments to build an exe file compatible with the calc

C@siomax, Thank You ! :)

#25 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 20 September 2003 - 02:29 PM

Yes you even can program in pascal if you want ... (someone said ...)

but isn't it speed we want? And isn't it compatibility you want? If you only use vc++ as compiler where is the sense? You
can even use an editor in this case. And @crimsons ... If you write your code this way why don'T you write directly
in assembler? Don't you know that c code is about 10 times as large as asm code (sometimes) and (nearly every time)
also 10 times slower? I don't understand how someone can write c code and says asm would be difficult. who does so
doesn'T program himself but only uses other libs since they MUST be written in asm in order to make them work with
the calc. And if you write those libs yourself you also can write your whole prog in asm and use asms advantages ...


(just my opinion)

#26 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 20 September 2003 - 02:53 PM

I dont write code in ASM, I'm just trying to compile the code for Scorch on my computer and it wont work, the way I learn is by making changes to existing programs to see what the effect is, but I cant compile a singe one. if I knew why then mabey I could start programming in C.

#27 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 20 September 2003 - 02:56 PM

the line you marked that gives the error makes no sense.

You must define what segment (of what variable)

e.g.

MOV AX,seg dudum ;Moves segment of var dumdum to AX ...

#28 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 20 September 2003 - 02:57 PM

seg is a variable, is that wrong?

#29 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 20 September 2003 - 03:01 PM

seg shouldn't be one since it is (often) an operator that, if given in front of a variable
refers to the segment the variable is stored in.

#30 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 20 September 2003 - 03:05 PM

I changed it to segm and now it works, I wonder why he did it like that? (in one place he does hav segm instead of seg :blink: )

#31 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 20 September 2003 - 03:33 PM

maybe just a spelling mistake ....

#32 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 20 September 2003 - 05:33 PM

SEG is an assembler keyword (a directive to be exact) it simply gets the segment value of a variable that SHOULD be after it - so now you see why it caused the error - you treated seg as a variable when compiler interpreted is as a keyword and expected something more.

As for huhn_m:
I don't believe you don't understand why people use ASM as a part of their programs.
Ok here is the story:
when you use a profiler on any program you will see that some parts of programs (like plotting a sprite, putting a pixel, clearing the screen) are, especially in games, called *very* often and thus the whole program's performance depends in about 70% on those tasks, so people try to code those strategic parts in the fastest language - machine language. Putting some parts of code as those "asm xxx" statements gives you *none* peantly comparing to externally compiled .asm file (acutally you can compile .c files via assembler).
Ofcourse it would be the best if everything was written in ASM (fastest and smallest code), but some other non performance-dependent tasks (like getting keyboard input from the user) can be written in easier to use and easier to read/maintain language (like C). I don't know how many programs you wrote, but please write 10 programs in ASM, don't look at them for a year and then return to them to modify some even simple part (I had to add changes to linl and txtview in this maner) - I am sure it will take you ages to understand what you have written year ago (unless for every line of code you write 2 of comments, but then why not write in C - less work).
My opinion and about 90% of the population of practical programmers (10% is even more lazy).
Roeoender.

#33 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 20 September 2003 - 05:41 PM

SEG is an assembler keyword (a directive to be exact) it simply gets the segment value of a variable that SHOULD be after it - so now you see why it caused the error - you treated seg as a variable when compiler interpreted is as a keyword and expected something more.

this isn't my code, its the code in scorch, I'm wondering how he got this to work in the first place...

#34 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 20 September 2003 - 05:46 PM

Yes I know, he may have used some older compiler, anyway I haven't used anything older than BC3.1,
but even in this version compiling ASM parts can produce some strange errors, so in his compiler it could be this way that the seg-variable hid (overlapped) the seg-asm-directive so everything was clear. It is common that some less important/external things are don in compilers in a crappy way (they quickly addapt huge parts of external source code etc.).
Congratulations in deciding to learn C/ASM programming - it is really worth the effort.
Roeoender.

#35 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 20 September 2003 - 05:50 PM

I'm taking a college course on it just so I can make games in C for my calc :greengrin:

#36 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 21 September 2003 - 03:07 AM

As for huhn_m:
I don't believe you don't understand why people use ASM as a part of their programs.


I didn't say this ... read my post!

I said: *You must write main parts in asm*
and I said that if they can do this it should be no problem for them to write the whole prog in asm ...

As for huhn_m:
I don't believe you don't understand why people use ASM as a part of their programs.


Well sure i'm not as experienced as you are but i wrote at least 8 progs (including 3 completely rewritteln <{GNULINUX}> version wherer only 2 were released) and I looked at some code of my first <{GNULINUX}> release (03/2003) to look how I did sth there. And I must say I
could read it very well ... I only commented about every 20th line and there params used for macros and procs but I used
variables names that make sense and since I know how most commands work it is no problem for me to see what I've done.
Sure it will be a problem for someone who doesn't know my style ... But I think someone who can'T reread his own code
without commenting every line ... well ....

#37 C@siomax

C@siomax

    Casio Freak

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

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

Posted 21 September 2003 - 07:43 AM

loooool!!
Personnally I can avoid comments because of the structurated code I write now(not like bomberman), using structures and explicit names !! Non-programmers can understand my code very well !! But don't follow my example ... I add comments at the end coz I find it boring to explain .... :P
About asm stuf ... I fully agree with Roe !! Asm is indispensible to make a program running at a correct speed !! For example, I write many of my routines in C, but I take some time to translate them into asm ;) """"little"""" tasks which you don't take care of can make you win sooooooooh much time :D

#38 Andy.Davies

Andy.Davies

    Forum Ghost

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1547 posts
  • Gender:Male
  • Location:Dorset, England
  • Interests:Age: 18
    Studying: MEng in cybernetics at Reading uni
    Interests: Progaming (VB, VB.Net, C#, Casio Basic)
    Computers UBBD (Using, Building, Breaking &amp; Destroying)
    Gaming (FPS, RTS, RPG)
    Electronics
    Rock Music (Preferably Loud)
    Riley's (Pool &amp; Snooker Bar)
    Driving (Preferably fast)
    Aikedo (Martial Art)

  • Calculators:
    Algebra FX 2.0 ROM 1.01, FX9750G

Posted 21 September 2003 - 07:51 AM

doest the AFX have a string compare (in ASM or C)? cos i think it would be quite useful, i cant wait until my AFX arrives :D

#39 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 21 September 2003 - 08:05 AM

I've commented this part of your post:

If you write your code this way why don'T you write directly
in assembler? Don't you know that c code is about 10 times as large as asm code (sometimes) and (nearly every time)
also 10 times slower

Mine "I don't believe..." sentence was not precise (my fault) it should be:
>>I don't believe you don't understand why people use ASM as a part of their [C] programs,[and not write everything in ASM]. <<

You are still working on <{GNULINUX}> so you remember all the stuff, but ater <{GNULINUX}> write 6 more programs for the calc (and 5 more for PC) in a year and then return to your <{GNULINUX}>.
Ofcourse everyone has his times of fascination about ASM language, but someday he finds out that it is not needed (or even harmful) for some tasks.

Another quote from your post:

I don't understand how someone can write c code and says asm would be difficult. who does so
doesn'T program himself but only uses other libs since they MUST be written in asm in order to make them work with
the calc.

So 90% of all programmers programming for *NIX are not "real" programmers because they use system calls, libraries like curses, glibc, or maybe C++ are not "real" programmers because they use STL library, adn even C programmers use standard library so they are not real programmers. lol.
I think that modern programming (sadly or not) is all about using libraries.
Ofcourse CASIO AFX is so simple you can do everyting on your own, but I wouldn't force everyone to do so (but ok, I do this way) and reinvent a wheel. And using someone elses code (if legal) doesn't mean that you're not a programmer, only if you steal someone elses code you're a lamer.

Agreed with C@siomax - I also use C for "prototyping" :D I did like this with sprite plotting - which I rewrote in ASM later.
Roeoender.

#40 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 21 September 2003 - 08:53 AM

I'm a firm beliver in comments, you sould see the code for lydonia, I must have about 5000 bytes of comments in there...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users