PL2303 发表于 2013-6-1 11:20:18

关于往内存内写程序,程序无报错.但就是没显示字符串和属性

关于往内存内写程序,程序无报错.但就是没显示字符串和属性
具体程序在附件中,请高手帮忙解析下,谢谢!!!
程序代码如下:
        assume cs:code_sg,ds:souse_sg,ss:stack_sg
       
        souse_sg segment
        db 'WELCOME TO MASM!'
        db 02h,24h,71h
        souse_sg ends
       
        stack_sg segment
        dw 5 dup(0)
        stack_sg ends
       
       
        code_sg segment
        start:       
                        mov ax,stack_sg
                        mov ss,ax
                        mov sp,10
                       
                        mov ax,souse_sg
                        mov ds,ax
                       
                        mov ax,0b872h
                        mov es,ax
                       
                        mov bx,0
                        mov cx,3
                s0:       
                        push cx
                        push bx
                        push ax
                       
                        mov di,0
                        mov si,0
                       
                        mov cx,10h
                        s1:
                                mov al,
                                mov es:,al
                               
                                mov al,ds:10h
                                mov es:,al
                                inc si
                                dec di
                                add di,2
                        loop s1       
                       
                        pop ax
                        pop bx       
                        pop cx
                        inc bx
                        add ax,0ah
                        mov ds,ax
                        loop s0

                                       
                        mov ax,4c00h
                        int 21h
                        code_sg ends
                        end start

飞雪 发表于 2013-6-2 11:05:11

你的mov cx,10h好像不对
页: [1]
查看完整版本: 关于往内存内写程序,程序无报错.但就是没显示字符串和属性