📄 hello.asm
字号:
; "Hello, World!" sample.
; When running in emulator,
; click "User Screen" button
; to see a greeting.
#make_COM#
; COM files are loaded
; at 100h prefix, this line
; informs compiler to adjust
; all labels and jumps
; to be +100h:
ORG 100h
; execution starts here,
; jump over the data string:
JMP start
; data string:
msg DB 'Hello, World!', 0
start:
; set the index register:
MOV SI, 0
next_char:
; get current character:
MOV AL, msg[SI]
; is it zero?
; if so stop printing:
CMP AL, 0
JE stop
; print character in
; teletype mode:
MOV AH, 0Eh
INT 10h
; update index register by 1:
INC SI
; go back to print
; another char:
JMP next_char
; exit here:
stop:
RET
END ; to stop compiler.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -