This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 07 Oct 2008 11:38:04 am    Post subject:

is there a way???
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 07 Oct 2008 01:00:13 pm    Post subject:

Yes.


Code:
bcall(_SetXXXXOP2)
bcall(_OP2ToOP1)
ld a,9
bcall(_dispOP1a)
Back to top
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 07 Oct 2008 02:21:18 pm    Post subject:

what exacly are bcall(_SetXXXXOP2) and bcall(_dispOP1a) doing??
Back to top
brandonw


Advanced Member


Joined: 12 Jan 2007
Posts: 455

Posted: 07 Oct 2008 03:50:15 pm    Post subject:

_SetXXXXOP2 takes the value in HL and converts it to a floating-point number in OP2. Another one similar to this is _SetXXOP1, which takes the value in A and converts it to a floating-point number in OP1.

Because there is no "_SetXXXXOP1", we have to use _SetXXXXOP2 and then move it to OP1 with _OP2ToOP1.

_dispOP1a will display the value in OP1 to penRow/penCol using the max number of characters specified in A. I set this to a large number like 9 just to be on the safe side...you can change it to whatever suits your needs. I believe this routine is documented in the 83+ SDK, and if not, on WikiTI.
Back to top
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 08 Oct 2008 02:52:38 am    Post subject:

ah, thanks for that

edit: as i only need 1 bit numbers 0-99: (maybe 255...)


Code:
bcall(_SetXXOP1)
LD A,2
bcall(_dispOP1a)


testing this right now


Last edited by Guest on 08 Oct 2008 06:43:28 am; edited 1 time in total
Back to top
tr1p1ea


Elite


Joined: 03 Aug 2003
Posts: 870

Posted: 08 Oct 2008 07:34:37 am    Post subject:

A 1-bit number you say?

Im not sure of the speed of _DispOp1A, but i guess it should suffice.
Back to top
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 08 Oct 2008 09:17:18 am    Post subject:

errr... byte...
Very Happy
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement