王爽 汇编语言 实验九

时间:2022-02-02 01:12:14
assume cs:codesg , ds:datasg

datasg segment
db 'welcome to masm!'
datasg ends

codesg segment
start:
mov bx , 0
mov cx , 16
mov si , 0
mov bp , 0744h

mov ax , datasg
mov es , ax
mov ax , 0b800h
mov ds , ax
s1:
mov al , es:[bx]
mov ah , 02h
mov ds:[bp+si] , ax


mov al ,es:[bx]
mov ah , 36
mov ds:[bp+si+00a0h] , ax

mov al ,es:[bx]
mov ah , 113
mov ds:[bp+si+0140h] , ax

inc bx
add si , 2
loop s1

mov ax , 4c00h
int 21h

codesg ends

end start