HP Forums
[Saturn Asm] Plot routine - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: [Saturn Asm] Plot routine (/thread-17697.html)



[Saturn Asm] Plot routine - dwesti - 11-10-2021 04:17 PM

Code:

         NIBASC  /HPHP48-A/      Binary download header
    CON(5)    =DOCODE
    REL(5)    Fin

* bottom menu off
    D0=(5) #00128
    LCHEX 3F
    DAT0=C B
* video address
    GOSBVL    =D0->Row1    * D0,A[A] -> top left corner of display
    R0=A.F    A
    D0=A
* clear screen
    LCHEX    87
    A=0 W
CL    DAT0=A W
    D0=D0+ 16
    C=C-1 B
    GONC CL

* test plot
    LAHEX 00000
    B=A A
* LL    GOTO LL
TP
    A=0 M
    A=B A
    C=B A
    GOSUB PLT  * C=y,A=x
    B=B+1 B
    LCHEX 40
    ?B<C B
    GOYES TP
KK    GOTO KK
    RTN
PLT * destroys A,C,D
    D=C A
    DSL A * D*16
    D=D+C A * D*17
    D=D+D A * D*34
    C=R0 A
    D=D+C A
* X
    LCHEX 00003
    C=C&A A
    CBIT=1  3
    P=C 0
    LCHEX #12481248
    P= 0
    CDEX A
    ASRB A
    ASRB A
    A=A+C A
    D0=A
    CDEX A
    A=DAT0 S
    A=A!C S
    DAT0=A S
    RTN

Fin
    END



RE: [Saturn Asm] Plot routine - dlidstrom - 11-23-2021 10:42 PM

What does it draw?


RE: [Saturn Asm] Plot routine - Jonathan Busby - 11-25-2021 07:25 PM

(11-23-2021 10:42 PM)dlidstrom Wrote:  What does it draw?

As far as I can tell it draws a 45 degree angle diagonal line starting from the top left corner of the screen down to the bottom.

Regards,

Jonathan