From: hachti Date: Sun, 23 Dec 2007 15:06:07 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://gitweb.hachti.de/?a=commitdiff_plain;h=990b21a1a4d0d5590aba547d3cf9879f1a6f5659;p=h316.git *** empty log message *** --- diff --git a/lib/hachti/src/matrix.asm b/lib/hachti/src/matrix.asm index 34c42fb..0908793 100644 --- a/lib/hachti/src/matrix.asm +++ b/lib/hachti/src/matrix.asm @@ -367,17 +367,122 @@ TM22 DAC 0 ******************************************************************************** * * -**** ROTATE MATRIX +**** ADD ROTATION TO MATRIX +* +* +* M = M * MROT +* +* | M11 M12 | | COS(X) -SIN(X)| +* = | | * | | +* | M21 M22 | | SIN( X) COS(X)| * -* THIS ROUTINE IS NOT YET FINISHED! +* | M11*COS(X)+M12*SIN(X) M12*COS(X)-M11*SIN(X) | +* = | | +* | M21*COS(X)+M22*SIN(X) M22*COS(X)-M21*SIN(X) | +* +* CALL: +* JST ROT +* DAC MATRIX +* DAC ANGLE +* DAC 0 DON'T FORGET! * **************************************** * ROT DAC ** ENTRY - IRS ROT TALLY RETURN ADDRESS - JMP* ROT EXIT +* + LDA* ROT GET MATRIX POINTER + STA R111 M11, FIRST COPY + STA R211 M11, SECOND COPY + ADD =2 + STA R112 + STA R212 + ADD =2 + STA R121 + STA R221 + ADD =2 + STA R122 + STA R222 + IRS ROT + STA RA1 + STA RA2 + IRS ROT + IRS ROT +* +* + CALL SINX1 FLOATING POINT SINE +RA1 DAC ** POINTER TO ANGLE + LDA ='77 + HLT + CALL H$22 SAVE TO TMP1 + DAC TMP1 + CALL M$22 MULTIPLY +R112 DAC ** M12 + CALL H$22 STORE TO TMP3 + DAC TMP3 + CALL COSX1 FLOATING POINT COSINE +RA2 DAC ** POINTER TO ANGLE + CALL H$22 SAVE TO TMP2 + DAC TMP2 + CALL M$22 MULTIPLY +R111 DAC ** M11 + CALL A$22 ADD TMP3 + DAC TMP3 + CALL H$22 SAVE NEW M11 TO TMP3 + DAC TMP3 +* + CALL L$22 LOAD SINE + DAC TMP1 + CALL M$22 MULTIPLY +R212 DAC ** M12 + CALL H$22 STORE TO TMP4 + DAC TMP4 + CALL L$22 LOAD COSINE + CALL M$22 MULTIPLY +R211 DAC ** + CALL S$22 SUBSTRACT + DAC TMP4 + CALL H$22 SAVE TO NEW M12 +R312 DAC ** + CALL L$22 LOAD NEW M11 FROM TMP3 + CALL H$22 AND SAVE TO NEW M11 +R311 DAC ** * * + CALL L$22 LOAD SINE + CALL M$22 MULTIPLY +R122 DAC ** M12 + CALL H$22 STORE TO TMP3 + DAC TMP3 + CALL H$22 LOAD COSINE + DAC TMP2 + CALL M$22 MULTIPLY +R121 DAC ** M11 + CALL A$22 ADD TMP3 + DAC TMP3 + CALL H$22 SAVE NEW M11 TO TMP3 + DAC TMP3 +* + CALL L$22 LOAD SINE + DAC TMP1 + CALL M$22 MULTIPLY +R222 DAC ** M12 + CALL H$22 STORE TO TMP4 + DAC TMP4 + CALL L$22 LOAD COSINE + CALL M$22 MULTIPLY +R221 DAC ** + CALL S$22 SUBSTRACT + DAC TMP4 + CALL H$22 SAVE TO NEW M12 +R322 DAC ** + CALL L$22 LOAD NEW M11 FROM TMP3 + CALL H$22 AND SAVE TO NEW M11 +R321 DAC ** +* +* + JMP* ROT RETURN. +* +* ******************************************************************************** * * @@ -475,13 +580,13 @@ XP1 DAC 0 CALL M$22 MULTIPLY FLOAT*FLOAT MP11 DAC 0 CALL H$22 STORE FLOAT - DAC TMP + DAC TMP1 CALL FLOAT YP1 DAC 0 CALL M$22 MP12 DAC 0 CALL A$22 - DAC TMP + DAC TMP1 JST RND ROUND AND CONVERT TO INTEGER STA PA21 STORE NEW X VALUE INTO TEMPORARY LOCATION **** @@ -490,14 +595,14 @@ XP2 DAC 0 CALL M$22 MP21 DAC 0 CALL H$22 - DAC TMP + DAC TMP1 * CALL FLOAT YP2 DAC 0 CALL M$22 MP22 DAC 0 CALL A$22 - DAC TMP + DAC TMP1 JST RND NOW INTEGER IN AC STA* YP1 STORE NEW Y VALUE * @@ -540,7 +645,10 @@ HLF OCT '040100 CONSTANT 0.5 * **** VARIABLES * -TMP BSS '10 SOME SPACE +TMP1 BSS '2 TEMPORARY 2-WORD VARIABLE +TMP2 BSS '2 " " " +TMP3 BSS '2 " " " +TMP4 BSS '2 " " " * * ********************************************************************************