View previous topic :: View next topic
|
Author |
Message |
ahmad
New User
Joined: 18 Oct 2008 Posts: 13 Location: Iran
|
|
|
|
i want to code and compute a simple arithmetic expression like below
exp = 3x^2 + 12/5x -3
may someone help me by introducing some source (sites,books,etc) or bring me some sample source codes. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
PL/I?
Assembler?
COBOL? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
In which language? |
|
Back to top |
|
|
ahmad
New User
Joined: 18 Oct 2008 Posts: 13 Location: Iran
|
|
|
|
sorry guys; i thought this part of forum dedicates to assmebly.
I want the code in assembler.
HLASM |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
This is PL/1 and assembler -- not just assembler. The precise assembler instructions depend on whether or not you're dealing with floating point numbers or fixed values, but in general:
Code: |
Load register,X
Multiply register,X
Multiply register,3
Save register,temp
Load register,X
Multiply register,12
Divide register,5
Subtract register,3
Add register,temp
Store register,exp |
Some of these instructions require register pairs to work properly. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
i thought this part of forum dedicates to assmebly |
This part of the forum is for pl/i and assembler. Unfortunately, sometimes other language questions are mistakenly posted here also and we re-locate them.
How much assembler experience do you have (both in terms of how long coding as well as what kind of code - business code or utility code)? |
|
Back to top |
|
|
ahmad
New User
Joined: 18 Oct 2008 Posts: 13 Location: Iran
|
|
|
|
I've just started to learn HLASM and I'm in day 5 of 6 days duration of IBM course (Introduction to assembly language programming).
and thanks to Robert Sample, but I need complete source and not just pseudo code. and that's because of getting use to registers and coding manners of HLASM.
thank you guys. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
debajyoti123
New User
Joined: 11 Aug 2008 Posts: 4 Location: Bangalore
|
|
|
|
IBM manual specially , Enterprise PL/I for z/os - Language reference can be used .
Or for elaborate example Structured PL/I by Joan Hughes can of good help. |
|
Back to top |
|
|
|