.data
message "Hello, World", 0
.code
main proc
mov bx, offset message ; message의 주소값
mov cx, 0 ; 인덱스 값
main_loop:
mov ax, 02h ; 한 글자씩 출력하기
mov dx, bx ; message[cx]의 문자를 dl로 옮기기
add dx, cx
mov dl, [dx]
int 21h; 한 글자씩
inc cx ;인덱스변수 값증가
cmp dx, 0 ; 방금 출력한 문자가 널문자?
jne main_loop ; 아니면 널문자 나올때까지반복
mov ah, 4ch ; 종료
int 21h
main endp
end main
어셈블리어를 이제 막 배우는 중인데요
한 글자씩 널문자 아닐때까지 출력하는 코드를 만들어 봤습니다