;这个程序是巧妙的利用了坐标的不断变化,从而实现了由星星构成的箱子3d转动!
;为了尊重版权,本人未对源码注释进行翻译,这样做也可以让国内的汇编爱好者自己琢磨国外的汇编编程的思维!
;编译方法: 1 tasm 3d.asm
; 2 tlink 3d.obj
; 3 exe2bin 3d.exe 3d.com
;==============================================================================;
; ;
; assembler program by vulture. ;
; 3d-system example. use the following formulas to rotate a point: ;
; ;
; rotate around x-axis ;
; yt = y * cos(xang) - z * sin(xang) / 256 ;
; zt = y * sin(xang) + z * cos(xang) / 256 ;
; y = yt ;
; z = zt ;
; ;
; rotate around y-axis ;
; xt = x * cos(yang) - z * sin(yang) / 256 ;