哪位高手帮忙看看这个代码的错误怎么改啊
运行之后就出现了这样的问题:c:\JMSOFT\Masm\xq.asm(82):error A2206:missing operator in expression.c:\JMSOFT\Masm\xq.asm(114):error A2206:missing operator in expression.
Code Segment
assume cs:code, ds:code
.386P
Org 100h ;
start: mov al, 13h ;VGA model
int 10h
mov ax, 0a000h
mov es, ax
mov dx, 3c8h ;初始化调色板,(注:效果不佳,不知为何.)
out dx, al
inc dx
@p:
out dx,al
out dx,al
out dx,al
inc al
Jnz @p
;==================
lea si, box ;初始化Box的数据,共 12*12*12=1728个点
@0: mov cx, -o
@1: mov bx, -o
@2: mov ax, -o
@3:
mov [si+0],ax
mov [si+2],bx
mov [si+4],cx
add si, 6
add ax, sd
cmp ax, o
jl @3
add bx, sd
cmp bx, o
jl @2
add cx, sd
cmp cx, o
jl @1
;==================
@main:lea si, box
mov cx, len
@upd: call update ;更新顶点坐标
@t: in al, 40h ;读时钟,控制节奏
test al, 8
Jnz @t
loop @upd
inc word ptr[rotX] ;全局轴rotX,同时转动Y轴和Z轴
in al, 60h
dec al
Jnz @main ;ESC键退出
mov ax, 3
int 10h
int 20h
;================
sincos: fldPI ;PI=3.1415926
fIdiv [r18] ;PI/180
fImul [rotX] ;PI/180*Rotation
fst(0) [Tan] ;Tan=
fSin ;Sin(Tan)
fImul [Yb] ;Y*Sin(Tan)
fIstp [Ya] ;Yt=Y*Sin(Tan)
fld [Tan] ;=Tan
fCos ;Cos(Tan)
fImul [Xb] ;X*Cos(Tan)
fISub [Ya] ;X*Cos(tan)-Y*Sin(tan)
fIstp [Xa] ;Xt=
mov CX, [Xa] ;Save Xt
fld [Tan] ;=Tan
fSin ;Sin(Tan)
fImul [Xb] ;X*Sin(tan)
fIstp [Xa] ;Xt=X*Sin(tan)
fld [Tan] ;Tan=
fCos ;Cos(Tan)
fImul [Yb] ;Y*Cos(Tan)
fIAdd [Xa] ;X*Sin(tan)+Y*Cos(tan)
fIstp [Ya] ;Yt=
mov BX, [Ya] ;Save Yt
mov DX, [Zb] ;Save Zb
mov [Za],DX ;Save Zt
ret
;================
Update:
push ax bx cx dx
lodsw
mov [Xb], ax ;X=[si+0]
lodsw
mov [Yb], ax ;Y=[si+2]
lodsw
mov [Zb], ax ;Z=[si+4]
;==================
call sincos ;XRotation
mov [Xb], CX
mov [Yb], BX
mov [Zb], DX
call sincos ;YRotation
mov [Zb], CX
mov [Xb], BX
mov [Yb], DX
call sincos ;ZRotation
Xchg DX, CX
Xchg CX, BX
;==================
mov di, [si+plen]
xor ax, ax
stosb ;擦除旧痕迹
mov di, BX ;BX是Y坐标
add di, 100
imul di, 140h ;转换成屏幕坐标
add di, 160
add di, CX ;CX是X坐标
;di= (BX+100)*140h+(CX+160)
mov [si+plen], di ;保存旧的坐标
add dx, o*2 ;DX的在正数范围内 dx=z= -60~60
mov es:[di], dl ;绘制点
pop ax bx cx dx
ret
;================数据
rotX dw 8
Xa dw ?
Ya dw ?
Za dw ?
Xb dw ?
Yb dw ?
Zb dw ?
r18 dw 180
Tan dd ?
box dw ?
o equ 60
sd equ 10
gd equ o*2/sd
len equ gd*gd*gd
plen equ len*6
code ends
end start
goto box
E100 B0 13 CD 10 B8 00 A0 8E C0 BA C8 03 EE 42 EE EE
E110 EE FE C0 75 F9 BE 37 02 B9 C4 FF BB C4 FF B8 C4
E120 FF 89 04 89 5C 02 89 4C 04 83 C6 06 05 0A 00 90
E130 3D 3C 00 90 7C EB 83 C3 0A 90 83 FB 3C 90 7C DE
E140 83 C1 0A 90 83 F9 3C 90 7C D1 BE 37 02 B9 C0 06
E150 90 E8 74 00 E4 40 A8 08 75 FA E2 F5 FF 06 23 02
E160 E4 60 FE C8 75 E4 B8 03 00 CD 10 CD 20 D9 EB DE
E170 36 31 02 DE 0E 23 02 D9 16 33 02 D9 FE DE 0E 2D
E180 02 DF 1E 27 02 D9 06 33 02 D9 FF DE 0E 2B 02 DE
E190 26 27 02 DF 1E 25 02 8B 0E 25 02 D9 06 33 02 D9
E1A0 FE DE 0E 2B 02 DF 1E 25 02 D9 06 33 02 D9 FF DE
E1B0 0E 2D 02 DE 06 25 02 DF 1E 27 02 8B 1E 27 02 8B
E1C0 16 2F 02 89 16 29 02 C3 50 53 51 52 AD A3 2B 02
E1D0 AD A3 2D 02 AD A3 2F 02 E8 92 FF 89 0E 2B 02 89
E1E0 1E 2D 02 89 16 2F 02 E8 83 FF 89 0E 2F 02 89 1E
E1F0 2B 02 89 16 2D 02 E8 74 FF 87 D1 87 CB 8B BC 80
E200 28 33 C0 AA 8B FB 83 C7 64 69 FF 40 01 81 C7 A0
E210 00 03 F9 89 BC 80 28 83 C2 78 90 26 88 15 5A 59
E220 5B 58 C3 08 00 00 00 00 00 00 00 00 00 00 00 00
E230 00 B4 00 6A 20 6A 00
G=100
Q
:box
debug<box.bat>