Re: A83: Loading PI into OP1


[Prev][Next][Index][Thread]

Re: A83: Loading PI into OP1




On 29-Mar-99, you wrote:


> How would I go about loading PI into OP1... I thought maybe if I loaded
> the PI token into OP1 because it would evaluate it to pi but you have to
> do some symbol lookup or something... anyway, what is some source to
> load PI into OP1.

I'd suggest putting it there yourself.

        ld hl,pi
        ld de,OP1
        ld bc,9
        ldir
        ...

pi:     .db 00h,80h,31h,41h,59h,26h,53h,58h,97h

or something like that.

> Unless there is a rom call that will convert degrees
> to radians?

Try _DTOR.

Linus
-- 
                                                           wwww 
                                                          (o)(O)
.-->                                           .-------mm--(__)--mm--------.
| Linus Akesson                                | http://linusworld.cjb.net |
`---------------^-- ----- --- --  -- -  -   -  `---------ooO--Ooo----------'
            Actual excuse notes teachers have recieved, part 11:
              - Sally won't be in school a week from Friday.
                We have to attend her funeral.



References: