summaryrefslogtreecommitdiff
path: root/samples/cube.s
diff options
context:
space:
mode:
Diffstat (limited to 'samples/cube.s')
-rw-r--r--samples/cube.s76
1 files changed, 37 insertions, 39 deletions
diff --git a/samples/cube.s b/samples/cube.s
index d42e3a7..37430bf 100644
--- a/samples/cube.s
+++ b/samples/cube.s
@@ -83,33 +83,32 @@ InitCube: MOV, Points3D[0], L;
;
MajMatr: MOV R5, [T1];
- CALL Cosinus;
- MOV R6, R5;
+ MOV R6, COS[R5];
MOV R5, [T2];
- CALL Cosinus;
+ MOV R6, COS[R5];
CALL Mult;
MOV, Matr[0+0], R5;
;
; M[1,1] = cosT1*cosT2
;
MOV R5, [T1];
- CALL Cosinus;
+ MOV R5, COS[R5];
SUB R5, R0, R5;
MOV R7, R5;
MOV R5, [T2];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Sinus;
+ MOV R5, SIN[R5];
CALL Mult;
MOV R7, R6;
CALL Mult;
MOV R7, R5;
MOV R5, [T1];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Cosinus;
+ MOV R5, COS[R5];
CALL Mult;
SUB R5, R7, R5;
MOV, Matr[0+1], R5;
@@ -117,23 +116,23 @@ MajMatr: MOV R5, [T1];
; M[1,2] = -cosT1*sinT2*sinT3-sinT1*CosT3
;
MOV R5, [T1];
- CALL Cosinus;
+ MOV R5, COS[R5];
SUB R5, R0, R5;
MOV R7, R5;
MOV R5, [T2];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Cosinus;
+ MOV R5, COS[R5];
CALL Mult;
MOV R7, R6;
CALL Mult;
MOV R7, R5;
MOV R5, [T1];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Sinus;
+ MOV R5, SIN[R5];
CALL Mult;
ADD R5, R7, R5;
MOV, Matr[0+2], R5;
@@ -141,33 +140,33 @@ MajMatr: MOV R5, [T1];
; M[1,3] = -cosT1*sinT2*cosT3+sinT1*sinT3
;
MOV R5, [T1];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T2];
- CALL Cosinus;
+ MOV R5, COS[R5];
CALL Mult;
MOV, Matr[3+0], R5;
;
; M[2,1] = sinT1*cosT2
;
MOV R5, [T1];
- CALL Sinus;
+ MOV R5, SIN[R5];
SUB R5, R0, R5;
MOV R7, R5;
MOV R5, [T2];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Sinus;
+ MOV R5, SIN[R5];
CALL Mult;
MOV R7, R6;
CALL Mult;
MOV R7, R5;
MOV R5, [T1];
- CALL Cosinus;
+ MOV R5, COS[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Cosinus;
+ MOV R5, COS[R5];
CALL Mult;
ADD R5, R7, R5;
MOV, Matr[3+1], R5;
@@ -175,23 +174,23 @@ MajMatr: MOV R5, [T1];
; M[2,2] = -sinT1*sinT2*sinT3+cosT1*cosT3
;
MOV R5, [T1];
- CALL Sinus;
+ MOV R5, SIN[R5];
SUB R5, R0, R5;
MOV R7, R5;
MOV R5, [T2];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Sinus;
+ MOV R5, SIN[R5];
CALL Mult;
MOV R7, R6;
CALL Mult;
MOV R7, R5;
MOV R5, [T1];
- CALL Cosinus;
+ MOV R5, COS[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Sinus;
+ MOV R5, SIN[R5];
CALL Mult;
SUB R5, R7, R5;
MOV, Matr[3+2], R5;
@@ -199,26 +198,26 @@ MajMatr: MOV R5, [T1];
; M[2,3] = -sinT1*sinT2*sinT3-cosT1*sinT3
;
MOV R5, [T2];
- CALL Sinus;
+ MOV R5, SIN[R5];
MOV, Matr[6+0], R5;
;
; M[3,1] = sinT2
;
MOV R5, [T2];
- CALL Cosinus;
+ MOV R5, COS[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Sinus;
+ MOV R5, SIN[R5];
CALL Mult;
MOV, Matr[6+1], R5;
;
; M[3,2] = cosT2*sinT3
;
MOV R5, [T2];
- CALL Cosinus;
+ MOV R5, COS[R5];
MOV R6, R5;
MOV R5, [T3];
- CALL Cosinus;
+ MOV R5, COS[R5];
CALL Mult;
MOV, Matr[6+2], R5;
;
@@ -427,12 +426,11 @@ IncrAngl: MOV R5, [T1];
;
;
.start
- CALL InitTrig;
- CALL InitCube;
-Main: CALL IncrAngl;
- CALL MajMatr;
- CALL RotCube;
- CALL Proj;
- CALL ClrScr;
- CALL Draw;
- JMP Main; \ No newline at end of file
+ CALL InitCube
+Main: CALL IncrAngl
+ CALL MajMatr
+ CALL RotCube
+ CALL Proj
+ CALL ClrScr
+ CALL Draw
+ JMP Main