hello3.asm
来自「汇编&c语言code」· 汇编 代码 · 共 24 行
ASM
24 行
; Turbo Assembler Copyright (c) 1988, 1991 By Borland International, Inc.
; HELLOPRN.ASM - Display "Hello World" on the printer
; From the Turbo Assembler Users Guide - Getting started
DOSSEG
.MODEL SMALL
.STACK 100h
.DATA
HelloMessage DB 'Hello, world',13,10,12
HELLO_MESSAGE_LENGTH EQU $ - HelloMessage
.CODE
mov ax,@data
mov ds,ax ;set DS to point to the data segment
mov ah,40h ;DOS write to device function #
mov bx,4 ;printer handle
mov cx,HELLO_MESSAGE_LENGTH ;number of characters to print
mov dx,OFFSET HelloMessage ;string to print
int 21h ;print "Hello, world"
mov ah,4ch ;DOS terminate program function #
int 21h ;terminate the program
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?