assume cs:code,ds:data,ss:stack
data segment
db 'welcome to masm!'
db02h,24h,71h
data ends
stack segment
dw 8 dup(0)
stack ends
code segment
start:mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,10h
xor bx,bx
mov ax,0b872h
mov cx,3
s3:push cx
push ax
push bx
mov es,ax
mov si,0
mov di,0
mov cx,10h
s1:mov al,ds:[si]
mov es:[di],al
inc si
add di,2
loop s1
mov di,1
pop bx
mov al,ds:10h[bx]
inc bx
mov cx,10h
s2:mov es:[di],al
add di,2
loop s2
pop ax
add ax,0ah
pop cx
loop s3
mov 4c00h
int 21h
code ends
end start
汇编总是提醒:error a2008::in instruction
答案:3 悬赏:40 手机版
解决时间 2021-01-26 23:12
- 提问者网友:原来太熟悉了会陌生
- 2021-01-26 00:43
最佳答案
- 五星知识达人网友:举杯邀酒敬孤独
- 2021-01-26 02:11
两处错误已经消除,正确程序如下:
assume cs:code,ds:data,ss:stack
data segment
db 'welcome to masm!'
db 02h,24h,71h
data ends
stack segment
dw 8 dup(0)
stack ends
code segment
start:mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,10h
xor bx,bx
mov ax,0b872h
mov cx,3
s3:push cx
push ax
push bx
mov es,ax
mov si,0
mov di,0
mov cx,10h
s1:mov al,ds:[si]
mov es:[di],al
inc si
add di,2
loop s1
mov di,1
pop bx
mov al,ds:10h[bx]
inc bx
mov cx,10h
s2:mov es:[di],al
add di,2
loop s2
pop ax
add ax,0ah
pop cx
loop s3
mov ax, 4c00h
int 21h
code ends
end start
本程序,显示三行彩色文字。
assume cs:code,ds:data,ss:stack
data segment
db 'welcome to masm!'
db 02h,24h,71h
data ends
stack segment
dw 8 dup(0)
stack ends
code segment
start:mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,10h
xor bx,bx
mov ax,0b872h
mov cx,3
s3:push cx
push ax
push bx
mov es,ax
mov si,0
mov di,0
mov cx,10h
s1:mov al,ds:[si]
mov es:[di],al
inc si
add di,2
loop s1
mov di,1
pop bx
mov al,ds:10h[bx]
inc bx
mov cx,10h
s2:mov es:[di],al
add di,2
loop s2
pop ax
add ax,0ah
pop cx
loop s3
mov ax, 4c00h
int 21h
code ends
end start
本程序,显示三行彩色文字。
全部回答
- 1楼网友:雪起风沙痕
- 2021-01-26 04:16
rowsizeb = ($ - tableb)
...
push rowsizeb
这种语句在 radasm 上是可以通过编译的
;-------------------------------------------
另外:
建议在 calc_row_sum 子程序中,让编译器自动平衡堆栈(与您的问题无关,只是建议)
- 2楼网友:渊鱼
- 2021-01-26 02:58
mov 4c00h
这是啥?
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯