Shop OBEX P1 Docs P2 Docs Learn Events
Assembly code math?? — Parallax Forums

Assembly code math??

krazyideaskrazyideas Posts: 119
edited 2008-11-10 21:42 in Propeller 1
Hello

I just wanted to know from someone that·isn't a beginner at·assembly programing if

1 I set up CTRA correctly to monitor·pin 0?

2 if I can·divide a varuble (measure2) by 10 and store the value in degree like this?

and what is the command to display a numerical varuble on a Monitor? I want to use the VGA_text.spin program from the Propellor Library is that right?
And comments would be very welcome
Thanks


······················· movs CTRA, %0·························· {Monitor pin 0}
······················· movi CTRA, %011010000·············· {Set CTRa mode to logic A and PLLa to times 16}

······················· mov degree, (measure2 / 10)········ {Divide clock's passed by 10 to get clock's pass in one degree}



·

Comments

  • AleAle Posts: 2,363
    edited 2008-11-10 21:42
    You can use the posted div algorithm from the "Propeller guts" file that hangs somewhere in the forums of from the Math article at propeller.wikispaces.org/MATH.

    The vga_text object has a couple of funtions to display numbers and text, have a look at the keyboard example in the library (in your propeller tool subdirectory) for usages.
Sign In or Register to comment.