Author Topic: MPASMAssembler  (Read 2625 times)

0 Members and 1 Guest are viewing this topic.

Offline mpuvddTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
MPASMAssembler
« on: March 25, 2008, 07:42:12 PM »
Hi everyone,
I read in 123 PIC MCU Experiments For The Evil Genius (a book) that the MPASM Assembler somehow has a built-in calculator.  Could anyone tell me how to access and use it, or is it not literally a calculator?  To me, and from context, it sounds like something you can literally plug values in and get answers from.
Thanks a lot,
mpuvdd
Any man who reads too much and uses his own brain too little falls into lazy habits of thinking-Einstein

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: MPASMAssembler
« Reply #1 on: March 25, 2008, 07:53:05 PM »
Hi everyone,
I read in 123 PIC MCU Experiments For The Evil Genius (a book) that the MPASM Assembler somehow has a built-in calculator.  Could anyone tell me how to access and use it, or is it not literally a calculator?  To me, and from context, it sounds like something you can literally plug values in and get answers from.
Thanks a lot,
mpuvdd

MPASM assembler takes the assembly code and makes hex code out of it  - thats all it does

I don't know what you are saying about a built-in-calculator
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline mpuvddTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: MPASMAssembler
« Reply #2 on: March 25, 2008, 08:18:53 PM »
Gotch ya  ;)
Well thanks again,
mpuvdd
Any man who reads too much and uses his own brain too little falls into lazy habits of thinking-Einstein

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: MPASMAssembler
« Reply #3 on: March 25, 2008, 10:53:06 PM »
Actually, it has a preprocessor that you can use to make look-up tables. I used it for converting the 8 bit Analog To Digital value of a Sharp IR Sensor to a rough distance estimate. Since the Sensor is nonlinear I took some data and did a best fit curve and had the preprocessor generate the table from the function.
« Last Edit: March 25, 2008, 10:55:46 PM by JesseWelling »

Offline mpuvddTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: MPASMAssembler
« Reply #4 on: March 27, 2008, 09:37:16 AM »
Really!
So how do you open the table/preprocessor?
Any man who reads too much and uses his own brain too little falls into lazy habits of thinking-Einstein

paulstreats

  • Guest
Re: MPASMAssembler
« Reply #5 on: March 27, 2008, 01:57:41 PM »
Quote
I used it for converting the 8 bit Analog To Digital value of a Sharp IR Sensor to a rough distance estimate. Since the Sensor is nonlinear I took some data and did a best fit curve and had the preprocessor generate the table from the function.

You can do a similar thing using c, by declaring arrays like:

far rom char[10] = {0x01,0x09,0x05 etc....}

This way it doesnt take up ram space, but you can still access the array table like a normal variable.

As for the original post, there is not a calculator as such built into mpasm. You can load up the mpasmwin.exe for the mpasm suite, but there is no standard calculator. You will notice though that there are several different radix base outputs etc, so it is capable of supporting calculations. Its function is to act like a big calculator

Offline mpuvddTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: MPASMAssembler
« Reply #6 on: March 27, 2008, 06:00:29 PM »
OK,
Makes sense,
Thanks again
Any man who reads too much and uses his own brain too little falls into lazy habits of thinking-Einstein

 


data_list