Hello World in simple assembly language

DATA SEGMENT
    STRING DB 'Hello World!','$'
DATA ENDS

CODE SEGMENT
    ASSUME CS:CODE, DS:DATA
START:
    MOV AX,DATA
    MOV DS,AX
    MOV DX,OFFSET STRING
    MOV AH,09H
    INT 21H
CODE ENDS
END START
AH Features Entry parameters Export parameters
4CH Return to DOS no no
1 Enter a character into AL by keyboard no AL = Character
2 Output the characters of the DL register to the display DL (Store one character)
9 Output a character string ending in "$" to the display DS: Segment address where the string is located
DX: String first address
no
0AH Enter a string from the keyboard to the specified buffer DS: segment address where the buffer is located DX: buffer first address

Guess you like

Origin www.cnblogs.com/wstong/p/12711258.html