Advertisement

汇编语言(五):汇编代码在内存中的结构(使用8086 + masm编译器)

阅读量:

汇编程序经过编译连接后被加载到内存空间中指定的数据区域和代码区域内存储着相应的数据项与指令项它们是如何存储在内存中的呢?

例如这个 代码:

复制代码
    assume cs:codesg,ds:data
    ;每个单词的头一个字母改为大写
    data segment
    	db '1. file         '
    	db '2. edit         '
    	db '3. search       '
    	db '4. view         '
    	db '5. options      '
    	db '6. help         '
    data ends
    
    codesg segment
    start:	mov ax,data
    		mov ds,ax
    		mov cx,6
    		mov bx,0
    	s:	mov al,[bx+4]
    		and al,11011111B
    		mov [bx+4],al
    		add bx,16
    		loop s
    	mov ax,4c00H
    	int 21H
    codesg ends
    
    end start

编译,链接成 convert.exe 后, d

全部评论 (0)

还没有任何评论哟~