do7ch:
push ax
push bx
push cx
push dx
push si
push es
mov si,0
;计算偏移地址
mov ax,0b800H
mov es,ax
dec dh
dec dl
add dl,dl
mov al,160
mul dh
mov dh,0
add ax,dx
;bx存储偏移地址
mov bx,ax
;字符串写入显示内存
mov ch,0
do7ch_s:
push cx
mov cl,[si]
jcxz do7ch_ok
pop cx
mov al,[si]
mov es:[bx],al
mov es:[bx+1],cl
inc si
add bx,2
jmp do7ch_s
do7ch_ok:
pop cx
pop es
pop si
pop dx
pop cx
pop bx
pop ax
iret
do7chend:
nop
code ends
end start
贴出一部分错误:
7ch-3.ASM(1): error A2009: Symbol not defined: CODE
7ch-3.ASM(2): error A2024: Segment parameters are changed
7ch-3.ASM(3): error A2086: Data emitted with no segment
7ch-3.ASM(4): error A2086: Data emitted with no segment
7ch-3.ASM(5): error A2086: Data emitted with no segment
7ch-3.ASM(6): error A2086: Data emitted with no segment
7ch-3.ASM(7): warning A4031: Operand types must match
7ch-3.ASM(8): warning A4031: Operand types must match
7ch-3.ASM(9): error A2086: Data emitted with no segment
7ch-3.ASM(10): error A2086: Data emitted with no segment
7ch-3.ASM(11): error A2086: Data emitted with no segment
7ch-3.ASM(12): error A2086: Data emitted with no segment
7ch-3.ASM(13): error A2086: Data emitted with no segment
7ch-3.ASM(14): error A2086: Data emitted with no segment
7ch-3.ASM(15): error A2086: Data emitted with no segment
7ch-3.ASM(16): error A2086: Data emitted with no segment
7ch-3.ASM(18): error A2024: Segment parameters are changed
我是新手才看到第11章 后面的中断什么的还木有看!~
mov ax,cs 这里不能用CS 我这里错误是 1.asm(1) : error A2008: : cs
然后我加了个 data segment
data ends
mov ax,data
编译通过了
根据你给的错误信息翻译是
7ch-3.ASM(1): error A2009: Symbol not defined: CODE 未定义的象征:代码
7ch-3.ASM(2): error A2024: Segment parameters are changed 段参数变化
7ch-3.ASM(3): error A2086: Data emitted with no segment 没有数据发出区段 (是不是意思你要定一个data数据段 )
7ch-3.ASM(4): error A2086: Data emitted with no segment
7ch-3.ASM(5): error A2086: Data emitted with no segment
7ch-3.ASM(6): error A2086: Data emitted with no segment
7ch-3.ASM(7): warning A4031: Operand types must match 操作数的类型必须匹配
7ch-3.ASM(8): warning A4031: Operand types must match操作数的类型必须匹配
7ch-3.ASM(9): error A2086: Data emitted with no segment 没有数据发出区段 (是不是意思你要定一个data数据段 )
7ch-3.ASM(10): error A2086: Data emitted with no segment
7ch-3.ASM(11): error A2086: Data emitted with no segment
7ch-3.ASM(12): error A2086: Data emitted with no segment
7ch-3.ASM(13): error A2086: Data emitted with no segment
7ch-3.ASM(14): error A2086: Data emitted with no segment
7ch-3.ASM(15): error A2086: Data emitted with no segment
7ch-3.ASM(16): error A2086: Data emitted with no segment
7ch-3.ASM(18): error A2024: Segment parameters are changed
7ch-3.ASM(2): error A2024: Segment parameters are changed
7ch-3.ASM(3): error A2086: Data emitted with no segment
7ch-3.ASM(4): error A2086: Data emitted with no segment
7ch-3.ASM(5): error A2086: Data emitted with no segment
7ch-3.ASM(6): error A2086: Data emitted with no segment
7ch-3.ASM(7): warning A4031: Operand types must match
7ch-3.ASM(8): warning A4031: Operand types must match
7ch-3.ASM(9): error A2086: Data emitted with no segment
7ch-3.ASM(10): error A2086: Data emitted with no segment
7ch-3.ASM(11): error A2086: Data emitted with no segment
7ch-3.ASM(12): error A2086: Data emitted with no segment
7ch-3.ASM(13): error A2086: Data emitted with no segment
7ch-3.ASM(14): error A2086: Data emitted with no segment
7ch-3.ASM(15): error A2086: Data emitted with no segment
7ch-3.ASM(16): error A2086: Data emitted with no segment
7ch-3.ASM(18): error A2024: Segment parameters are changed