why does ti contain op1set1, 2, 3 and 4

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
New Member
Posts: 43
Joined: Fri 07 May, 2010 11:00 pm

why does ti contain op1set1, 2, 3 and 4

Post by puromtec »

I am really just curious, why does ti offer op1set1/2/3/4. I understand that op1set1 will help setup the exponent and real flag in floating point to make creating floating point values a little easier. But, why also have 2 3 and 4, as well as system routines? Just seems odd.
New Member
Posts: 42
Joined: Sun 06 Feb, 2011 7:08 am

Re: why does ti contain op1set1, 2, 3 and 4

Post by Xeda »

It's because it was easy, that's all. The code might have been something like:

Code: Select all

      xor a
      jr SetXXOP1
      ld a,1
      jr SetXXOP1
      ld a,2
      jr SetXXOP1
      ld a,3
      jr SetXXOP1
      ld a,4
      <<code for bcall(_SetXXOP1)>>
I do that, too when I only need to add a few bytes to create something else useful. For example, in BatLib I have a call that multiplies DE by BC, so I added an ex de,hl to make another call called Mult_HL_by_BC :D

I have not checked those bcalls, but I have looked at the calls like OP1ToOP2 and that is how they work, so I imagine that is how the OP1Setx calls work.
Post Reply