Author Topic: PugLib  (Read 2850 times)

0 Members and 1 Guest are viewing this topic.

pugboy

  • Guest
PugLib
« on: July 21, 2007, 04:08:00 pm »
This is a new assembly library that aids BASIC programmers in achieving features not reachable in pure BASIC. This new library has been tested on VTI and a TI-84+, and there have been no problems so far! If you would like to send any suggestions, comments, or just want to spam, send an email to [email protected]! The download link will be modified so it directs you to the Cemetech archives (if it gets approved).

user posted image

http://www.unitedti.org/index.php?download=306

PugLib
Current Size: 2012 bytes
Functions: 20, 3 inactive and in Beta Stage
Build: 10

From the manual-
Syntax
X:Asm(prgmPUGLIB where X is the corresponding value to the effect desired.
1: Clear the graph screen and LCD
2: Turn the run indicator off/on
   -X=1: Off
   -X=2: On
3: Invert Text
   -X=1: Inverse on
   -X=2: Inverse off
4: Alpha Lock on (Temporary)
5: Toggle Lowercase
6: Free Ram (in X)
7: Black graph screen
8: Invert the graph screen
9: Invert Home Screen
10: Battery Status
   -X=0: Battery low
   -X>0: Battery ok
11: Increase Contrast
12: Decrease Contrast
13: Set Temporary Contrast (>0 and <63 in X) (Beta)
14: Fast Circles (Store 1 in X for on, 2 for off) (Beta)
15: OS Version (in X)
16: Hardware Version (in X and Ans) (Beta)
17: Power down (Returns to calling program)
18: Toggle Un/Archiving programs within BASIC programs (If A=3:Archive prgmHI)
   -Do this before and after Un/archiving
19: Turn off DONE at end of program(s)
20: About PugLib (Displays a Splash Screen)

If it is the Beta Stage, it will display an error message.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
PugLib
« Reply #1 on: July 21, 2007, 07:01:00 pm »
*spams*

jk

Hi and welcome here, I am drunk right now, so pardon me if my posts are weird but this look awesome. Btw, one suggestion for optimising

14: Fast Circles (Store 1 in X for on, 2 for off) (Beta)

that should be removed

why? Because in pure BASIC you can alerady use fast circle. Just do Circle(X,Y,Radius,{i instead of Circle(X,Y,Radius and circles draws in less than half a sec

pugboy

  • Guest
PugLib
« Reply #2 on: July 24, 2007, 05:39:00 am »
I have a new way of drawing a circle (thanks to Kllrnohj!), so I will be removing the beta status. It was a four part flag enabler, so it would work the same ways as in BASIC, but the Bresenham algorithm should speed things up!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
PugLib
« Reply #3 on: July 24, 2007, 06:20:00 am »
cool to hear, i hope to see it in action soon :)smile.gif

pugboy

  • Guest
PugLib
« Reply #4 on: July 24, 2007, 09:39:00 am »
Another couple weeks and it should be at .3!

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
PugLib
« Reply #5 on: July 24, 2007, 10:12:00 am »
the bresenehan alg is just finding what points should be filled in in a line, i dont think it draws circles but perhaps with some modification.... i bet your circle routine is real fast, i wrote a circle lib in basic the other day and it was 1/5 of a second faster at drawing a circle with radius 15 than the calc's drawing circle command :)smile.gif. another useful feature you could add would be finding the calcs version number

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
PugLib
« Reply #6 on: July 24, 2007, 10:15:00 am »
dinho: was your basic routine faster than the Circle(X,Y,Radius command? Or the Circle(X,Y,Radius,{i one?

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
PugLib
« Reply #7 on: July 24, 2007, 11:53:00 am »
QuoteBegin-DJ Omnimaga+24 Jul, 2007, 16:15-->
QUOTE (DJ Omnimaga @ 24 Jul, 2007, 16:15)
dinho: was your basic routine faster than the Circle(X,Y,Radius command? Or the Circle(X,Y,Radius,{i one?  

 Most likely the normal, as the {i is faster that 1 sec :Ptongue.gif

Looking good, I like the features maybe a tilemap feature or a delete program feature?

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
PugLib
« Reply #8 on: July 25, 2007, 02:54:00 pm »
umm im not sure which one because i tried circle(20,-20,15,1 and it didnt work so i couldnt test it...i will if you could tell me what my problem is. also my program does a bunch of sstuff that circle doesnt do, like it changes the screen so that its in the 1 increment zoom mode (i duno what you all call it but its the mode where pt(x)=pxl(x) and pxl(y) = pt(-54125+y)) but i could take all that out if i were actually gona use it. also i can easily modify 4 lines of code to say ptoff so i can draw white circles. i havent tested it again but i ouptimized it a tad and lost 1 line of code and shortened 2 others so now i bet its a bit faster.

ps can puglib draw negative circles?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
PugLib
« Reply #9 on: July 25, 2007, 03:06:00 pm »
dinho: you have to do circle(20,-20,15,{i

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
PugLib
« Reply #10 on: July 26, 2007, 04:35:00 am »
oh...thats wierd, i figured i'd just be turning on a flag with the one, i'll test it in a bit, i have to goto the gym in like 15 minutes